Adding the Blocks
For this project, you will use three main blocks:
- uart_rx: Receives the byte sent via UART.
- uart_logic_const: Compares the received byte to the constant value.
- uart_tx: Sends data back to your serial console for verification or debugging
- LED block: Lights up depending on the implemented logic.
Now you have to connect the blocks:
a. uart_rx Block
1. Input:
- uartRx (receives UART data)
2. Outputs:
- rxByte (the received byte)
- byteReady (indicates when a byte is ready)
b. uart_logic_const Block
1. Inputs:
- rxByte (connect to rxByte from uart_rx)
- byteReady (connect to byteReady from uart_rx)
- compareChar (constant ASCII value set by the user, e.g. 97 for 'a')
2. Output:
- signal (goes high whenever the incoming byte matches compareChar)
c. LED Block
-
-
Input:
-
match (connect to the match output of uart_logic_const).
-
-
Output:
-
The LED lights up when the match is high.
-
-
d. uart_tx Block
1. Inputs:
- reset (Asynchronous reset, active high).
- tx_data (8-bit data to be transmitted).
- tx_data_valid (Indicates that the 8-bit tx_data is valid and ready to be sent).
2. Outputs:
- tx_data_ready (Goes high when the transmitter is idle or has completed sending data, signaling it can accept new tx_data).
- tx_pin (Serial data output line that connects to a UART receiver (PC or other device).
- For FPGA projects, the names of the input ports need to match those registered in the system to ensure the process runs correctly.
No Comments