Monday, 2019-04-22

*** tpb has joined #tomu00:00
futarisIRCcloudxobs: Sweet. loopback is always the best simple test.00:54
xobsfutarisIRCcloud: simple but effective!  It should be enough to hook up Python now.00:55
futarisIRCcloudxobs: I take it I have to install nextpnr, icestorm and yosys from source?00:59
xobsfutarisIRCcloud: better suggestions are welcome. I have prebuilt versions for Raspberry Pi, but that's not really feasible for synthesizing all of Foboot.01:02
xobsFPGAwars has some binaries: https://github.com/FPGAwars/toolchain-ice40/releases01:02
tpbTitle: Releases · FPGAwars/toolchain-ice40 · GitHub (at github.com)01:02
futarisIRCcloudMaybe best just throw the instructions from http://www.clifford.at/icestorm/ at the top of the readme and/or point to the toolchain-ice40 ...01:10
tpbTitle: Project IceStorm (at www.clifford.at)01:10
futarisIRCcloudxobs: Using latest git for everything:01:37
futarisIRCcloudERROR: Cell 'SB_IO_11' cannot be bound to bel 'X19/Y0/io1' since it is already bound to cell 'SB_IO_6'01:37
futarisIRCcloudERROR: Placing design failed.01:37
futarisIRCcloud--revision hacker01:38
xobsfutarisIRCcloud: add --placer heap01:39
futarisIRCcloudcommit 29640c5a9237ab689befa6c354c5e159e8ae9826  / im-tomu/foboot/hw$ python3 foboot-bitstream.py --revision hacker --placer heap01:42
futarisIRCcloudgives the same error message01:42
futarisIRCcloudtag v1.1 works.01:44
xobsOh, I must've messed up the touch pads then.02:09
xobsYeah, that's what I did.  Oops.  I reused "F2" as the "WP" line.  Oops.02:10
xobsTry that? (I'm rebuilding it too)02:12
futarisIRCcloudOk. Building now.02:15
futarisIRCcloudBuilt ok.02:19
xobsYour machine is much faster than mine.  Still routing.02:20
futarisIRCcloudQuad core i5-7300HQ.02:23
polloHey folks! I've got a hacker fomu board but no SPI programmer and I was wondering if people here could recommend something02:42
polloI'm not sure I want an RPI (I seems a simple USB one would be simpler and cheaper)02:48
xobspollo: I'm not sure what options there are for bit banging gpios on a desktop. I gather ftdi chips allow for that, but drivers are an issue then.02:50
xobsI went with a pi because it meant not having to deal with drivers or differing platforms.02:51
polloI really have no experience in that domain so if you say the RPI is the way to go, I'll happily go that way :D02:51
polloIs there an RPI version I should be targeting?02:52
xobsThis is an evolving situation. futarisIRCcloud is just testing the bootloader on a Hacker board now.02:53
xobsI've been trying to build a new rpi image, but my local Raspbian mirror is missing a random assortment of packages. I think they're updating things.02:54
futarisIRCcloudI just finished flashing v1.2.7 Fomu-Dev onto my SD card. Let me see if I can get giomasce 's poor man's programmer to work.02:58
*** ewen has joined #tomu03:28
ewenxobs: futarisIRCcloud: in case it helps (re yosys / nextpnr / ...), mithro's litex-buildenv conda repo has pre-built versions of (most of) those, which could be installed via litex-buildenv or possibly more directly via conda.03:30
futarisIRCcloudCheers.03:30
futarisIRCcloudNow I just need to get the pinouts right for the Raspberry Pi (1) B ...03:31
ewenI'm using the Raspberry Pi image (1.2.8 + htpdate package update) for dev testing, on a recent Raspberry Pi 3B+, and it's fine for smaller examples; I've not tried foboot yet.03:31
ewen(I've also not got hacker Fomus, just EVT2 and EVT3, which are Pi shields anyway.)03:31
xobsewen: speaking of which, it looks like the packages finally succeeded in downloading, so 1.2.9 should be done soon.03:32
xobs(In an hour or two)03:32
ewenxobs: Yay!03:33
ewenfutarisIRCcloud: https://anaconda.org/TimVideos/repo is the repo.  Seemsto have recently rebuilt yosys, nextpnr, and icestorm (for x86-64).03:33
ewenfutarisIRCcloud: Amongst other things they're used for TinyFPGA BX and other iCE40 based boards.03:33
ewen(I suspect they might not have the heap placer enabled though, which xob's Raspberry Pi build of nextpnr does have enabled; I've successfully used the nextpnr heap placer for small EVT tests.)03:34
mithroewen: recent versions of cobra seem to support RPi architectures03:34
mithroI may not have enabled the heap placer?03:35
ewenmithro: AFAICT from https://github.com/timvideos/conda-hdmi2usb-packages/commits/master the only updates since my work in Feb was and iverlog build recipe fix.  heap placer didn't get added until March-ish from memory.03:36
tpbTitle: Commits · timvideos/conda-hdmi2usb-packages · GitHub (at github.com)03:36
ewenmithro: re "recent versions of cobra", what is "cobra" in that context?03:38
mithroMy phone autocorrecting conda03:39
ewenmithro: I wondered if that was it :-)03:40
ewenmithro: Raspberry Pi support in conda could be useful, especially for fomu users.03:40
mithroThere is also https://github.com/SymbiFlow/conda-packages03:41
tpbTitle: GitHub - SymbiFlow/conda-packages: Conda build recipes for the toolchains needed by LiteX / MiSoC firmware (at github.com)03:41
xobsmithro: you have pogo pins for the portable jig, right?03:42
ewenFTR, looks like nextpnr HeAP placer was added 2019-02-26: https://github.com/YosysHQ/nextpnr/commit/7142db28a8b828da557729a706c20c8f330ba12903:50
tpbTitle: HeAP: Make HeAP placer optional · YosysHQ/[email protected] · GitHub (at github.com)03:50
ewenLooks like recent nextpnr defaults to building HeAP if it's not turned off (https://github.com/timvideos/nextpnr/blob/5344bc3b65f4e06f983db781e9a82d30b3f1512b/CMakeLists.txt#L8) and we don't turn it off (https://github.com/timvideos/conda-hdmi2usb-packages/blob/7bb4638f9c356d2409c29fb7ef0c53ad4b630a3a/nextpnr/build.sh#L10), so the recent pull of nextpnr and recent conda rebuild might actually have picked it up.03:54
tpbTitle: nextpnr/CMakeLists.txt at 5344bc3b65f4e06f983db781e9a82d30b3f1512b · timvideos/nextpnr · GitHub (at github.com)03:54
mithroxobs: Yes03:55
futarisIRCcloudhttps://usercontent.irccloud-cdn.com/file/xNWeYBks/20190422_141106.jpg04:19
ewenfutarisIRCcloud: That's a pretty elegant "fake programming jig" :-)04:20
futarisIRCcloudhttps://usercontent.irccloud-cdn.com/file/BsMGXnkf/Screenshot%20from%202019-04-22%2014-12-49.png04:21
futarisIRCcloudAnd it detects!04:21
futarisIRCcloudxobs / ewen: Can someone confirm that I should just need to run 'fomu-flash -w build/gateware/top-multiboot.bin' and then 'fomu-flash -r' to get the hacker board working?04:29
xobsfutarisIRCcloud: that should be it, yes.04:30
xobsYou can verify the SPI flash, too.04:30
xobs"fomu-flash -v build/gateware/top-multiboot" just to make sure it wrote.04:30
futarisIRCcloudhttps://usercontent.irccloud-cdn.com/file/bOmO4YfQ/Screenshot%20from%202019-04-22%2014-23-48.png04:32
futarisIRCcloudLooks like it worked. LED is blinking04:32
ewenxobs: Do you remember if EVT clock is 48Mhz?  And also if the uart_tx/uart_rx are wired to Raspberry Pi /dev/ttyS0 serial port lines?04:32
xobsewen: yes to both04:32
xobsI disabled the UART because it ended up getting pretty large, and the DVT/hacker boards have no UART.04:32
ewenxobs: Cool, thanks.  I'm guessing I might need to cross tx/rx to get this test example to build.04:33
xobsBut you might be able to build with "--debug=uart".  I dunno if it'll fit.04:33
ewenxobs: (This is with a zipcpu tutorial example I'm trying to test out: https://zipcpu.com/tutorial/lsn-05-serialtx.pdf and https://zipcpu.com/tutorial/ex-05-hello.tgz, which has no CPU, etc, so it's tiny: just state machine outputting serial at 115k2)04:33
xobsOh cool!  Then yeah, that should work.04:34
xobsThe rpi serial port is actually /dev/ttyAMA004:34
xobsThe file /dev/ttyS0 is something else.04:34
futarisIRCcloudNow, I should swap the pins to another board and test that this one enumerates.04:34
ewenxobs: Ah, that'd explain why I'm not seeing output.  Thanks, I'll try /dev/ttyAMA0.04:35
ewenxobs: Success, it's telling me "Hello World!" once a second (with RX/TX crossed as I'd guessed).04:36
ewenFor anyone playing along at home, https://www.raspberrypi.org/documentation/configuration/uart.md explains there are *two* UARTs on the Raspberry Pi; /dev/ttyS0 is the "mini UART", and /dev/ttyAMA0 is the "PL011", typically.  Looks like /dev/serial0 is a more reliable name for "the primary UART" though, as it appears which is the primary UART varies by Raspberry Pi board.04:39
futarisIRCcloudAnd now I have two fomu hacker boards flashed...04:43
ewenfutarisIRCcloud: Woot!04:43
futarisIRCcloudhttps://usercontent.irccloud-cdn.com/file/yqeL5umw/Screenshot%20from%202019-04-22%2014-38-44.png04:46
xobsHooray!04:47
xobsI should tag a new release.04:47
futarisIRCcloudxobs: 722aee3 enumerates04:47
xobsI think the gateware is mostly settled.  I'm just working on the software now.04:47
xobsEventually I'd like to open up a 512-byte chunk of BRAM to allow passing information to the bootloader, but aside from that the gateware is "done".04:48
futarisIRCcloudWe can always reflash the bootloader from the app, if we need to. Are you locking the bootloader yet?04:49
xobsI'm not locking the flash yet, no.04:49
*** rohitksingh_work has joined #tomu04:49
futarisIRCcloudhttps://usercontent.irccloud-cdn.com/file/WCPFXzrv/20190422_145628.jpg05:04
xobsfutarisIRCcloud: wow! such program.05:06
xobsMe: "I wonder why this DFU modification isn't writing properly?"05:06
xobsAlso me: "Oh, let me just hook up the debugger."05:06
futarisIRCcloudDebugging the USB over USB. :)05:07
xobsWell, it works!05:08
xobsThough I find myself asking now if I can speed it up at all.  Is that a bad sign?05:08
futarisIRCcloudHow fast can we toggle the IOs on the connector?05:15
ewenxobs: "faster" is probably a software/firmware 2.x feature.  ("reliable" is probably the most useful 1.0 feature.  Just Saying.)05:16
xobsewen: agreed on that.05:16
xobsfutarisIRCcloud: if it's coming from a clock buffer, the datasheet seems to indicate the maximum frequency is 417 MHz (2.4 ns)05:19
* xobs uploaded an image: image.png (128KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/FoUCDlZuOtoUaAMpDoNXiIJx >05:20
futarisIRCcloudSo, it depends on the speed of the logic...05:21
futarisIRCcloudI guess monochrome DVI would be possible, or 8 color VGA.05:21
xobsI thought someone got HDMI working on Glasgow, or something similar.05:24
tnt you only have 4 IOs that's a bit short ...05:26
tntUsing an external hdmi encoder I got 1080p60 output on the icebreaker, but I'm using 8 IOs.05:28
futarisIRCcloudhttps://github.com/smunaut/ice40-playground/commit/8d856f44939bc07bcd1791c2174861227687f15f ?05:34
tpbTitle: projects/hdmi_text: Import demo code for the HDMI text on the iCEBreaker · smunaut/[email protected] · GitHub (at github.com)05:34
tntfutarisIRCcloud: yes05:42
futarisIRCcloudWe should be able to run zephyr in 128kb of RAM... It'll run in 8kb apparently.05:56
xobsI've thought about adding a feature to let you use dfu-util to upload a riscv program into ram. That'd make os development easier, I think.05:58
futarisIRCcloudI should probably just add qemu riscv support to litex-buildenv ...06:00
futarisIRCcloudI guess if the gateware for the valentyusb is finalised, we can add a qemu model for the USB device easily enough.06:00
xobsAlright, I added a shortcut.  If your binary contains the magic number "0x17ab0f23" within the first 64 bytes, then the program is loaded to the offset immediately following that number, instead of getting written to flash.06:55
xobsThat should make the development cycle much shorter.06:56
xobs(Assuming your program fits in 124 kilobytes)06:56
futarisIRCcloudhttps://github.com/im-tomu/fomu-pi-gen/releases/tag/v1.2.9-fomu08:45
futarisIRCcloudhttps://youtu.be/-kpnTM_b4u8?t=13908:45
tpbTitle: Release Its About Time · im-tomu/fomu-pi-gen · GitHub (at github.com)08:45
xobsNow I understand how Linux gets codenames like "Pink Farting Weasel" and "Displaced Humerous Anterior"08:48
*** ewen has quit IRC09:32
*** futarisIRCcloud has quit IRC12:49
*** rohitksingh_work has quit IRC12:58
mithroMorning!14:50
xobsGood morning!14:51
*** emeb has joined #tomu15:54
*** AmosSam has left #tomu17:17
*** AmosSam has joined #tomu17:25
*** AmosSam has left #tomu17:47
*** AmosSam has joined #tomu17:55
*** AmosSam has left #tomu18:15
*** AmosSam has joined #tomu18:27
*** flammit has quit IRC21:01
*** jacobrosenthal has quit IRC21:13
*** jacobrosenthal has joined #tomu21:15
*** flammit has joined #tomu21:19
*** hegemoOn has quit IRC22:07
*** hegemoOn has joined #tomu22:07
*** samueldr has quit IRC22:07
*** samueldr has joined #tomu22:09
*** jacobrosenthal has quit IRC22:15
*** jacobrosenthal has joined #tomu22:15
*** eaterof has joined #tomu22:20
*** jerith_ has joined #tomu22:21
*** migy__ has joined #tomu22:23
*** eater has quit IRC22:24
*** AmosSam has quit IRC22:24
*** jerith has quit IRC22:24
*** migy_ has quit IRC22:24
*** tnt has quit IRC22:24
*** andi- has quit IRC22:24
*** tnt has joined #tomu22:28
*** andi- has joined #tomu22:29
*** futarisIRCcloud has joined #tomu23:01

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