Tuesday, 2018-12-18

*** tpb has joined #timvideos00:00
*** futarisIRCcloud has joined #timvideos00:22
mithroxobs: When you are up, I would like to repo your RPi setup with the Hacker tomu's here00:28
xobsmithro: sure.  I've got half an hour before chinese class. What's up?00:39
mithroxobs: Do I just follow https://git.xobs.io/xobs/fomu-flash ?00:39
tpbTitle: xobs/fomu-flash: Utilities to work with Fomu, as attached to a Raspberry Pi - Gitea: Git with a cup of tea (at git.xobs.io)00:39
mithroand which pins do I use?00:40
xobsAh, for Fomu?  Yes.00:40
xobsI probably should add more diagnostics, including the ability to read out the SPI flash ID code.00:41
xobsI'll do that when I'm at the office today and have access to my EVT board.00:41
xobsLet's see... the best way to hook pins up is probably to follow https://git.xobs.io/xobs/tomu-fpga/raw/commit/cd4d928adb3dd68b22ab5da60e4a4d01ee201caf/reference/tomu-fpga-evt2.pdf00:42
mithroxobs: Okay thanks00:54
mithroI'll probably still be around when you get into the office later00:54
xobsmithro: alright. the two features I need to add are (1) the ability to read out the SPI flash ID code, to make sure the connection is good, and (2) a flag to set the SPI mode (single/dual/quad/qpi).00:55
mithroxobs: SGTM00:56
mithroxobs: Your not using this SPI flash that tinyfpga was using?00:56
mithrotinyfpga: ping?00:56
xobsmithro: no, the version tinyfpga is using is a WLCSP that's designed to be super small. I went with an 8USON that's slightly larger, but has second sources, as well as slightly larger capacity.00:57
xobsI'd love to be able to go with a larger 8USON, though. The one I picked is 3x2mm, but there are some 4x4mm ones that have more storage capacity.00:58
mithroxobs: IIRC the tinyfpga has a special register that has to be written to get QSPI mode...00:59
xobsmithro: I'd imagine that's standard. fomu-flash does that, too: https://git.xobs.io/xobs/fomu-flash/src/branch/master/spi.c#L39401:00
tpbTitle: xobs/fomu-flash: Utilities to work with Fomu, as attached to a Raspberry Pi - spi.c at master - Gitea: Git with a cup of tea (at git.xobs.io)01:00
mithroxobs: I know picosoc needed something specially for it01:00
xobsyeah, it took me a while to find that. much frustration. otoh, now I understand QPI and quad spi much better now.01:06
mithroxobs: Should I add tomu-evt to LiteX-BuildEnv?01:18
xobsmithro: that would be nice, thanks! what do you need to do that?01:22
xobsI have a local version that I've been working with. it's a bit of a lie, because I run the 48 MHz oscillator through a PLL and call it "12 MHz", so I'm not entirely happy with my solution.01:23
mithroxobs: I'm using the internal 48MHz oscillator at 12MHz01:34
xobsmithro: I'm still learning FPGAs -- can you just pull out bit 2 and run it into a clock buffer?  Is that stable enough to actually work at those frequencies?01:35
mithroxobs: The oscillator has an internal divider01:36
xobsmithro: ah! you run the internal 48 MHz oscillator through a divider, not the crystal. clever.01:37
mithroxobs: I'm just doing a little rebasing01:38
cr1901_modern$cr1901cc -pedantic01:44
cr1901_modernBelow 50Mhz, it's not gonna matter, but one should really not use a FF divider to do clock division.01:44
cr1901_modernskew will result so it's difficult to relate the phase of your divided clock to the source clk01:44
xobscr1901_modern: thanks for the info. That was my gut feeling, too.01:53
mithroxobs: Generally it's pretty hard to route clocks into/out of the logic01:57
mithroxobs: Do you have a tinyfpga_bx ?02:02
xobsmithro: I don't think I do, no. Why do you ask?02:03
mithroxobs: It would be good for someone to replicate the USB that currently works02:03
xobsmithro: today I'll give it a shot on Fomu. Better test it before the campaign starts...02:04
mithroxobs: I need to figure out what I've done wrong as the usb core is not meeting timing on the up5k02:05
mithroxobs: Would be good to test lm32+picorv32+vexriscv on the Fomu too...02:05
xobsI got lm32 micropython working.02:07
mithroxobs: Seem mithro/litex-buildenv/tinyusb-work02:07
xobsI tried building a smaller vexriscv, and the result was just the top line of the bios prompt before it froze.02:08
xobsThat was using my own Scala file, though.02:08
mithroxobs: I just rolled forward litex, so litex-buildenv should have Florent's minimal vexriscv versions in it now02:09
cr1901_modernxobs: Lemme know if the minimal vexriscv versions work. I've had trouble w/ minimal vexriscv last time I tried it on ice40.03:05
xobsmithro: I just added the "-i" and "-t" parameters to fomu-flash.03:10
xobsThe "-i" parameter reads every ID code it can find.  Use that to make sure your connection is good.03:10
xobsThe "-t" parameter takes one of four options: 1, 2, 4, or q.  It sets the SPI bit width.03:11
xobsSo try "-t 1" for now.03:11
*** futarisIRCcloud has quit IRC03:21
mithroxobs: okay, will test after I grab some dinner03:21
xobsmithro: also, I'm grabbing your latest tinyusb work.  I'll try to get it working on Fomu!  It uses lm32, right?03:22
mithroxobs: At the moment, but it should be easy to port to vexriscv / picrorv3203:23
xobsalright, then in the interest of not changing too much at once, I'll stick with lm3203:23
mithroxobs: I haven't tested on the up5k yet03:23
xobs...that's worrisome. "Info:            ICESTORM_LC:  5169/ 5280    97%"03:36
mithroxobs: What config are you using?03:46
xobsI was using lite, but now I'm retrying with minimal.03:47
mithroxobs: Mine is in the 4k range03:47
xobs4883 (92%) with minimal lm32.  Still doesn't route, though.  Much better!03:51
xobsIs there an example of a litex target that doesn't have ROM, but boots from RAM instead?04:15
xobsI'll just add ROM as a mirror of RAM.04:19
mithroxobs: https://github.com/mithro/litex-buildenv/blob/tinyusb-work/targets/tomu_fpga_hacker/base.py04:20
tpbTitle: litex-buildenv/base.py at tinyusb-work · mithro/litex-buildenv · GitHub (at github.com)04:20
mithroxobs: That is XIP from spiflash, no rom04:21
xobsI pulled out SPI and it managed to route.04:24
*** rohitksingh_work has joined #timvideos05:02
*** Kripton has quit IRC05:16
*** Kripton has joined #timvideos05:18
xobsWhat's the best way to access a Verilog signal?  I'd like to wire soc_lm32_dbus_adr[2] up to an IO pin.  What I'd really like to do is assign pmod_n0 <= soc_lm32_dbus_adr[2]05:55
mithroxobs: That I'm not sure about06:14
xobsdaveshah (or anyone): do you know if the UP5K bitstream supports SPRAM configuration?06:44
mithroxobs: It does not06:55
* xobs gets distracted fitting the bios into 8kB of RAM...08:33
xobsOkay, so I now have a boot prompt, and I have just about everything working from a UX perspective.  The only command that doesn't work is "wcsr", because that blows out the 8 kB image.08:59
xobsmithro: Should I load some program from third_party/valentyusb/third_party/tinyusb/examples/?09:00
*** rohitksingh_wor1 has joined #timvideos09:01
*** rohitksingh_work has quit IRC09:04
*** rohitksingh_work has joined #timvideos09:44
*** rohitksingh_wor1 has quit IRC09:45
xobsOkay, I managed to get the bios to work mostly, though I need to change the memory offsets. The spiboot command ends up overwriting the bios memory due to overlaps.10:53
xobsThe cool thing is that this now fits in the Bitstream, so no need for flash memory.10:54
xobsI'll see what I can do to get USB working.10:54
*** rohitksingh_work has quit IRC10:58
*** rohitksingh_work has joined #timvideos11:00
*** Kripton has quit IRC11:05
*** Kripton has joined #timvideos11:11
*** samsagaz has quit IRC12:53
*** samsagaz has joined #timvideos12:56
*** Kripton has quit IRC13:12
*** rohitksingh_work has quit IRC13:13
*** Kripton has joined #timvideos13:21
*** rohitksingh has joined #timvideos14:09
*** CarlFK has joined #timvideos14:19
*** ChanServ sets mode: +v CarlFK14:19
*** tsglove has quit IRC14:38
*** tsglove has joined #timvideos14:38
*** rohitksingh has quit IRC18:03
*** tsglove has quit IRC18:13
*** rohitksingh has joined #timvideos18:21
*** rohitksingh has quit IRC18:37
*** tsglove has joined #timvideos20:03
mithroxobs: I'm around now22:30
mithroxobs: `sudo ./fomu-flash -i -t 1` right?22:33
mithroxobs: Will the fomu flash hold the FPGA in reset while trying to talk to the spi flash?22:43
mithroxobs: Looks like it does try too22:48
mithroAt the moment I have22:49
mithrohttps://www.irccloud.com/pastebin/nqZ98tUN/22:49
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)22:49
mithroooo!22:54
mithrohttps://www.irccloud.com/pastebin/fMz7kIYP/22:54
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)22:54
mithroxobs: What would you expect for serial number?23:05
mithroxobs: It seems like the  AT25SF161 doesn't come preprogrammed with a serial number, but does have security registers which can be used for a serial number?23:06
mithroThe device contains three extra pages called Security Registers that can be used for purposes such as unique device serialization, system-level Electronic Serial Number (ESN) storage, locked key storage, etc. The Security Registers are independent of the main Flash memory. Each page of the Security Register can be erased and programmed independently. Each page can also be independently locked to prevent further changes.23:07
mithroxobs: Would you expect writing to work if reading the  device id / etc works?23:10

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