w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tbd_pdp11core.vhd
Go to the documentation of this file.
1-- $Id: tbd_pdp11core.vhd 1348 2023-01-08 13:33:01Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2007-2023 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: tbd_pdp11core - syn
7-- Description: Wrapper for pdp11_core to avoid records. It has a port
8-- interface which will not be modified by xst synthesis
9-- (no records, no generic port).
10--
11-- Dependencies: genlib/clkdivce
12-- pdp11_core
13-- pdp11_bram
14-- ibus/ibdr_minisys
15-- pdp11_tmu_sb [sim only]
16--
17-- To test: pdp11_core
18--
19-- Target Devices: generic
20-- Tool versions: xst 8.2-14.7; viv 2016.2-2022.1; ghdl 0.18-2.0.0
21--
22-- Synthesized (xst):
23-- Date Rev ise Target flop lutl lutm slic t peri
24-- 2010-06-13 305 11.4 L68 xc3s1000-4 601 2504 206 1428 s 18.6
25-- 2008-03-01 120 8.2.03 I34 xc3s1000-4 679 2562 206 1465 s 18.5
26-- 2008-01-06 111 8.2.03 I34 xc3s1000-4 605 2324 164 1297 s 18.7
27-- 2007-12-30 107 8.2.03 I34 xc3s1000-4 536 2119 119 1184 s 19.3
28-- 2007-10-27 92 9.2.02 J39 xc3s1000-4 INTERNAL_ERROR -> blog_webpack
29-- 2007-10-27 92 9.1 J30 xc3s1000-4 503 2021 119 - t 18.7
30-- 2007-10-27 92 8.2.03 I34 xc3s1000-4 534 2091 119 1170 s 19.3
31-- 2007-10-27 92 8.1.03 I27 xc3s1000-4 557 2186 119 - s 18.6
32--
33-- Revision History:
34-- Date Rev Version Comment
35-- 2023-01-08 1348 1.6.5 pass DM_STAT_SE to pdp11_tmu_sb
36-- 2018-10-07 1054 1.6.4 drop ITIMER from core
37-- 2018-10-05 1053 1.6.3 use DM_STAT_CA instead of DM_STAT_SY
38-- 2015-11-01 712 1.6.2 use sbcntl_sbf_tmu
39-- 2015-07-03 697 1.6.1 adapt to new DM_STAT_(SY|VM)
40-- 2015-05-03 674 1.6 start/stop/suspend overhaul
41-- 2011-11-18 427 1.5.1 now numeric_std clean
42-- 2010-12-30 351 1.5 rename tbd_pdp11_core -> tbd_pdp11core
43-- 2010-10-23 335 1.4.2 rename RRI_LAM->RB_LAM;
44-- 2010-06-20 307 1.4.1 add CP_ADDR_racc, CP_ADDR_be port
45-- 2010-06-13 305 1.4 add CP_ADDR_... in ports; add CP_CNTL_rnum in port
46-- 2010-06-11 303 1.3.9 use IB_MREQ.racc instead of RRI_REQ
47-- 2009-07-12 233 1.3.8 adapt to ibdr_minisys interface changes
48-- 2009-05-10 214 1.3.7 use pdp11_tmu_sb instead of pdp11_tmu
49-- 2008-08-22 161 1.3.6 use iblib, ibdlib
50-- 2008-05-03 143 1.3.5 rename _cpursta->_cpurust
51-- 2008-04-27 140 1.3.4 use cpursta interface, remove cpufail
52-- 2008-04-19 137 1.3.3 add DM_STAT_(DP|VM|CO|SY) signals, add pdp11_tmu
53-- 2008-04-18 136 1.3.2 add RESET for ibdr_minisys
54-- 2008-02-23 118 1.3.1 use sys_conf for bram size
55-- 2008-02-17 117 1.3 adapt to em_ core interface; use pdp11_bram
56-- 2008-01-20 112 1.2.1 rename clkgen->clkdivce; use ibdr_minisys, BRESET;
57-- 2008-01-06 111 1.2 add some external devices: KW11L, DL11, RK11
58-- 2007-12-30 107 1.1 use IB_MREQ/IB_SRES interface now; remove DMA port
59-- 2007-09-23 85 1.0 Initial version
60------------------------------------------------------------------------------
61
62library ieee;
63use ieee.std_logic_1164.all;
64use ieee.numeric_std.all;
65
66use work.slvtypes.all;
67use work.genlib.all;
68use work.iblib.all;
69use work.ibdlib.all;
70use work.pdp11.all;
71use work.sys_conf.all;
72
73entity tbd_pdp11core is -- full core [no records]
74 port (
75 CLK : in slbit; -- clock
76 RESET : in slbit; -- reset
77 CP_CNTL_req : in slbit; -- console control port
78 CP_CNTL_func : in slv5; -- console control port
79 CP_CNTL_rnum : in slv3; -- console control port
80 CP_ADDR_addr : in slv22_1; -- console address port
81 CP_ADDR_racc : in slbit; -- console address port
82 CP_ADDR_be : in slv2; -- console address port
83 CP_ADDR_ena_22bit : in slbit; -- console address port
84 CP_ADDR_ena_ubmap : in slbit; -- console address port
85 CP_DIN : in slv16; -- console data in
86 CP_STAT_cmdbusy : out slbit; -- console status port
87 CP_STAT_cmdack : out slbit; -- console status port
88 CP_STAT_cmderr : out slbit; -- console status port
89 CP_STAT_cmdmerr : out slbit; -- console status port
90 CP_STAT_cpugo : out slbit; -- console status port
91 CP_STAT_cpustep : out slbit; -- console status port
92 CP_STAT_cpuwait : out slbit; -- console status port
93 CP_STAT_cpususp : out slbit; -- console status port
94 CP_STAT_cpurust : out slv4; -- console status port
95 CP_STAT_suspint : out slbit; -- console status port
96 CP_STAT_suspext : out slbit; -- console status port
97 CP_DOUT : out slv16 -- console data out
98 );
100
101
102architecture syn of tbd_pdp11core is
103
104 signal CE_USEC : slbit := '0';
105
106 signal EI_PRI : slv3 := (others=>'0');
107 signal EI_VECT : slv9_2 := (others=>'0');
108 signal EI_ACKM : slbit := '0';
109
110 signal CP_CNTL : cp_cntl_type := cp_cntl_init;
111 signal CP_ADDR : cp_addr_type := cp_addr_init;
112 signal CP_STAT : cp_stat_type := cp_stat_init;
113
114 signal EM_MREQ : em_mreq_type := em_mreq_init;
115 signal EM_SRES : em_sres_type := em_sres_init;
116
117 signal BRESET : slbit := '0';
118 signal IB_MREQ_M : ib_mreq_type := ib_mreq_init;
119 signal IB_SRES_M : ib_sres_type := ib_sres_init;
120
121 signal DM_STAT_DP : dm_stat_dp_type := dm_stat_dp_init;
122 signal DM_STAT_SE : dm_stat_se_type := dm_stat_se_init;
123 signal DM_STAT_VM : dm_stat_vm_type := dm_stat_vm_init;
124 signal DM_STAT_CO : dm_stat_co_type := dm_stat_co_init;
125 signal DM_STAT_CA : dm_stat_ca_type := dm_stat_ca_init;
126
127begin
128
129 CP_CNTL.req <= CP_CNTL_req;
130 CP_CNTL.func <= CP_CNTL_func;
131 CP_CNTL.rnum <= CP_CNTL_rnum;
132
133 CP_ADDR.addr <= CP_ADDR_addr;
134 CP_ADDR.racc <= CP_ADDR_racc;
135 CP_ADDR.be <= CP_ADDR_be;
136 CP_ADDR.ena_22bit <= CP_ADDR_ena_22bit;
137 CP_ADDR.ena_ubmap <= CP_ADDR_ena_ubmap;
138
139 CP_STAT_cmdbusy <= CP_STAT.cmdbusy;
140 CP_STAT_cmdack <= CP_STAT.cmdack;
141 CP_STAT_cmderr <= CP_STAT.cmderr;
142 CP_STAT_cmdmerr <= CP_STAT.cmdmerr;
143 CP_STAT_cpugo <= CP_STAT.cpugo;
144 CP_STAT_cpustep <= CP_STAT.cpustep;
145 CP_STAT_cpuwait <= CP_STAT.cpuwait;
146 CP_STAT_cpususp <= CP_STAT.cpususp;
147 CP_STAT_cpurust <= CP_STAT.cpurust;
148 CP_STAT_suspint <= CP_STAT.suspint;
149 CP_STAT_suspext <= CP_STAT.suspext;
150
151 CLKDIV : clkdivce
152 generic map (
153 CDUWIDTH => 6,
154 USECDIV => 50,
155 MSECDIV => 1000)
156 port map (
157 CLK => CLK,
158 CE_USEC => CE_USEC,
159 CE_MSEC => open
160 );
161
162 PDP11 : pdp11_core
163 port map (
164 CLK => CLK,
165 RESET => RESET,
166 CP_CNTL => CP_CNTL,
167 CP_ADDR => CP_ADDR,
168 CP_DIN => CP_DIN,
169 CP_STAT => CP_STAT,
170 CP_DOUT => CP_DOUT,
171 ESUSP_O => open, -- not tested
172 ESUSP_I => '0', -- dito
173 HBPT => '0', -- dito
174 EI_PRI => EI_PRI,
175 EI_VECT => EI_VECT,
176 EI_ACKM => EI_ACKM,
177 EM_MREQ => EM_MREQ,
178 EM_SRES => EM_SRES,
179 BRESET => BRESET,
186 );
187
188 MEM : pdp11_bram
189 generic map (
190 AWIDTH => sys_conf_bram_awidth)
191 port map (
192 CLK => CLK,
193 GRESET => RESET,
194 EM_MREQ => EM_MREQ,
196 );
197
198 IBDR_SYS : ibdr_minisys
199 port map (
200 CLK => CLK,
201 CE_USEC => CE_USEC,
202 CE_MSEC => CE_USEC, -- !! in test benches msec = usec !!
203 RESET => RESET,
204 BRESET => BRESET,
205 RB_LAM => open,
208 EI_ACKM => EI_ACKM,
209 EI_PRI => EI_PRI,
210 EI_VECT => EI_VECT,
211 DISPREG => open
212 );
213
214 DM_STAT_CA <= dm_stat_ca_init;
215
216-- synthesis translate_off
217 TMU : pdp11_tmu_sb
218 generic map (
219 ENAPIN => sbcntl_sbf_tmu)
220 port map (
221 CLK => CLK,
227 );
228
229-- synthesis translate_on
230
231end syn;
out CE_MSEC slbit
Definition: clkdivce.vhd:39
USECDIV positive := 50
Definition: clkdivce.vhd:33
CDUWIDTH positive := 6
Definition: clkdivce.vhd:32
out CE_USEC slbit
Definition: clkdivce.vhd:37
MSECDIV positive := 1000
Definition: clkdivce.vhd:34
in CLK slbit
Definition: clkdivce.vhd:36
in RESET slbit
out DISPREG slv16
in CE_USEC slbit
out EI_PRI slv3
in BRESET slbit
out EI_VECT slv9_2
in CLK slbit
in IB_MREQ ib_mreq_type
out IB_SRES ib_sres_type
in EI_ACKM slbit
out RB_LAM slv16_1
in CE_MSEC slbit
Definition: iblib.vhd:33
AWIDTH positive := 14
Definition: pdp11_bram.vhd:31
in EM_MREQ em_mreq_type
Definition: pdp11_bram.vhd:35
in GRESET slbit
Definition: pdp11_bram.vhd:34
in CLK slbit
Definition: pdp11_bram.vhd:33
out EM_SRES em_sres_type
Definition: pdp11_bram.vhd:37
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
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 DM_STAT_DP dm_stat_dp_type
in DM_STAT_CO dm_stat_co_type
in DM_STAT_SE dm_stat_se_type
in CLK slbit
in DM_STAT_VM dm_stat_vm_type
in DM_STAT_CA dm_stat_ca_type
ENAPIN integer := sbcntl_sbf_tmu
Definition: pdp11.vhd:123
std_logic_vector( 21 downto 1) slv22_1
Definition: slvtypes.vhd:69
std_logic_vector( 3 downto 0) slv4
Definition: slvtypes.vhd:36
std_logic_vector( 4 downto 0) slv5
Definition: slvtypes.vhd:37
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
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34
slv9_2 :=( others => '0') EI_VECT
dm_stat_se_type := dm_stat_se_init DM_STAT_SE
slbit := '0' EI_ACKM
dm_stat_dp_type := dm_stat_dp_init DM_STAT_DP
dm_stat_vm_type := dm_stat_vm_init DM_STAT_VM
slv3 :=( others => '0') EI_PRI
slbit := '0' CE_USEC
em_sres_type := em_sres_init EM_SRES
dm_stat_co_type := dm_stat_co_init DM_STAT_CO
cp_stat_type := cp_stat_init CP_STAT
ib_mreq_type := ib_mreq_init IB_MREQ_M
slbit := '0' BRESET
cp_addr_type := cp_addr_init CP_ADDR
ib_sres_type := ib_sres_init IB_SRES_M
cp_cntl_type := cp_cntl_init CP_CNTL
em_mreq_type := em_mreq_init EM_MREQ
dm_stat_ca_type := dm_stat_ca_init DM_STAT_CA
out CP_STAT_cmdbusy slbit
in CP_CNTL_req slbit
in RESET slbit
out CP_STAT_suspint slbit
in CP_ADDR_racc slbit
out CP_STAT_cpugo slbit
in CP_ADDR_ena_22bit slbit
out CP_STAT_cpuwait slbit
out CP_STAT_suspext slbit
in CP_CNTL_func slv5
in CLK slbit
out CP_STAT_cmderr slbit
out CP_STAT_cmdmerr slbit
out CP_DOUT slv16
in CP_DIN slv16
out CP_STAT_cpususp slbit
in CP_ADDR_be slv2
in CP_ADDR_addr slv22_1
in CP_CNTL_rnum slv3
out CP_STAT_cpustep slbit
out CP_STAT_cpurust slv4
in CP_ADDR_ena_ubmap slbit
out CP_STAT_cmdack slbit