-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmips.v
68 lines (59 loc) · 1.03 KB
/
mips.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
`timescale 1ns / 1ps
module mips(
input clk,
input reset,
input interrupt,
output [31:0] addr
);
//Timer1
wire [31:0] Dout1;
//Timer2
wire [31:0] Dout2;
//Bridge
wire [7:2] HWInt;
wire [31:0] PrWD;
wire [31:2] PrAddr;
wire [31:0] PrRD;
cpu cpu (
.clk(clk),
.reset(reset),
.PrRD(PrRD),
.HWInt(HWInt),
.addr(addr),
.PrAddr(PrAddr),
.PrWD(PrWD),
.PrWe(PrWe)
);
Bridge Bridge (
.interrupt(interrupt),
.IRQ1(IRQ1),
.IRQ2(IRQ2),
.We1(We1),
.We2(We2),
.PrRD1(Dout1),
.PrRD2(Dout2),
.PrAddr(PrAddr),
.PrWD(PrWD),
.PrWe(PrWe),
.HWInt(HWInt),
.PrRD(PrRD)
);
TC TC1 (
.clk(clk),
.reset(reset),
.Addr(PrAddr),
.WE(We1),
.Din(PrWD),
.Dout(Dout1),
.IRQ(IRQ1)
);
TC TC2 (
.clk(clk),
.reset(reset),
.Addr(PrAddr),
.WE(We2),
.Din(PrWD),
.Dout(Dout2),
.IRQ(IRQ2)
);
endmodule