• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Verilog example for Serial data transfer on Au
#1
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.
  Reply
#2
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/embmic...erial_rx.v
https://raw.githubusercontent.com/embmic...erial_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)
  Reply
#3
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/
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)