_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://freenode.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
rohitksingh has quit [Ping timeout: 260 seconds]
Degi_ has joined #litex
Degi has quit [Ping timeout: 265 seconds]
Degi_ is now known as Degi
CarlFK has quit [Quit: Leaving.]
CarlFK has joined #litex
gregdavill has joined #litex
<gregdavill> Are there any examples of adding a second CSRBank to a SoC?
skip has quit [Remote host closed the connection]
<gregdavill> I think I've got it working correctly, but now I'm wanting to tidy up the implementation.
<gregdavill> I'm essentially creating a new CSR bus, and passing the address/data signals through a clock domain via an AsyncFIFO.
<gregdavill> This is specifically for operating valentyusb.eptri 12MHz, from a CPU that's running at 48-72MHz.
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #litex
rohitksingh has joined #litex
CarlFK has quit [Quit: Leaving.]
<_florent_> gregdavill: for second CSRBank, you have to do it manually for now, probably as you just did. The potential issue with CSR and CDC is that the CSR is expecting reads to be returned on the next clock cycle which is not possible if the origin clock is faster than the target clock. Doing CDC on Wishbone would be possible (due to the stb/ack) but not currently implemented in LiteX.
<_florent_> gregdavill: happy to have a look at your implementation to see if we could ease this in LiteX
<gregdavill> I've created a custom WB2CSR. Which exposes an Ack signal that is fed externally if a read is performed.
<gregdavill> Essentially I send Addr/Dat/we signals through an Async FIFO, and then if we is low, addr/dat is sent back though another AsyncFIFO. Ack is esserted when the address back matches the pending request.
<gregdavill> I'm trying to just have all the cdc stuff happening at the CSR bus, because it's nice and simple. But I've had to tie in a wishbone level to hold the CPU to handle reads.
<gregdavill> This way isn't super fast for reads, but uses the least amount of resources.
<zyp> does the link part of valentyusb really have to be operated at 12MHz?
<zyp> I'm currently working on a usb core of my own, and while the phy needs to operate at 48 MHz, the link should be able to operate at whatever as long as it's able to keep up
<_florent_> gregdavill: ok i see, it's indeed complicated to do CDC on CSR due to the assumption data should be ready on the next cycle
<_florent_> In the future, we should probably allow creating different groups of CSRs running in different clock domains and let the tools connect it to the main bus and insert the CDC modules. But not sure this is going to be very soon, so your solution is probably fine for now.
<_florent_> zyp: i'm not well aware of valentyusb, but the link is probably working at 12MHz to simplify CDC between 12MHz and 48MHz and reduce resource usage.
<zyp> https://github.com/im-tomu/valentyusb/blob/master/valentyusb/usbcore/rx/pipeline.py#L104 <- it's using an AsyncFIFO for CDC and my understanding is that that should work for arbitrary clock differences, am I mistaken?
<tpb> Title: valentyusb/pipeline.py at master · im-tomu/valentyusb · GitHub (at github.com)
<zyp> ah, looks like the tx pipeline is running the serializer from the 12MHz clock
<gregdavill> I actually haven't looked into it too deeply, I just assumed that the 12/48MHz domains were quite tightly coupled.
HoloIRCUser1 has joined #litex
HoloIRCUser has quit [Read error: Connection reset by peer]
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
skip has joined #litex
gregdavill has quit [Quit: Leaving]
ambro718 has joined #litex
ambro718 has quit [Quit: Konversation terminated!]
ambro718 has joined #litex
CarlFK has joined #litex
btashton has joined #litex
<btashton> I'm trying top build the kernel module for the litepcie core, but I am a little unclear as to how I should be integrating this with the generated sources from my litex build
<btashton> I see I was not generating the correct headers.
gojimmypi has joined #litex
btashton has quit [Remote host closed the connection]
btashton has joined #litex
btashton has quit [Remote host closed the connection]
btashton has joined #litex
btashton has quit [Ping timeout: 240 seconds]
scanakci has joined #litex
<scanakci> I could simulate Linux on Litex for BlackParrot.
<scanakci> @_florent_: There were some issues on BlackParrot side. I will resolve the issues once I could run Linux on FPGA.
<scanakci> I am expecting to make it happen this week.
<somlo> scanakci: nice! How long did it take to boot Linux in the simulator?
skip has quit [Remote host closed the connection]
skip has joined #litex
CarlFK has quit [Quit: Leaving.]
ambro718 has quit [Quit: Konversation terminated!]
<skip> I'm trying to get Linux running on my Panologic G2, but I get a build error with the current tree:
<skip> When I build the gateware for the default CPU_VARIANT it builds and runs, but when I set CPU_VARIANT to linux the build fails with:
<skip> File "/home/skip/pano/working/litex-buildenv/targets/pano_logic_g2/base.py", line 86, in __init__
<skip> anyone had any ideas?
CarlFK has joined #litex
HoloIRCUser2 has joined #litex
HoloIRCUser3 has joined #litex
HoloIRCUser1 has quit [Ping timeout: 256 seconds]
HoloIRCUser2 has quit [Ping timeout: 264 seconds]
futarisIRCcloud has joined #litex
peepsalot has joined #litex
HoloIRCUser1 has joined #litex
HoloIRCUser3 has quit [Ping timeout: 265 seconds]