Alchitry Forums
Verilog example for Serial data transfer on Au - Printable Version

+- Alchitry Forums (https://forum.alchitry.com)
+-- Forum: Alchitry (https://forum.alchitry.com/forum-1.html)
+--- Forum: General Questions (https://forum.alchitry.com/forum-2.html)
+--- Thread: Verilog example for Serial data transfer on Au (/thread-257.html)



Verilog example for Serial data transfer on Au - anirbanbits - 09-26-2020

Hi, could you please share any examples on how to perform serial communication using Verilog on the Alchitry Au? The examples I saw in the tutorials section for serial comms were all for the Mojo board. 

What I have tried:
I see that in the top level module there are two ports: usb_rx(input) and usb_tx(output). I defined a register to hold an 8 bit data, assigned the usb_tx output port to this register. Then in the always block I updated the register but couldn't see any data show up on the serial port monitor. I feel like I am missing modules/IP that will make this work because nowhere do I see the ability to set baud rate or flow control in the default setup.


RE: Verilog example for Serial data transfer on Au - alchitry - 11-02-2020

You can use the serial_tx.v and serial_rx.v modules to connect directly to the usb_rx and usb_tx ports

https://raw.githubusercontent.com/embmicro/mojo-base-project/master/src/serial_rx.v
https://raw.githubusercontent.com/embmicro/mojo-base-project/master/src/serial_tx.v

To set the baud set the CLK_PER_BIT parameter like this $rtoi($ceil(CLK_RATE/SERIAL_BAUD_RATE))

CLK_RATE is likely 100000000 (100MHz)


RE: Verilog example for Serial data transfer on Au - howdyrichard - 01-17-2022

I tried uart_rx and uart_tx using Serial_Echo at 9600 and 19200. Through the USB port they work fine but using other pins not using the FTDI chip it skips characters if I scroll a text file. Typing works okay. Normally I do not need flow control but something in the structure is not buffering properly; I think.

Any ideas on this/