Wednesday, 2021-01-13

*** tpb has joined #litex00:00
*** lf_ has joined #litex00:10
*** lf has quit IRC00:10
*** ranzbak has quit IRC01:49
*** Degi_ has joined #litex04:13
*** Degi has quit IRC04:15
*** Degi_ is now known as Degi04:15
*** Bertl is now known as Bertl_zZ04:34
*** andrewb1999 has quit IRC06:43
*** ranzbak has joined #litex07:19
*** Melkhior has joined #litex08:56
*** kgugala has quit IRC09:00
*** kgugala has joined #litex09:00
*** hansfbaier has joined #litex09:04
MelkhiorHello all; I have a question about litex & sdcard - are you supposed to be able to see and mount an sdcard if you've booted from serial ? Or is it only to load the kernel & rootfs to memory ?09:06
MelkhiorI have a piece of hardware I designed and I can't get the sdcard to work for me from my own gateware (unrelated to LiteX), but I can 'sdcard_detect', 'sdcard_init' and 'sdcard_read' in the LiteX BIOS...09:06
MelkhiorI wanted to check the HW more thoroughly using it from Linux-on-VexRiscV, but  I don't see the sdcard in 'dmesg' or in /dev.09:06
MelkhiorThanks for any help :-)09:06
*** hansfbaier1 has joined #litex09:51
*** hansfbaier has quit IRC09:53
_florent_Hi Melkhior, the SDCard can be used to load images with the BIOS but can also be used from Linux (even if Linux is booted from serial if the SDCard is declared in the .dts).10:54
_florent_But the SDCard support with Linux-on-LiteX-VexRiscv still need to be finished: https://github.com/litex-hub/linux-on-litex-vexriscv/issues/17110:55
Melkhior_florent_ thanks. It's not in my DTS so I guess PIBKAC :-)10:56
_florent_The current status with Linux-on-LiteX-VexRiscv is: with the BIOS: both SPI and SD mode are working. with Linux: SPI mode is working, SD mode still requires somes tests/fixes.10:57
MelkhiorI forgot to change the DTB in my 'boot directory' when I added my expansion board, silly me...10:57
_florent_but SD mode is working in Linux with Rocket CPU, so it's probably not a big issue, but still need to be looked at :)10:58
MelkhiorBTW - does the sdcard code requires 'wishbone' or does it have a lower-level interface ?11:00
MelkhiorAlso - I'm trying to add a micro-sd card slot to a 26 years old SPARCstation 20 so the performance of the SD interface is not the primary concern:-)  (or Linux support, only NetBSD has good support theses days)11:00
MelkhiorThanks for the help!11:00
acathlaI'm trying to understand why in uart.py, in RS232PHYTX Module there is this line : self.sink = stream.Endpoint([("data", 8)])11:06
acathlaWhy is TX a sink?11:06
zypbecause a UART transmitter needs data to transmit, the sink is receiving that data11:11
acathlaOkay, thanks zyp11:22
*** hansfbaier1 has quit IRC12:02
*** shorne has joined #litex12:04
shornesomlo: FYI, the changes still look good, I may just merge soon12:05
*** Bertl_zZ is now known as Bertl12:06
somloshorne: sounds good, thanks!12:37
Melkhior_florent_ For some reason even with the right DTB I don't see the sd-card from Linux, but once I put the boot files on the sdcard the BIOS instantly boots from it - and a lot faster than from serial :-)13:24
MelkhiorI might have an out-of-date/incompatible kernel and/or litesdcard...13:24
Melkhioranyway it shows that my HW is OK at least for reading, I guess13:24
MelkhiorThanks again13:24
*** st-gourichon-fid has quit IRC13:44
*** st-gourichon-fid has joined #litex14:29
*** sthornington has joined #litex15:20
*** peeps[zen] has joined #litex17:29
*** peepsalot has quit IRC17:30
*** peepsalot has joined #litex17:34
*** peeps[zen] has quit IRC17:35
*** andrewb1999 has joined #litex17:36
_florent_acathla: sink/source is always relative to your point of view (if you see things from inside a Module or outside). Here for RS232PHYTX we are reasoning from outside where the sink receive the data. That's generally the approach that is used in the cores.17:55
*** Melkhior has quit IRC17:57
_florent_Melkhior: good for the SDCard, if reads work, writes should also work (that's the same 4-bit bus)17:57
acathla_florent_, but in the module there is no fifo, but an Endpoint, and I don't really understand well the logic here17:58
_florent_acathla: that's True that it would be good to add some comments in this code :)18:00
acathlaIn every code in LiteX :P18:00
_florent_but basically, it receives the data on the sink. On the sink, 3 signals are used: valid/ready/data18:01
_florent_when valid is set to 1 (by the external Module driving it), we have a TX byte to transmit18:01
_florent_the core can then use the data and transmit it18:02
_florent_and then just ack on ready signal when done18:02
_florent_the external module can then just send the next data18:02
_florent_etc...18:02
_florent_The LiteX's streams are very close to AXI streams18:03
acathlaI never used AXI streams...18:03
_florent_https://github.com/enjoy-digital/litex/wiki/Streams18:03
acathlaI read it, a lot =)18:04
acathlaThe problem is that I cannot fill the TX FIFO so that the UART says it's full. A If(uart_txfull_read()) { printf("full\n" } uart_rxtx_write(somechar); in a loop never fills the fifo, even at 12MHz when it's a serial thing18:05
_florent_ah ok, maybe you could look at the AXI specification, it's well written and explains things clearly18:05
acathla_florent_, ok18:05
_florent_for example: https://www.xilinx.com/support/documentation/ip_documentation/ug761_axi_reference_guide.pdf18:06
_florent_you can only look at AXI stream18:06
_florent_for your particular case it could just be that the transmitter consumes the data faster than provided by the CPU18:08
acathlaHow is it possible when it's a serial transmitted feeded by a parallel CPU?18:09
acathlaunless it takes many CPU cycles to write to the FIFO18:10
_florent_observing the valid/ready signals of the transmitter's sink could be useful18:10
_florent_(I'm reasoning with the elements I have from our last discussion: SERV CPU, 8-bit CSR, etc... :))18:11
acathlaI tried with a vexriscv, with code in RAM, much faster now18:11
_florent_(but you were also not using a regular RS232 transmitter IIRC)18:11
_florent_ok18:12
acathlaright, to transmit with InfraRed18:12
_florent_at least, I think you would have a better visibility by including a LiteScope module or outputing some signals to a scope, this would also be very useful to understand how things are working18:13
acathlaLast time I tried the design was too big to fit, but I can try now I removed USB18:13
acathlaOr try on a bigger FPGA18:15
_florent_Yes I was going to recommend that18:17
_florent_LiteX greatly simplifies switching from a FPGA device/family to another, so I would really recommend prototyping things on a medium/large FPGA first18:18
*** kgugala_ has joined #litex18:26
*** kgugala__ has joined #litex18:28
*** kgugala has quit IRC18:29
*** kgugala_ has quit IRC18:30
*** kgugala__ has quit IRC18:35
*** kgugala has joined #litex18:35
*** Bertl is now known as Bertl_oO18:43
*** andrewb1999 has quit IRC19:15
*** SpaceCoaster_ has quit IRC19:17
*** SpaceCoaster has joined #litex19:18
*** andrewb1999 has joined #litex19:25
*** andrewb1999 has quit IRC19:49
Findequick plug that if any of you have projects related to litex, you might want to add them to librecores.org to help others find them :)20:21
*** acathla has quit IRC21:21
*** acathla has joined #litex21:22
*** hansfbaier has joined #litex21:36
*** lkcl has quit IRC22:18
*** lkcl has joined #litex22:31
*** acathla has quit IRC23:08
*** acathla has joined #litex23:08
*** hansfbaier has quit IRC23:25

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