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

Subversion Repositories claw

[/] [claw/] [trunk/] [or1200_cpu/] [tb_or1200_if.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
`include "timescale.v"
7
`include "or1200_defines.v"
8
module tb_or1200_if();
9
 
10
reg rst;
11
reg clk;
12
reg [63:0] icpu_dat_i;
13
reg icpu_ack_i;
14
reg icpu_err_i;
15
reg [31:0] icpu_addr_i;
16
reg [3:0] icpu_tag_i;
17
 
18
reg if_freeze;
19
reg flushpipe;
20
reg no_more_dslot;
21
reg rfe;
22
 
23
wire [31:0] if_insn;
24
wire [31:0] if_insn2;
25
wire [31:0] if_pc;
26
wire if_stall;
27
wire genpc_refetch;
28
wire except_itlbmiss;
29
wire except_immufault;
30
wire except_ibuserr;
31
 
32
or1200_if or1200_if99(.clk(clk), .rst(rst), .icpu_dat_i(icpu_dat_i),
33
  .icpu_ack_i(icpu_ack_i), .icpu_err_i(icpu_err_i), .icpu_adr_i(icpu_addr_i),
34
  .icpu_tag_i(icpu_tag_i), .if_freeze(if_freeze), .if_insn(if_insn),
35
  .if_insn2(if_insn2),.if_pc(if_pc), .flushpipe(flushpipe), .if_stall(if_stall),  .no_more_dslot(no_more_dslot), .genpc_refetch(genpc_refetch), .rfe(rfe),
36
  .except_itlbmiss(except_itlbmiss), .except_immufault(except_immufault),
37
  .except_ibuserr(except_ibuserr));
38
 
39
always #5 clk = ~clk;
40
 
41
initial begin
42
#10     rst=1;
43
        clk=0;
44
 
45
#30     rst=0;
46
        icpu_dat_i=64'h1234567890ABCDEF;
47
        icpu_err_i=0;
48
        no_more_dslot=0;
49
        rfe=0;
50
        icpu_ack_i=1'b1;
51
        flushpipe=0;
52
 
53
#40     icpu_dat_i=64'h234567890ABCDEF1;
54
        icpu_err_i=1;
55
        icpu_tag_i=`OR1200_ITAG_PE;
56
 
57
#50     icpu_dat_i=64'h34567890ABCDEF12;
58
        icpu_tag_i=`OR1200_ITAG_BE;
59
 
60
#60     icpu_dat_i=64'h4567890ABCDEF123;
61
        icpu_tag_i=`OR1200_ITAG_TE;
62
 
63
#70     icpu_dat_i=64'h567890ABCDEF1234;
64
 
65
end
66
endmodule

powered by: WebSVN 2.1.0

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