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

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [verilog/] [fpRes_tb.v] - Blame information for rev 86

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

Line No. Rev Author Line
1 15 robfinch
module fpRes_tb();
2
reg rst;
3
reg clk;
4
reg [12:0] adr;
5
reg [127:0] mem [0:8191];
6
reg [127:0] memo [0:9000];
7
reg [63:0] a,a6;
8
wire [63:0] a5;
9
wire [63: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/fpRes_tv.txt", mem);
16
        #20 rst = 1;
17
        #50 rst = 0;
18
end
19
 
20
always #5
21
        clk = ~clk;
22
 
23
delay3 #(64) u2 (clk, 1'b1, a, a5);
24
 
25
always @(posedge clk)
26
if (rst)
27
        adr = 0;
28
else
29
begin
30
        adr <= adr + 1;
31
        a <= mem[adr][63: 0];
32
        a6 <= a5;
33
        if (adr > 2)
34
                memo[adr-1] <= {o,a5};
35
        if (adr==8191) begin
36
                $writememh("d:/cores6/rtfItanium/v1/rtl/fpUnit/fpRes_tvo.txt", memo);
37
                $finish;
38
        end
39
end
40
 
41
fpRes #(64) u1 (clk, a, o);
42
 
43
endmodule

powered by: WebSVN 2.1.0

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