-
Notifications
You must be signed in to change notification settings - Fork 4
/
bitrevorder_test_top2_tb.v.bak
61 lines (47 loc) · 1.06 KB
/
bitrevorder_test_top2_tb.v.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Verilog test fixture created from schematic C:\Users\Nikhil Handyal\Documents\Spring 2012\EE 201\Xillinx\Final Project\Spectrum_Analyzer\bitrevorder_test_top2.sch - Mon Apr 30 03:21:40 2012
`timescale 1ns / 1ps
module bitrevorder_test_top2_bitrevorder_test_top2_sch_tb();
parameter HALF_PERIOD = 5;
// Inputs
reg Clk;
reg start;
reg reset;
// Output
integer i;
// Bidirs
// Instantiate the UUT
bitrevorder_test_top2 UUT (
.Clk(Clk),
.start(start),
.reset(reset)
);
initial begin :CLK_GENERATOR
Clk = 0;
forever begin
#HALF_PERIOD Clk = ~Clk;
end
end
initial begin
// Initialize Inputs
fileID = $fopen("bit_rev_order_output.txt","w");
Clk = 0;
start = 0;
reset = 1;
// Wait 100ns for global reset to finish
#100;
// Apply Stimulus
#HALF_PERIOD;
reset = 0;
start = 1;
#20;
start = 0;
wait(md512);
Print_Ram;
$fclose(fileID);
end
task Print_Ram;
for (i = 0; i <= 1023; i = i+1) begin
$fdisplay(fileID,"i = %d, mem[i] = %d", i, mem[i]);
end
endtask
endmodule