_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://libera.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
Guest8421 has quit [Quit: Client closed]
peepsalot has quit [Read error: Connection reset by peer]
peepsalot has joined #litex
<somlo> _florent_: updated the litesata driver in the `litex-rebase` kernel branch: uses `ident` to determine size, and detects partitions. No write support yet, and mounting partitions fails (either b/c of unsupported writes, or more likely I have some sort of stride error when I read sectors within a bvec or something). I'll figure it out next week :)
linear_cannon has joined #litex
<jevinskie[m]> Anybody have recommendations for adapting litedram PHY for use on max10 that doesn’t have any serdes primitives on the external memory bank IOEs? They only have plain DDR registers. Should I just write the serdes in fpga logic? I guess that’s what the altera IP must do, I just wonder if it will be fast enough. Xilinx SelectIO is pretty spiffy compared to the more basic intel parts…
Degi has quit [Ping timeout: 260 seconds]
Degi has joined #litex
benh has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
benh has joined #litex
<cr1901> _florent_: Just to be clear: litevideo and opentitan are no longer used/supported, so I can safely delete those repos from my disk?
Guest3289 has joined #litex
FabM has joined #litex
FabM has quit [Changing host]
FabM has joined #litex
swetland has joined #litex
<swetland> _florent_: can't quite figure out how to wire up the clocks
<swetland> Exception: Unresolved clock domain eth, availables: sys sys_ps hdmi hdmi5x eth_rx eth_tx
<swetland> these migen ? errors resulting in big spews of python backtrace are unfun to try to unravel
<swetland> okay... kosagi_netv2 had an approach that at least is getting things to build, though I'm a bit unclear on what direction liteeth is expecting ref_clk to be in
<_florent_> swetland: can you share your target file? I could have a quick look
<swetland> I got it sorted. muselabs board is exchanging packets with my workstation now
<swetland> arp is working and then it tries to hit tftp. so it appears to be hearing the responses as well
<_florent_> ok good
<swetland> I do need to figure out how to set it up to handle driving refclk *to* the phy instead of accepting it from the phy once my boards get back from jlcpcb
<swetland> am I right in my assumption that the only documentation on how to use liteeth from a sw perspective is the source code for the bios?
<swetland> cool. just wanted to be sure I wasn't missing some human readable docs somewhere. (it doesn'
<swetland> t look like a terribly complicated interface)
<swetland> I have to say, it's quite impressive how much stuff Just Works most of the time with Litex.
Guest3289 is now known as betocool
<betocool> Hi all, I'm new to Litex here. Yet to start tinkering with Litex-Migen, either on a Nano board or an Arty A7. I find the concept very interesting.
<pepijndevos[m]> would it be possible to teach litex to use ghdl for synthesis of vhdl? That microwatt hack of manually compiling to verilog seems somewhat... unfortunate
<betocool> Question out of curiosity, would it be able to use LiteEth with LWiP on a baremetal uC (Risc-V) or as a FreeRTOS add on?
<gatecat> betocool: see no reason why not - I believe there's already Zephyr support for liteeth which might be useful for inspiration
<shenki> we also have a u-boot liteeth. lots of examples to follow.
<betocool> shenki: That will be interesting to see... Of all Litex projects, which one should I start to unravel to get a better idea of all interconnects, cpus, cores, etc?
<betocool> Oh, also... I'm assuming this is the right place to ask beginner questions?
<_florent_> Playing a bit with CoreScore on a VU19P :) : https://twitter.com/enjoy_digital/status/1527205528098721792
<_florent_> pepijndevos[m]: we should indeed automates the use of GHDL for toolchain not supporting VHDL
<_florent_> betocool: at some point we were using LWiP with LiteEth: https://github.com/enjoy-digital/liteeth/commit/0688532619fd2b111990066c8afce9132935afb9
<_florent_> betocool: this should still work
<pepijndevos[m]> at the moment GHDL can't correctly synth my design so maybe I'll just give up on the idea and write it in Migen :(
<_florent_> pepijndevos[m]: ah strange, are you using un-common VHDL design patterns? I've been using GHDL synth to prototype design in LiteX/Migen and progressively switch to VHDL and had that much issues with GHDL synth.
<pepijndevos[m]> I think it's choking on using the `abs` function
<_florent_> betocool: Documentation in the project is still limited, but you to have a better overview of the project, you can have a look at the wiki: https://github.com/enjoy-digital/litex/wiki
<_florent_> betocool: and the Tutorial/Resources: https://github.com/enjoy-digital/litex/wiki/Tutorials-Resources
<pepijndevos[m]> so far it looks like using ghdl to generate verilog directly is more reliable than using yosys... and also simpler to install and manage
<_florent_> ok, interesting, I think I only tested the VHDL -> GHDL-Synth -> Yosys -> Verilog flow
<pepijndevos[m]> yea I tried that initially, and that used to be the only path
<pepijndevos[m]> But turns out these days you can do `ghdl --synth --out=verilog` and bypass yosys if all you need is verilog code
betocool has quit [Quit: Client closed]
betocool has joined #litex
betocool has quit [Quit: Client closed]
<pepijndevos[m]> so `("H1", 0, Pins("j1:0 j1:1 j1:2 j1:3"), IOStandard("LVCMOS33"))` would take pins out of the j1 connector I supposed
<pepijndevos[m]> it's compiling!!!
<pepijndevos[m]> <_florent_> "litex_server --udp" <- hmmmm I already forgot how I did it last time but now I get `AttributeError: 'RemoteClient' object has no attribute 'regs'`
<tnt> you need the csr.csv file
<pepijndevos[m]> yea that seems to be it...
<pepijndevos[m]> now it's doing reeeeeally weird things
<pepijndevos[m]> it sorta boots but then times out and spams a looot of whitespace and then resets a few times and then has an error in the etherbone stuff or something
<trabucayre> comment tu m'as trouvé sur mastodon toi?
<pepijndevos[m]> oui (wait no I can understand this, don't spoil it)
<pepijndevos[m]> how you can find me on mastodon?
<trabucayre> oups... wrong chan :-/
<pepijndevos[m]> I figured ;)
<trabucayre> => how did you find me on mastodon you :)
<pepijndevos[m]> ah close... yea I wasn't sure about the m'as and toi parts the rest seemed... familiar
<trabucayre> I have closed one window -> lost my habits :)
<pepijndevos[m]> hmmmm so I've managed to get UART working without the etherbone stuff and it's stable now, but now I don't have a blinky and reset button any more.
<_florent_> Practice your french in #litex channel with trabucayre; lesson one May 19: How to kindly ask how your friend how (s)he found your mastodon account with the french attitude :)
<_florent_> pepijndevos[m]: IIRC correctly Etherbone was working correctly for you on Colorlight a few days ago no? Are you using a different configuration?
<pepijndevos[m]> yea it was working before... only difference should be that I've added my own IP
<pepijndevos[m]> but it's fine to use serial UART, makes it easier to experiment with the Ethernet probably.
<pepijndevos[m]> Only problem is now I'm not sure how to reset the device to upload new software.
<trabucayre> _florent_: :-/
<pepijndevos[m]> I guess powercycle it...
<pepijndevos[m]> or is there a way to make the software reset itself? Like... jump to litex
<trabucayre> its really it's perfectly kindly on the contrary :)
<pepijndevos[m]> hmmm actually yea I could just jump to the bios address maybe?
<pepijndevos[m]> I kinda want to learn french... It's like... I know just enough to be dangerous but no grammar at all
<_florent_> trabucayre: hehe
<_florent_> pepijndevos[m]: are you aware of this BTW: https://twitter.com/Claude1079/status/1231194849350647808, could be useful to modify at least one connector to have more In/Out IOs
<pepijndevos[m]> yea I've seen it
<pepijndevos[m]> also someone made a flexpcb mod that just wired them straight through
<_florent_> pepijndevos[m]: on thing you can also but, but not sure how fast it will be:
<pepijndevos[m]> for now I can get away with only outputs, mostly...
<_florent_> instead or regular UART, use UARBone + Crossover UART
<_florent_> 2s, I'll give you the commands
<_florent_> so build with --uart-name=crossover+uartbone
<_florent_> then open litex_server with --uart --uart-port=/dev/ttyUSBX
<_florent_> then litex_term crossover
<_florent_> this should allow you to load/execute your firmware as you were doing over etherbone
<_florent_> and you can also open litex_cli --gui in parallel
<_florent_> which will allow you to write/read the register of the SoC
<_florent_> registers
<_florent_> and should also have a reboot button
<pepijndevos[m]> wait I'm confused...
<pepijndevos[m]> what does --uart-name=crossover+uartbone actually do?
<pepijndevos[m]> Before I had crossover, and etherbone, and that somehow allowed me to use wishbone over ethernet. Now I have serial, which allows me to connect over UART, but uses the same pins as the LED/BTN
<_florent_> yes, so with crossover+uartbone, you are going to replace etherbone with uartbone and will still use the crossover uart
<_florent_> so the UART is tunneled over the UARTBone
<_florent_> you'll get something similar to this:
Guest1751 has joined #litex
<shenki> _florent_: why did you stop at 6000? :)
<_florent_> pepijndevos[m]: basically, you are deporting the reboot button to your Host :)
<_florent_> pepijndevos[m]: what's also funny is that there is continous refresh of the registers, so you see the SoC behaving through the CSR registers
<pepijndevos[m]> ohhhhhh
<pepijndevos[m]> so litex_cli --gui is what has the reset button?
<_florent_> yes, and litex_term/litex_cli will both be connected to litex_server that will share access to the hardware
<pepijndevos[m]> and I guess this also allows me to poke the registers of my peripheral which is neat
<_florent_> the interface is very simple for now, but has already been useful for such things yes
<pepijndevos[m]> awesome
<pepijndevos[m]> trabucayre: quand est la prochaine leçon
<_florent_> shenki: that was just a first test, just wanted to see how the vu19P would be filled with the previous top CoreScore on VU37P (but still beat it by +1 :))
<_florent_> shenki: another version is running
<shenki> nice
<shenki> _florent_: how long did the first run take?
<_florent_> shenki: not that long in fact, 13H and not on a particularly optimized setup: I7/7700K with Windows 10 and Vivado running in a Ubuntu 20.04 VM...
<_florent_> shenki: you just need to put enough RAM in the machine to avoid a Vivado crash...
<shenki> Ahh, what would sythesis be without a Vivado crash
<shenki> very cool. What's your prediction for the maximum corescore?
<_florent_> probably between 15000-18000, but not sure how long it will take on this machine with the congestions.
<_florent_> shenki: in fact a more useful experiment with these big FPGAs (at least for LiteX), would be to create a LiteX design with SoC peripherals in common and all the supported CPU softcores implemented in the same design and that could be selected as the main CPU of the SoC. Would be nice for CPU regression tests: One board, one bitstream to verify all the CPUs (and also eventually verify the Linux boot on the ones supporting it).
<_florent_> the VU19P is from a client but I have some VU9P (recycled from mining) that I could use for this.
<pepijndevos[m]> _florent_: yeeaaahhh so the uartbone gives a similar problem where it seems there is a timeout error between the terminal and the litex_server
<pepijndevos[m]> The GUI gives the same timeout
<shenki> _florent_: that would be a fun experiment. A sure way to flush out some bugs in litex
<trabucayre> pepijndevos[m]: next time I close an IRC window :)
<pepijndevos[m]> deal
<pepijndevos[m]> bleg
<pepijndevos[m]> The gui is actually great for poking registers but I can't seem to upload my code with this config: `[LITEX-TERM] Got unexpected response from device 'b';''`
Guest1751 has quit [Quit: Client closed]
FabM has quit [Quit: Leaving]
<_florent_> pepijndevos[m]: can you try to add --safe to litex_term? (I think that what I also suggested when you were using Etherbone)
<pepijndevos[m]> what does that do?
<pepijndevos[m]> At the moment I'm just calling reset at the end of my program, so I can upload it, and as long as I keep the terminal open it'll keep uploading it, but if I close it it just goes back to the bios. Works well enough for now.
<pepijndevos[m]> hm maybe --safe will fix the upload issue, but it'll not fix the timeout, which seems to be a problem with the litex_server since both the GUI and the terminal have the same timeout after a while.
<_florent_> this force litex_term to wait for the CPU ack before transmiting the next packet. So is slow since you pay the round-trip latency for each packet but should work in all cases.
cr1901_ has joined #litex
cr1901 has quit [Ping timeout: 272 seconds]
cr1901 has joined #litex
cr1901_ has quit [Ping timeout: 260 seconds]
<jevinskie[m]> _florent_: I see that the lpddr4 PHY uses utils Serializer/Deserializer to make a 16:1 serdes from 8:1 HW serdes. I guess I should try using it as an 8:1 serdes for the max10 IOE?
zjason` has joined #litex
zjason has quit [Ping timeout: 240 seconds]
<swetland> okay, wacky... litex *does* provide the clock to the 8720A module by default... I had assumed since the module had a 50M oscillator it was configured the other way around
<swetland> what's the simplest way to talk to something over etherbone? (is there a trivial little tool to just read/write memory/registers?)
<sajattack[m]> I think wishbone_tool or something
<sajattack[m]> Can't remember the exact names
<sajattack[m]> wishbone_tool and litex_cli maybe
<sajattack[m]> swetland:
<jevinskie[m]> swetland: RemoteClient python class could be used from a Python REPL or simple script. Here is a more complicated script that does bitfield decoding but it illustrates the use of RemoteClient
<swetland> looks like litex_server talks to wishbone and then other tools talk to it?
<swetland> er etherbone
<jevinskie[m]> yep. i forget if wishbone_tool talks directly to the fpga or not
<swetland> is etherbone a stable protocol? is there a spec somewhere?
<tpb> Title: Etherbone full specifications · Wiki · Projects / EtherBone Core · Open Hardware Repository (at ohwr.org)
<jevinskie[m]> check out the last page
<swetland> hm. memory reads seem to return 0 or timeout. but it does seem to be interacting with the board
<jevinskie[m]> I'd try checking using a different transport (eth/jtag/uart)
* swetland nods
<swetland> writing a little test program it seems like a very large percentage of rx packets have crc errors
<swetland> wondering if there's a clock alignment issue
<swetland> the cheesy trick of swapping 0 and 1 here fixes rx for me: self.specials += DDROutput(0, 1, clock_pads.ref_clk, ClockSignal("eth_tx"))
<swetland> (liteeth/phy/rmii.py)