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 9

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

Line No. Rev Author Line
1 9 wfjm
-- $Id: pdp11_core.vhd 351 2010-12-30 21:50:54Z mueller $
2 2 wfjm
--
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 9 wfjm
-- Test bench:     tb/tb_pdp11core
27
--                 tb/tb_rlink_tba_pdp11core
28 2 wfjm
--
29
-- Target Devices: generic
30 9 wfjm
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2, 12.1; ghdl 0.18-0.29
31 2 wfjm
-- Revision History: 
32
-- Date         Rev Version  Comment
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
 
52
library ieee;
53
use ieee.std_logic_1164.all;
54
use ieee.std_logic_arith.all;
55
 
56
use work.slvtypes.all;
57
use work.iblib.all;
58
use work.pdp11.all;
59
 
60
-- ----------------------------------------------------------------------------
61
 
62
entity 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
    EI_PRI : in slv3;                   -- external interrupt priority
72
    EI_VECT : in slv9_2;                -- external interrupt vector
73
    EI_ACKM : out slbit;                -- external interrupt acknowledge
74
    EM_MREQ : out em_mreq_type;         -- external memory: request
75
    EM_SRES : in em_sres_type;          -- external memory: response
76
    BRESET : out slbit;                 -- ibus reset
77
    IB_MREQ_M : out ib_mreq_type;       -- inbus master request (master)
78
    IB_SRES_M : in ib_sres_type;        -- inbus slave response (master)
79
    DM_STAT_DP : out dm_stat_dp_type;   -- debug and monitor status - dpath
80
    DM_STAT_VM : out dm_stat_vm_type;   -- debug and monitor status - vmbox
81
    DM_STAT_CO : out dm_stat_co_type    -- debug and monitor status - core
82
  );
83
end pdp11_core;
84
 
85
architecture syn of pdp11_core is
86
 
87
  signal GRESET : slbit := '0';
88
  signal CRESET : slbit := '0';
89
  signal BRESET_L : slbit := '0';
90
  signal SEQ_CRESET : slbit := '0';
91
  signal SEQ_BRESET : slbit := '0';
92
  signal VM_CNTL : vm_cntl_type := vm_cntl_init;
93
  signal VM_STAT : vm_stat_type := vm_stat_init;
94
  signal MMU_MONI : mmu_moni_type := mmu_moni_init;
95
  signal DP_CNTL : dpath_cntl_type := dpath_cntl_init;
96
  signal DP_STAT : dpath_stat_type := dpath_stat_init;
97
  signal DP_PSW : psw_type := psw_init;
98
  signal DP_PC : slv16 := (others=>'0');
99
  signal DP_IREG : slv16 := (others=>'0');
100
  signal VM_DIN : slv16 := (others=>'0');
101
  signal VM_ADDR : slv16 := (others=>'0');
102
  signal VM_DOUT : slv16 := (others=>'0');
103
  signal ID_STAT : decode_stat_type := decode_stat_init;
104
  signal INT_PRI : slv3 := (others=>'0');
105
  signal INT_VECT : slv9_2 := (others=>'0');
106
  signal CP_STAT_L : cp_stat_type := cp_stat_init;
107
  signal INT_ACK : slbit := '0';
108
 
109
  signal IB_SRES_DP : ib_sres_type := ib_sres_init;
110
  signal IB_SRES_SEQ : ib_sres_type := ib_sres_init;
111
  signal IB_SRES_IRQ : ib_sres_type := ib_sres_init;
112
  signal IB_SRES_SYS : ib_sres_type := ib_sres_init;
113
 
114
  signal IB_MREQ : ib_mreq_type := ib_mreq_init; -- ibus request  (local)
115
  signal IB_SRES : ib_sres_type := ib_sres_init; -- ibus response (local)
116
 
117
begin
118
 
119
  GRESET   <= RESET;
120
  CRESET   <= RESET or SEQ_CRESET;
121
  BRESET_L <= RESET or SEQ_CRESET or SEQ_BRESET;
122
 
123
  VMBOX : pdp11_vmbox
124
    port map (
125
      CLK       => CLK,
126
      GRESET    => GRESET,
127
      CRESET    => CRESET,
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,
137
      MMU_MONI  => MMU_MONI,
138
      IB_MREQ_M => IB_MREQ,
139
      IB_SRES_CPU => IB_SRES,
140
      IB_SRES_EXT => IB_SRES_M,
141
      DM_STAT_VM  => DM_STAT_VM
142
    );
143
 
144
  DPATH : pdp11_dpath
145
    port map (
146
      CLK     => CLK,
147
      CRESET  => CRESET,
148
      CNTL    => DP_CNTL,
149
      STAT    => DP_STAT,
150
      CP_DIN  => CP_DIN,
151
      CP_DOUT => CP_DOUT,
152
      PSWOUT  => DP_PSW,
153
      PCOUT   => DP_PC,
154
      IREG    => DP_IREG,
155
      VM_ADDR => VM_ADDR,
156
      VM_DOUT => VM_DOUT,
157
      VM_DIN  => VM_DIN,
158
      IB_MREQ => IB_MREQ,
159
      IB_SRES => IB_SRES_DP,
160
      DM_STAT_DP => DM_STAT_DP
161
    );
162
 
163
  IDEC : pdp11_decode
164
    port map (
165
      IREG => DP_IREG,
166
      STAT => ID_STAT
167
    );
168
 
169
  SEQ : pdp11_sequencer
170
    port map (
171
      CLK       => CLK,
172
      GRESET    => GRESET,
173
      PSW       => DP_PSW,
174
      PC        => DP_PC,
175
      IREG      => DP_IREG,
176
      ID_STAT   => ID_STAT,
177
      DP_STAT   => DP_STAT,
178
      CP_CNTL   => CP_CNTL,
179
      VM_STAT   => VM_STAT,
180
      INT_PRI   => INT_PRI,
181
      INT_VECT  => INT_VECT,
182
      CRESET    => SEQ_CRESET,
183
      BRESET    => SEQ_BRESET,
184
      MMU_MONI  => MMU_MONI,
185
      DP_CNTL   => DP_CNTL,
186
      VM_CNTL   => VM_CNTL,
187
      CP_STAT   => CP_STAT_L,
188
      INT_ACK   => INT_ACK,
189
      IB_MREQ   => IB_MREQ,
190
      IB_SRES   => IB_SRES_SEQ
191
    );
192
 
193
  IRQ : pdp11_irq
194
    port map (
195
      CLK     => CLK,
196
      BRESET  => BRESET_L,
197
      INT_ACK => INT_ACK,
198
      EI_PRI  => EI_PRI,
199
      EI_VECT => EI_VECT,
200
      EI_ACKM => EI_ACKM,
201
      PRI     => INT_PRI,
202
      VECT    => INT_VECT,
203
      IB_MREQ => IB_MREQ,
204
      IB_SRES => IB_SRES_IRQ
205
    );
206
 
207
  SYS70 : pdp11_sys70
208
    port map (
209
      CLK     => CLK,
210
      CRESET  => CRESET,
211
      IB_MREQ => IB_MREQ,
212
      IB_SRES => IB_SRES_SYS
213
    );
214
 
215
  IB_SRES_OR : ib_sres_or_4
216
    port map (
217
      IB_SRES_1  => IB_SRES_DP,
218
      IB_SRES_2  => IB_SRES_SEQ,
219
      IB_SRES_3  => IB_SRES_IRQ,
220
      IB_SRES_4  => IB_SRES_SYS,
221
      IB_SRES_OR => IB_SRES
222
    );
223
 
224
  IB_MREQ_M <= IB_MREQ;
225
 
226
  CP_STAT <= CP_STAT_L;
227
 
228
  BRESET  <= BRESET_L;
229
 
230
  DM_STAT_CO.cpugo       <= CP_STAT_L.cpugo;
231
  DM_STAT_CO.cpuhalt     <= CP_STAT_L.cpuhalt;
232
 
233
end syn;
234
 

powered by: WebSVN 2.1.0

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