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

Subversion Repositories round_robin_arbiter

[/] [round_robin_arbiter/] [trunk/] [tb.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rainrhythm
module tb();
2
 
3
reg clk;
4
reg req0;
5
reg req1;
6
reg req2;
7
reg req3;
8
reg rst_an;
9
 
10
round_robin_arbiter dut (
11
        .req({req3,req2,req1,req0}),
12
        .grant({grant3,grant2,grant1,grant0}),
13
        .clk(clk),
14
        .rst_an(rst_an)
15
);
16
 
17
initial
18
begin
19
        clk = 0;
20
        req3 = 0;
21
        req2 = 0;
22
        req1 = 0;
23
        req0 = 0;
24
        rst_an = 1'b1;
25
        #10 rst_an = 0;
26
        #10 rst_an = 1;
27
        repeat (1) @ (posedge clk);
28
        req0 <= 1;
29
        repeat (1) @ (posedge clk);
30
        req0 <= 0;
31
        repeat (1) @ (posedge clk);
32
        req0 <= 1;
33
        req1 <= 1;
34
        repeat (1) @ (posedge clk);
35
        req2 <= 1;
36
        req1 <= 0;
37
        repeat (1) @ (posedge clk);
38
        req3 <= 1;
39
        req2 <= 0;
40
        repeat (1) @ (posedge clk);
41
        req3 <= 0;
42
        repeat (1) @ (posedge clk);
43
        req0 <= 0;
44
        repeat (1) @ (posedge clk);
45
        #10  $finish;
46
 
47
end
48
 
49
always  #1 clk = ~clk;
50
endmodule

powered by: WebSVN 2.1.0

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