Thursday, 2019-06-13

*** tpb has joined #litex00:00
*** futarisIRCcloud has joined #litex01:37
*** sb0 has joined #litex05:53
sb0_florent__: https://github.com/enjoy-digital/litedram/blob/master/test/test_upconverter.py#L9405:53
tpbTitle: litedram/test_upconverter.py at master · enjoy-digital/litedram · GitHub (at github.com)05:53
sb0when there is a single clock domain you can omit this; also, "generators" can be a simple list05:53
sb0same in test_downconverter.py05:54
_florent__sb0: thanks, yes that's what i'm doing in others simulations, i'll fix07:18
*** sb0 has quit IRC10:54
*** ambro718 has joined #litex15:32
ambro718How do I write a non-linux program to run on linux-on-litex-vexriscv for test purposes?15:37
_florent__ambro718: here is a minimal firmware (you can remove the sdram_bist part): https://github.com/enjoy-digital/chubby75/tree/master/firmware15:52
tpbTitle: chubby75/firmware at master · enjoy-digital/chubby75 · GitHub (at github.com)15:52
_florent__once compiled, you can load it over serial with : lxterm /dev/ttyUSBX --kernel=firmware.bin15:52
ambro718Thanks!15:52
ambro718_florent__: For transmission with DMA, I think I would need to delay emptying the FIFO until either the FIFO is full or the entire packet is in the FIFO. Can probably be done by adding something between the FIFO sink and the following Ethernet pipeline.16:10
ambro718s/sink/source/16:10
ambro718So it doesn't happen that just when the DMA starts giving data, transmission starts and runs out of data.16:11
ambro718I suppose it would help to keep track of how many "last" data are in the FIFO.16:17
_florent__ambro718: yes, that's why i was suggesting adding packet FIFO when we first discussed that16:24
_florent__ambro718: i think i already needed a such fifo, i'll try to find some code16:28
ambro718If you don't find it I can just code it as a wrapper around a normal FIFO though.16:32
_florent__i'm not able to find it right now, but yes that was a wrapper around SyncFIFO16:40
somloanyone using verilator v4 (curious about multithreaded support)?17:14
_florent__somlo: i tried it but multithreading was slower with litex_sim17:33
somlosimulating a MMU-enabled rocket is rather slow, so I was hoping to speed it up a bit :)17:40
somlo_florent__, what did you have to change in litex_sim to specify multithreading in verilator ? (I'm still kinda hoping threading speedup will kick in with "bigger" designs)17:43
_florent__somlo: add --threads=n to your litex_sim command17:44
somlooh, that simple -- nice, thanks!17:44
_florent__also, i recently added --opt-level command to select speeding up compilation time or execution time17:46
_florent__command/parameter17:46
somloyeah, I see that now (finally occurred to me to run "litex_sim.py --help") :)17:47
somloI'll go ahead and install v4, and see if/what it does for me (as soon as my 8MB tftp of BBL+Linux either completes, dies, or I get tired of waiting for it) :)17:49
somloas it turns out, the "standard" rocket variant we have in LiteX has no MMU; so I created a MMU-enabled variant, but that's too big (128%) for my 45K ecp5 on the versa board17:51
somloand I never got litedram working at 50MHz on the nexys4ddr...17:51
somloso I'm stuck with the simulator for now...17:52
somlo_florent__: somewhat unrelated, what's the bigger picture behind the naming convention of allowed variant names?18:00
somlois "linux" bigger than "full", or are they orthogonal?18:00
somloI was considering adding an FPU-enabled variant (which will never fit on an ecp5, but does fit comfortably on the artix7 on nexys4ddr)18:00
somloand apparently "linuxfp" (linux capable *plus* floating-point) is not a good variant name18:01
somloso I'm thinking "full", but is that assumed to be "lesser" than linux for other cpu types?18:02
_florent__somlo: you can still give it a specific name if you want18:02
_florent__if you are calling the others linux, you can call it linux-fpu18:02
somlook, but just doing that in .../rocket/core.py is not enough, I'd have to add an entry in CPU_VARIANTS in soc_core.py, so that InvalidCPUVariantError won't yell at me when I actually try and build one18:04
somlowhich I'm ok doing, I was just trying to understand the convention before I went blundering in and screwing something up :)18:05
_florent__mithro tried to standardized the variants' names but we should still be able to give specific name if needed18:07
_florent__we should probably be able to disable the InvalidCPUVariantError18:07
somlowell, "full (alias: everything)" does fit a MMU *and* FPU enabled "Big" rocket core configuration18:11
somloso I'm inclined to just go with that, unless it's specifically assumed to be "worse" or "lesser" than the "linux" variant :)18:12
*** mnr has joined #litex18:54
somloto follow up on the numbers we were passing around the other day, a LiteX SoC with a full MMU+FPU Rocket core would need a mythical 140Kcell ecp5 FPGA :)18:57
mnrsomlo: <tongue-in-cheek> Doing it the 68020 way with the FPU in a separate chip? }:-> </tongue-in-cheek>18:59
mnrsomlo: and of course with the PMMU in another separate chip ;-)19:00
somlomnr: there's some research on P&R across multiple physical FPGAs, but I'm really not ready to go there :)19:00
daveshahsomlo: I think that will drop significantly once we have DSP inference in Yosys working19:03
daveshahBetween that and the area reduction from improved ABC integration (e.g. proper costs for using muxes to combine LUTs) it may well fit comfortably in 85k19:05
mnrdaveshah: I've seen that you had mentioned on twitter that you were thinking about doing a small-to-medium production run for your TrellisBoard design. Do you already have specifc plans for that?19:09
daveshahNo time line yet unfortunately, discussing with colleagues how we will go forward19:09
daveshahBut I imagine we will do a run of 20 boards at some point19:10
mnrIf I can somehow afford it, I'd be definitely interested in one.19:10
daveshahSure, I'll note that19:10
daveshahNot sure what pricing will be19:11
ambro718Is there a way, other than FSM, to combine sync and comb logic? I want to write things like If(condition, a.eq(1), NextValue(b, 1)).19:58
ambro718Annoyingly FSM throws an exception if you only define one state.19:59
ambro718_florent__: Does this look sensible to you? https://paste.ubuntu.com/p/NTdykdFCQP/20:38
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)20:38
_florent__ambro718: sorry, it's the end of the day here, not sure my mind is fresh enough to understand your code :)20:58
_florent__ambro718: i found something: https://github.com/enjoy-digital/litex/commit/8497f6b9063a92c313a1735d4e8f9dab3494c21d20:59
tpbTitle: use PacketBuffer for udp loopback · enjoy-digital/litex@8497f6b · GitHub (at github.com)20:59
ambro718No problem :)20:59
ambro718Seems more complicated.20:59
_florent__i think i was storing if packet information in a fifo and data in another fifo and just using the information fifo to read the data fifo21:00
ambro718All I do is delay the output of a packet until either the entire packet is inside the fifo (i.e. number of last values in fifo is >0) or the fifo is full. Once the start of a packet is outputted then the entire packet is outputted without delay.21:01
_florent__ok i see, it should work yes21:03
ambro718I hope so, next step is to write some C code to see what actually works. I got the full TX logic done now.21:04
_florent__have you done some simulation of the code? i would recommend doing some if not, it will be a lot faster to debug21:06
ambro718Wasn't planning to, how would I do that? With the verilator?21:06
_florent__yes you can do a simulation with the migen simulator (slow but useful for doing unit-test) or with litex_sim (fast and useful for higher level simulation)21:07
_florent__if you share your TX code, i can prepare a testbench skeleton for you tomorrow21:09
ambro718Here, https://github.com/ambrop72/liteeth/blob/dma/liteeth/core/mac/__init__.py#L3521:16
tpbTitle: liteeth/__init__.py at dma · ambrop72/liteeth · GitHub (at github.com)21:16
ambro718This branch has my DMA code, you instantiate LiteEthMAC with interface="wishbone_dma"21:17
ambro718Here's how I integrated it into EthernetSoc: https://paste.ubuntu.com/p/DF3nKjR2HD/21:18
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)21:18
ambro718Basically, uses two WB master interfaces and needs interrupts.21:18
ambro718Just the DMA (no Ethernet) is here if you think it's enough to focus on this: https://github.com/ambrop72/liteeth/blob/dma/liteeth/core/mac/wishbone_dma.py#L44021:20
tpbTitle: liteeth/wishbone_dma.py at dma · ambrop72/liteeth · GitHub (at github.com)21:20
*** ambro718 has quit IRC22:18

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