Friday, 2019-04-05

*** tpb has joined #tomu00:00
*** AmosSam has left #tomu02:31
*** rohitksingh_work has joined #tomu04:53
*** AmosSam has joined #tomu05:17
*** AmosSam_ has quit IRC06:38
*** xobs has quit IRC06:39
*** shalzz has quit IRC06:39
*** nrossi has quit IRC06:39
*** ptotter[m] has quit IRC06:39
*** xobs has joined #tomu07:16
xobsHooray!  Finally have an end-to-end demo of Foboot working!07:16
*** shalzz has joined #tomu07:32
*** ptotter[m] has joined #tomu07:32
*** nrossi has joined #tomu07:32
MadHackerxobs: Yay! Good job. :)07:45
xobsMadHacker: thanks!08:00
xobsFinally figured out the SB_WARMBOOT construct.  Turns out it's really five entries.08:01
*** futarisIRCcloud has quit IRC09:04
MadHackerOh right?09:21
MadHackerThought it was a four-image deal?09:21
MadHackerWhat's the fifth?09:21
xobsYeah, the first entry is the "initial boot" entry, followed by four "reboot" entries.09:21
MadHackerAhh. OK.09:21
MadHackerNo way to loop back to the initial boot one?09:22
xobsIf you set entry 0 and 1 to the same thing, that'll do it.09:22
MadHackerBut that's just using two "slots" for the same image, no?09:22
xobsCorrect09:23
MadHackerAh, hold on, I see though - you can set the address for both to the same point in the flash, so you're not taking up more actual flash space.09:24
MadHackerSo, no big deal. Fair enough.09:24
MadHackerThe lattice tools actually generate a file with four images and a tiny bootloader that just samples two pins to pick which image to use and triggers the warmboot, now I look.09:27
MadHacker This option can be implemented by creating an applet from Deployment Tool as shown in Figure 12.09:27
MadHackerWhen this option is enabled in the applet, the iCE40 FPGA boots normally from power-on or a master reset09:27
MadHacker(CRESET_B = Low pulse), but monitors the value on two PIO pins that are borrowed during configuration, as09:27
MadHackershown in Figure 11. These pins, labeled PIO2/CBSEL0 and PIO2/CBSEL1, tell the FPGA which of the four possible SPI configurations to load into the device.09:27
xobsI think that's what they mean when they refer to "coldboot", whereas "warmboot" means to start from the 0th image and prime the ability to reboot into image 1, 2, 3, or 4.09:30
MadHackerAye, it's just that there's a standard 0th image in the lattice tools that makes it seem there are four images, not five.09:31
MadHackerI've never poked at this end of it, because my iCE40s have all been programmed in SPI slave mode.09:31
MadHacker(from Novena's own FPGA bit-banging)09:32
tntAFAIR the up5k doesn't support the cbsel pins.09:32
xobstnt: that's my understanding, too.09:33
MadHackerNor does the HX from the above. It just supports a 0th image which reads them.09:38
*** futarisIRCcloud has joined #tomu09:40
tntthe doc mentions cbsel for lp & hx. But excludes the up5k from that.09:40
tntso if this is just a sw thing done by icecube, why is that ?09:40
MadHackerPerhaps a minimum image size thing in the ultraplus?09:40
MadHackerOr maybe they just literally never got around to building it. :)09:41
MadHackerNotice the wording above (C+P'd from the programming and configuration datasheet) - This option can be implemented by *creating* an applet from Deployment Tool as shown in Figure 1209:42
MadHackerSo I guess it builds it on the fly09:42
xobsSimilarly, I saw a LEDD block (which they have a hard macro for in the Ultraplus) done in Verilog, presumably for older parts.09:43
tntxobs: that's for the ultralite.09:44
tntthere is apparently a hardip ... but it's buggy so the tool replace it with a soft version using the 'hidden' logic in the smaller parts.09:44
xobstnt: delightful09:44
MadHackerNo harm in designing in some fault-tolerance like that. :)09:45
MadHackerCPU microcode patches are arguably similar.09:45
tntif you look at the "iCE40 Ultra" line, the largest one is the only one that doesn't support the PWM ip. ... because all the LCs are "exposed" to the user, thereis nowhere to hide the soft ip.09:45
*** shalzz has quit IRC10:01
*** ptotter[m] has quit IRC10:01
*** xobs has quit IRC10:01
*** nrossi has quit IRC10:01
futarisIRCcloudxobs: congrats on getting foboot working end to end.10:15
*** xobs has joined #tomu10:18
xobsThere, I added fancy LED effects.10:18
tnthehe.10:20
xobsSo in theory, Foboot (Rescue Mode) is Done.   It can write a single image to offset 262144, and can reboot to that image.10:21
xobsYou can use "dfu-util -e" to boot, or "dfu-util -D [image]" to write a new image.10:21
xobsIt doesn't yet auto-boot.  But baby steps.10:21
futarisIRCcloudxobs: Does it work fine on the hacker version?10:34
xobsfutarisIRCcloud: I don't know!  I should find someone with a development environment setup and ask.10:35
xobsrohitksingh_work: ping?10:35
*** shalzz has joined #tomu10:38
*** ptotter[m] has joined #tomu10:38
*** nrossi has joined #tomu10:38
rohitksingh_workxobs: pong!10:43
xobsYou've got a hacker setup, don't you?10:44
rohitksingh_workxobs: Yup, I've...last I had tried foboot, it wasn't enumerating correcrtly. Seems to have progressed quite a lot now.10:45
rohitksingh_workI'll try the latest design10:45
tntarf, I wanted to give it a quick shot on the icebreaker but 48M vs 12M ... not so quick :p10:47
xobstnt: Not super quick, but the default uses the PLL to generate 48M, so it's a simple change.10:48
*** AmosSam has left #tomu10:50
*** AmosSam has joined #tomu10:59
tntyeah, trying to work that out now ...11:03
*** AmosSam has left #tomu11:06
xobsAnd I'm trying to work out how to re-integrate the BIOS code.11:07
tntyeah when I build the bitstream with "./foboot-bitstream.py --rev icebreaker" ... I get build/gateware/top.bin  but I guess I need to put some software somewhere for it to do anything ?11:15
xobsSorry, I guess it's not quite there yet.  I need to undo the random rom stuff that I've been developing with.11:18
xobsIt's at the state right now where it's lots of little files.11:18
xobshttps://gist.github.com/xobs/410328e964f78d37979e8f483e8310e111:18
tpbTitle: Contents of matching rom ยท GitHub (at gist.github.com)11:18
xobsWith "random.hex" being the output of "foboot-bitstream.py --export-random-rom-file random.hex"11:19
*** AmosSam has joined #tomu11:33
tntit's a shame this was never merged https://sourceware.org/bugzilla/show_bug.cgi?id=1992111:34
tpbTitle: 19921 enable specification of data width when writing verilog hex format (at sourceware.org)11:34
xobsI think my approach will be to modify the software Makefile a bit.11:34
xobsYeah, shame. Though I'm rather proud of myself for writing that in Python and not C.11:36
xobsAnyway, I have a cellotape-and-string solution that I just need to build into the Python Makefile.11:37
xobsOnce that's done, I'll switch gears and get to working on the case.11:37
xobsThat hopefully will finally unblock everyone who has a Hacker version.11:38
tntOh, the led is breathing orange, that's a good sign.11:41
xobs...i should add a csr to indicate the board revision.11:41
tntmm, doesn't enumerate though so I guess I screwed something up somewhere.11:42
xobsDoes it try, though?11:42
xobsThe led is controlled by c code.11:42
tntyes11:42
tnt[1601353.257338] usb 2-1: new full-speed USB device number 104 using xhci_hcd11:42
tnt[1601353.407326] usb 2-1: device descriptor read/64, error -7111:42
xobsThe d+/d- might be swapped.11:42
tntis there any serial output ?11:44
xobsHmm... Could also be a timing issue. I'm only trying it on a Raspberry Pi.11:44
xobsNo serial output... I ran out of room.11:45
tntmmm ... I just did a build --with-debug  and, despite this one failing timing, it enumerates.11:45
tnt[1601577.651447] usb 2-1: Product: Fomu Bootloader (0) v0.1-40-gb40a9ba11:45
xobsOh! Thats a good sign.11:46
tntoh, wait nm ... it works without debug too. But I can't unplug/replug. It only enumerates if it's already plugged into USB when loading the bitstream.11:47
tntand now it works all the time ... weird.11:51
tntand dfu-util finds it :)11:51
*** AmosSam has left #tomu12:25
*** AmosSam has joined #tomu12:46
*** rohitksingh_work has quit IRC12:53
*** futarisIRCcloud has quit IRC13:59
*** jas4711 has quit IRC14:28
*** AmosSam has left #tomu14:37
*** AmosSam has joined #tomu14:37
*** jas4711 has joined #tomu15:13
*** jas4711 has quit IRC15:27
*** jas4711 has joined #tomu15:30
*** emeb has joined #tomu15:33
*** AmosSam has left #tomu17:03
*** AmosSam has joined #tomu17:03
*** AmosSam has left #tomu18:27
*** AmosSam has joined #tomu18:27
*** awe00 has joined #tomu19:09
*** flammit has joined #tomu19:25
*** davidlt_ has joined #tomu22:06
*** davidlt has quit IRC22:09
*** MadHacker has quit IRC22:09
*** davidlt_ is now known as davidlt22:10
*** MadHacker has joined #tomu22:13

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!