diff options
-rw-r--r-- | usrp2/extramfifo/ext_fifo_tb.sh | 3 | ||||
-rw-r--r-- | usrp2/extramfifo/ext_fifo_tb.v | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/usrp2/extramfifo/ext_fifo_tb.sh b/usrp2/extramfifo/ext_fifo_tb.sh index a56574102..dcfede37a 100644 --- a/usrp2/extramfifo/ext_fifo_tb.sh +++ b/usrp2/extramfifo/ext_fifo_tb.sh @@ -1 +1,2 @@ -fuse -prj ext_fifo_tb.prj -t work.glbl -t work.ext_fifo_tb -L unisims_ver -L xilinxcorelib_ver -o ext_fifo_tb +#fuse -prj ext_fifo_tb.prj -t work.glbl -t work.ext_fifo_tb -L unisims_ver -L xilinxcorelib_ver -o ext_fifo_tb +iverilog -c ext_fifo_tb.cmd -o ext_fifo_tb ext_fifo_tb.v diff --git a/usrp2/extramfifo/ext_fifo_tb.v b/usrp2/extramfifo/ext_fifo_tb.v index db5f31a9d..0eda89769 100644 --- a/usrp2/extramfifo/ext_fifo_tb.v +++ b/usrp2/extramfifo/ext_fifo_tb.v @@ -84,11 +84,17 @@ module ext_fifo_tb(); initial begin - repeat (20) @(negedge int_clk); + repeat (5) @(negedge int_clk); + dst_rdy_i <= 1; + + while (src_rdy_o !== 1) + @(negedge int_clk); // Fall through fifo, first output already valid if (dataout !== ref_dataout) - $display("Error: Expected %x, got %x",ref_dataout, dataout); + $display("Error: Expected %x, got %x @%d",ref_dataout, dataout, $time); + ref_dataout <= ref_dataout + src_rdy_o ; + // Decimate by 16 rate while (ref_dataout < 2000) begin @@ -96,7 +102,7 @@ module ext_fifo_tb(); ref_dataout <= ref_dataout + src_rdy_o ; dst_rdy_i <= src_rdy_o; if ((dataout !== ref_dataout) && src_rdy_o) - $display("Error: Expected %x, got %x",ref_dataout, dataout); + $display("Error: Expected %x, got %x @%d",ref_dataout, dataout, $time); @(negedge int_clk); dst_rdy_i <= 0; repeat(14) @(negedge int_clk); @@ -108,7 +114,7 @@ module ext_fifo_tb(); ref_dataout <= ref_dataout + src_rdy_o ; dst_rdy_i <= src_rdy_o; if ((dataout !== ref_dataout) && src_rdy_o) - $display("Error: Expected %x, got %x",ref_dataout, dataout); + $display("Error: Expected %x, got %x @%d",ref_dataout, dataout, $time); @(negedge int_clk); dst_rdy_i <= 0; repeat(6) @(negedge int_clk); @@ -120,7 +126,7 @@ module ext_fifo_tb(); ref_dataout <= ref_dataout + src_rdy_o ; dst_rdy_i <= src_rdy_o; if ((dataout !== ref_dataout) && src_rdy_o) - $display("Error: Expected %x, got %x",ref_dataout, dataout); + $display("Error: Expected %x, got %x @%d",ref_dataout, dataout, $time); @(negedge int_clk); dst_rdy_i <= 0; repeat(2) @(negedge int_clk); @@ -132,7 +138,7 @@ module ext_fifo_tb(); ref_dataout <= ref_dataout + src_rdy_o ; dst_rdy_i <= src_rdy_o; if ((dataout !== ref_dataout) && src_rdy_o) - $display("Error: Expected %x, got %x",ref_dataout, dataout); + $display("Error: Expected %x, got %x @%d",ref_dataout, dataout, $time); end // while (ref_dataout < 10000) |