OpenCores
URL https://opencores.org/ocsvn/ft816float/ft816float/trunk

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [test_bench/] [fpAddsub_L10_tb.v] - Blame information for rev 31

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 robfinch
module fpAddsub_L10_tb();
2
reg rst;
3
reg clk;
4
reg [12:0] adr;
5
reg [95:0] mem [0:8191];
6
reg [95:0] memo [0:9000];
7
reg [31:0] a,b,a6,b6;
8
wire [31:0] a5,b5;
9
wire [31:0] o;
10
 
11
initial begin
12
        rst = 1'b0;
13
        clk = 1'b0;
14
        adr = 0;
15
        $readmemh("d:/cores6/rtfItanium/v1/rtl/fpUnit/test_bench/fpAddsub_tv.txt", mem);
16
        #20 rst = 1;
17
        #50 rst = 0;
18
end
19
 
20
always #5
21
        clk = ~clk;
22
 
23
vtdl #(32) u2 (clk, 1'b1, 4'd11, a, a5);
24
vtdl #(32) u3 (clk, 1'b1, 4'd11, b, b5);
25
 
26
always @(posedge clk)
27
if (rst)
28
        adr = 0;
29
else
30
begin
31
        adr <= adr + 1;
32
        a <= mem[adr][31: 0];
33
        b <= mem[adr][63:32];
34
        a6 <= a5;
35
        b6 <= b5;
36
        if (adr > 5)
37
                memo[adr-6] <= {o,b5,a5};
38
        if (adr==8191) begin
39
                $writememh("d:/cores6/rtfItanium/v1/rtl/fpUnit/test_bench/fpAddsub_L10_tvo.txt", memo);
40
                $finish;
41
        end
42
end
43
 
44
fpAddsubnr_L10 #(32) u1 (clk, 1'b1, 3'b000, 1'b0, a, b, o);
45
 
46
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.