_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
rohitksingh has quit [Ping timeout: 255 seconds]
CarlFK has quit [Ping timeout: 272 seconds]
rohitksingh has joined #litex
rohitksingh has quit [Ping timeout: 240 seconds]
gregdavill has joined #litex
<gregdavill> pdp7: whoops, that module was a remnant of some hardware DMA tests I was trying, not required for the LCD.
<gregdavill> r4d10n: The BIOS code is compiled and then loaded directly into BRAM during synthesis. So it is embedded in the bitstream and should run once the ECP5 is configured.
<gregdavill> sajattack[m]: The following files are needed gen.py and uartstream.py. This is all WIP stuff, it could be organised much better.
<gregdavill> uartstream.py replaces the standard UART module, and provides the serial data (via a FIFO) in the form of a LiteX stream.
<sajattack[m]> Yeah it locked up my uart
<gregdavill> gen.py takes a LiteX stream and prints characters to the Terminal display memory. It also handles newlines and line-wrap by scrolling the text up the screen.
<gregdavill> A solution is to wrap the standard UART module, with a module that splits the TX stream into 2 a main and sub stream. The standard UART terminal will still be connected to main, and the display hooks onto the sub.
<gregdavill> In its current demo on the hadbadge it's kind of dumb, there is no way to type data into the console. So it's really only useful for showing the Linux startup scroll.
<sajattack[m]> Ok mine didn't do that either
<gregdavill> You'll need to add the new uart module to the SoC: https://github.com/gregdavill/linux-on-litex-vexriscv/blob/hadbadge-flash/soc_linux.py#L225
<tpb> Title: linux-on-litex-vexriscv/soc_linux.py at hadbadge-flash · gregdavill/linux-on-litex-vexriscv · GitHub (at github.com)
<gregdavill> Then hook up the fake uart stream, to the terminal generator, and the terminal generator to the terminal: https://github.com/gregdavill/linux-on-litex-vexriscv/blob/hadbadge-flash/soc_linux.py#L238
<tpb> Title: linux-on-litex-vexriscv/soc_linux.py at hadbadge-flash · gregdavill/linux-on-litex-vexriscv · GitHub (at github.com)
<gregdavill> If you can push some code you've got running so far I can take a look for any obvious issues with how things are connected.
rohitksingh has joined #litex
_whitelogger has joined #litex
gregdavill has quit [Remote host closed the connection]
gregdavill has joined #litex
<sajattack[m]> it's ok I'll look at it another time
_whitelogger has joined #litex
CarlFK has joined #litex
ambro718 has joined #litex
ambro718 has quit [Ping timeout: 272 seconds]
<sajattack[m]> I think I know why I'm not getting linux booting
<sajattack[m]> I'm set up for serial boot and your replaced the serial with something that just prints "root\n" at boot
<sajattack[m]> I haven't dug into litex enough to know what a stream is either
rohitksingh has quit [Ping timeout: 248 seconds]
<tpb> Title: litex/uart.py at 017c91a4be6f1463cb771f4bd928db6e7c79a4de · enjoy-digital/litex · GitHub (at github.com)
<sajattack[m]> unfortunately uart_stream doesn't seem to have the right interface for that
ambro718 has joined #litex
<sajattack[m]> or does it?
<gregdavill> Ahh, you're still using serialboot. That explains it, that lcd interface, in it's current form, replaces the uart entirely.
<sajattack[m]> Yeah
<gregdavill> UARTMultiplexer is probably not the right interface, you'd want something closer to the UARTCrossover.
<gregdavill> Basically tee off the TX stream, and feed that into gen.py. No need for uart_stream.
<gregdavill> You only need to connect the data/valid signals, maybe another small FIFO.
<sajattack[m]> is this enough? https://hastebin.com/alinuquhut.pl
* sajattack[m] uploaded an image: image.png (730KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/UrWWrSWrDBgxrekrrOycPgDi >
<sajattack[m]> it doesn't work whether I connect to uart or uart.xover
<gregdavill> You might be able to just do `self.uart.source.connect(gen.sink, omit=['ready'])`
<sajattack[m]> with or without uartcrossover?
<gregdavill> without, but I just tested it, and it doesn't work very well.
<sajattack[m]> not very well is better than not at all
<gregdavill> This kinda works. You might get some dropped characters on the VGA terminal.
<gregdavill> For now you can just increase the FIFO size if you see dropped data. :P
<sajattack[m]> cool thanks
<sajattack[m]> is 64 the fifo size?
<gregdavill> Yep
<gregdavill> What this code is doing, is basically just watching the internal UART TX stream. When a byte is transmitted (ready & valid) it copies it to a FIFO. The terminal generator is then taking these bytes from the FIFO.
<sajattack[m]> ok
<sajattack[m]> it's only showing the last line
<sajattack[m]> and it really doesn't like when I backspace
<gregdavill> Do you have the latest LiteVideo?
<sajattack[m]> idk
<gregdavill> There is a change need for implementing the scrolling.
<tpb> Title: Merge pull request #27 from gregdavill/terminal-readback · enjoy-digital/litevideo@5974ba8 · GitHub (at github.com)
<sajattack[m]> probably not
<sajattack[m]> I've actually been messing with litevideo a bit
<sajattack[m]> wow, matrix lag
<gregdavill> I never thought about backspace either... That would need to be added to the gen.py file.
<gregdavill> The changes to litevideo are small, so you can probably just add them manually.
<sajattack[m]> it's ok I didn't change much either
<sajattack[m]> do I need scroll=True in gen.py?
<sajattack[m]> very cool, now why is it only the top 2/3 of the screen?
gregdavill has quit [Ping timeout: 240 seconds]
CarlFK has quit [Ping timeout: 255 seconds]
CarlFK has joined #litex
rohitksingh has joined #litex
ambro718 has quit [Ping timeout: 255 seconds]
CarlFK has quit [Ping timeout: 272 seconds]
<sajattack[m]> if I wanted to make a ps/2 keyboard driver, would the best way be to latch on to the uart rx stream?
tpb has quit [Remote host closed the connection]
tpb has joined #litex