You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
884 B
Coq

8 months ago
// , uart_rx , rx_data
// rx_done, rx_doneuart_txstart_en,uart_txrx_data, txd
module uart_top(
input wire sys_clk, // U18
input wire sys_rst, //J15
input wire rxd,
output wire txd
);
parameter CLK_FREQ = 5000_0000;
parameter BPS = 115200;
wire rx_done;
wire [7:0] rx_data;
uart_rx #(
.CLK_FREQ(CLK_FREQ),
.BPS(BPS)
)u_uart_rx(
.sys_clk(sys_clk),
.sys_rst(sys_rst),
.rxd(rxd),
.rx_done(rx_done),
.rx_data(rx_data)
);
uart_tx #(
.CLK_FREQ(CLK_FREQ),
.BPS(BPS)
)u_uart_tx(
.sys_clk(sys_clk),
.sys_rst(sys_rst),
.start_en(rx_done),
.tx_data(rx_data),
.txd(txd),
.tx_busy()
);
endmodule