OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [w11a/] [pdp11_core.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 wfjm
-- $Id: pdp11_core.vhd 427 2011-11-19 21:04:11Z mueller $
2 2 wfjm
--
3 13 wfjm
-- Copyright 2006-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 2 wfjm
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15
-- Module Name:    pdp11_core - syn
16
-- Description:    pdp11: full processor core
17
--
18
-- Dependencies:   pdp11_vmbox
19
--                 pdp11_dpath
20
--                 pdp11_decode
21
--                 pdp11_sequencer
22
--                 pdp11_irq
23
--                 pdp11_sys70
24
--                 ibus/ib_sres_or_4
25
--
26 9 wfjm
-- Test bench:     tb/tb_pdp11core
27
--                 tb/tb_rlink_tba_pdp11core
28 2 wfjm
--
29
-- Target Devices: generic
30 13 wfjm
-- Tool versions:  xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29
31 2 wfjm
-- Revision History: 
32
-- Date         Rev Version  Comment
33 13 wfjm
-- 2011-11-18   427   1.3.1  now numeric_std clean
34 2 wfjm
-- 2010-06-13   305   1.3    add CP_ADDR in port; drop R_CPDIN, R_CPOUT; _vmbox
35
--                           CP_ADDR now from in port; dpath CP_DIN now from in
36
--                           port; out port CP_DOUT now from _dpath
37
-- 2009-05-30   220   1.2.5  final removal of snoopers (were already commented)
38
-- 2008-08-22   161   1.2.4  rename pdp11_ibres_ -> ib_sres_
39
-- 2008-04-25   138   1.2.3  BRESET: add for _vmbox, use for _irq
40
-- 2008-04-19   137   1.2.2  add DM_STAT_(DP|VM|CO) port; added pdp11_sys70
41
-- 2008-03-02   121   1.2.1  remove snoopers
42
-- 2008-02-17   117   1.2    add em_(mreq|sres) interface for memory
43
-- 2008-01-20   112   1.1.3  add BRESET port (intbus reset), rename P->BRESET
44
-- 2008-01-06   111   1.1.2  rename signal EI_ACK->EI_ACKM (master ack)
45
-- 2008-01-01   109   1.1.1  _vmbox w/ IB_SRES_(CPU|EXT)
46
-- 2007-12-30   107   1.1    use IB_MREQ/IB_SRES interface now; remove DMA port
47
-- 2007-07-15    66   1.0.3  rename pdp11_top -> pdp11_core
48
-- 2007-07-02    63   1.0.2  reordered ports on pdp11_top (by function, not i/o)
49
-- 2007-06-14    56   1.0.1  Use slvtypes.all
50
-- 2007-05-12    26   1.0    Initial version 
51
------------------------------------------------------------------------------
52
 
53
library ieee;
54
use ieee.std_logic_1164.all;
55 13 wfjm
use ieee.numeric_std.all;
56 2 wfjm
 
57
use work.slvtypes.all;
58
use work.iblib.all;
59
use work.pdp11.all;
60
 
61
-- ----------------------------------------------------------------------------
62
 
63
entity pdp11_core is                    -- full processor core
64
  port (
65
    CLK : in slbit;                     -- clock
66
    RESET : in slbit;                   -- reset
67
    CP_CNTL : in cp_cntl_type;          -- console control port
68
    CP_ADDR : in cp_addr_type;          -- console address port
69
    CP_DIN : in slv16;                  -- console data in
70
    CP_STAT : out cp_stat_type;         -- console status port
71
    CP_DOUT : out slv16;                -- console data out
72
    EI_PRI : in slv3;                   -- external interrupt priority
73
    EI_VECT : in slv9_2;                -- external interrupt vector
74
    EI_ACKM : out slbit;                -- external interrupt acknowledge
75
    EM_MREQ : out em_mreq_type;         -- external memory: request
76
    EM_SRES : in em_sres_type;          -- external memory: response
77
    BRESET : out slbit;                 -- ibus reset
78
    IB_MREQ_M : out ib_mreq_type;       -- inbus master request (master)
79
    IB_SRES_M : in ib_sres_type;        -- inbus slave response (master)
80
    DM_STAT_DP : out dm_stat_dp_type;   -- debug and monitor status - dpath
81
    DM_STAT_VM : out dm_stat_vm_type;   -- debug and monitor status - vmbox
82
    DM_STAT_CO : out dm_stat_co_type    -- debug and monitor status - core
83
  );
84
end pdp11_core;
85
 
86
architecture syn of pdp11_core is
87
 
88
  signal GRESET : slbit := '0';
89
  signal CRESET : slbit := '0';
90
  signal BRESET_L : slbit := '0';
91
  signal SEQ_CRESET : slbit := '0';
92
  signal SEQ_BRESET : slbit := '0';
93
  signal VM_CNTL : vm_cntl_type := vm_cntl_init;
94
  signal VM_STAT : vm_stat_type := vm_stat_init;
95
  signal MMU_MONI : mmu_moni_type := mmu_moni_init;
96
  signal DP_CNTL : dpath_cntl_type := dpath_cntl_init;
97
  signal DP_STAT : dpath_stat_type := dpath_stat_init;
98
  signal DP_PSW : psw_type := psw_init;
99
  signal DP_PC : slv16 := (others=>'0');
100
  signal DP_IREG : slv16 := (others=>'0');
101
  signal VM_DIN : slv16 := (others=>'0');
102
  signal VM_ADDR : slv16 := (others=>'0');
103
  signal VM_DOUT : slv16 := (others=>'0');
104
  signal ID_STAT : decode_stat_type := decode_stat_init;
105
  signal INT_PRI : slv3 := (others=>'0');
106
  signal INT_VECT : slv9_2 := (others=>'0');
107
  signal CP_STAT_L : cp_stat_type := cp_stat_init;
108
  signal INT_ACK : slbit := '0';
109
 
110
  signal IB_SRES_DP : ib_sres_type := ib_sres_init;
111
  signal IB_SRES_SEQ : ib_sres_type := ib_sres_init;
112
  signal IB_SRES_IRQ : ib_sres_type := ib_sres_init;
113
  signal IB_SRES_SYS : ib_sres_type := ib_sres_init;
114
 
115
  signal IB_MREQ : ib_mreq_type := ib_mreq_init; -- ibus request  (local)
116
  signal IB_SRES : ib_sres_type := ib_sres_init; -- ibus response (local)
117
 
118
begin
119
 
120
  GRESET   <= RESET;
121
  CRESET   <= RESET or SEQ_CRESET;
122
  BRESET_L <= RESET or SEQ_CRESET or SEQ_BRESET;
123
 
124
  VMBOX : pdp11_vmbox
125
    port map (
126
      CLK       => CLK,
127
      GRESET    => GRESET,
128
      CRESET    => CRESET,
129
      BRESET    => BRESET_L,
130
      CP_ADDR   => CP_ADDR,
131
      VM_CNTL   => VM_CNTL,
132
      VM_ADDR   => VM_ADDR,
133
      VM_DIN    => VM_DIN,
134
      VM_STAT   => VM_STAT,
135
      VM_DOUT   => VM_DOUT,
136
      EM_MREQ   => EM_MREQ,
137
      EM_SRES   => EM_SRES,
138
      MMU_MONI  => MMU_MONI,
139
      IB_MREQ_M => IB_MREQ,
140
      IB_SRES_CPU => IB_SRES,
141
      IB_SRES_EXT => IB_SRES_M,
142
      DM_STAT_VM  => DM_STAT_VM
143
    );
144
 
145
  DPATH : pdp11_dpath
146
    port map (
147
      CLK     => CLK,
148
      CRESET  => CRESET,
149
      CNTL    => DP_CNTL,
150
      STAT    => DP_STAT,
151
      CP_DIN  => CP_DIN,
152
      CP_DOUT => CP_DOUT,
153
      PSWOUT  => DP_PSW,
154
      PCOUT   => DP_PC,
155
      IREG    => DP_IREG,
156
      VM_ADDR => VM_ADDR,
157
      VM_DOUT => VM_DOUT,
158
      VM_DIN  => VM_DIN,
159
      IB_MREQ => IB_MREQ,
160
      IB_SRES => IB_SRES_DP,
161
      DM_STAT_DP => DM_STAT_DP
162
    );
163
 
164
  IDEC : pdp11_decode
165
    port map (
166
      IREG => DP_IREG,
167
      STAT => ID_STAT
168
    );
169
 
170
  SEQ : pdp11_sequencer
171
    port map (
172
      CLK       => CLK,
173
      GRESET    => GRESET,
174
      PSW       => DP_PSW,
175
      PC        => DP_PC,
176
      IREG      => DP_IREG,
177
      ID_STAT   => ID_STAT,
178
      DP_STAT   => DP_STAT,
179
      CP_CNTL   => CP_CNTL,
180
      VM_STAT   => VM_STAT,
181
      INT_PRI   => INT_PRI,
182
      INT_VECT  => INT_VECT,
183
      CRESET    => SEQ_CRESET,
184
      BRESET    => SEQ_BRESET,
185
      MMU_MONI  => MMU_MONI,
186
      DP_CNTL   => DP_CNTL,
187
      VM_CNTL   => VM_CNTL,
188
      CP_STAT   => CP_STAT_L,
189
      INT_ACK   => INT_ACK,
190
      IB_MREQ   => IB_MREQ,
191
      IB_SRES   => IB_SRES_SEQ
192
    );
193
 
194
  IRQ : pdp11_irq
195
    port map (
196
      CLK     => CLK,
197
      BRESET  => BRESET_L,
198
      INT_ACK => INT_ACK,
199
      EI_PRI  => EI_PRI,
200
      EI_VECT => EI_VECT,
201
      EI_ACKM => EI_ACKM,
202
      PRI     => INT_PRI,
203
      VECT    => INT_VECT,
204
      IB_MREQ => IB_MREQ,
205
      IB_SRES => IB_SRES_IRQ
206
    );
207
 
208
  SYS70 : pdp11_sys70
209
    port map (
210
      CLK     => CLK,
211
      CRESET  => CRESET,
212
      IB_MREQ => IB_MREQ,
213
      IB_SRES => IB_SRES_SYS
214
    );
215
 
216
  IB_SRES_OR : ib_sres_or_4
217
    port map (
218
      IB_SRES_1  => IB_SRES_DP,
219
      IB_SRES_2  => IB_SRES_SEQ,
220
      IB_SRES_3  => IB_SRES_IRQ,
221
      IB_SRES_4  => IB_SRES_SYS,
222
      IB_SRES_OR => IB_SRES
223
    );
224
 
225
  IB_MREQ_M <= IB_MREQ;
226
 
227
  CP_STAT <= CP_STAT_L;
228
 
229
  BRESET  <= BRESET_L;
230
 
231
  DM_STAT_CO.cpugo       <= CP_STAT_L.cpugo;
232
  DM_STAT_CO.cpuhalt     <= CP_STAT_L.cpuhalt;
233
 
234
end syn;
235
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.