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

Subversion Repositories claw

[/] [claw/] [trunk/] [or1200_cpu/] [tb_or1200_wbmux.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 conte
////////////////////////////////////////////////////////////////
2
//// Author:                                                ////
3
////    - Balaji V. Iyer, bviyer@ncsu.edu                   ////
4
////////////////////////////////////////////////////////////////
5
 
6
 
7
`include "timescale.v"
8
`include "or1200_defines.v"
9
 
10
module tb_or1200_wbmux();
11
 
12
reg clk;
13
reg rst;
14
reg wb_freeze;
15
reg[`OR1200_RFWBOP_WIDTH-1:0]    rfwb_op;
16
reg[`OR1200_RFWBOP_WIDTH-1:0]    rfwb_op2;
17
reg[31:0] muxin_a;
18
reg[31:0] muxin_b;
19
reg[31:0] muxin_c;
20
reg[31:0] muxin_d;
21
reg[31:0] muxin_a2;
22
reg[31:0] muxin_b2;
23
reg[31:0] muxin_c2;
24
reg[31:0] muxin_d2;
25
wire[31:0] muxout;
26
wire[31:0] muxout2;
27
 
28
wire[31:0] muxreg;
29
wire[31:0] muxreg2;
30
wire muxreg_valid;
31
wire muxreg2_valid;
32
 
33
 
34
or1200_wbmux or1200_wbmux(.clk(clk), .rst(rst), .wb_freeze(wb_freeze),
35
  .rfwb_op(rfwb_op), .rfwb_op2(rfwb_op2), .muxin_a(muxin_a), .muxin_b(muxin_b),
36
  .muxin_c(muxin_c), .muxin_d(muxin_d), .muxin_a2(muxin_a2),.muxin_b2(muxin_b2),
37
  .muxin_c2(muxin_c2), .muxin_d2(muxin_d2), .muxout(muxout), .muxout2(muxout2),
38
  .muxreg(muxreg), .muxreg2(muxreg2), .muxreg_valid(muxreg_valid),
39
  .muxreg2_valid(muxreg2_valid));
40
 
41
initial begin
42
 
43
#0       rst=0;
44
        clk=0;
45
 
46
#10     rst=1;
47
 
48
#10     rst=0;
49
        wb_freeze=0;
50
        rfwb_op=3'b1;
51
        rfwb_op2=3'd3;
52
        muxin_a=32'h12345678;
53
        muxin_b=32'h23456789;
54
        muxin_c=32'h34567890;
55
        muxin_d=32'h4567890A;
56
        muxin_a2=32'h90ABCDEF;
57
        muxin_b2=32'h0ABCDEF9;
58
        muxin_c2=32'hABCDEF90;
59
        muxin_d2=32'hBCDEF90A;
60
 
61
#10     rfwb_op=3'd3;
62
        rfwb_op2=3'd5;
63
 
64
 
65
 
66
#10     rfwb_op=3'd5;
67
        rfwb_op2=3'd7;
68
 
69
#10     rfwb_op=3'd7;
70
        rfwb_op2=3'd1;
71
 
72
end
73
 
74
always #5 clk = ~clk;
75
 
76
 
77
endmodule

powered by: WebSVN 2.1.0

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