-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTop.sv
76 lines (68 loc) · 1.17 KB
/
Top.sv
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
69
70
71
72
73
74
75
76
module Top
(
input clk, rst,
output [15:0] led,
input [15:0] sw,
input btnc,
output [7:0] an,
output [7:0] seg
);
BusItf bCpuDataIf(), bCpuInsIf(), bCacheBusIf();
BusItf bNoneIf(); //TODO: fix this
Cpu U_Cpu(
.bDataCacheIf(bCpuDataIf),
.bInsCacheIf(bCpuInsIf),
.*
);
DataCache U_DataCache(
.bCpuIf(bCpuDataIf),
.bBusIf(bCacheBusIf),
.*
);
InsCache U_InsCache(
.bCpuIf(bCpuInsIf),
.bBusIf(bNoneIf),
.*
);
logic [15:0] led_p;
logic ledWe_p;
logic [15:0] sw_p;
logic [31:0] seg_p;
logic segWe_p;
logic ent_p, entClr_p;
BusCtrl U_BusCtrl(
.bCacheIf(bCacheBusIf),
.oLed(led_p),
.oLedWe(ledWe_p),
.iSw(sw_p),
.oSeg(seg_p),
.oSegWe(segWe_p),
.iEnt(ent_p),
.oEntClr(entClr_p),
.*
);
Sw U_Sw(
.iSw(sw),
.oSw(sw_p),
.*
);
Led U_Led(
.iLed(led_p),
.iWe(ledWe_p),
.oLed(led),
.*
);
Seg U_Seg (
.iSeg(seg_p),
.iWe(segWe_p),
.oAn(an),
.oSeg(seg),
.*
);
Enter U_Enter (
.iBtn(btnc),
.iClr(entClr_p),
.oEnt(ent_p),
.*
);
endmodule