Tuesday, 2021-02-02

*** tpb has joined #litex00:00
*** futarisIRCcloud has joined #litex00:03
*** ambro718 has quit IRC00:10
*** Bertl is now known as Bertl_zZ00:12
*** lf_ has quit IRC00:39
*** lf has joined #litex00:39
*** lkcl has quit IRC01:44
*** lkcl has joined #litex01:56
*** Degi_ has joined #litex03:32
*** Degi has quit IRC03:35
*** Degi_ is now known as Degi03:35
*** lkcl has quit IRC04:01
*** lkcl has joined #litex04:14
*** futarisIRCcloud has quit IRC04:33
*** kgugala_ has joined #litex06:18
*** kgugala has quit IRC06:19
*** lkcl has quit IRC07:23
geertunickoe: Why? Flipping USB connectors is part of our heritage ;-)07:27
geertus/our heritage/the full USB experience/07:33
*** lkcl has joined #litex07:36
*** kgugala_ has quit IRC07:40
*** kgugala has joined #litex07:41
*** proteusguy has quit IRC10:29
*** proteusguy has joined #litex10:42
*** Zguig has joined #litex11:00
ZguigHi all, is it just me or there was a change somewhere related to ethernet? I don't manage to receive packets with ECPIX-5 boards. I see them going out and being received, but the reply is not catched in Linux... Am I missing something? Some days ago it was working... :(11:01
ZguigWhat is strange is that boot from tftp is working fine11:10
ZguigSo it should mean that at Ethernet core level everything is fine and that the issue is related to Linux?11:11
_florent_Zguig: I switched back to IRQ mode a few days ago: https://github.com/litex-hub/linux-on-litex-vexriscv/commit/1e05fad048a28520015a696d46499de6cbe15dee11:11
_florent_this also requires: https://github.com/enjoy-digital/litex/commit/7abfbd9825188d1f6d97453838e18ed7af5526a711:12
_florent_Zguig: can you check your .dts to see if there is the status = "okay"; in the ethernet peripheral?11:13
ZguigYes I have it11:14
Zguig            mac0: mac@f0004800 {11:14
Zguig                compatible = "litex,liteeth";11:14
Zguig                reg = <0xf0004800 0x7c>,11:14
Zguig                      <0xf0004000 0x0a>,11:14
Zguig                      <0xb0000000 0x2000>;11:14
Zguig                tx-fifo-depth = <2>;11:14
Zguig                rx-fifo-depth = <2>;11:14
Zguig                interrupts = <2>;11:14
Zguig                status = "okay";11:14
Zguig            };11:14
_florent_OK, and you are booting from SDCard?11:14
ZguigNop from TFTP11:14
ZguigI can try with SDCard also11:14
ZguigBut that was the strange thing that at bios level it was ok with udp11:15
_florent_no tftp is fine, was just wondering of the rv32.dtb has been updated on your tftp server11:16
ZguigI check this file11:16
_florent_otherwise, can you try setting polling to True here: https://github.com/litex-hub/linux-on-litex-vexriscv/blob/master/soc_linux.py#L25911:16
_florent_regenerate the rv32.dtb with ./make.py --board=ecpix5, copy images/rv32.dtb to your tftp server and retry with it11:17
_florent_if working with polling and not working with irqs, I could have a closer look in the next days11:18
ZguigI test all this, thanks _florent_!:11:19
*** Zguig has quit IRC11:26
*** Zguig has joined #litex11:26
ZguigOk so when I enable back polling, it works fine11:47
ZguigI will dig a bit this dts file, never heard about it before :)11:48
Zguigthere might be something there or with linux kernel conf11:48
ZguigI had also issues with multicore boot, this might be where I need to dig on what is going on11:48
*** Bertl_zZ is now known as Bertl11:49
ZguigBut regarding to linux kernel, to make sure it was not me, I did some tests also with prebuild kernels you provided in beginning of the year11:52
*** lkcl has quit IRC12:03
_florent_somlo: your ECPIX5 port is also working here: https://twitter.com/enjoy_digital/status/135657338605556941012:05
*** lkcl has joined #litex12:16
somlo_florent_: thanks, looks great! :)12:21
geertusomlo: How many LEs do you need for rocket?12:30
*** lkcl has quit IRC12:55
*** lkcl has joined #litex13:08
somlogeertu: off the top of my head, the whole LiteX+Rocket SoC (with ethernet and sdcard) uses about 70% of TRELLIS_SLICEs on an 85k ecp513:18
somlogeertu: and here's the hierarchical place utilization report from vivado (for the nexys4ddr): https://pastebin.com/erVHtDn213:24
tpbTitle: -------------------------------------------------------------------------------- - Pastebin.com (at pastebin.com)13:24
somlo(this one was built with the added analyzer, so hopefully that's reflected in there somewhere :)13:25
*** Bertl is now known as Bertl_oO13:35
geertusomlo: Hmm, so no small task to make it fit in the 24K part.13:50
*** lkcl has quit IRC14:16
*** lkcl has joined #litex14:16
*** lkcl has quit IRC14:27
somlogeertu: it's hit-or-miss even on the versa (45k ecp5) -- don't think a rocket/litex soc can fit on a 24k...14:36
somloor by "24k part" you mean a xilinx chip? no idea if/how that would work, in that case14:37
*** lkcl has joined #litex14:40
*** Zguig has quit IRC14:51
*** Zguig has joined #litex14:52
geertusomlo: I did mean the small ECP4 on the OrangeCrab14:56
*** lkcl has quit IRC15:00
*** Melkhior has joined #litex15:04
MelkhiorDatapoint: using vivado (not an OSS toolchain), the Rocket SoC just fit using 95% of the LUT in a Artix-7 35k ; that's with just memory controller, serial port, sdcard; no ethernet or any fancy options15:06
Melkhior|          Site Type         |  Used | Fixed | Available | Util% |15:08
Melkhior+----------------------------+-------+-------+-----------+-------+15:08
Melkhior| Slice LUTs                 | 19792 |     0 |     20800 | 95.15 |15:08
Melkhior| Slice Registers            | 10758 |     0 |     41600 | 25.86 |15:08
Melkhior| Slice Registers            | 10758 |     0 |     41600 | 25.86 |15:08
Melkhior|     Site Type     | Used | Fixed | Available | Util% |15:08
Melkhior+-------------------+------+-------+-----------+-------+15:08
Melkhior| Block RAM Tile    | 25.5 |     0 |        50 | 51.00 |15:08
geertus/ECP4/ECP5/15:08
MelkhiorBut rocket uses no DSP block at all ? Weird, VexRiscV uses some for the multiplier.15:09
*** lkcl has joined #litex15:14
*** lambda has quit IRC15:26
*** lambda has joined #litex15:37
nickoegeertu: hehe15:53
nickoe(usb)15:54
somlo_florent_, daveshah: here's my attempt at an ecp5 jtag patch for litex: mirror.ini.cmu.edu/litex/litex-ecp5-jtag.patch and here's trying to use that by adding analyzer support for the trellisboard: mirror.ini.cmu.edu/litex/litex-boards-trellisboard-analyzer.patch16:28
somloand here's what happens when I try to connect to it with litex-server: https://pastebin.com/fkdmx68N16:28
tpbTitle: $ dist/litex_server --jtag --jtag-config /usr/share/trellis/misc/openocd/trellis - Pastebin.com (at pastebin.com)16:28
somloanything obvious I might have missed?16:29
daveshahI think something is failing in the OpenOCD integration. Something that I don't see is something telling OpenOCD about the custom opcodes to use (0x32/0x38) to access the JTAGG16:30
somlowould that be in the openocd config file ?16:30
daveshahI'm not sure how that works tbh16:30
daveshahbut I know it needs to be somewhere :)16:30
somloyeah, then I'm screwed :) I know a lot *less* and was just hoping for some easy cut'n'paste, monkey-see-monkey-doo success, but things rarely work out for me like that :D16:31
somloguess that's how I end up learning things, I'll keep staring at the various moving parts until they slowly and painfully start making sense, eventually, hopefully...16:32
daveshahyou could try something like changing "irscan $_CHIPNAME.tap $_USER1" to "irscan ecp5.tap 0x32"16:33
daveshahin https://github.com/enjoy-digital/litex/blob/2a542e150de8715fa07e4b43bb7ec37f4d788fec/litex/build/openocd.py16:33
daveshahand same here, $_CHIPNAME to ecp5 https://github.com/enjoy-digital/litex/blob/2a542e150de8715fa07e4b43bb7ec37f4d788fec/litex/build/openocd.py#L14316:35
daveshahI think the Xilinx OpenOCD stuff is setting  $_CHIPNAME but the ECP5 stuff isn't so this would be a quick way to check (I don't know what the proper fix here would be)16:35
somlodaveshah: that definitely got things started -- I can fire up litex_server16:40
daveshahthat's good16:41
somlorunning litescope_cli gets stuck "downloading" the vcd file16:41
daveshahthere might be timing differences compared to the Xilinx primitive16:41
somlobut that might just be the ecp5 jtagg utilization being wrong on my end16:41
daveshah> o_JRSTN   = ~self.reset16:43
daveshahhuh does LiteX allow inversion of an output this way (it may well, I've just not seen this before)16:43
somloI've grepped around for how one would invert a signal, and there's examples like that elsewhere in the code base16:43
somloI think there's one even in soc/cores/jtag.py further above where I added mine...16:44
daveshahthat looks like an input though16:45
somlooh you mean I screwed up and should have written "i_JRSTN" ?16:46
daveshahno, o_JRSTN is an output16:46
daveshahbut I think what you might need to do is output to a temp signal and then assign self.reset to be the inverse of that temp signal16:46
daveshahunless that really is valid syntax for an inverted output16:47
somloI can try that and see if it makes a difference... I don't get an error and it's done elsewhere, and did I mention cut'n'paste is how I get things done ? :D16:47
somlobut yeah, worth a shot...16:48
*** peeps[zen] has joined #litex17:38
*** peepsalot has quit IRC17:39
somlodaveshah: same behavior with the explicitly negated signal -- I'm going to assume it was OK with the original syntax, and dig elsewhere for why the vcd isn't getting downloaded from litescope_cli...17:46
_florent_somlo: you should indeed use o_JRSTN = self.reset_n and have a self.reset.eq(~self.reset_n) below17:47
somlobut thanks for tracking down the openocd magic in litex_server!17:47
_florent_somlo: also litescope will be stressing the link a bit, that's a bit ambitious for a first test :) I would first test with simple accesses to the scratch register (eventually with litex_client --read/--write/--regs)17:49
somlo_florent_: the "direct negation" syntax is also used elsewhere: https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/jtag.py#L31 -- but looking more closely, the negated signal is an "lvalue" (or source to an input), and in my case it's an output, so maybe that's why *I* shouldn't do it like that and it's ok for the line I linked to :)17:49
somlo_florent_ I'm going to try writing (reading still won't work for me over the jtag debug link on nexys4ddr, so I can't rely on it)17:50
_florent_somlo: in the other case it's an input, which works17:50
somlo_florent_ -- I mean writing from litex_cli, and checking from the litex bios on the board itself17:50
somloreading registers via litex_cli is still not making sense for me on the nexys4ddr, is what I meant to say -- so either I'm doing something wrong, or there's a bug in the analyzer -> jtag -> server -> client read path...17:51
_florent_for bringing this up, I would recommend using a design with a SoC and both uartbone and jtagbone bridge with Litescope on the JTAG signals17:52
_florent_run Litescope over the uartbone to capture the write/read accesses from the JTAG17:53
somlook, so the ecp5 jtag patch now has additionally this: https://pastebin.com/JUy1PjuV17:54
tpbTitle: diff --git a/litex/soc/cores/jtag.py b/litex/soc/cores/jtag.pyindex 3fc1a601.. - Pastebin.com (at pastebin.com)17:54
somlo_florent_: I'm going to try writing to the trellisboard registers via jtag (what I know to already work on the nexys4ddr). We should probably stick to the nexys4ddr to further debug the read-register-over-jtagbone problem, IMHO (fewer unknown unknowns :) )17:59
somloand writes do *not* make it through over the ecp5 jtagg thing, so back to the drawing board18:01
somloit does not help that jtagg is practically undocumented (beyond a list of inputs and outputs)18:01
somloI'm sure there's probably 17.5 things I'm getting wrong about it by just guessing :)18:02
somlomaybe I should put in a RFC-dont-apply-PR if that makes it easier to look at it together?18:02
_florent_somlo: just for info, I'm been using jtagbone the last few days to do bus control/LiteScope since need it on a Kintex7 boards that only has a JTAG connector and haven't reproduced the issue you see on nexys4ddr yet18:10
somlo_florent_ I wonder if it's specific to the nexys4ddr, and/or the bitstream (or analyzer-enabling patch) I'm applying to it18:11
_florent_I'll try to do some tests on the nexys4ddr to see if I reproduce18:12
somlo_florent_: I use http://mirror.ini.cmu.edu/litex/litex-nexys-analyzer.patch18:16
somlook, PR #797 for the ecp5 jtag "candidate"18:28
somlonow back to nexys4ddr...18:28
*** Melkhior has quit IRC18:53
*** Zguig has quit IRC18:53
*** kgugala_ has joined #litex19:09
*** kgugala has quit IRC19:12
*** kgugala has joined #litex19:21
*** kgugala_ has quit IRC19:24
*** kgugala_ has joined #litex19:30
*** kgugala has quit IRC19:32
*** kgugala_ has quit IRC19:42
*** kgugala has joined #litex19:42
nickoeAnyone who has some notes on doing boundry scan test practically with openocd and the artix7 somehow?19:44
*** kgugala_ has joined #litex19:44
*** kgugala has quit IRC19:48
nickoeOn another topic, how does one define the platform for a board where you have the FPGA for a sub module and you want to remap those "pins" to something on that base board and make it more accessible.19:48
*** peeps[zen] is now known as peepsalot20:15
*** ambro718 has joined #litex20:18
*** ambro718 has quit IRC20:28
nickoeok,  verified the board could be flashed with nmigen and a couple of LEDs, now I just need to figure out how that RAM and flash works...20:44
nickoeDoes the spiflash_model have any real meaning in the platforms ?21:13
nickoeOk, I think I did define the flash correctly now. Next up the ddr3 stuff :S22:02
nickoeWhat does the grouping to the Pins object mean for a?  https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/arty_s7.py#L91-L9322:11
nickoeWhy isn't that just one list?22:11
nickoeI have a signal called VREF_DDR3, but I am not sure what to make that to in the platform conf, is that "cs_n"?22:18
nickoehttps://dpaste.com/4Q342VQHY22:18
tpbTitle: dpaste: 4Q342VQHY (at dpaste.com)22:18
nickoeso I have not assigned the A's and the VREF_DDR3 is the one one "left" (I updated the other variables)22:19
nickoeThe board has a 100R pull down on something called "CS#"... so I wonder.. maybe I shall just remove it?22:26
nickoeor do I need to connect it elsewher?22:27
nickoemithro: yo, trying to "upgrade" from the basys3 to something with DDR3 SDRAM. Any hints? :d22:28
daveshah10:11 PM <nickoe> What does the grouping to the Pins object mean for a?  https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/arty_s7.py#L91-L9322:29
daveshahIt is just one list22:30
nickoedaveshah: ok, cool22:30
daveshahThe grouping is arbitrary to make it a bit clearer, Python joins the strings together22:30
daveshahSorry, not Python joining the strings here but LiteX (I missed the comma)22:30
daveshahsame thing though22:30
daveshahSounds like chip select is always enabled if it is permanently pulled down and has no associated pin, then yes you should be able to remove it22:31
daveshahfrom the LiteX board file22:31
nickoeis that VREF_DDR3 to be used for anything? it looks like it is the center of a voltage divider on the board22:32
daveshahYes, although often it doesn't need a pin constraint because it's a fixed pin22:33
nickoeok, I think it is correct now, although there is a high likelyhood of typos after all those parameters. What is the best way to test this?22:33
daveshahBuild a test SoC and see if the memory test passes is pretty much the only way22:34
nickoethis is my platform code for now, https://dpaste.com/3XLTBU5CV22:34
tpbTitle: dpaste: 3XLTBU5CV (at dpaste.com)22:34
daveshahMany typos will cause the build to fail22:34
nickoeI am not exactly sure about the SPI flash parameters, but I think they are correct.22:34
nickoeI asume the IOStandard and misc args to those signals are correct, but I don't really know. I just copied the skeleton from another thing that had a DDR3 SDRAM comment to the block.22:35
daveshahIt looks decent at a glance22:36
daveshahThe next step is to get a target written, if you haven't already22:36
nickoeI don't but I guess I can copy one and replace some bits22:36
nickoeI am new to litex22:36
nickoeand migen in general22:36
daveshahYeah the target files tend to involve fewer changes than the platform file22:37
daveshahMainly it will be setting it up with the right RAM chip etc22:37
nickoeI guess I could copy the arty_s7.py22:38
daveshahYep22:39
nickoemmm, it has a  "from litedram.modules import MT41K128M16"   :S Is that something that should match my RAM?22:39
daveshahYes22:39
daveshahIf it's not in litedram.modules already then you'll need to add it22:40
nickoebeing NT5CC128M16IP-DI22:40
nickoedaveshah: Is that in the form of these yaml files? https://github.com/enjoy-digital/litedram/tree/master/examples22:42
daveshahno, it's an entry like this22:43
daveshahhttps://github.com/enjoy-digital/litedram/blob/master/litedram/modules.py#L62122:43
daveshahcreate a class for your chip using the values from its datasheet22:43
nickoeoh, ok, I will have a look22:49
nickoeDatasheet is https://www.nanya.com/Files/696?Filename=2Gb_DDR3_I_Die_component_Datasheet.pdf&ProductId=3,771    But, daveshah, but I can I figure out what nrows and ncols should be?23:03
daveshahnrows is 2^14=16384, ncols is 2^10=1024, based on the number of row and column address bits23:04
nickoeso that is for 128Mb x 16 ?23:05
nickoededuced from the "Density and Addressing" table on the front page?23:05
daveshahYes23:06
nickoeand the fact that NT5CC128M16IP-DI is listed as "128M x 16" organization. ok23:06
daveshahyup23:06
nickoeWhat about the timings then?23:06
nickoewhy is that set as tREFI=64e6/8192 for some of the other devices?23:08
nickoethe table has a temperature  dependent  value, tREFI(us) 4 Tc<=85 °C :7.8, Tc>85 °C :3.923:08
daveshahthat is 64ms (the total refresh time) divided by 8192 rows, I think23:09
daveshahI think just copying the 64e6/8192 should be fine23:12
nickoeunder section "Extended Temperature Usage" it talks about supporting extended temperateture ranges, and having a faster refresh rate. Is that because leakage current is higher?23:12
daveshahgiven DRAM is somewhat standardised, I would expect most of the timings to be the same as another 128Mx16 part23:12
nickoeat higher temperatures?23:12
daveshahYes23:12
nickoeok, so the last thing, the speedgrade timings23:12
mithronickoe: Get an Arty A7....23:16
nickoeugh, build_waxwing.sh: line 4: xst: command not found23:24
nickoemithro: I mean; I have another board now with DDR23:25
mithronickoe: That needs ISE....23:25
nickoemithro: ehh, no23:25
mithroxst == ISE23:26
nickoeoh.. then I did something wrong, this has an artix723:26
nickoeoh, it detected P=waxwing  ... mmmm23:26
nickoeis there some place I need to specify a new platform to make it be detected properly when I set PLATFORM and sources the enter env?23:27
nickoeoh, right. I added the "target" in another litex-boards repo23:28
nickoeinstead of the litex-buildenv23:28
nickoeok, so far so good, some fiddling with the "target" needed, but it is getting late here. GN.  https://dpaste.com/3P3FRECM423:36
tpbTitle: dpaste: 3P3FRECM4 (at dpaste.com)23:36
daveshahyep looks like it is just getting confused by the lack of a reset in the platform (if the board doesn't have anything usable as a reset button you should just be able to remove the reset from the target)23:39

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!