forked from thasega/HD63701
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HD63701_CORE.v
54 lines (42 loc) · 1.16 KB
/
HD63701_CORE.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
/***************************************************************************
This file is part of "HD63701V0 Compatible Processor Core".
****************************************************************************/
`timescale 1ps / 1ps
`include "HD63701_defs.i"
module HD63701_Core
(
input CLKx2,
input RST,
input NMI,
input IRQ,
input IRQ2,
input [3:0] IRQ2V,
output RW,
output [15:0] AD,
output [7:0] DO,
input [7:0] DI,
// for DEBUG
output CLKo,
output [5:0] PH,
output `mcwidth MC,
output [15:0] REG_D,
output [15:0] REG_X,
output [15:0] REG_S,
output [5:0] REG_C
);
reg CLK = 0;
always @( negedge CLKx2 ) CLK <= ~CLK;
assign CLKo = CLK;
wire `mcwidth mcode;
wire [7:0] vect;
wire inte, fncu;
assign MC = mcode;
HD63701_SEQ SEQ(.CLK(CLK),.RST(RST),
.NMI(NMI),.IRQ(IRQ),.IRQ2(IRQ2),.IRQ2V(IRQ2V),
.DI(DI),
.mcout(mcode),.vect(vect),.inte(inte),.fncu(fncu),
.PH(PH) );
HD63701_EXEC EXEC(.CLK(CLK),.RST(RST),.DI(DI),.AD(AD),.RW(RW),.DO(DO),
.mcode(mcode),.vect(vect),.inte(inte),.fncu(fncu),
.REG_D(REG_D),.REG_X(REG_X),.REG_S(REG_S),.REG_C(REG_C) );
endmodule