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

Subversion Repositories claw

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 conte
`include "timescale.v"
2
`include "or1200_defines.v"
3
 
4
module tb_or1200_genpc();
5
reg                           clk;
6
reg                           rst;
7
wire  [31:0]                  icpu_adr_o;
8
wire                          icpu_cycstb_o;
9
wire  [3:0]                   icpu_sel_o;
10
wire  [3:0]                   icpu_tag_o;
11
reg                           icpu_rty_i;
12
reg   [31:0]                  icpu_adr_i;
13
reg   [`OR1200_BRANCHOP_WIDTH-1:0]    branch_op;
14
reg   [`OR1200_EXCEPT_WIDTH-1:0]      except_type;
15
reg                                   except_prefix;
16
reg   [31:2]                  branch_addrofs;
17
reg   [31:0]                  lr_restor;
18
reg                           flag;
19
wire                          taken;
20
reg                           except_start;
21
reg   [31:2]                  binsn_addr;
22
reg   [31:0]                  epcr;
23
reg   [31:0]                  spr_dat_i;
24
reg                           spr_pc_we;
25
reg                           genpc_refetch;
26
reg                           genpc_stop_prefetch;
27
reg                           genpc_freeze;
28
reg                           no_more_dslot;
29
reg [2:0]                     branch_thread;
30
reg [2:0]                     except_thread;
31
reg [2:0]                     wb_thread;
32
wire [2:0]                    thread_out;
33
 
34
 
35
 
36
 
37
or1200_genpc or1200_genpc(
38
        clk, rst,
39
        icpu_adr_o, icpu_cycstb_o, icpu_sel_o, icpu_tag_o,
40
        icpu_rty_i, icpu_adr_i,
41
        branch_op, except_type, except_prefix,
42
        branch_addrofs, lr_restor, flag, taken, except_start,
43
        binsn_addr, epcr, spr_dat_i, spr_pc_we, genpc_refetch,
44
        genpc_freeze, genpc_stop_prefetch, no_more_dslot,
45
        thread_out, branch_thread,wb_thread, except_thread
46
);
47
 
48
initial begin
49
 
50
#0       rst=0;
51
        clk=1;
52
#5      rst=1;
53
 
54
#10     rst=0;
55
        no_more_dslot=0;
56
        except_start=0;
57
        icpu_rty_i=0;
58
        genpc_refetch=0;
59
        genpc_freeze=0;
60
        spr_pc_we=0;
61
        branch_op=`OR1200_BRANCHOP_NOP;
62
/*
63
#10     rst=0;
64
        except_start=0;
65
        spr_pc_we=0;
66
        branch_op=`OR1200_BRANCHOP_NOP;
67
*/
68
 
69
#60     except_start=0;
70
        spr_pc_we=0;
71
        branch_op=`OR1200_BRANCHOP_J;
72
        branch_addrofs=30'b11_1111_1111_1111_1111_1111_1111_1111;
73
        branch_thread=3'd5;
74
 
75
#10     except_start=0;
76
        spr_pc_we=0;
77
        branch_op=`OR1200_BRANCHOP_JR;
78
        lr_restor=32'hF0F0F0F0;
79
        branch_thread=3'd3;
80
 
81
#10     except_start=0;
82
        spr_pc_we=0;
83
        branch_op=`OR1200_BRANCHOP_BAL;
84
        binsn_addr=30'd3;
85
        branch_addrofs=30'd6;
86
        wb_thread=3'd2;
87
end
88
 
89
always #5 clk = ~clk;
90
endmodule
91
 
92
 

powered by: WebSVN 2.1.0

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