another uart demonstration: uart echo module

This commit is contained in:
2021-05-30 15:19:08 -05:00
parent 99a8661faa
commit 2cbbe090ed
10 changed files with 532 additions and 0 deletions

37
uart/rtl/uart_echo.v Normal file
View File

@@ -0,0 +1,37 @@
`default_nettype none
module uart_echo #(parameter CLOCKS_PER_BAUD=16'd104)(
input wire clk,
input wire rst_n,
input wire rx_i,
output wire tx_o
);
wire tx_en;
wire [7:0] tx_data;
uart_rx #(/*autoinstparam*/
// Parameters
.CLOCKS_PER_BAUD (CLOCKS_PER_BAUD)) rx (/*autoinst*/
// Outputs
.data_o (tx_data),
.rx_done_o (tx_en),
// Inputs
.clk (clk),
.rst_n (rst_n),
.rx_i (rx_i));
uart_tx #(/*autoinstparam*/
// Parameters
.CLOCKS_PER_BAUD (CLOCKS_PER_BAUD)) tx (/*autoinst*/
// Outputs
.tx_o (tx_o),
.tx_done_o (),
// Inputs
.clk (clk),
.rst_n (rst_n),
.en_i (tx_en),
.data_i (tx_data));
endmodule
// Local Variables:
// verilog-library-directories:(".." "../rtl" ".")
// End: