Line 55... |
Line 55... |
o_uart_tx);
|
o_uart_tx);
|
//
|
//
|
input i_clk;
|
input i_clk;
|
output wire o_uart_tx;
|
output wire o_uart_tx;
|
`ifndef OPT_STANDALONE
|
`ifndef OPT_STANDALONE
|
input [29:0] i_setup;
|
input [30:0] i_setup;
|
`endif
|
`endif
|
|
|
// If i_setup isnt set up as an input parameter, it needs to be set.
|
// If i_setup isnt set up as an input parameter, it needs to be set.
|
// We do so here, to a setting appropriate to create a 115200 Baud
|
// We do so here, to a setting appropriate to create a 115200 Baud
|
// comms system from a 100MHz clock. This also sets us to an 8-bit
|
// comms system from a 100MHz clock. This also sets us to an 8-bit
|
// data word, 1-stop bit, and no parity.
|
// data word, 1-stop bit, and no parity.
|
`ifdef OPT_STANDALONE
|
`ifdef OPT_STANDALONE
|
wire [29:0] i_setup;
|
wire [30:0] i_setup;
|
assign i_setup = 30'd868; // 115200 Baud, if clk @ 100MHz
|
assign i_setup = 31'd868; // 115200 Baud, if clk @ 100MHz
|
`endif
|
`endif
|
|
|
reg pwr_reset;
|
reg pwr_reset;
|
initial pwr_reset = 1'b1;
|
initial pwr_reset = 1'b1;
|
always @(posedge i_clk)
|
always @(posedge i_clk)
|
Line 119... |
Line 119... |
if (&counter)
|
if (&counter)
|
tx_stb <= 1'b1;
|
tx_stb <= 1'b1;
|
else if ((tx_stb)&&(!tx_busy)&&(tx_index==4'hf))
|
else if ((tx_stb)&&(!tx_busy)&&(tx_index==4'hf))
|
tx_stb <= 1'b0;
|
tx_stb <= 1'b0;
|
|
|
|
// Bypass any hardware flow control
|
|
wire rts;
|
|
assign rts = 1'b1;
|
|
|
txuart transmitter(i_clk, pwr_reset, i_setup, tx_break,
|
txuart transmitter(i_clk, pwr_reset, i_setup, tx_break,
|
tx_stb, tx_data, o_uart_tx, tx_busy);
|
tx_stb, tx_data, rts, o_uart_tx, tx_busy);
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|