Wednesday, 2018-12-19

*** tpb has joined #timvideos00:00
xobsmithro: I would expect that yes.00:06
xobsI know not all devices implement all commands, so I read as many as I can find.00:09
mithroxobs: https://git.xobs.io/xobs/fomu-flash/issues/400:09
tpbTitle: #4 - Support Adesto flash - Gitea: Git with a cup of tea (at git.xobs.io)00:09
mithroxobs: It does look like the device should support 0x02 write command? https://github.com/tinyfpga/TinyFPGA-Bootloader/blob/master/programmer/tinyprog/__init__.py#L35700:11
tpbTitle: TinyFPGA-Bootloader/__init__.py at master · tinyfpga/TinyFPGA-Bootloader · GitHub (at github.com)00:11
mithroxobs: The current behaviour I see is https://git.xobs.io/xobs/fomu-flash/issues/4#issuecomment-2000:12
tpbTitle: #4 - Support Adesto flash - Gitea: Git with a cup of tea (at git.xobs.io)00:12
mithroxobs: Would be first good to know if I'm using it right :-P00:14
CarlFKmithro: can you either accept my PR as is, or reply to my questions about: grep 'timvideos/litex-buildenv|timvideos/HDMI2USB-litex-firmware'00:15
CarlFKmithro: and maybe some #comments about why it is grepping remote's would be nice so I have a better idea what it is doing00:17
mithroCarlFK: It's trying to figure out what is the latest revision in your tree that is also upstream on the builder00:18
mithroCarlFK: So, actually it should only be looking for timvideos/HDMI2USB-litex-firmware as that repo is the only one which pushes to the prebuilt repo00:19
CarlFKmithro: then it should not be grepping "git remote", right?00:20
mithroCarlFK: it needs to find out what the local name is for the upstream repo?00:22
*** samsagaz has quit IRC00:23
CarlFKmithro: I don't get it.    https://github.com/timvideos/litex-buildenv/wiki/HowTo-FuPy-on-a-Digilent-Arty-A7#download-the-build-environment has:00:37
tpbTitle: HowTo FuPy on a Digilent Arty A7 · timvideos/litex-buildenv Wiki · GitHub (at github.com)00:37
CarlFKgit clone https://github.com/timvideos/litex-buildenv.git00:37
tpbTitle: GitHub - timvideos/litex-buildenv: An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! (at github.com)00:37
CarlFKcd ... ; ./scripts/download-env.sh00:37
CarlFKwhy would "git remote" show HDMI2USB-litex-firmware ?00:38
mithroCarlFK: litex-buildenv and HDMI2USB-litex-firmware actually have the same contents00:38
CarlFKmithro: im still lost.  /litex-buildenv$ git remote -v00:42
CarlFKoriginhttps://github.com/timvideos/litex-buildenv.git (fetch)00:42
CarlFKoriginhttps://github.com/timvideos/litex-buildenv.git (push)00:42
tpbTitle: GitHub - timvideos/litex-buildenv: An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! (at github.com)00:42
tpbTitle: GitHub - timvideos/litex-buildenv: An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! (at github.com)00:42
CarlFKno HDMI2USB-litex-firmware00:42
mithroCarlFK: Sure - something should do a "git remoate add tv-h2u https://github.com/timvideos/HDMI2USB-litex-firmware.git"01:00
CarlFKmithro: how about for now have the HowTo-FuPy  use my repo:  git clone repo https://github.com/CarlFK/litex-buildenv/01:03
tpbTitle: GitHub - CarlFK/litex-buildenv: An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! (at github.com)01:03
mithroCarlFK: ?01:07
CarlFKmithro: this section  https://github.com/timvideos/litex-buildenv/wiki/HowTo-FuPy-on-a-Digilent-Arty-A7#download-the-build-environment01:11
tpbTitle: HowTo FuPy on a Digilent Arty A7 · timvideos/litex-buildenv Wiki · GitHub (at github.com)01:11
CarlFK- git clone https://github.com/timvideos/litex-buildenv.git01:11
tpbTitle: GitHub - timvideos/litex-buildenv: An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! (at github.com)01:11
CarlFK+ git clone https://github.com/CarlFK/litex-buildenv/01:11
tpbTitle: GitHub - CarlFK/litex-buildenv: An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! (at github.com)01:11
mithroCarlFK: change it to "git clone https://github.com/timvideos/HDMI2USB-litex-firmware.git" if you want to use the prebuilt firmware for now01:13
mithroxobs: https://docs.google.com/drawings/d/1jr1GA0f9aSGsO-cZbMaKLTKsMyf7a11hyPqtgNesKKI/edit01:14
tpbTitle: valentyusb Endpoint FSM - Google Drawings (at docs.google.com)01:14
mithroxobs: https://docs.google.com/drawings/d/1olpdWXglPGzJdW_R1DwWviBumlCetyuSZjl-luO_Xe8/edit01:15
tpbTitle: valentyusb - Parts - Google Drawings (at docs.google.com)01:15
mithrotinyfpga: ping?01:16
CarlFKmithro: that only gets past problem #1.  #2 is the 404: svn: E170000: URL 'https://github.com/timvideos/HDMI2USB-firmware-prebuilt/trunk/archive/master/v0.0.4-444-gf271c2a/arty/base/lm32' doesn't exist01:30
mithroCarlFK: correct - looks like there isn't any lm32 in https://github.com/timvideos/HDMI2USB-firmware-prebuilt/tree/master/archive/master/v0.0.4-444-gf271c2a/arty/base01:31
tpbTitle: HDMI2USB-firmware-prebuilt/archive/master/v0.0.4-444-gf271c2a/arty/base at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at github.com)01:31
CarlFKmithro: I have to run, I'll get back on this in an hour, and for sure tomorrow morning01:31
mithrohttps://travis-ci.org/timvideos/HDMI2USB-litex-firmware/jobs/46962065101:32
tpbTitle: Travis CI - Test and Deploy Your Code with Confidence (at travis-ci.org)01:32
mithrosvn: E160024: MERGE failed01:32
*** CarlFK has quit IRC01:40
mithroxobs: https://docs.google.com/drawings/d/1srX-CqYGcCHrSrwacdKM-4Ir_ptvMbKja0NggQfmsLM/edit02:00
tpbTitle: valentyusb Endpoint Bits - Google Drawings (at docs.google.com)02:00
xobsmithro: ooh, those are super useful02:30
*** CarlFK has joined #timvideos02:33
*** ChanServ sets mode: +v CarlFK02:33
mithroI'm going to grab dinner02:47
*** samsagaz has joined #timvideos03:17
mithroback now03:20
mithroxobs: Any luck?03:20
xobsmithro: got fomu-flash to work, so now I'm working on fixing some quirks.03:20
mithro\o/03:21
xobsThe Winbond part I'm using requires you send either 50h OR 06h, but most other parts require 06h AND 50h.  So I'm adding that now.03:21
CarlFKmithro: Gateware downloaded!  thank you!!!03:23
mithroxobs: Have you been able to talk to the iCE40?03:24
xobsmithro: I haven't done that yet on your board, since I'm still qualifying the SPI flash stuff.03:25
xobsBut you should be able to generate a top.bin file that e.g. does blinky LED and upload it with "fomu-flash -f top.bin"03:25
CarlFKwee!!! MicroPython v1.9.4-534-gd2bd404 on 2018-12-18; litex with lm3203:34
CarlFKmithro: how much is 100 fumos?03:42
mithroCarlFK: That is a question for xobs03:43
CarlFKxobs: : how much is 100 fumos?03:43
xobsCarlFK: $199903:43
xobsInteresting, you're not the first person to call it "Fumo".03:44
*** rohitksingh_work has joined #timvideos03:44
CarlFKfomu?03:45
xobsFomu!  The FPGA version of Tomu!04:03
CarlFKyou assume I can remember how to spell tomu ;)04:15
CarlFKoh wait... wat?04:16
mithroxobs: I'm thinking I might bring the Fomu Jig to CCC04:52
xobsmithro: okay, that'll be fun to see.04:53
mithroI'm going to head out now04:55
xobssounds good.  I'm just adding the ability to update security registers.04:56
mithroxobs: For the USB firmware you want04:56
mithrocd third_party/valentyusb/third_party/tinyusb04:56
mithromake -C examples/device/cdc_msc_hid BOARD=valentyusb clean && make -C examples/device/cdc_msc_hid BOARD=valentyusb04:56
mithroxobs: then in the top level directory04:56
mithroln -s $PWD/third_party/valentyusb/third_party/tinyusb/examples/device/cdc_msc_hid/build-valentyusb/valentyusb-firmware.bin build/tinyfpga_bx_usb_lm32.lite//software/tinyusb/firmware.bin04:56
mithroand export FIRMWARE=tinyusb04:57
*** CarlFK has quit IRC05:34
xobsmithro: security register stuff should work now.05:43
xobsI just added the ability to dump security registers, not save them.06:13
*** CarlFK has joined #timvideos06:52
*** ChanServ sets mode: +v CarlFK06:52
xobsgeneral question: is there any existing litex project that uses icebram to replace the bios without rebuilding everything?06:54
_florent_xobs: i'm not aware of that (but would also be interested :)), maybe mithro or cr1901_modern have tested it07:06
CarlFKMicroPython v1.9.4-757-g39eef27 on 2018-12-19; linux version - yay.07:26
xobs_florent_: is there an easy way to write random data to rom?  my integrated_rom_size is 0x2000, and I'd like to fill it full of random data.10:29
xobswoo! good news: I managed to patch the bios without rebuilding anything?11:32
xobsbad news: icebram looks like it uses heuristics to figure out which memory blocks to patch, so I had to hack up migen to fill ram with random data.11:32
*** Kripton has quit IRC11:38
*** Kripton has joined #timvideos12:00
*** rohitksingh_work has quit IRC12:14
_florent_xobs: nice, can you share your hack and explain the steps?12:47
xobs_florent_: would it be better if I opened an issue?  largely, it involves filling the rom with random data.12:48
xobsI have a C program I've written that massages things into a format that makes the icestorm tools happy, and I'd like some help porting that to python.12:49
_florent_xobs: an issue is fine yes, thanks12:49
xobshttps://github.com/enjoy-digital/litex/issues/14213:40
tpbTitle: Support patching ICE40 SRAM images · Issue #142 · enjoy-digital/litex · GitHub (at github.com)13:40
xobsI had to add byteswapping to get it working on lm32, but it works now!13:40
_florent_thanks13:47
xobsmithro: \o/ "New USB device found, idVendor=cafe, idProduct=4001"13:47
xobsThis is very very good!13:48
xobsI'm building a bitstream with a random ROM, then I'm building a USB example from tinyusb and replacing the random BIOS with that image.13:49
xobsThis way I'm able to quickly iterate on the software without rebuilding the entire bitstream.13:49
xobsFurthermore, reloading bitstreams is much faster than reflashing spi.  it shows as 0.211s according to "time".13:50
*** rohitksingh has joined #timvideos14:38
xobsThe Fomu campaign is live now: https://www.crowdsupply.com/sutajio-kosagi/fomu/14:43
tpbTitle: Fomu | Crowd Supply (at www.crowdsupply.com)14:43
cr1901_modernxobs: I'm working on the icebram thing16:09
xobscr1901_modern: cool, what's your approach?16:09
cr1901_modernmake it a Makefile target that generates a dummy bram image, inject that into make.py using a special FIRMWARE= target to create a base image. Then everytime you just want to reload new firmware, you call "make firmware" and "make reload-bram" or something16:12
cr1901_modernxobs: This is for litex-buildenv specificallyt16:12
xobsthat sounds super useful, and close-ish to what I'm doing.16:16
xobsOne problem I've run into right now is that I'm not sure how to rebuild e.g. libbase.a without having it start regenerating the bitstream, which re-randomizes the memory block.16:16
cr1901_modernOh I may have to manually modify litex to get this to work16:19
CarlFKxobs: Fomu Q:  hef: it has no output pins?16:19
cr1901_modernI haven't ran into a problem you described, but if I do, I'll force litex to do the right thing lol16:19
xobsCarlFK: I was thinking of how to phrase that.  Technically no, but you could wire things up to the touchpads.  They're not really designed for output.16:20
cr1901_modernit doesn't have an LED?16:20
xobsI have outputs listed as "One RGB LED"16:21
cr1901_modernahh16:21
xobsmithro: good news! I'm getting USB traffic, and I've got my USB Beagle working.  I see lots of string descriptors going by.16:23
CarlFKxobs: notes for v2 in 2020:   loans: without at least one or two decent GPIO my interest is pretty low16:24
CarlFKxobs: can the usb lines be hijacked?16:25
xobsmithro: I see a packet "80 06 00 06 00 00 0A 00" going by just after it sets the device descriptor.  That packet is never acked (which you should do by sending a zero-length DATA packet), which I think is the source of some issues.  Anyway, I'll have to look at it more tomorrow.16:26
xobsCarlFK: I'm not sure how you'd have a GPIO on something that fits inside a USB port.  It's an ongoing challenge.16:26
cr1901_modernxobs: Very interesting you got vexriscv minimal to work... I haven't been able to get it to work at all myself.16:27
xobscr1901_modern: I can share more with you tomorrow, if you like.16:28
xobsI'm going to head to bed now.  Goodnight!16:28
cr1901_modernxobs: Sure16:28
*** rohitksingh has quit IRC18:35
*** cr1901_modern has quit IRC21:41
*** cr1901_modern has joined #timvideos22:40
mithroxobs: When you get up, I'm interested in understanding your results as I was pretty sure the USB didn't meet timing?23:14
CarlFKdidn't meet timing - typo?23:15
mithroCarlFK: no?23:15
daveshahDoesn't meet timing ≠ doesn't work at room temperature on a good chip23:15
mithrodaveshah: By like 50%23:15
daveshahMaybe Vcc is on the high side23:16
mithrodaveshah: Anyway, I'm interested in understanding the results better23:17
xobsmithro: morning23:57
mithroxobs: So - how are you building stuff?23:58
xobswell, for one thing I had to strip out all but EP0 to get it to fit.  the last few commits made the gate size very large.23:59
xobsI've also heavily patched libbase to remove all calls to printf() and replaced the crc functions with non-table-based versions.  As a result, bios.bin fits in 8kB.23:59

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