tpb has joined #litex
<scanakci> _florent_: I guess I am done with the necessary changes to fix the issue that we discussed. I will probably let you know tomorrow. Do you mind having a separate branch for blackparrot? I think it is the easiest way for final integration, too. I can also create a separate repo.
y2kbugger has joined #litex
<scanakci> ls
forksand has quit [Ping timeout: 240 seconds]
forksand has joined #litex
forksand has quit [Ping timeout: 240 seconds]
CarlFK has quit [Read error: Connection reset by peer]
forksand has joined #litex
<_florent_> scanakci: good for the simulation changes, a separate branch or repo would be fine yes
_whitelogger has joined #litex
CarlFK has joined #litex
y2kbugger has quit [Ping timeout: 245 seconds]
y2kbugger has joined #litex
y2kbugger has quit [Ping timeout: 245 seconds]
y2kbugger has joined #litex
y2kbugger has quit [Ping timeout: 245 seconds]
y2kbugger has joined #litex
CarlFK has quit [Quit: Leaving.]
forksand has quit [Ping timeout: 240 seconds]
forksand has joined #litex
CarlFK has joined #litex
acathla has quit [Remote host closed the connection]
y2kbugger has quit [Ping timeout: 245 seconds]
y2kbugger has joined #litex
acathla has joined #litex
cansu has joined #litex
<cansu> Hello @somlo, I have another question. I was checking wishbone-axi interface in rocket core and as far as I understood, in core.py file, two interfaces for axi(64 bit), two interfaces for wishbone(64bit) are defined and then converted to each other by using AXI2WB and then downconverted to 32 bit ibus and dbus wishbone interfaces. What I could not understand is where the data is coming to mem_axi and mmio_axi. I could not
<cansu> see how it is connected to L1 and MMIO in rocket and how you get information for ibus and dbus. If you can explain briefly or send me the file where this connection is made, I would really appreciate. Thanks in advance.
<somlo> cansu: most other (32bit) CPU models in LiteX don't have L1 cache, and have separate wishbone ports for instruction vs. data accesses
<somlo> hence "ibus" and "dbus"
<somlo> they're both masters on the wishbone bus, and whichever the CPU happens to use, it will write or read data over the bus
<somlo> data which then gets routed to a CSR (mmio register), sram, bootrom, or main_ram, depending on the address
<somlo> ok, now on to Rocket -- which has an "on-board" L1 cache, and internal routing of read/write accesses
<somlo> you build Rocket with hard-coded MMIO and RAM address ranges, when generating the verilog (in the rocket/verilog litex submodule)
<somlo> these ranges should match what LiteX has specified in rocket/core.py (or else things can't work)
<somlo> If a read/write access to an MMIO address (as per rocket's internal routing map) occurs, it will come out over the mmio_axi port
<somlo> if it's to/from a RAM range, the mem_axi port will be used instead
<somlo> doesn't matter, both end up being converted to 32-bit wishbone, and wired into ibus and dbus (again, doesn't matter, they're both masters on the wb bus)
<somlo> so ibus and dbus are "misnomers" as far as rocket is concerned, it's just that litex is coded to expect those two and add them to the masters list on the wishbone interconnect
<somlo> so I think mem_axi is converted to 64bit wb, then to 32bit wb, then connected to the bus as the "ibus" master port
<somlo> mmio_axi is undergoing a similar conversion to 32bit wb, and ends up as the "dbus" wb master
<somlo> now, with the latest litex commit from yesterday (b627a8fe), the *only* thing being accessed over mem_axi is actual RAM starting at 0x8000_0000, everything else goes over mmio_axi
<somlo> which means my next step is to decouple Rocket's mem_axi port and LiteDRAM's data port from the wishbone bus, and just hook them up to each other, point-to-point, at native 64bit axi
<somlo> which should hopefully improve memory bandwidth significantly.
<somlo> cansu: how many axi ports does your CPU have?
ambro718 has joined #litex
<somlo> cansu: hope that all makes sense, if not let me know and I can elaborate on whichever bits were too vague :)
<somlo> cansu: here's a picture :) https://pastebin.com/8bWCnWR5
freemint has joined #litex
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #litex
CarlFK has quit [Ping timeout: 240 seconds]
freemint has quit [Ping timeout: 264 seconds]
<cansu> @somlo Our CPU does not have any AXI ports yet and we are considering to make a connection from MEM-CCE interface to Wishbone, just for LiteX integration. I am just trying to figure out how things are working in Rocket. I will check your explanation and get back to you very soon. Thank you very much for your time and for the detailed explanation!
freemint has joined #litex
<somlo> cansu: if all (instruction and data) accesses are done over a single wishbone port, you won't have to worry about axi, conversion, or routing
<somlo> you may have to down-convert wishbone to 32-bit (if yours will be 64 natively)
<somlo> then you need to connect either ibus or dbus to the 32-bit master side of your cpu-facing wishbone port
<somlo> not sure what happens if one of them (ibus or dbus) is 'None' right now, but I'm thinking of adding a check for that as a patch
<somlo> because I will also only have one to connect to the wishbone bus...
<somlo> once I bypass wb for the cpu-to-litedram datapath, that is
freemint has quit [Ping timeout: 245 seconds]
<_florent_> somlo: this should simplify things:
<tpb> Title: cpu: add buses list and use it in soc_core to add bus masters · enjoy-digital/litex@1045cda · GitHub (at github.com)
<tpb> Title: cpu/rocket: rename ibus/dbus to mem_wb/mmio_wb and add size suffix · enjoy-digital/litex@467d35e · GitHub (at github.com)
<somlo> _florent_: thanks, that makes it simple and straightforward; also for cansu if the new cpu only comes with a single, universal wishbone port!
freemint has joined #litex
<_florent_> yes and in the future we would even allow buses to be wb or axi and non-32-bit and do the adaptation directly in the SoC
freemint has quit [Ping timeout: 245 seconds]
CarlFK has joined #litex
freemint has joined #litex
cansu has quit [Quit: Connection closed for inactivity]
<scanakci> __florent_: The branch is ready to be pushed. I guess you need to add me as a contributor before I push the branch.
<scanakci> I added an environment variable (FILE_LIST_PATH) to the "litex/build/sim/core/Makefile" file to specify the filelist. Verilator accepts this file with -f. I think it may be good to add another function which specify the path of filelist instead of specifying folder path (i.e. add_source_dir).
y2kbugger has quit [Read error: Connection reset by peer]
y2kbugger has joined #litex
ambro718 has quit [Quit: Konversation terminated!]
y2kbugger has quit [Ping timeout: 250 seconds]
y2kbugger has joined #litex
y2kbugger has quit [Ping timeout: 250 seconds]
y2kbugger has joined #litex
tpb has quit [Remote host closed the connection]