I have wierd problem with RS232 implementation it works on board but dunno whats wrong with testbench it just doesnt work. Could somone take a look on this testbench code...
And I get on TxD_o "1" for whole simulation
Rich (BB code):
`timescale 1ns
module testbench;
// Inputs
reg RXD_i;
reg clk_i;
// Outputs
wire TXD_o;
// Instantiate the Unit Under Test (UUT)
main uut (
.RXD_i(RXD_i),
.clk_i(clk_i),
.TXD_o(TXD_o)
);
initial
begin
// Initialize Inputs
clk_i=0;
RXD_i=1'b1;
#100 RXD_i=0;
#10 RXD_i=0;
#10 RXD_i=1;
#10 RXD_i=0;
#10 RXD_i=1;
#10 RXD_i=1;
#10 RXD_i=1;
#10 RXD_i=0;
#10 RXD_i=1;
#10 RXD_i=0;
end
always
#5 clk_i =~clk_i;
endmodule