_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
_whitelogger has joined #litex
_whitelogger has joined #litex
lkcl_ has joined #litex
lkcl__ has quit [Ping timeout: 265 seconds]
jaseg has quit [Ping timeout: 272 seconds]
jaseg has joined #litex
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #litex
lkcl__ has joined #litex
lkcl_ has quit [Ping timeout: 258 seconds]
_whitelogger has joined #litex
CarlFK has quit [Remote host closed the connection]
FFY00 has quit [Ping timeout: 240 seconds]
FFY00 has joined #litex
Yam33 has quit [Remote host closed the connection]
_whitelogger has joined #litex
<lkcl__> does anyone know how to get litex to add a 16550 UART - in simulation - at an address 0xc0002000 ?
<lkcl__> so far i have tracked down (by looking at the generated csr.h) that UART (of an indetermined type, possibly not a 16550) is added by default at 0xc0001800 ("uart allocated at location 0")
<daveshah> I may be wrong but I don't think Litex has a 16550
<daveshah> It is possible to override the address using csr_map but I haven't done that for a while
<lkcl__> daveshah: mmm... drat. yeah i over-rode csr_map["sram"]... oh wait, no that was self.mem_map["sram"], it has allowed me to put an integrated RAM at 0x0000000 so i can run microwatt unit tests
<lkcl__> csr_map, i will try that, see what happens.
<lkcl__> ah the format is, csr_map['uart'] = 4 # Location 4
<lkcl__> holy shit it worked
<lkcl__> .oOOo.
<lkcl__> ; .mw. ; Microwatt, it works.
<lkcl__> ." ".
<lkcl__> :)
<lkcl__> wow, wow, that's incredible, it works for libresoc as well!
* lkcl__ is so happy :)
<daveshah> Great!
<daveshah> Did it turn out to be 16550 enough for the tests?
<lkcl__> basically yes
<lkcl__> i can't type at it via the simulation
<lkcl__> so keyboard interaction is out (the simulation of hello_world.bin is supposed to echo)
<lkcl__> but i don't need that right now
<lkcl__> it's enough so that i can try adding XICS interrupt handling without rewriting the microwatt tests/xics.bin
<lkcl__> right. sorry. next question.
<lkcl__> i have two peripherals, XICS-ICP and XICS-ICS. both of them are wishbone
<lkcl__> i have two options to connecting them up:
<lkcl__> 1) create a nmigen wishbone arbiter, set the addresses there, basically "hooking" into the dcache bus coming from the CPU
<lkcl__> 2) DoSomeVoodooMagicWith litex
<lkcl__> for (2) i'm guessing i'd need to bring out both WB buses via core.py
<lkcl__> and add them to periphh_buses (which currently is [self.dbus, self.ibus])
<lkcl__> however wiring them up *as* peripherals - specifying the address that they're to be on? no clue
<lkcl__> soc/integration/soc.py adds them like this (as WB masters):
<lkcl__> self.bus.add_master(name="cpu_bus{}".format(n), master=cpu_bus)
<lkcl__> ah.
<lkcl__> so i'm not adding the XICS peripherals (which are slaves) to periph_buses, then :)
* lkcl__ hmmmm
lkcl__ is now known as lkcl
<daveshah> The liteeth integration might be a useful clue
<tpb> Title: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)
<tpb> Title: liteeth/wishbone.py at master · enjoy-digital/liteeth · GitHub (at github.com)
<lkcl> ahh ;0
<lkcl> thank you
<lkcl> apologies, shift key is damaged, got jammed down there when typing a smiley
<daveshah> lol
<daveshah> This adds a sub-Wishbone-bus for accessing the Ethernet rx/tx buffers, into a region of main memory
<lkcl> it's got score-lines in it, almost worn completely the way through, from my nails (!)
<lkcl> ok excellent
<daveshah> XICS-ICP/XICS-ICS are devices, not initiators, right?
<lkcl> specifies the size... not cached...
<lkcl> yes, they're devices (wb slaves)
<lkcl> the processor will read/write to them to query the actual interrupt that occurred (and reset/acknowledge it)
<daveshah> Yep, makes sense
<lkcl> after receiving one single "global interrupt occurred" hardware flag being raised
<lkcl> it's a good system, basically identical to RISC-V PLIC
<lkcl> daveshah: so... SoCRegion will take the origin from the map (0xC0008000 or whatever), then self.bus.add_slave adds the peripheral at that memory location (with the size)?
<daveshah> yeah, that's how I understand it
<lkcl> ok great.
<lkcl> so this *might* be dead simple.
xobs has quit [Quit: killed]
leons has quit [Quit: killed]
<lkcl> self.bus = wishbone.Interface()
nrossi has quit [Quit: killed]
DerFetzer[m] has quit [Quit: killed]
sajattack[m] has quit [Quit: killed]
CarlFK[m] has quit [Quit: killed]
disasm[m] has quit [Quit: killed]
<lkcl> that's what gets added from self.bus.add_slave(name=name, slave=ethmac.bus,
<lkcl> the rest of LiteEthMACWishbone is not needed, i have that via the externally-generated code (nmigen libresoc), all i need to do is create a map in core.py onto a litex wishbone.Interface() and that's identical to how the dbus / ibus works
<lkcl> ok, thank you, i have a way forward :)
xobs has joined #litex
<lkcl> daveshah: at some point it'd be nice to put some of NLnet's donations your way, you've saved me an awful lot of time.
Felkin has joined #litex
<Felkin> Hello, guys! I'm looking for a little bit of advice. I've currently embarked upon a project of trying to get the PYNQ board running with litex.
<Felkin> I've asked florent about this a few months back, but had to then focus on something else so had to put the project on hold. Now I'm finally ready to get back to it and, well. It's proving challenging.
<Felkin> To summarize where I'm at: I know that the correct approach would be to generate zynq's processing system IP .xic file, use that in a similar fashion as the zybo_z7.py example in the litex-board repo, also prepare a platform board file with the pins outlined and go from there. The issue is that I'm having trouble wrapping my ahead around how
<Felkin> xilinx is handling these .xic files
<Felkin> If I was only trying to get a sort of 'pynq_processing_system7.xci' file, it seems doable, I've found these tucked away in the pynq image repo, but thing is, a pynq's selling point is the overlay system
<Felkin> What I think is interesting is being able to work on the design side in python with litex but then also interact with the designs using the overlay that xilinx designed. It'd be an interesting loop of everything sitting in the same python scripts for some rapid prototyping
<Felkin> Issue is, the overlay diagram is, well, huge and it's not clear to me at all if vivado is even generating a single .xci for this base overlay. It lists all these ips with their respective .xci's for each component of the overlay, but is there even a single 'final' .xci that it makes. Is it possibly the case that I should rather be looking for the
<Felkin> final verilog file it generates? I did find one that 'kind of' looks like what the full overlay is
peeps[zen] has quit [Ping timeout: 246 seconds]
nrossi has joined #litex
DerFetzer[m] has joined #litex
sajattack[m] has joined #litex
leons has joined #litex
mibus[m] has joined #litex
disasm[m] has joined #litex
CarlFK[m] has joined #litex
david-sawatzke[m has joined #litex
Felkin has quit [Remote host closed the connection]
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #litex
CarlFK has joined #litex
peepsalot has joined #litex
<lkcl> daveshah: xics added (i had to fudge the size of the CSR memmap because microwatt drops the XICS memmap @ 0xc0004000 and 0xc0005000)
<lkcl> thank you for that
<lkcl> i even added the uart interrupt line... aand of course the litex uart doesn't support UART_REG_IER_RLSI as a way to enable interrupts, doh :)
<lkcl> so i can see XICS wishbone addresses wiggling on the vcd trace, but not the external interrupt line.
* lkcl has to think a bit how to deal with that
<Finde> I think that microwatt was using another open source uart 16550
<lkcl> Finde: yes, the opencores one.
<lkcl> issue is, right now, i'm looking to test the libresoc XICS controller (equivalent to RISC-V PLIC)
<lkcl> with as simple a test infrastructure as i can make
CarlFK has quit [Ping timeout: 256 seconds]
lf has quit [Ping timeout: 260 seconds]
lf has joined #litex
CarlFK has joined #litex