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 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wfjm
-- $Id: pdp11_core.vhd 314 2010-07-09 17:38:41Z mueller $
2
--
3
-- Copyright 2006-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
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
-- Test bench:     tb/tb_pdp11_core
27
--                 tb/tb_rritba_pdp11core
28
--                 tb/tb_rripdp_pdp11core
29
--                 tb/tb_rriext_pdp11core
30
--
31
-- Target Devices: generic
32
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
33
-- Revision History: 
34
-- Date         Rev Version  Comment
35
-- 2010-06-13   305   1.3    add CP_ADDR in port; drop R_CPDIN, R_CPOUT; _vmbox
36
--                           CP_ADDR now from in port; dpath CP_DIN now from in
37
--                           port; out port CP_DOUT now from _dpath
38
-- 2009-05-30   220   1.2.5  final removal of snoopers (were already commented)
39
-- 2008-08-22   161   1.2.4  rename pdp11_ibres_ -> ib_sres_
40
-- 2008-04-25   138   1.2.3  BRESET: add for _vmbox, use for _irq
41
-- 2008-04-19   137   1.2.2  add DM_STAT_(DP|VM|CO) port; added pdp11_sys70
42
-- 2008-03-02   121   1.2.1  remove snoopers
43
-- 2008-02-17   117   1.2    add em_(mreq|sres) interface for memory
44
-- 2008-01-20   112   1.1.3  add BRESET port (intbus reset), rename P->BRESET
45
-- 2008-01-06   111   1.1.2  rename signal EI_ACK->EI_ACKM (master ack)
46
-- 2008-01-01   109   1.1.1  _vmbox w/ IB_SRES_(CPU|EXT)
47
-- 2007-12-30   107   1.1    use IB_MREQ/IB_SRES interface now; remove DMA port
48
-- 2007-07-15    66   1.0.3  rename pdp11_top -> pdp11_core
49
-- 2007-07-02    63   1.0.2  reordered ports on pdp11_top (by function, not i/o)
50
-- 2007-06-14    56   1.0.1  Use slvtypes.all
51
-- 2007-05-12    26   1.0    Initial version 
52
------------------------------------------------------------------------------
53
 
54
library ieee;
55
use ieee.std_logic_1164.all;
56
use ieee.std_logic_arith.all;
57
 
58
use work.slvtypes.all;
59
use work.iblib.all;
60
use work.pdp11.all;
61
 
62
-- ----------------------------------------------------------------------------
63
 
64
entity pdp11_core is                    -- full processor core
65
  port (
66
    CLK : in slbit;                     -- clock
67
    RESET : in slbit;                   -- reset
68
    CP_CNTL : in cp_cntl_type;          -- console control port
69
    CP_ADDR : in cp_addr_type;          -- console address port
70
    CP_DIN : in slv16;                  -- console data in
71
    CP_STAT : out cp_stat_type;         -- console status port
72
    CP_DOUT : out slv16;                -- console data out
73
    EI_PRI : in slv3;                   -- external interrupt priority
74
    EI_VECT : in slv9_2;                -- external interrupt vector
75
    EI_ACKM : out slbit;                -- external interrupt acknowledge
76
    EM_MREQ : out em_mreq_type;         -- external memory: request
77
    EM_SRES : in em_sres_type;          -- external memory: response
78
    BRESET : out slbit;                 -- ibus reset
79
    IB_MREQ_M : out ib_mreq_type;       -- inbus master request (master)
80
    IB_SRES_M : in ib_sres_type;        -- inbus slave response (master)
81
    DM_STAT_DP : out dm_stat_dp_type;   -- debug and monitor status - dpath
82
    DM_STAT_VM : out dm_stat_vm_type;   -- debug and monitor status - vmbox
83
    DM_STAT_CO : out dm_stat_co_type    -- debug and monitor status - core
84
  );
85
end pdp11_core;
86
 
87
architecture syn of pdp11_core is
88
 
89
  signal GRESET : slbit := '0';
90
  signal CRESET : slbit := '0';
91
  signal BRESET_L : slbit := '0';
92
  signal SEQ_CRESET : slbit := '0';
93
  signal SEQ_BRESET : slbit := '0';
94
  signal VM_CNTL : vm_cntl_type := vm_cntl_init;
95
  signal VM_STAT : vm_stat_type := vm_stat_init;
96
  signal MMU_MONI : mmu_moni_type := mmu_moni_init;
97
  signal DP_CNTL : dpath_cntl_type := dpath_cntl_init;
98
  signal DP_STAT : dpath_stat_type := dpath_stat_init;
99
  signal DP_PSW : psw_type := psw_init;
100
  signal DP_PC : slv16 := (others=>'0');
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
 
119
begin
120
 
121
  GRESET   <= RESET;
122
  CRESET   <= RESET or SEQ_CRESET;
123
  BRESET_L <= RESET or SEQ_CRESET or SEQ_BRESET;
124
 
125
  VMBOX : pdp11_vmbox
126
    port map (
127
      CLK       => CLK,
128
      GRESET    => GRESET,
129
      CRESET    => CRESET,
130
      BRESET    => BRESET_L,
131
      CP_ADDR   => CP_ADDR,
132
      VM_CNTL   => VM_CNTL,
133
      VM_ADDR   => VM_ADDR,
134
      VM_DIN    => VM_DIN,
135
      VM_STAT   => VM_STAT,
136
      VM_DOUT   => VM_DOUT,
137
      EM_MREQ   => EM_MREQ,
138
      EM_SRES   => EM_SRES,
139
      MMU_MONI  => MMU_MONI,
140
      IB_MREQ_M => IB_MREQ,
141
      IB_SRES_CPU => IB_SRES,
142
      IB_SRES_EXT => IB_SRES_M,
143
      DM_STAT_VM  => DM_STAT_VM
144
    );
145
 
146
  DPATH : pdp11_dpath
147
    port map (
148
      CLK     => CLK,
149
      CRESET  => CRESET,
150
      CNTL    => DP_CNTL,
151
      STAT    => DP_STAT,
152
      CP_DIN  => CP_DIN,
153
      CP_DOUT => CP_DOUT,
154
      PSWOUT  => DP_PSW,
155
      PCOUT   => DP_PC,
156
      IREG    => DP_IREG,
157
      VM_ADDR => VM_ADDR,
158
      VM_DOUT => VM_DOUT,
159
      VM_DIN  => VM_DIN,
160
      IB_MREQ => IB_MREQ,
161
      IB_SRES => IB_SRES_DP,
162
      DM_STAT_DP => DM_STAT_DP
163
    );
164
 
165
  IDEC : pdp11_decode
166
    port map (
167
      IREG => DP_IREG,
168
      STAT => ID_STAT
169
    );
170
 
171
  SEQ : pdp11_sequencer
172
    port map (
173
      CLK       => CLK,
174
      GRESET    => GRESET,
175
      PSW       => DP_PSW,
176
      PC        => DP_PC,
177
      IREG      => DP_IREG,
178
      ID_STAT   => ID_STAT,
179
      DP_STAT   => DP_STAT,
180
      CP_CNTL   => CP_CNTL,
181
      VM_STAT   => VM_STAT,
182
      INT_PRI   => INT_PRI,
183
      INT_VECT  => INT_VECT,
184
      CRESET    => SEQ_CRESET,
185
      BRESET    => SEQ_BRESET,
186
      MMU_MONI  => MMU_MONI,
187
      DP_CNTL   => DP_CNTL,
188
      VM_CNTL   => VM_CNTL,
189
      CP_STAT   => CP_STAT_L,
190
      INT_ACK   => INT_ACK,
191
      IB_MREQ   => IB_MREQ,
192
      IB_SRES   => IB_SRES_SEQ
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,
206
      IB_SRES => IB_SRES_IRQ
207
    );
208
 
209
  SYS70 : pdp11_sys70
210
    port map (
211
      CLK     => CLK,
212
      CRESET  => CRESET,
213
      IB_MREQ => IB_MREQ,
214
      IB_SRES => IB_SRES_SYS
215
    );
216
 
217
  IB_SRES_OR : ib_sres_or_4
218
    port map (
219
      IB_SRES_1  => IB_SRES_DP,
220
      IB_SRES_2  => IB_SRES_SEQ,
221
      IB_SRES_3  => IB_SRES_IRQ,
222
      IB_SRES_4  => IB_SRES_SYS,
223
      IB_SRES_OR => IB_SRES
224
    );
225
 
226
  IB_MREQ_M <= IB_MREQ;
227
 
228
  CP_STAT <= CP_STAT_L;
229
 
230
  BRESET  <= BRESET_L;
231
 
232
  DM_STAT_CO.cpugo       <= CP_STAT_L.cpugo;
233
  DM_STAT_CO.cpuhalt     <= CP_STAT_L.cpuhalt;
234
 
235
end syn;
236
 

powered by: WebSVN 2.1.0

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