I had some problems using your build instructions so I synthesised and flashed using:
yosys -p "synth_ice40 -blif uart_demo.blif" uart_demo.v
arachne-pnr -d 1k -p icestick.pcf uart_demo.blif -o uart_demo.asc
icepack uart_demo.asc uart_demo.bin
During testing I see that every other character is echo'd back:
>>Send to /dev/ttyUSB1: "Hello"<<
Hlo
It appears that the UART module is in state TX_DELAY_RESTART when transmit is raised to high meaning that the byte to be transmitted gets ignored.
Changing the tx_countdown from 8 to 4 in the TX_SENDING case fixes this for me.
I had some problems using your build instructions so I synthesised and flashed using:
During testing I see that every other character is echo'd back:
It appears that the UART module is in state TX_DELAY_RESTART when transmit is raised to high meaning that the byte to be transmitted gets ignored.
Changing the tx_countdown from 8 to 4 in the TX_SENDING case fixes this for me.