aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp3/lib/vita/iq_to_float_tb.v
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2013-10-10 10:17:27 -0700
committerBen Hilburn <ben.hilburn@ettus.com>2013-10-10 10:17:27 -0700
commit0df4b801a34697f2058b4a7b95e08d2a0576c9db (patch)
treebe10e78d1a97c037a9e7492360a178d1873b9c09 /fpga/usrp3/lib/vita/iq_to_float_tb.v
parent6e7bc850b66e8188718248b76b729c7cf9c89700 (diff)
downloaduhd-0df4b801a34697f2058b4a7b95e08d2a0576c9db.tar.gz
uhd-0df4b801a34697f2058b4a7b95e08d2a0576c9db.tar.bz2
uhd-0df4b801a34697f2058b4a7b95e08d2a0576c9db.zip
Squashed B200 FPGA Source. Code from Josh Blum, Ian Buckley, and Matt Ettus.
Diffstat (limited to 'fpga/usrp3/lib/vita/iq_to_float_tb.v')
-rw-r--r--fpga/usrp3/lib/vita/iq_to_float_tb.v61
1 files changed, 61 insertions, 0 deletions
diff --git a/fpga/usrp3/lib/vita/iq_to_float_tb.v b/fpga/usrp3/lib/vita/iq_to_float_tb.v
new file mode 100644
index 000000000..3ab7ffbd5
--- /dev/null
+++ b/fpga/usrp3/lib/vita/iq_to_float_tb.v
@@ -0,0 +1,61 @@
+module iq_to_float_tb();
+
+
+ reg clk, reset;
+ integer x,file;
+ reg [15:0] in;
+ wire [31:0] out;
+
+ initial clk = 0;
+
+ always #10 clk = ~clk;
+
+ initial $dumpfile("iq_to_float_tb.vcd");
+ initial $dumpvars(0,iq_to_float_tb);
+ integer f;
+ initial
+
+ begin
+ x <= 0;
+ reset <= 1;
+ in <= 0;
+ file = $fopen("iq_to_float_VER.txt");
+
+ repeat(65536) @(posedge clk);
+ reset <= 0;
+ repeat(65536) @(posedge clk)
+ begin
+ in <= data[x];
+ x <= x+1;
+ $fdisplayh(file,out);
+ end
+ $fclose(file);
+
+
+ repeat(65536) @(posedge clk);
+ $finish;
+
+ end
+
+
+
+
+ iq_to_float #(.BITS_IN(16), .BITS_OUT(32))
+ dut
+ (
+ .in(in), .out(out), .clk(clk), .reset(reset)
+ );
+
+
+
+ reg [15:0] data [0:65535];
+ initial $readmemh("iq_to_float_input.txt",data);
+
+
+
+
+
+
+
+endmodule
+