Sunday, 2020-02-23

*** tpb has joined #litex00:00
*** rohitksingh has quit IRC00:56
*** CarlFK has quit IRC01:33
*** rohitksingh has joined #litex01:38
*** rohitksingh has quit IRC02:06
*** gregdavill has joined #litex02:25
gregdavillpdp7: whoops, that module was a remnant of some hardware DMA tests I was trying, not required for the LCD.02:28
gregdavillr4d10n: 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.02:30
gregdavillsajattack[m]: The following files are needed gen.py and uartstream.py. This is all WIP stuff, it could be organised much better.02:34
gregdavilluartstream.py replaces the standard UART module, and provides the serial data (via a FIFO) in the form of a LiteX stream.02:36
sajattack[m]Yeah it locked up my uart02:36
gregdavillgen.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.02:37
gregdavillA 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.02:45
gregdavillIn 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.02:47
sajattack[m]Ok mine didn't do that either03:11
gregdavillYou'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#L22503:13
tpbTitle: linux-on-litex-vexriscv/soc_linux.py at hadbadge-flash · gregdavill/linux-on-litex-vexriscv · GitHub (at github.com)03:13
gregdavillThen 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#L23803:14
tpbTitle: linux-on-litex-vexriscv/soc_linux.py at hadbadge-flash · gregdavill/linux-on-litex-vexriscv · GitHub (at github.com)03:14
gregdavillIf 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.03:15
*** rohitksingh has joined #litex04:05
*** _whitelogger has quit IRC04:31
*** _whitelogger has joined #litex04:34
*** gregdavill has quit IRC04:53
*** gregdavill has joined #litex04:53
sajattack[m]it's ok I'll look at it another time05:05
*** _whitelogger has quit IRC06:25
*** _whitelogger has joined #litex06:28
*** CarlFK has joined #litex08:05
*** ambro718 has joined #litex08:46
*** ambro718 has quit IRC09:11
sajattack[m]I think I know why I'm not getting linux booting09:45
sajattack[m]I'm set up for serial boot and your replaced the serial with something that just prints "root\n" at boot09:46
sajattack[m]I haven't dug into litex enough to know what a stream is either09:48
*** rohitksingh has quit IRC10:44
sajattack[m]OwO what's this? https://github.com/enjoy-digital/litex/blob/017c91a4be6f1463cb771f4bd928db6e7c79a4de/litex/soc/cores/uart.py#L24910:52
tpbTitle: litex/uart.py at 017c91a4be6f1463cb771f4bd928db6e7c79a4de · enjoy-digital/litex · GitHub (at github.com)10:52
sajattack[m]unfortunately uart_stream doesn't seem to have the right interface for that11:17
*** ambro718 has joined #litex11:24
sajattack[m]or does it?11:26
gregdavillAhh, you're still using serialboot. That explains it, that lcd interface, in it's current form, replaces the uart entirely.12:11
sajattack[m]Yeah12:12
gregdavillUARTMultiplexer is probably not the right interface, you'd want something closer to the UARTCrossover.12:14
gregdavillBasically tee off the TX stream, and feed that into gen.py. No need for uart_stream.12:15
gregdavillYou only need to connect the data/valid signals, maybe another small FIFO.12:16
sajattack[m]is this enough? https://hastebin.com/alinuquhut.pl12:19
* sajattack[m] uploaded an image: image.png (730KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/UrWWrSWrDBgxrekrrOycPgDi >12:25
sajattack[m]it doesn't work whether I connect to uart or uart.xover13:01
gregdavillYou might be able to just do `self.uart.source.connect(gen.sink, omit=['ready'])`13:02
sajattack[m]with or without uartcrossover?13:03
gregdavillwithout, but I just tested it, and it doesn't work very well.13:06
sajattack[m]not very well is better than not at all13:08
gregdavillhttps://hastebin.com/ifinohijep.pl13:12
gregdavillThis kinda works. You might get some dropped characters on the VGA terminal.13:14
gregdavillFor now you can just increase the FIFO size if you see dropped data. :P13:16
sajattack[m]cool thanks13:16
sajattack[m]is 64 the fifo size?13:17
gregdavillYep13:17
gregdavillWhat 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.13:18
sajattack[m]ok13:19
sajattack[m]it's only showing the last line13:22
sajattack[m]and it really doesn't like when I backspace13:24
gregdavillDo you have the latest LiteVideo?13:28
sajattack[m]idk13:29
gregdavillThere is a change need for implementing the scrolling.13:29
gregdavillhttps://github.com/enjoy-digital/litevideo/commit/5974ba830005a9c061b47979df54d923b90d113013:29
tpbTitle: Merge pull request #27 from gregdavill/terminal-readback · enjoy-digital/litevideo@5974ba8 · GitHub (at github.com)13:29
sajattack[m]probably not13:29
sajattack[m]I've actually been messing with litevideo a bit13:30
sajattack[m]wow, matrix lag13:30
gregdavillI never thought about backspace either... That would need to be added to the gen.py file.13:30
gregdavillThe changes to litevideo are small, so you can probably just add them manually.13:31
sajattack[m]it's ok I didn't change much either13:32
sajattack[m]do I need scroll=True in gen.py?13:32
sajattack[m]very cool, now why is it only the top 2/3 of the screen?13:40
*** gregdavill has quit IRC13:43
*** CarlFK has quit IRC15:07
*** CarlFK has joined #litex18:20
*** rohitksingh has joined #litex20:24
*** ambro718 has quit IRC21:58
*** CarlFK has quit IRC22:05
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?23:05

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!