w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
pdp11_core.vhd
Go to the documentation of this file.
1-- $Id: pdp11_core.vhd 1339 2022-12-27 12:11:34Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2006-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: pdp11_core - syn
7-- Description: pdp11: full processor core
8--
9-- Dependencies: pdp11_vmbox
10-- pdp11_dpath
11-- pdp11_decode
12-- pdp11_sequencer
13-- pdp11_irq
14-- pdp11_reg70
15-- ibus/ib_sres_or_4
16--
17-- Test bench: tb/tb_pdp11core
18-- tb/tb_rlink_tba_pdp11core
19--
20-- Target Devices: generic
21-- Tool versions: ise 8.2-14.7; viv 2014.4-2022.1; ghdl 0.18-2.0.0
22-- Revision History:
23-- Date Rev Version Comment
24-- 2022-12-27 1339 1.4.5 _sequencer: rm PC port; _dpath: rm PCOUT port
25-- 2018-10-07 1054 1.4.4 drop ITIMER, now routed via DM_STAT_SE.itimer
26-- 2016-10-03 812 1.4.3 drop SNUM signal, not used anymore
27-- 2015-07-19 702 1.4.2 add DM_STAT_SE port; re-arrange DM_STAT_CO usage
28-- 2015-07-05 697 1.4.1 wire istart,istop,cpustep to DM_STAT_CO
29-- 2015-06-26 695 1.4.1 connect SNUM (current state number)
30-- 2015-05-09 679 1.4 start/stop/suspend overhaul; reset overhaul
31-- 2015-04-30 670 1.3.2 rename pdp11_sys70 -> pdp11_reg70
32-- 2011-11-18 427 1.3.1 now numeric_std clean
33-- 2010-06-13 305 1.3 add CP_ADDR in port; drop R_CPDIN, R_CPOUT; _vmbox
34-- CP_ADDR now from in port; dpath CP_DIN now from in
35-- port; out port CP_DOUT now from _dpath
36-- 2009-05-30 220 1.2.5 final removal of snoopers (were already commented)
37-- 2008-08-22 161 1.2.4 rename pdp11_ibres_ -> ib_sres_
38-- 2008-04-25 138 1.2.3 BRESET: add for _vmbox, use for _irq
39-- 2008-04-19 137 1.2.2 add DM_STAT_(DP|VM|CO) port; added pdp11_sys70
40-- 2008-03-02 121 1.2.1 remove snoopers
41-- 2008-02-17 117 1.2 add em_(mreq|sres) interface for memory
42-- 2008-01-20 112 1.1.3 add BRESET port (intbus reset), rename P->BRESET
43-- 2008-01-06 111 1.1.2 rename signal EI_ACK->EI_ACKM (master ack)
44-- 2008-01-01 109 1.1.1 _vmbox w/ IB_SRES_(CPU|EXT)
45-- 2007-12-30 107 1.1 use IB_MREQ/IB_SRES interface now; remove DMA port
46-- 2007-07-15 66 1.0.3 rename pdp11_top -> pdp11_core
47-- 2007-07-02 63 1.0.2 reordered ports on pdp11_top (by function, not i/o)
48-- 2007-06-14 56 1.0.1 Use slvtypes.all
49-- 2007-05-12 26 1.0 Initial version
50------------------------------------------------------------------------------
51
52library ieee;
53use ieee.std_logic_1164.all;
54use ieee.numeric_std.all;
55
56use work.slvtypes.all;
57use work.iblib.all;
58use work.pdp11.all;
59
60-- ----------------------------------------------------------------------------
61
62entity pdp11_core is -- full processor core
63 port (
64 CLK : in slbit; -- clock
65 RESET : in slbit; -- reset
66 CP_CNTL : in cp_cntl_type; -- console control port
67 CP_ADDR : in cp_addr_type; -- console address port
68 CP_DIN : in slv16; -- console data in
69 CP_STAT : out cp_stat_type; -- console status port
70 CP_DOUT : out slv16; -- console data out
71 ESUSP_O : out slbit; -- external suspend output
72 ESUSP_I : in slbit; -- external suspend input
73 HBPT : in slbit; -- hardware bpt
74 EI_PRI : in slv3; -- external interrupt priority
75 EI_VECT : in slv9_2; -- external interrupt vector
76 EI_ACKM : out slbit; -- external interrupt acknowledge
77 EM_MREQ : out em_mreq_type; -- external memory: request
78 EM_SRES : in em_sres_type; -- external memory: response
79 CRESET : out slbit; -- cpu reset
80 BRESET : out slbit; -- bus reset
81 IB_MREQ_M : out ib_mreq_type; -- ibus master request (master)
82 IB_SRES_M : in ib_sres_type; -- ibus slave response (master)
83 DM_STAT_SE : out dm_stat_se_type; -- debug and monitor status - sequencer
84 DM_STAT_DP : out dm_stat_dp_type; -- debug and monitor status - dpath
85 DM_STAT_VM : out dm_stat_vm_type; -- debug and monitor status - vmbox
86 DM_STAT_CO : out dm_stat_co_type -- debug and monitor status - core
87 );
88end pdp11_core;
89
90architecture syn of pdp11_core is
91
92 signal GRESET : slbit := '0';
93 signal CRESET_L : slbit := '0';
94 signal BRESET_L : slbit := '0';
95 signal VM_CNTL : vm_cntl_type := vm_cntl_init;
96 signal VM_STAT : vm_stat_type := vm_stat_init;
97 signal MMU_MONI : mmu_moni_type := mmu_moni_init;
98 signal DP_CNTL : dpath_cntl_type := dpath_cntl_init;
99 signal DP_STAT : dpath_stat_type := dpath_stat_init;
100 signal DP_PSW : psw_type := psw_init;
101 signal DP_IREG : slv16 := (others=>'0');
102 signal VM_DIN : slv16 := (others=>'0');
103 signal VM_ADDR : slv16 := (others=>'0');
104 signal VM_DOUT : slv16 := (others=>'0');
105 signal ID_STAT : decode_stat_type := decode_stat_init;
106 signal INT_PRI : slv3 := (others=>'0');
107 signal INT_VECT : slv9_2 := (others=>'0');
108 signal CP_STAT_L : cp_stat_type := cp_stat_init;
109 signal INT_ACK : slbit := '0';
110
111 signal IB_SRES_DP : ib_sres_type := ib_sres_init;
112 signal IB_SRES_SEQ : ib_sres_type := ib_sres_init;
113 signal IB_SRES_IRQ : ib_sres_type := ib_sres_init;
114 signal IB_SRES_SYS : ib_sres_type := ib_sres_init;
115
116 signal IB_MREQ : ib_mreq_type := ib_mreq_init; -- ibus request (local)
117 signal IB_SRES : ib_sres_type := ib_sres_init; -- ibus response (local)
118
119begin
120
121 GRESET <= RESET;
122
123 VMBOX : pdp11_vmbox
124 port map (
125 CLK => CLK,
126 GRESET => GRESET,
127 CRESET => CRESET_L,
128 BRESET => BRESET_L,
129 CP_ADDR => CP_ADDR,
130 VM_CNTL => VM_CNTL,
131 VM_ADDR => VM_ADDR,
132 VM_DIN => VM_DIN,
133 VM_STAT => VM_STAT,
134 VM_DOUT => VM_DOUT,
135 EM_MREQ => EM_MREQ,
136 EM_SRES => EM_SRES,
142 );
143
144 DPATH : pdp11_dpath
145 port map (
146 CLK => CLK,
147 CRESET => CRESET_L,
148 CNTL => DP_CNTL,
149 STAT => DP_STAT,
150 CP_DIN => CP_DIN,
151 CP_DOUT => CP_DOUT,
152 PSWOUT => DP_PSW,
153 IREG => DP_IREG,
154 VM_ADDR => VM_ADDR,
155 VM_DOUT => VM_DOUT,
156 VM_DIN => VM_DIN,
157 IB_MREQ => IB_MREQ,
160 );
161
162 IDEC : pdp11_decode
163 port map (
164 IREG => DP_IREG,
165 STAT => ID_STAT
166 );
167
168 SEQ : pdp11_sequencer
169 port map (
170 CLK => CLK,
171 GRESET => GRESET,
172 PSW => DP_PSW,
173 IREG => DP_IREG,
174 ID_STAT => ID_STAT,
175 DP_STAT => DP_STAT,
176 CP_CNTL => CP_CNTL,
177 VM_STAT => VM_STAT,
178 INT_PRI => INT_PRI,
180 INT_ACK => INT_ACK,
181 CRESET => CRESET_L,
182 BRESET => BRESET_L,
184 DP_CNTL => DP_CNTL,
185 VM_CNTL => VM_CNTL,
187 ESUSP_O => ESUSP_O,
188 ESUSP_I => ESUSP_I,
189 HBPT => HBPT,
190 IB_MREQ => IB_MREQ,
193 );
194
195 IRQ : pdp11_irq
196 port map (
197 CLK => CLK,
198 BRESET => BRESET_L,
199 INT_ACK => INT_ACK,
200 EI_PRI => EI_PRI,
201 EI_VECT => EI_VECT,
202 EI_ACKM => EI_ACKM,
203 PRI => INT_PRI,
204 VECT => INT_VECT,
205 IB_MREQ => IB_MREQ,
207 );
208
209 REG70 : pdp11_reg70
210 port map (
211 CLK => CLK,
212 CRESET => CRESET_L,
213 IB_MREQ => IB_MREQ,
215 );
216
217 IB_SRES_OR : ib_sres_or_4
218 port map (
224 );
225
227
229
230 CRESET <= CRESET_L;
231 BRESET <= BRESET_L;
232
233 DM_STAT_CO.cpugo <= CP_STAT_L.cpugo;
234 DM_STAT_CO.cpustep <= CP_STAT_L.cpustep;
235 DM_STAT_CO.cpususp <= CP_STAT_L.cpususp;
236 DM_STAT_CO.suspint <= CP_STAT_L.suspint;
237 DM_STAT_CO.suspext <= CP_STAT_L.suspext;
238
239end syn;
240
in IB_SRES_2 ib_sres_type := ib_sres_init
in IB_SRES_3 ib_sres_type := ib_sres_init
out IB_SRES_OR ib_sres_type
in IB_SRES_4 ib_sres_type := ib_sres_init
in IB_SRES_1 ib_sres_type
Definition: iblib.vhd:33
slbit := '0' GRESET
Definition: pdp11_core.vhd:92
ib_mreq_type := ib_mreq_init IB_MREQ
Definition: pdp11_core.vhd:116
dpath_stat_type := dpath_stat_init DP_STAT
Definition: pdp11_core.vhd:99
vm_cntl_type := vm_cntl_init VM_CNTL
Definition: pdp11_core.vhd:95
slv16 :=( others => '0') VM_DOUT
Definition: pdp11_core.vhd:104
slv16 :=( others => '0') VM_DIN
Definition: pdp11_core.vhd:102
slbit := '0' BRESET_L
Definition: pdp11_core.vhd:94
cp_stat_type := cp_stat_init CP_STAT_L
Definition: pdp11_core.vhd:108
mmu_moni_type := mmu_moni_init MMU_MONI
Definition: pdp11_core.vhd:97
vm_stat_type := vm_stat_init VM_STAT
Definition: pdp11_core.vhd:96
slbit := '0' INT_ACK
Definition: pdp11_core.vhd:109
ib_sres_type := ib_sres_init IB_SRES_DP
Definition: pdp11_core.vhd:111
decode_stat_type := decode_stat_init ID_STAT
Definition: pdp11_core.vhd:105
slv16 :=( others => '0') VM_ADDR
Definition: pdp11_core.vhd:103
ib_sres_type := ib_sres_init IB_SRES_IRQ
Definition: pdp11_core.vhd:113
psw_type := psw_init DP_PSW
Definition: pdp11_core.vhd:100
slbit := '0' CRESET_L
Definition: pdp11_core.vhd:93
ib_sres_type := ib_sres_init IB_SRES
Definition: pdp11_core.vhd:117
slv9_2 :=( others => '0') INT_VECT
Definition: pdp11_core.vhd:107
ib_sres_type := ib_sres_init IB_SRES_SEQ
Definition: pdp11_core.vhd:112
slv16 :=( others => '0') DP_IREG
Definition: pdp11_core.vhd:101
slv3 :=( others => '0') INT_PRI
Definition: pdp11_core.vhd:106
dpath_cntl_type := dpath_cntl_init DP_CNTL
Definition: pdp11_core.vhd:98
ib_sres_type := ib_sres_init IB_SRES_SYS
Definition: pdp11_core.vhd:114
in RESET slbit
Definition: pdp11_core.vhd:65
in IB_SRES_M ib_sres_type
Definition: pdp11_core.vhd:82
out DM_STAT_DP dm_stat_dp_type
Definition: pdp11_core.vhd:84
in CP_ADDR cp_addr_type
Definition: pdp11_core.vhd:67
out EI_ACKM slbit
Definition: pdp11_core.vhd:76
out DM_STAT_CO dm_stat_co_type
Definition: pdp11_core.vhd:87
in CLK slbit
Definition: pdp11_core.vhd:64
in EM_SRES em_sres_type
Definition: pdp11_core.vhd:78
out CP_DOUT slv16
Definition: pdp11_core.vhd:70
out IB_MREQ_M ib_mreq_type
Definition: pdp11_core.vhd:81
out CRESET slbit
Definition: pdp11_core.vhd:79
in CP_DIN slv16
Definition: pdp11_core.vhd:68
in CP_CNTL cp_cntl_type
Definition: pdp11_core.vhd:66
in EI_VECT slv9_2
Definition: pdp11_core.vhd:75
in EI_PRI slv3
Definition: pdp11_core.vhd:74
out CP_STAT cp_stat_type
Definition: pdp11_core.vhd:69
out DM_STAT_VM dm_stat_vm_type
Definition: pdp11_core.vhd:85
out DM_STAT_SE dm_stat_se_type
Definition: pdp11_core.vhd:83
in ESUSP_I slbit
Definition: pdp11_core.vhd:72
out ESUSP_O slbit
Definition: pdp11_core.vhd:71
out EM_MREQ em_mreq_type
Definition: pdp11_core.vhd:77
out BRESET slbit
Definition: pdp11_core.vhd:80
in HBPT slbit
Definition: pdp11_core.vhd:73
in IREG slv16
out STAT decode_stat_type
out DM_STAT_DP dm_stat_dp_type
Definition: pdp11_dpath.vhd:70
out PSWOUT psw_type
Definition: pdp11_dpath.vhd:62
in CNTL dpath_cntl_type
Definition: pdp11_dpath.vhd:58
in VM_DOUT slv16
Definition: pdp11_dpath.vhd:65
in CLK slbit
Definition: pdp11_dpath.vhd:56
out CP_DOUT slv16
Definition: pdp11_dpath.vhd:61
in CRESET slbit
Definition: pdp11_dpath.vhd:57
in IB_MREQ ib_mreq_type
Definition: pdp11_dpath.vhd:67
out VM_ADDR slv16
Definition: pdp11_dpath.vhd:64
out IB_SRES ib_sres_type
Definition: pdp11_dpath.vhd:68
in CP_DIN slv16
Definition: pdp11_dpath.vhd:60
out VM_DIN slv16
Definition: pdp11_dpath.vhd:66
out IREG slv16
Definition: pdp11_dpath.vhd:63
out STAT dpath_stat_type
Definition: pdp11_dpath.vhd:59
in BRESET slbit
Definition: pdp11_irq.vhd:43
out EI_ACKM slbit
Definition: pdp11_irq.vhd:47
out PRI slv3
Definition: pdp11_irq.vhd:48
in INT_ACK slbit
Definition: pdp11_irq.vhd:44
in CLK slbit
Definition: pdp11_irq.vhd:42
in IB_MREQ ib_mreq_type
Definition: pdp11_irq.vhd:50
out IB_SRES ib_sres_type
Definition: pdp11_irq.vhd:52
in EI_VECT slv9_2
Definition: pdp11_irq.vhd:46
in EI_PRI slv3
Definition: pdp11_irq.vhd:45
out VECT slv9_2
Definition: pdp11_irq.vhd:49
in CLK slbit
Definition: pdp11_reg70.vhd:36
in CRESET slbit
Definition: pdp11_reg70.vhd:37
in IB_MREQ ib_mreq_type
Definition: pdp11_reg70.vhd:38
out IB_SRES ib_sres_type
Definition: pdp11_reg70.vhd:40
in ID_STAT decode_stat_type
out DP_CNTL dpath_cntl_type
in PSW psw_type
in VM_STAT vm_stat_type
out MMU_MONI mmu_moni_type
in IB_MREQ ib_mreq_type
out IB_SRES ib_sres_type
out VM_CNTL vm_cntl_type
in CP_CNTL cp_cntl_type
out CP_STAT cp_stat_type
out DM_STAT_SE dm_stat_se_type
in DP_STAT dpath_stat_type
in BRESET slbit
Definition: pdp11_vmbox.vhd:78
out VM_STAT vm_stat_type
Definition: pdp11_vmbox.vhd:83
in MMU_MONI mmu_moni_type
Definition: pdp11_vmbox.vhd:87
in CP_ADDR cp_addr_type
Definition: pdp11_vmbox.vhd:79
in IB_SRES_EXT ib_sres_type
Definition: pdp11_vmbox.vhd:90
in GRESET slbit
Definition: pdp11_vmbox.vhd:76
in CLK slbit
Definition: pdp11_vmbox.vhd:75
in EM_SRES em_sres_type
Definition: pdp11_vmbox.vhd:86
in CRESET slbit
Definition: pdp11_vmbox.vhd:77
out IB_MREQ_M ib_mreq_type
Definition: pdp11_vmbox.vhd:88
out VM_DOUT slv16
Definition: pdp11_vmbox.vhd:84
in VM_CNTL vm_cntl_type
Definition: pdp11_vmbox.vhd:80
out DM_STAT_VM dm_stat_vm_type
Definition: pdp11_vmbox.vhd:92
in VM_DIN slv16
Definition: pdp11_vmbox.vhd:82
in VM_ADDR slv16
Definition: pdp11_vmbox.vhd:81
out EM_MREQ em_mreq_type
Definition: pdp11_vmbox.vhd:85
in IB_SRES_CPU ib_sres_type
Definition: pdp11_vmbox.vhd:89
Definition: pdp11.vhd:123
std_logic_vector( 2 downto 0) slv3
Definition: slvtypes.vhd:35
std_logic_vector( 8 downto 2) slv9_2
Definition: slvtypes.vhd:65
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic slbit
Definition: slvtypes.vhd:30