Saturday, 2020-01-11

*** tpb has joined #tomu00:00
MadHackergurke_: I think you're mostly reading the sampling performance of your meter.00:01
gurke_uhm, true, that could also make sense :-)00:02
gurke_i'm always forgetting about the electrical part00:02
MadHackerMm. There's no such thing as a purely digital output. :)00:02
gurke_it's a 60 mhz analog oscilloscope and i do have to push it to the limits, yes00:02
gurke_yes :-)00:03
MadHackerUnless your probes are very good, the actual bandwidth won't even be 60, unfortunately.00:03
gurke_yes00:03
gurke_but i can read out the 48 MHz - even though the signal looks not very rectangular anymore00:04
MadHackerYep, that's reasonable.00:04
gurke_thanks!00:04
MadHackerAnyway; on your original question: You won't need to do anything special to output from a signal, sync or otherwise. Just specify its connection to the physical pins and you should be fine.00:05
gurke_ok, i was just wondering about https://github.com/im-tomu/fomu-workshop/blob/master/verilog/blink-expanded/blink.v#L6800:06
tpbTitle: fomu-workshop/blink.v at master · im-tomu/fomu-workshop · GitHub (at github.com)00:06
gurke_what's the buffering for?00:06
MadHackerClock signals are special, because there's an internal clock distribution network inside the FPGA to connect it to all the flip-flops without delays etc.00:07
MadHackerIn the case of that example, the code is instantiatng a clock buffer explicitly to connect a clock pin to the internal clock network.00:08
gurke_ah, ok, makes sense00:09
MadHackerhttps://www.latticesemi.com/-/media/LatticeSemi/Documents/ApplicationNotes/IK/iCE40sysCLOCKPLLDesignandUsageGuide.ashx?document_id=47778 is the ice40 clocking datasheet and should explain the SB_GB bit properly.00:10
gurke_yep, i've already read that00:10
MadHackerSo, on page 2, you'll see it says " To use a global buffer along with a user interface or PIO, use the SB_GB primitive if it is not inferred automatically"00:11
MadHackerIt's inferred automatically pretty often.00:11
gurke_ok - and otherwise i'd notice probably?00:11
MadHackerProbably. I think you'll get warnings out of the build chain grumbling about using normal fabric signals for clocks.00:12
MadHackerI know you do on the Xilinx toolchains; I've never run into it on ice40, but I've never really put myself into situations where I'd expect inference to struggle.00:12
gurke_ok00:13
gurke_you may have noticed that i'm actually pretty new to FPGAs00:13
gurke_but thanks a lot - that helps so far!00:16
MadHackerNo problem. A lot of folks in the same position here, the more folks playing with them, the merrier. :)00:17
*** im-tomu has left #tomu00:25
*** im-tomu has joined #tomu00:25
xobsThe ICE40 is small enough that we could probably get away without buffering.00:29
xobsBut, for example, early versions of the USB core just used a flip-flop to divide down the 48 MHz clock to get 12 MHz, but we ran into phase alignment issues.00:30
xobsIt would work sometimes, and on some boards with some machines.  Sometimes even only on some USB ports.00:30
gurke_oh, i see00:31
xobsBottom line: clocks are weird.00:32
xobsI mean, even on real asics they're weird. Some ungodly high percentage of lots of chips are dedicated to clock routing.00:33
gurke_i think, more generally, time is a weird concept ;-)00:34
xobsWhat even is time.00:34
*** ewen has joined #tomu01:02
*** xkapastel has quit IRC02:00
mithroxobs: http://www.contrib.andrew.cmu.edu/~somlo/BTCP/03:08
tpbTitle: A Trustworthy, Free (Libre), Linux Capable, Self-Hosting 64bit RISC-V Computer (at www.contrib.andrew.cmu.edu)03:08
mithroOpps wrong url03:09
mithrohttps://groups.google.com/d/msgid/linux-litex/20200111015354.GA29609%40crash.ini.cmu.edu03:09
tpbTitle: Google Groups (at groups.google.com)03:09
*** im-tomu has left #tomu04:49
*** im-tomu has joined #tomu04:49
*** im-tomu has left #tomu06:07
*** im-tomu has joined #tomu06:07
*** im-tomu has left #tomu06:38
*** im-tomu has joined #tomu06:38
*** ewen has quit IRC06:50
*** tac-tics has joined #tomu07:07
tac-ticsIs it to be expected that, after running dfu-util -D <FILE>, I can't run it a second time to flash a second file instead?07:10
tac-ticsI've been having to unplug my Fomu each time07:10
tac-ticsAlso, I'm following the steps on https://workshop.fomu.im Everything has worked perfectly up to the Rust example. However, starting with the Verilog section, the examples seem not to work at all. Both the LED blink and Litex leave the board unblinking and unable to talk over the bus.07:15
*** tommythorn has joined #tomu07:18
tac-ticsAnd it seems as though the verilog directory got renamed, but the documentation hasn't been updated in the rst file.07:18
tac-tics(or perhaps the website just hasn't been updated that recently).07:20
tommythornIs getting “state(10) = dfuERROR, status(8) = Cannot program memory due to received address that is out of range” a known issue when trying to update the bootloader to pvt-updater-v2.0.3.dfu ?07:21
tommythornI followed https://workshop.fomu.im/en/latest/bootloader.html07:22
tac-ticsI didn't get any errors of any sort.07:25
tac-ticsAlso, I *think* I have the hacker version, but at the same time, when I went through the Python example, it seemed like I had the pvt version of the board.07:25
tac-ticsIt definitely looks like the hacker version07:25
tommythornThanks.  I got mine through Crowdsupply, and it’s definitely pvt07:28
*** tommythorn has quit IRC07:39
gurke_tac-tics: DFU is provided by the bootloader which flashes a single file and then "executes" it08:22
*** ewen has joined #tomu08:23
gurke_tac-tics: so you cannot flash a second file, however after re-plugging, you can start the file you've flashed before again using dfu-util -e08:23
gurke_tac-tics: yes, the verilog section is outdated, I'm working on a pull request to fix that currently08:24
tac-ticsWhat does the `wishbone-tool 0xe0006000 0xac` command effectively do then? If I flash micropython onto the board, then run that command, I somehow get the DFU device to appear again in `dfu-utils -l`08:24
tac-ticsah, nice08:25
gurke_ok, the bootloader is a bit more complicated :-)08:25
gurke_there are different things happening08:25
tac-ticsheh08:25
tac-ticsIt's something I'd like to learn more about08:25
tac-ticssometime08:25
gurke_the bootloader loads a RISC-V cpu into the fpga and executes on it08:26
gurke_if you flash micropython, it is executed on the very same cpu set up by the bootloader08:26
tac-ticsThe RISC-V softcore is just stored on the SPI flash with everything else, right?08:26
tac-ticsIf you're not careful, you can erase it and brick the device, can't you?08:26
gurke_the bootloader also configures some configuration and status registers, among them the 0xe000600008:27
gurke_using the 0xe0006000 register, you can direct the fpga to load some other bitstream (or reload the first one with the bootloader)08:27
tac-ticsah08:27
gurke_however, if you load a "simple" verilog/migen bitstream without bootloader, then those registers do not exist and you have to physically unplug fomu to get back08:28
gurke_more can be found here: http://rm.fomu.im/08:28
tpbTitle: Documentation for Fomu Bootloader Fomu Bootloader documentation (at rm.fomu.im)08:28
tac-ticsthanks08:28
gurke_and yes, the softcore is also stored on the flash08:28
gurke_however, the bootloader normally prevents you from overwriting things, so you can freely experiment by flashing stuff08:29
gurke_you would have to be careful if you start poking around in the flash directly over SPI08:29
tac-ticsBecause the USB is handled in the softcore, I imagine once you brick the thing, you might as well use the device as a USB dust protector, right? :)08:30
tac-ticsIn other words, there's no way to flash anything onto the drive if you put the SPI into a bad enough state08:31
gurke_there are some testpads on the board which can be used to flash, however i guess that's quite a fiddly thing to do if you do not have the appropriate jig08:31
gurke_(never tried that)08:32
tac-ticsMy level of hardware expertise is that if I need a solder gun to fix it, I just throw the thing away. It's clearly hopeless.08:32
gurke_you don't have to go that far ;-)08:33
gurke_i think the thing is quite hard to brick unless you try to do so on purpose (or do weird things on the SPI)08:33
tac-ticsThe tutorial showed how you can inspect the SPI in micropython. I was assuming that meant arbitrary poke and peek of memory.08:34
tac-ticsAnd if not in micropython, then perhaps in assembly.08:34
tac-ticsAlthough, I would think a sensible way to prevent that would be to avoid memory mapping those parts of the SPI on the bus.08:34
gurke_well, reading out should never be an issue08:35
gurke_however, I'm also only two weeks into the project now - so not everything might be 100% correct08:35
tac-ticsIn any case, I'll be eagerly awaiting your verilog blinky fix.08:36
gurke_i've basically read the source for the bootloader, which showed me how a lot of things work: https://github.com/im-tomu/foboot08:36
tpbTitle: GitHub - im-tomu/foboot: Bootloader for Fomu (at github.com)08:36
gurke_tac-tics: did you try the blink-expanded? this one should actually work if you set the correct environment variable (export FOMU_REV=pvt if you have a production fomu)08:37
*** ewen has quit IRC08:38
tac-ticsI tried both with FOMU_REV=pvt and =hacker, but while both seem to program without error, both leave the device with the LED off.08:40
gurke_and you get something like "Built 'blink' for Fomu pvt" at the end of make?08:41
tac-ticsBuilt 'blink' for Fomu hacker08:41
gurke_and you have a hacker version?08:42
tac-ticsI'm prettty sure08:44
gurke_ok, no clue then, sorry08:44
tac-ticsmaybe08:44
tac-ticsactually, the device itself reports 'P' for production in one of the registers08:45
tac-ticsand the die actually looks more like the PVT08:45
tac-ticsbut the color is different. Mine is blue.08:45
tac-ticsMine must be a pvt after all08:45
tac-ticswtf. ok. whatever. it works now08:49
*** gio has quit IRC08:56
tac-ticsOh. And at least according to this brief explanation, it seems that there's a boot rom at 0x0000_0000. I would think that that means you can't clobber the base image quite as easily as I was thinking.08:59
*** im-tomu has left #tomu09:36
*** im-tomu has joined #tomu09:36
*** gio has joined #tomu09:49
*** im-tomu has left #tomu10:15
*** im-tomu has joined #tomu10:16
*** im-tomu has left #tomu12:43
*** im-tomu has joined #tomu12:43
futarisIRCcloudhttps://twitter.com/GregDavill/status/1215923939634888704?s=1912:52
*** im-tomu has left #tomu13:06
*** im-tomu has joined #tomu13:07
*** im-tomu has left #tomu15:08
*** im-tomu has joined #tomu15:08
*** coderobe has quit IRC17:15
*** coderobe has joined #tomu17:15
*** im-tomu has left #tomu17:46
*** im-tomu has joined #tomu17:46
*** im-tomu has left #tomu18:28
*** im-tomu has joined #tomu18:28
*** tpb has joined #tomu18:55
*** gio has quit IRC19:22
*** earthnative has quit IRC19:22
*** gio has joined #tomu19:24
*** earthnative has joined #tomu19:28
*** cdmatter has quit IRC21:50
*** GNUtoo has quit IRC22:02
*** GNUtoo has joined #tomu22:02
*** cdmatter has joined #tomu23:08
*** cdmatter has quit IRC23:12
*** cdmatter has joined #tomu23:18

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