Friday, 2020-09-04

*** tpb has joined #litex00:00
*** _whitelogger has quit IRC00:33
*** _whitelogger has joined #litex00:35
*** _whitelogger has quit IRC00:54
*** _whitelogger has joined #litex00:56
*** lkcl_ has joined #litex00:58
*** lkcl__ has quit IRC01:02
*** jaseg has quit IRC02:53
*** jaseg has joined #litex02:55
*** Degi has quit IRC03:38
*** Degi has joined #litex03:39
*** lkcl__ has joined #litex04:03
*** lkcl_ has quit IRC04:07
*** _whitelogger has quit IRC04:45
*** _whitelogger has joined #litex04:47
*** CarlFK has quit IRC08:53
*** FFY00 has quit IRC08:54
*** FFY00 has joined #litex08:55
*** Yam33 has quit IRC09:13
*** _whitelogger has quit IRC09:57
*** _whitelogger has joined #litex09:59
lkcl__does anyone know how to get litex to add a 16550 UART - in simulation - at an address 0xc0002000 ?11:40
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")11:41
daveshahI may be wrong but I don't think Litex has a 1655011:49
daveshahIt is possible to override the address using csr_map but I haven't done that for a while11:52
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 tests11:55
lkcl__csr_map, i will try that, see what happens.11:55
lkcl__ah the format is, csr_map['uart'] = 4 # Location 411:56
lkcl__holy shit it worked11:56
lkcl__   .oOOo.11:57
lkcl__ ."      ".11:57
lkcl__ ;  .mw.  ;   Microwatt, it works.11:57
lkcl__:)11:57
lkcl__wow, wow, that's incredible, it works for libresoc as well!11:57
* lkcl__ is so happy :)11:58
daveshahGreat!11:59
daveshahDid it turn out to be 16550 enough for the tests?11:59
lkcl__basically yes11:59
lkcl__i can't type at it via the simulation12:00
lkcl__so keyboard interaction is out (the simulation of hello_world.bin is supposed to echo)12:00
lkcl__but i don't need that right now12:00
lkcl__it's enough so that i can try adding XICS interrupt handling without rewriting the microwatt tests/xics.bin12:01
lkcl__right.  sorry.  next question.12:05
lkcl__i have two peripherals, XICS-ICP and XICS-ICS.  both of them are wishbone12:05
lkcl__i have two options to connecting them up:12:05
lkcl__1) create a nmigen wishbone arbiter, set the addresses there, basically "hooking" into the dcache bus coming from the CPU12:06
lkcl__2) DoSomeVoodooMagicWith litex12:06
lkcl__for (2) i'm guessing i'd need to bring out both WB buses via core.py12:08
lkcl__and add them to periphh_buses (which currently is [self.dbus, self.ibus])12:08
lkcl__however wiring them up *as* peripherals - specifying the address that they're to be on? no clue12:09
lkcl__soc/integration/soc.py adds them like this (as WB masters):12:11
lkcl__                self.bus.add_master(name="cpu_bus{}".format(n), master=cpu_bus)12:11
lkcl__ah.12:11
lkcl__so i'm not adding the XICS peripherals (which are slaves) to periph_buses, then :)12:12
* lkcl__ hmmmm12:12
*** lkcl__ is now known as lkcl12:12
daveshahThe liteeth integration might be a useful clue12:14
daveshahhttps://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L1302-L130312:14
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)12:14
daveshahhttps://github.com/enjoy-digital/liteeth/blob/master/liteeth/mac/wishbone.py#L15-L4712:14
tpbTitle: liteeth/wishbone.py at master · enjoy-digital/liteeth · GitHub (at github.com)12:14
lkclahh ;012:14
lkclthank you12:14
lkclapologies, shift key is damaged, got jammed down there when typing a smiley12:15
daveshahlol12:15
daveshahThis adds a sub-Wishbone-bus for accessing the Ethernet rx/tx buffers, into a region of main memory12:15
lkclit's got score-lines in it, almost worn completely  the way through, from my nails (!)12:16
lkclok excellent12:16
daveshahXICS-ICP/XICS-ICS are devices, not initiators, right?12:16
lkclspecifies the size... not cached...12:16
lkclyes, they're devices (wb slaves)12:16
lkclthe processor will read/write to them to query the actual interrupt that occurred (and reset/acknowledge it)12:17
daveshahYep, makes sense12:17
lkclafter receiving one single "global interrupt occurred" hardware flag being raised12:18
lkclit's a good system, basically identical to RISC-V PLIC12:18
lkcldaveshah: 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)?12:20
daveshahyeah, that's how I understand it12:21
lkclok great.12:21
lkclso this *might* be dead simple.12:21
*** xobs has quit IRC12:21
*** leons has quit IRC12:21
*** nrossi has quit IRC12:21
lkclself.bus    = wishbone.Interface()12:21
*** DerFetzer[m] has quit IRC12:21
*** sajattack[m] has quit IRC12:21
*** CarlFK[m] has quit IRC12:21
*** disasm[m] has quit IRC12:22
lkclthat's what gets added from self.bus.add_slave(name=name, slave=ethmac.bus,12:22
lkclthe 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 works12:23
lkclok, thank you, i have a way forward :)12:24
*** xobs has joined #litex12:30
lkcldaveshah: 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.12:31
*** Felkin has joined #litex12:33
FelkinHello, 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.12:35
FelkinI'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.12:37
FelkinTo 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 how12:41
Felkinxilinx is handling these .xic files12:41
FelkinIf 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 system12:43
FelkinWhat 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 prototyping12:45
FelkinIssue 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 the12:47
Felkinfinal verilog file it generates? I did find one that 'kind of' looks like what the full overlay is12:47
*** peeps[zen] has quit IRC12:56
*** DerFetzer[m] has joined #litex12:57
*** nrossi has joined #litex12:57
*** sajattack[m] has joined #litex12:57
*** leons has joined #litex12:57
*** CarlFK[m] has joined #litex12:57
*** disasm[m] has joined #litex12:57
*** mibus[m] has joined #litex12:57
*** david-sawatzke[m has joined #litex12:57
*** Felkin has quit IRC13:40
*** FFY00 has quit IRC15:07
*** FFY00 has joined #litex15:08
*** CarlFK has joined #litex16:23
*** peepsalot has joined #litex17:35
lkcldaveshah: xics added (i had to fudge the size of the CSR memmap because microwatt drops the XICS memmap @ 0xc0004000 and 0xc0005000)20:40
lkclthank you for that20:40
lkcli 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 :)20:41
lkclso i can see XICS wishbone addresses wiggling on the vcd trace, but not the external interrupt line.20:42
* lkcl has to think a bit how to deal with that20:42
FindeI think that microwatt was using another open source uart 1655022:41
lkclFinde: yes, the opencores one.23:00
lkclissue is, right now, i'm looking to test the libresoc XICS controller (equivalent to RISC-V PLIC)23:01
lkclwith as simple a test infrastructure as i can make23:01
*** CarlFK has quit IRC23:39
*** lf has quit IRC23:44
*** lf has joined #litex23:44
*** CarlFK has joined #litex23:54

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