Monday, 2022-03-07

*** tpb <[email protected]> has joined #litex00:00
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:cf1:8507:720a:c17> has quit IRC (Remote host closed the connection)01:37
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:cf1:8507:720a:c17> has joined #litex01:38
*** linear_cannon <[email protected]> has quit IRC (Read error: Connection reset by peer)02:01
*** linear_cannon <[email protected]> has joined #litex02:01
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)02:40
*** TMM_ <[email protected]> has joined #litex02:40
*** Degi <[email protected]> has quit IRC (Ping timeout: 256 seconds)03:01
*** Degi <[email protected]> has joined #litex03:02
*** zjason` is now known as zjason07:49
*** Prometheus6765 <[email protected]> has joined #litex07:59
Prometheus6765_florent_ Thank you.  I am getting the following error while running https://github.com/sergachev/litex-template/blob/main/src/main.py :08:00
Prometheus6765subprocess.CalledProcessError: Command '['make', '-C', '/home/karthikeyan/sims/litex-template/src/build/software/firmware', '-f', '/home/karthikeyan/sims/litex-template/src/src/firmware/Makefile']' returned non-zero exit status 2.08:00
*** FabM <[email protected]> has joined #litex08:02
Prometheus6765Sorry found out the mistake now I am getting ../include/generated/variables.mak: No such file or directory could somebody help08:42
ilia__sit's worth showing a full output of the command you are running; maybe you are missing some basic dependencies09:42
Prometheus6765I am running "python3 main.py"10:12
ilia__sit does rely on relative paths (I should fix that it seems), so run as I proposed - python src/main.py from repo root11:37
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Remote host closed the connection)11:45
tntAnyone got experience with JTAGBone ? Jut got a Digilent HS-3 instad of my Xilinx Platform cable to try and use it.  I have self.add_jtagbone() in the target. And trying litex_server --jtag but that doesn't seem to be enough.12:17
tntInfo : TAP xc7.tap does not have valid IDCODE (idcode=0x8e80126)12:18
tntInfo : JTAG tap: auto0.tap tap/device found: 0x04740093 (mfg: 0x049 (Xilinx), part: 0x4740, ver: 0x0)12:18
tntError: xc7.tap: IR capture error; saw 0x23 not 0x0112:18
trabucayretnt: zynqmp? seems idcode for a device where only PS tap is present12:48
tnttrabucayre: yeah, I grabbed https://raw.githubusercontent.com/openocd-org/openocd/master/tcl/target/xilinx_zynqmp.cfg and used that instead of xc7 one now.12:50
tnthttps://pastebin.com/6T7KunDx12:50
tpbTitle: (_env) tnt@asuka ~/litex $ litex_server --jtag --jtag-config prog/openocd_zynqmp - Pastebin.com (at pastebin.com)12:50
tntit's better but still not working. Any attempt to read/access anything just times out.12:51
trabucayreok so everything must be correctly configured12:54
tntheh, if it was, it should be working, but it's not :)13:08
tntOk, so progress ... the xilinx_zynqmp.cfg stupidely used chipname.tap for the CPU ad chipname.ps for the logic ... (which makes no-sense, PS is 'Programmable System', that's the ARM core. PL is the logic ... ).13:20
tntAnyway, I changed it so that chipname.tap is the PL tap and now, I get a response.  It's garbage but at least there is a reponse.13:21
tnthttps://pastebin.com/G3KTXKpE13:21
tpbTitle: (_env) tnt@asuka ~/litex $ litex_cli --identÿ¿ßï¿ï÷ýþÿßï÷ýþÿ¿ßïûýþ¿ß÷ûýþ¿ß - Pastebin.com (at pastebin.com)13:21
acathlaAnybody made a module in migen/LiteX to access SPI/QPI pseudo SRAM (Lyontek LY68L6400)?13:44
acathlatnt, does that part https://github.com/smunaut/ice40-playground/blob/master/projects/riscv_doom/rtl/top.v#L311-L366 handle access to that chip?13:45
tntacathla: yes13:46
tnt(it handles both the flash and the psram since they're on the same spi bus just with different chip selects)13:47
cr1901.oO (I keep thinking... how does tnt do all this cool stuff :D?)13:47
* tnt hasn't done much recently :(13:48
cr1901Maybe, but everyone needs a break13:48
acathlacr1901, I thought you made some cool stuffs too. It's time sharing of making cool stuffs13:51
*** linear_cannon <[email protected]> has quit IRC (Read error: Connection reset by peer)13:51
acathlaMaybe I'll do cool stuff one day13:51
*** linearcannon <[email protected]> has joined #litex13:51
cr1901acathla: I appreciate that. I've just been in a massive rut writing FPGA code for the past several months13:53
cr1901Everything except the absolute basics takes a lot of out of me13:54
acathlacr1901, I'm trying to do something usefull with FPGAs for years...13:55
tntdidn't you work on xp2 support ?13:55
*** linearcannon <[email protected]> has quit IRC (Read error: Connection reset by peer)13:56
cr1901tnt: Yes, and then I took a long break :'D.13:58
cr1901I don't feel good about it. I think doing the xo2 stuff was cool, but I haven't really _utilized_ it yet13:58
*** linear_cannon <[email protected]> has joined #litex13:59
*** linear_cannon <[email protected]> has quit IRC (Read error: Connection reset by peer)14:01
*** linear_cannon <[email protected]> has joined #litex14:03
*** linear_cannon <[email protected]> has quit IRC (Ping timeout: 250 seconds)14:11
*** linear_cannon <[email protected]> has joined #litex14:13
trabucayretnt: yep you have PL Tap, ARM dap & PS Tap... but PS is not PS :)15:07
_florent_tnt: unfortunately I don't think JTAGBone has yet been tested with on Zynq with the chained ARM/PL taps...15:14
Prometheus6765Thanks ilia__s. I was able to get  https://github.com/sergachev/litex-template/blob/main/src/main.py  to run but it shows "Memory initialization failed"15:21
tnttrabucayre: what do you mean PS is not PS ?15:24
tnt_florent_: Mmm, does that change anything, I wold have expected openocd to "abstract" that aways.15:24
_florent_tnt: the LiteX Server / Gateware part will be similar yes, but I'm just not the sure OpenOCD part has been tested with this configuration15:29
_florent_tnt: So the issue will most probably be in the .cfg file or here: https://github.com/enjoy-digital/litex/blob/master/litex/build/openocd.py#L42-L16015:30
_florent_tnt: and most probably here: https://github.com/enjoy-digital/litex/blob/master/litex/build/openocd.py#L42-L54 or https://github.com/enjoy-digital/litex/blob/master/litex/build/openocd.py#L15615:32
trabucayrePS -> Processing System, and PS tap: a tap in jtag chain used to enable/configure ARM+PL15:32
tntI'm a bit lost why to select between chain 1-4 the irscan is set to '1 + chain' while what I read in the doc indicates it shouldbe 0x20-0x23.16:03
tnt(for 7 series)16:04
trabucayrezynqmp chain is weird: there is an hidden tap: https://github.com/trabucayre/openFPGALoader/blob/master/src/xilinx.cpp#L10316:07
tntyeah, I'm looking at it right now. But to know what to change I have to understand the supposedely working code for 7 series.16:08
tntopenocd sees the correct idcodes so presumably the opencd config for zynmps properly sets stuff up.16:11
tntbut the IR has to be set for USER1-4 differently than on 7 series which is what I'm looking at now.16:11
tntBut AFAICT the old code sets IR to 2,3,4,5 for USER1-4 ... but I'd have expected 0x20,0x21,0x22,0x23 respectively.16:12
trabucayreI you select second tap (PL) it make sense the rest is the same as others serie716:15
trabucayreBut I have never tried...16:15
tntno, from what I read, you have to treat the PS+PL tap as a single one with IR=12 because you need a specific 12 bit value loaded to go to USER1-416:19
tntthis is also what the openocd file does, create a single tap with IR len = 1216:19
tnthttps://jsteward.moe/images/zujtag-nahitafu.png16:20
trabucayreIn fact I have introduce a dummy tap with irlen=6. This allows to have same behaviour :)16:21
tntIn anycase, none of this explains why litex loads 2-5 in IR instead of 0x20-0x23 for 7 series16:22
tntwhich is really what's I'm interested in at this point16:22
trabucayreyep16:22
trabucayrecould you provides datasheet ?16:24
tntI read that here : https://jsteward.moe/risc-v-hardware-design-part-b-edgeboard-series.html16:25
tpbTitle: RISC-V Hardware Design: Debug via BSCAN Chain - Edgeboard RISC-V Series - Pengcheng Xu's Place (at jsteward.moe)16:25
tntLooking at the config guide I found : https://i.imgur.com/klcGxHG.png  which is yet another set of values ...16:26
tntWhich is a mix of both lol .... 2,3,0x22,0x23 ...16:26
trabucayrefor artix, kintex I use 2 for USER116:27
trabucayrebig mix :)16:27
tntOk, gotta go, I'll pick this up later this evening.16:28
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 240 seconds)17:32
acathlaSomeone has a simple documentation of what migen.genlib.misc.timeline() do?17:40
acathlahttps://github.com/m-labs/migen/blob/master/migen/genlib/misc.py#L48-L7317:41
_florent_acathla: This is a simple time/action sequencer, but not sure I would recommend using it that much since not very flexible18:10
_florent_acathla: The HyperRAM core was for example using it, but I had to switch to a proper FSM to allow more flexibility, ex: https://github.com/litex-hub/litehyperbus/commit/02033b1df6ef3518dae0a54a1a196183d9059981 18:12
acathla_florent_, ok, thank you. I just wanted to understand already written code18:15
tntSomehwat annoyingly I can't find the equivalent of "7-series configuration guide" for the zyn mpsocs :/  There is one for "Ultrascale" but that doesn't cover the zynq usp.18:31
cr1901_florent_: In the auto_tx_flush code, I feel like I'm missing something19:31
cr1901https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/uart.py#L289-L290 On these two lines, you connect the tx_fifo and the PHY to the flushing stream from both ends19:32
cr1901https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/uart.py#L295-L297 How are you able to override the control signal connections down here when you connected both ends?19:33
tnttrabucayre: btw, just adding {0x04740093, {"xilinx", "zynqmp",     "xczu11eg", 6}},  make openfpga loader work with the xczu11eg20:10
cr1901(In addition, valentyusb doesn't have an add_auto_tx_flush)20:24
tntcr1901: what's your target fpga btw ?20:25
cr1901orangecrab20:25
cr1901Or do you mean for the machxo2 work?20:25
tntno, I meant for your questions above.20:26
cr1901orangecrab20:26
cr1901r0.220:26
cr1901Basically, my confusion boils down to "I don't know how the LiteX streams work and I often get confused by the terms source and sink because those terms depend on your POV"20:27
tntah yeah, same here.20:28
cr1901Maybe someone should write a tutorial about how the streams work20:29
* cr1901 is someone. In theory.20:29
_florent_cr1901: in the auto_tx_flush I'm probably using the fact that the last assignment done is the one effectively done (similar to this behavior in verilog/vhdl).20:57
cr1901Ahhhh fair.20:59
_florent_otherwise regarding sink/source, in the LiteX codebase, sink/source are always seen from outside the module21:00
_florent_at least that's what I'm trying to do21:00
cr1901Meaning the autoflush is the tx fifo's sink21:01
cr1901and the autoflush is the PHY's source21:01
_florent_but I admit sink/source can then be confusing when describing the internal logic of the module21:02
cr1901Are my above two messages correct?21:02
_florent_the VideoFrameBuffer would make a nice stream tutorial/wiki, I should spent a bit of time writing it21:03
cr1901My understanding is that if you have the autoflusher, even if the PHY is ready, the TX FIFO is throttled by "interval"21:05
_florent_cr1901: I would say, the TX FIFO source is connected to Autoflush sink and Autoflush source connected to PHY source21:05
_florent_TX-FIFO -> Autoflush -> PHY21:05
cr1901Autoflush source connected to PHY source*?21:06
cr1901You mean sink?21:06
_florent_and when Autoflush is active, we accept data from TX-FIFO without retransmitting it to the PHY21:06
_florent_yes sorry, to the UART's source, that is connected externally to the PHY's sink :)21:07
cr1901ack21:07
cr1901Wait... why do you connect a source to a source?21:07
cr1901Yea see, this is why I get confused21:09
cr1901>sink/source are always seen from outside the module21:10
cr1901UART as a source makes sense if you're referring to it as the beginning of another pipeline from inside autoflush21:10
cr1901from inside the autoflush module21:10
cr1901But you just said sink/source are always seen from outside the module21:10
cr1901_florent_: Sorry, this still isn't clear to me21:12
* tnt still trying to debug JTAGBone21:13
tntNow I get all 0x00 for some reasons. Thing is if I set a wrong value in IR, it times out. Observing the data at he "CommUART" level, I actually see the right number of bytes in response to commands.21:14
cr1901_florent_: Ignore my above q ("Wait... why do you connect a source to a source?")21:19
cr1901wait, no... don't ignore it. I still don't get it T_T21:20
* cr1901 wishes he could delete IRC msgs sometimes21:20
_florent_tnt: from what you describe, it's like the FPGA receive the commands correctly so Host -> FPGA path is working and the FPGA -> Host path is "almost" working: sending the right number of data but stuck at 0...21:24
_florent_tnt: You could confirm this with a UARTBone + LiteScope observing the signals from the JTAG21:25
tnt_florent_: huh, no I think the number of bytes on the CommUART must be an artefact just because it expects 4 bytes so it only reeads 4.21:25
tntI just uncommented a bunhc of 'echo' in the openocd script and it prints tons of stuff like https://pastebin.com/L9pmZqQv21:26
tpbTitle: write overflow10 0x001 10 0x001 10 0x001 10 0x001 10 0x001 10 0x001 10 0x001 1 - Pastebin.com (at pastebin.com)21:26
_florent_tnt: since we were speaking of sink/source, JTAG bone is transmitting valid/ready of of streams on bits 0 and 9: 21:28
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/build/openocd.py#L60-L6921:29
tntyeah looking at that now, but when issuing manual dr scan is almost like DR is not 10 bits.21:30
tnthttps://pastebin.com/8v0w1SSS21:31
tpbTitle: > drscan uscale.tap 10 0 -endstate DRPAUSE0001> drscan uscale.tap 10 0 -ends - Pastebin.com (at pastebin.com)21:31
_florent_indeed. I still think it could make sense to have some debug in place in the FPGA on the JTAG PHY21:33
_florent_to split the issue in half21:33
_florent_sorry I have to go21:33
cr1901I feel like we've overloaded poor _florent_ today21:34
cr1901_florent_: My questions can wait/they aren't important21:34
cr1901I just wanted to ask while you were around :D!21:34
*** Prometheus6765 <[email protected]> has quit IRC (Quit: Connection closed for inactivity)22:05
tnt_florent_: actually looking at the logic in JTAGPHY, I don't see how this would work.22:33
tntThere will be more SHIFTs than 10 because the total DR length is more than 10. So the "hardcoded" "JTAG Xfer FSM" can't work.22:34
tnt(more than 10 because there are other taps on the chain).22:34
tntDR really needs to be implemented as a 10 length shift register that's only loaded/interpreted at the right time rather than relying on counting the shifts.22:35
*** ilia__s <[email protected]> has joined #litex23:19

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