One thing that someone else might find useful whil...
# mpw-6plus-silicon
m
One thing that someone else might find useful while debugging your chips is soldering a header and using a jumper on J2. When J2 is shorted Caravel's serial port gets connected to the FTDI chip, and you can use a serial terminal program like picocom to receive data from Caravel on your pc. The downside is that you can't flash the firmware while J2 is shorted. That's why I use a jumper.
πŸ‘ 4
And if you are trying to read serial data from Caravel, just reading the
reg_uart_data
won't work (you keep reading the first char you send). You need to clear the receive event. I use this functions: https://github.com/efabless/caravel_mgmt_soc_litex/blob/main/verilog/dv/firmware/APIs/uart_api.h Caravel docs don't mention this. Maybe it's something related to the change from PicoRV to VexRiscC https://caravel-harness.readthedocs.io/en/latest/uart.html
πŸ‘ 3
m
just tested that, works nicely
πŸ‘ 1
m
Here's some sample code that outputs the state of Caravel's IOs to a terminal to use for debugging purposes: https://gist.github.com/mbalestrini/5cb4ed6b369dd6bb2775b3fffb773674
πŸ™Œ 2
v
Hi Maximos, So does UART_readChar() work for you? I have the same behavior that you describe; it keeps reading the first byte received. It seems that clear the event using the CSR doesn't work in the CLEAR FPGA management.