w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tbd_tba_pdp11core.vhd
Go to the documentation of this file.
1-- $Id: tbd_tba_pdp11core.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2008-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: tbd_tba_pdp11core - syn
7-- Description: tbd for testing pdp11_core_rbus plus ibdr_minisys
8--
9-- Dependencies: genlib/clkdivce
10-- pdp11_core_rbus
11-- pdp11_core
12-- pdp11_bram
13-- ibus/ibdr_minisys
14-- rbus/rb_sres_or_2
15--
16-- Test bench: tb_rlink_tba_pdp11core
17--
18-- Target Devices: generic
19--
20-- Synthesized (xst):
21-- Date Rev ise Target flop lutl lutm slic t peri
22--
23-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.35
24-- Revision History:
25-- Date Rev Version Comment
26-- 2019-06-02 1159 1.6.2 use rbaddr_ constants
27-- 2018-10-07 1054 1.6.1 drop ITIMER from core
28-- 2015-05-09 677 1.6 start/stop/suspend overhaul; reset overhaul
29-- 2014-08-28 588 1.5.1 use new rlink v4 iface and 4 bit STAT
30-- 2014-08-15 583 1.5 rb_mreq addr now 16 bit
31-- 2011-11-18 427 1.4.1 now numeric_std clean
32-- 2010-12-30 351 1.4 renamed from tbd_pdp11core_rri; rbv3 port;
33-- 2010-10-23 335 1.3.2 rename RRI_LAM->RB_LAM;
34-- 2010-06-18 306 1.3.1 rename RB_ADDR->RB_ADDR_CORE, add RB_ADDR_IBUS;
35-- remove pdp11_ibdr_rri
36-- 2010-06-11 303 1.3 use IB_MREQ.racc instead of RRI_REQ
37-- 2010-05-02 287 1.2.1 rename RP_STAT->RB_STAT,AP_LAM->RB_LAM
38-- 2010-05-01 285 1.2 port to rri V2 interface
39-- 2009-07-12 233 1.1.4 adapt to ibdr_minisys interface changes
40-- 2008-08-22 161 1.1.3 use iblib, ibdlib
41-- 2008-04-18 136 1.1.2 add RESET for ibdr_minisys
42-- 2008-02-23 118 1.1.1 use sys_conf for bram size
43-- 2008-02-17 117 1.1 adapt to em_ core interface; use pdp11_bram
44-- 2008-01-20 113 1.0 Initial version (factored out from rrirp_pdp11core,
45-- add rri access to ibdr now)
46------------------------------------------------------------------------------
47
48library ieee;
49use ieee.std_logic_1164.all;
50use ieee.numeric_std.all;
51
52use work.slvtypes.all;
53use work.genlib.all;
54use work.iblib.all;
55use work.ibdlib.all;
56use work.pdp11.all;
57use work.sys_conf.all;
58use work.rblib.all;
59
60entity tbd_tba_pdp11core is -- tbd pdp11_core_rbus plus ibdr_minisys
61 -- implements rbtba_aif
62 port (
63 CLK : in slbit; -- clock
64 RESET : in slbit; -- reset
65 RB_MREQ_aval : in slbit; -- rbus: request - aval
66 RB_MREQ_re : in slbit; -- rbus: request - re
67 RB_MREQ_we : in slbit; -- rbus: request - we
68 RB_MREQ_initt : in slbit; -- rbus: request - init; avoid name coll
69 RB_MREQ_addr : in slv16; -- rbus: request - addr
70 RB_MREQ_din : in slv16; -- rbus: request - din
71 RB_SRES_ack : out slbit; -- rbus: response - ack
72 RB_SRES_busy : out slbit; -- rbus: response - busy
73 RB_SRES_err : out slbit; -- rbus: response - err
74 RB_SRES_dout : out slv16; -- rbus: response - dout
75 RB_LAM : out slv16; -- rbus: look at me
76 RB_STAT : out slv4 -- rbus: status flags
77 );
78end entity tbd_tba_pdp11core;
79
80
81architecture syn of tbd_tba_pdp11core is
82
83 signal CE_USEC : slbit := '0';
84
85 signal GRESET : slbit := '0';
86 signal CP_CNTL : cp_cntl_type := cp_cntl_init;
87 signal CP_ADDR : cp_addr_type := cp_addr_init;
88 signal CP_DIN : slv16 := (others=>'0');
89 signal CP_STAT : cp_stat_type := cp_stat_init;
90 signal CP_DOUT : slv16 := (others=>'0');
91
92 signal RB_MREQ : rb_mreq_type := rb_mreq_init;
93 signal RB_SRES : rb_sres_type := rb_sres_init;
94
95 signal RB_SRES_CPU : rb_sres_type := rb_sres_init;
96 signal RB_SRES_IBD : rb_sres_type := rb_sres_init;
97
98 signal EI_PRI : slv3 := (others=>'0');
99 signal EI_VECT : slv9_2 := (others=>'0');
100 signal EI_ACKM : slbit := '0';
101
102 signal EM_MREQ : em_mreq_type := em_mreq_init;
103 signal EM_SRES : em_sres_type := em_sres_init;
104
105 signal BRESET : slbit := '0';
106 signal IB_MREQ : ib_mreq_type := ib_mreq_init;
107 signal IB_SRES : ib_sres_type := ib_sres_init;
108
109begin
110
111 RB_MREQ.aval <= RB_MREQ_aval;
112 RB_MREQ.re <= RB_MREQ_re;
113 RB_MREQ.we <= RB_MREQ_we;
114 RB_MREQ.init <= RB_MREQ_initt;
115 RB_MREQ.addr <= RB_MREQ_addr;
116 RB_MREQ.din <= RB_MREQ_din;
117
118 RB_SRES_ack <= RB_SRES.ack;
119 RB_SRES_busy <= RB_SRES.busy;
120 RB_SRES_err <= RB_SRES.err;
121 RB_SRES_dout <= RB_SRES.dout;
122
123 CLKDIV : clkdivce
124 generic map (
125 CDUWIDTH => 6,
126 USECDIV => 50,
127 MSECDIV => 1000)
128 port map (
129 CLK => CLK,
130 CE_USEC => CE_USEC,
131 CE_MSEC => open
132 );
133
134 RB2CP : pdp11_core_rbus
135 generic map (
136 RB_ADDR_CORE => rbaddr_cpu0_core,
137 RB_ADDR_IBUS => rbaddr_cpu0_ibus)
138 port map (
139 CLK => CLK,
140 RESET => RESET,
141 RB_MREQ => RB_MREQ,
143 RB_STAT => RB_STAT,
144 RB_LAM => RB_LAM(0),
145 GRESET => GRESET,
146 CP_CNTL => CP_CNTL,
147 CP_ADDR => CP_ADDR,
148 CP_DIN => CP_DIN,
149 CP_STAT => CP_STAT,
151 );
152
153 W11A : pdp11_core
154 port map (
155 CLK => CLK,
156 RESET => GRESET,
157 CP_CNTL => CP_CNTL,
158 CP_ADDR => CP_ADDR,
159 CP_DIN => CP_DIN,
160 CP_STAT => CP_STAT,
161 CP_DOUT => CP_DOUT,
162 ESUSP_O => open,
163 ESUSP_I => '0',
164 HBPT => '0',
165 EI_PRI => EI_PRI,
166 EI_VECT => EI_VECT,
167 EI_ACKM => EI_ACKM,
168 EM_MREQ => EM_MREQ,
169 EM_SRES => EM_SRES,
170 BRESET => BRESET,
173 DM_STAT_SE => open,
174 DM_STAT_DP => open,
175 DM_STAT_VM => open,
176 DM_STAT_CO => open
177 );
178
179 MEM : pdp11_bram
180 generic map (
181 AWIDTH => sys_conf_bram_awidth)
182 port map (
183 CLK => CLK,
184 GRESET => GRESET,
185 EM_MREQ => EM_MREQ,
187 );
188
189 IBDR_SYS : ibdr_minisys
190 port map (
191 CLK => CLK,
192 CE_USEC => CE_USEC,
193 CE_MSEC => CE_USEC, -- !! in test benches msec = usec !!
194 RESET => GRESET,
195 BRESET => BRESET,
196 RB_LAM => RB_LAM(15 downto 1),
197 IB_MREQ => IB_MREQ,
198 IB_SRES => IB_SRES,
199 EI_ACKM => EI_ACKM,
200 EI_PRI => EI_PRI,
201 EI_VECT => EI_VECT,
202 DISPREG => open
203 );
204
205 RB_SRES_OR : rb_sres_or_2
206 port map (
210 );
211
212end 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 CP_STAT cp_stat_type
out CP_CNTL cp_cntl_type
in RB_MREQ rb_mreq_type
out CP_ADDR cp_addr_type
RB_ADDR_CORE slv16 := rbaddr_cpu0_core
RB_ADDR_IBUS slv16 := rbaddr_cpu0_ibus
out RB_SRES rb_sres_type
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
Definition: pdp11.vhd:123
in RB_SRES_2 rb_sres_type := rb_sres_init
out RB_SRES_OR rb_sres_type
in RB_SRES_1 rb_sres_type
Definition: rblib.vhd:32
std_logic_vector( 3 downto 0) slv4
Definition: slvtypes.vhd:36
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
slv9_2 :=( others => '0') EI_VECT
ib_mreq_type := ib_mreq_init IB_MREQ
slv3 :=( others => '0') EI_PRI
slv16 :=( others => '0') CP_DOUT
rb_mreq_type := rb_mreq_init RB_MREQ
em_sres_type := em_sres_init EM_SRES
slv16 :=( others => '0') CP_DIN
rb_sres_type := rb_sres_init RB_SRES
cp_stat_type := cp_stat_init CP_STAT
rb_sres_type := rb_sres_init RB_SRES_CPU
cp_addr_type := cp_addr_init CP_ADDR
rb_sres_type := rb_sres_init RB_SRES_IBD
cp_cntl_type := cp_cntl_init CP_CNTL
em_mreq_type := em_mreq_init EM_MREQ
ib_sres_type := ib_sres_init IB_SRES