This project contains some simple building block modules for creating a simple UART interface on an FPGA using verilog.
The project currently WORKS. However, there is some issue on the UART_TX and UART_RX modules that requires a latch. This latch causes the sythesis to state the design is not guarenteed to work at any clock freq. The project does, however, work at 16MHz on the B2 board.
Default=16000000 (16MHz)
The input clock frequency. Used to generate the selected baud rate.
Default=9600
Sets the UART baud rate.
Default=1
Start bits are the low bits at the beginning of the data frame and when combined with stop bits guarentee at least one transition to signal a new bit.
Default=1
Stop bits are the amount of high bits at the end of the data frame.
Default=0
Parity bits are located at the end of the data, before the stop bits. They are a form of checksum. Not currently implemented in any form.
Default=8
Width defines the length of the data to be transmitted. It defines the size of the transmit buffer.
Size=1 bit
Input clock signal. Used as clock for flip-flops and for generating the UART's baud.
Size=1 bit
This is a strobe that informs the module that data has been written to the input buffer and is ready to be sent. This signal should be high for at least one full clock cycle and must be low before the module is ready to send the next byte to prevent sending a duplicate byte.
Size=WIDTH
This is the tranmit input buffer. It is of length WIDTH. It must be set to the correct value before the new_data strobe.
Size=1 bit
This signal is high when the module is ready to recieve new data. This signal also "or"s with the output to make it high when the module is not active.
Size=1 bit
This is the serial output (TX) of the module.
Default=16000000 (16MHz)
This is the modules clock frequency and is used to determine the speed based on the baud of the module.
Default=9600
Sets the UART baud rate.
Default=1
Start bits are the low bits at the beginning of the data frame and when combined with stop bits guarentee at least one transition to signal a new bit.
Default=1
Stop bits are the amount of high bits at the end of the data frame.
Default=0
Parity bits are located at the end of the data, before the stop bits. They are a form of checksum. Not currently implemented in any form.
Default=8
Width defines the length of the data to be transmitted. It defines the size of the transmit buffer.
Size=1 bit
Input clock signal. Used as clock for flip-flops and for generating the UART's baud.
Size=1 bit
This is the serial data in (RX) for the module.
Size=WIDTH
This is the output register for recieved serial data. This register is undefined until the new_data strobe is high.
Size=1 bit
This is the output strobe of the module. When it is high, data is ready to be read from the data_out port. This signal is high for one complete clock cycle and is directly compatible with the uart_tx module.
This is the top level module. It is a simple uart passthrough module. Pin13 serves as a heartbeat to verify the part is working correctly and is not in bootloader mode. The serial in (RX) is on pin23. Serial out (TX) is on pin22. This signal comes from the resonator on the B2 board and generates the logic clock. This pin is the serial in port (RX) for the passthrough. Signal not used. Signal not used. This pin is the heartbeat for the board. It cycles about once every 1s. This pin is the serial out port (TX) for the passthrough.