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

Subversion Repositories t400

[/] [t400/] [trunk/] [rtl/] [vhdl/] [t400_comp_pack-p.vhd] - Blame information for rev 112

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

Line No. Rev Author Line
1 2 arniml
-------------------------------------------------------------------------------
2
--
3 112 arniml
-- $Id: t400_comp_pack-p.vhd,v 1.7 2006-06-05 20:31:56 arniml Exp $
4 2 arniml
--
5
-- Copyright (c) 2006, Arnim Laeuger (arniml@opencores.org)
6
--
7
-- All rights reserved
8
--
9
-------------------------------------------------------------------------------
10
 
11
library ieee;
12
use ieee.std_logic_1164.all;
13
 
14
use work.t400_opt_pack.all;
15
use work.t400_pack.all;
16
 
17
package t400_comp_pack is
18
 
19
  component t400_clkgen
20
    generic (
21
      opt_ck_div_g : integer := t400_opt_ck_div_16_c
22
    );
23
    port (
24
      -- System Interface -----------------------------------------------------
25
      ck_i      : in  std_logic;
26
      ck_en_i   : in  boolean;
27
      por_i     : in  boolean;
28
      -- Clock Interface ------------------------------------------------------
29
      phi1_o    : out std_logic;
30
      out_en_o  : out boolean;
31
      in_en_o   : out boolean;
32
      icyc_en_o : out boolean
33
    );
34
  end component;
35
 
36
  component t400_reset
37
    port (
38
      -- System Interface -----------------------------------------------------
39
      ck_i      : in  std_logic;
40
      icyc_en_i : in  boolean;
41
      -- Reset Interface ------------------------------------------------------
42
      por_i     : in  boolean;
43
      reset_n_i : in  std_logic;
44
      res_o     : out boolean
45
    );
46
  end component;
47
 
48
  component t400_stack
49
    generic (
50
      opt_type_g : integer := t400_opt_type_420_c
51
    );
52
    port (
53
      -- System Interface -----------------------------------------------------
54
      ck_i    : in  std_logic;
55
      ck_en_i : in  boolean;
56
      por_i   : in  boolean;
57
      -- Stack Control Interface ----------------------------------------------
58
      op_i    : in  stack_op_t;
59
      -- Program Counter Interface --------------------------------------------
60
      pc_i    : in  pc_t;
61
      pc_o    : out pc_t
62
    );
63
  end component;
64
 
65
  component t400_pmem_ctrl
66
    generic (
67
      opt_type_g : integer := t400_opt_type_420_c
68
    );
69
    port (
70
      -- System Interface -----------------------------------------------------
71
      ck_i       : in  std_logic;
72
      ck_en_i    : in  boolean;
73
      por_i      : in  boolean;
74
      res_i      : in  boolean;
75
      a_i        : in  dw_t;
76
      m_i        : in  dw_t;
77
      -- Control Interface ----------------------------------------------------
78
      op_i       : in  pc_op_t;
79
      dec_data_i : in  dec_data_t;
80
      -- Stack Interface ------------------------------------------------------
81
      pc_o       : out pc_t;
82
      pc_i       : in  pc_t;
83
      -- Program Memory Interface ---------------------------------------------
84
      pm_addr_o  : out pc_t
85
    );
86
  end component;
87
 
88
  component t400_alu
89 43 arniml
    generic (
90
      opt_cko_g : integer := t400_opt_cko_crystal_c
91
    );
92 2 arniml
    port (
93
      -- System Interface -----------------------------------------------------
94
      ck_i       : in  std_logic;
95
      ck_en_i    : in  boolean;
96
      por_i      : in  boolean;
97
      res_i      : in  boolean;
98 43 arniml
      cko_i      : in  std_logic;
99 2 arniml
      -- Control Interface ----------------------------------------------------
100
      op_i       : in  alu_op_t;
101
      -- Data Interface -------------------------------------------------------
102
      m_i        : in  dw_t;
103
      dec_data_i : in  dec_data_t;
104
      q_low_i    : in  dw_t;
105
      b_i        : in  b_t;
106
      g_i        : in  dw_t;
107
      in_i       : in  dw_t;
108
      sio_i      : in  dw_t;
109
      a_o        : out dw_t;
110
      carry_o    : out std_logic;
111
      c_o        : out std_logic
112
    );
113
  end component;
114
 
115
  component t400_dmem_ctrl
116
    generic (
117
      opt_type_g : integer := t400_opt_type_420_c
118
    );
119
    port (
120
      -- System Interface -----------------------------------------------------
121
      ck_i       : in  std_logic;
122
      ck_en_i    : in  boolean;
123
      por_i      : in  boolean;
124
      res_i      : in  boolean;
125
      -- Control Interface ----------------------------------------------------
126
      dmem_op_i  : in  dmem_op_t;
127
      b_op_i     : in  b_op_t;
128
      dec_data_i : in  dec_data_t;
129
      a_i        : in  dw_t;
130
      q_high_i   : in  dw_t;
131
      b_o        : out b_t;
132
      -- Data Memory Interface ------------------------------------------------
133
      dm_addr_o  : out dm_addr_t;
134
      dm_data_i  : in  dw_t;
135
      dm_data_o  : out dw_t;
136
      dm_we_o    : out std_logic
137
    );
138
  end component;
139
 
140
  component t400_opc_table
141
    generic (
142
      opt_type_g   : integer := t400_opt_type_420_c
143
    );
144
    port (
145
      opcode_i     : in  byte_t;
146
      mnemonic_o   : out mnemonic_t;
147
      multi_byte_o : out boolean
148
    );
149
  end component;
150
 
151
  component t400_decoder
152
    generic (
153
      opt_type_g : integer := t400_opt_type_420_c
154
    );
155
    port (
156 102 arniml
      -- System Interface -----------------------------------------------------
157 2 arniml
      ck_i       : in  std_logic;
158
      ck_en_i    : in  boolean;
159
      por_i      : in  boolean;
160
      res_i      : in  boolean;
161
      out_en_i   : in  boolean;
162
      in_en_i    : in  boolean;
163
      icyc_en_i  : in  boolean;
164 102 arniml
      -- Module Control Interface ---------------------------------------------
165 2 arniml
      pc_op_o    : out pc_op_t;
166
      stack_op_o : out stack_op_t;
167
      dmem_op_o  : out dmem_op_t;
168
      b_op_o     : out b_op_t;
169
      skip_op_o  : out skip_op_t;
170
      alu_op_o   : out alu_op_t;
171
      io_l_op_o  : out io_l_op_t;
172
      io_d_op_o  : out io_d_op_t;
173
      io_g_op_o  : out io_g_op_t;
174 49 arniml
      io_in_op_o : out io_in_op_t;
175 2 arniml
      sio_op_o   : out sio_op_t;
176
      dec_data_o : out dec_data_t;
177
      en_o       : out dw_t;
178 102 arniml
      -- Skip Interface -------------------------------------------------------
179 2 arniml
      skip_i     : in  boolean;
180
      skip_lbi_i : in  boolean;
181 102 arniml
      is_lbi_o   : out boolean;
182 68 arniml
      int_i      : in  boolean;
183 102 arniml
      -- Program Memory Interface ---------------------------------------------
184 2 arniml
      pm_addr_i  : in  pc_t;
185
      pm_data_i  : in  byte_t
186
    );
187
  end component;
188
 
189
  component t400_skip
190 68 arniml
    generic (
191
      opt_type_g : integer := t400_opt_type_420_c
192
    );
193 2 arniml
    port (
194 102 arniml
      -- System Interface -----------------------------------------------------
195 2 arniml
      ck_i       : in  std_logic;
196
      ck_en_i    : in  boolean;
197
      por_i      : in  boolean;
198
      res_i      : in  boolean;
199 102 arniml
      -- Control Interface ----------------------------------------------------
200 2 arniml
      op_i       : in  skip_op_t;
201
      dec_data_i : in  dec_data_t;
202
      carry_i    : in  std_logic;
203
      c_i        : in  std_logic;
204
      bd_i       : in  dw_t;
205
      is_lbi_i   : in  boolean;
206 102 arniml
      skip_o     : out boolean;
207
      skip_lbi_o : out boolean;
208
      -- Data Interface -------------------------------------------------------
209 2 arniml
      a_i        : in  dw_t;
210
      m_i        : in  dw_t;
211
      g_i        : in  dw_t;
212 102 arniml
      tim_c_i    : in  boolean
213 2 arniml
    );
214
  end component;
215
 
216
  component t400_io_l
217
    generic (
218
      opt_out_type_7_g : integer := t400_opt_out_type_std_c;
219
      opt_out_type_6_g : integer := t400_opt_out_type_std_c;
220
      opt_out_type_5_g : integer := t400_opt_out_type_std_c;
221
      opt_out_type_4_g : integer := t400_opt_out_type_std_c;
222
      opt_out_type_3_g : integer := t400_opt_out_type_std_c;
223
      opt_out_type_2_g : integer := t400_opt_out_type_std_c;
224
      opt_out_type_1_g : integer := t400_opt_out_type_std_c;
225
      opt_out_type_0_g : integer := t400_opt_out_type_std_c;
226
      opt_microbus_g   : integer := t400_opt_no_microbus_c
227
    );
228
    port (
229
      -- System Interface -----------------------------------------------------
230
      ck_i      : in  std_logic;
231
      ck_en_i   : in  boolean;
232
      por_i     : in  boolean;
233 102 arniml
      in_en_i   : in  boolean;
234 2 arniml
      -- Control Interface ----------------------------------------------------
235
      op_i      : in  io_l_op_t;
236
      en2_i     : in  std_logic;
237
      m_i       : in  dw_t;
238
      a_i       : in  dw_t;
239
      pm_data_i : in  byte_t;
240
      q_o       : out byte_t;
241
      -- Microbus Interface ---------------------------------------------------
242
      cs_n_i    : in  std_logic;
243
      rd_n_i    : in  std_logic;
244
      wr_n_i    : in  std_logic;
245
      -- Port L Interface -----------------------------------------------------
246
      io_l_i    : in  byte_t;
247
      io_l_o    : out byte_t;
248
      io_l_en_o : out byte_t
249
    );
250
  end component;
251
 
252
  component t400_io_d
253
    generic (
254
      opt_out_type_3_g : integer := t400_opt_out_type_std_c;
255
      opt_out_type_2_g : integer := t400_opt_out_type_std_c;
256
      opt_out_type_1_g : integer := t400_opt_out_type_std_c;
257
      opt_out_type_0_g : integer := t400_opt_out_type_std_c
258
    );
259
    port (
260
      -- System Interface -----------------------------------------------------
261
      ck_i      : in  std_logic;
262
      ck_en_i   : in  boolean;
263
      por_i     : in  boolean;
264
      res_i     : in  boolean;
265
      -- Control Interface ----------------------------------------------------
266
      op_i      : in  io_d_op_t;
267
      bd_i      : in  bd_t;
268
      -- Port D Interface -----------------------------------------------------
269
      io_d_o    : out dw_t;
270
      io_d_en_o : out dw_t
271
    );
272
  end component;
273
 
274
  component t400_io_g
275
    generic (
276
      opt_out_type_3_g : integer := t400_opt_out_type_std_c;
277
      opt_out_type_2_g : integer := t400_opt_out_type_std_c;
278
      opt_out_type_1_g : integer := t400_opt_out_type_std_c;
279 112 arniml
      opt_out_type_0_g : integer := t400_opt_out_type_std_c;
280
      opt_microbus_g   : integer := t400_opt_no_microbus_c
281 2 arniml
    );
282
    port (
283
      -- System Interface -----------------------------------------------------
284
      ck_i       : in  std_logic;
285
      ck_en_i    : in  boolean;
286
      por_i      : in  boolean;
287
      res_i      : in  boolean;
288 112 arniml
      cs_n_i     : in  std_logic;
289
      wr_n_i     : in  std_logic;
290 2 arniml
      -- Control Interface ----------------------------------------------------
291
      op_i       : in  io_g_op_t;
292
      m_i        : in  dw_t;
293
      dec_data_i : in  dec_data_t;
294
      -- Port G Interface -----------------------------------------------------
295
      io_g_o     : out dw_t;
296
      io_g_en_o  : out dw_t
297
    );
298
  end component;
299
 
300 49 arniml
  component t400_io_in
301
    port (
302
      -- System Interface -----------------------------------------------------
303 68 arniml
      ck_i      : in  std_logic;
304
      ck_en_i   : in  boolean;
305
      por_i     : in  boolean;
306
      icyc_en_i : in boolean;
307
      in_en_i   : in  boolean;
308 49 arniml
      -- Control Interface ----------------------------------------------------
309 68 arniml
      op_i      : in  io_in_op_t;
310
      en1_i     : in  std_logic;
311 49 arniml
      -- Port Interface -------------------------------------------------------
312 68 arniml
      io_in_i   : in  dw_t;
313
      in_o      : out dw_t;
314
      int_o     : out boolean
315 49 arniml
    );
316
  end component;
317
 
318 2 arniml
  component t400_sio
319
    generic (
320
      opt_so_output_type_g : integer := t400_opt_out_type_std_c;
321
      opt_sk_output_type_g : integer := t400_opt_out_type_std_c
322
    );
323
    port (
324
      -- System Interface -----------------------------------------------------
325
      ck_i       : in  std_logic;
326
      ck_en_i    : in  boolean;
327
      por_i      : in  boolean;
328
      res_i      : in  boolean;
329
      phi1_i     : in  std_logic;
330
      out_en_i   : in  boolean;
331
      in_en_i    : in  boolean;
332
      -- Control Interface ----------------------------------------------------
333
      op_i       : in  sio_op_t;
334
      en0_i      : in  std_logic;
335
      en3_i      : in  std_logic;
336
      -- SIO Interface --------------------------------------------------------
337
      a_i        : in  dw_t;
338
      c_i        : in  std_logic;
339
      sio_o      : out dw_t;
340
      -- Pad Interface --------------------------------------------------------
341
      si_i       : in  std_logic;
342
      so_o       : out std_logic;
343
      so_en_o    : out std_logic;
344
      sk_o       : out std_logic;
345
      sk_en_o    : out std_logic
346
    );
347
  end component;
348
 
349 37 arniml
  component t400_timer
350
    port (
351
      -- System Interface -----------------------------------------------------
352
      ck_i      : in  std_logic;
353
      ck_en_i   : in  boolean;
354
      por_i     : in  boolean;
355
      icyc_en_i : in  boolean;
356
      -- Skip Interface -------------------------------------------------------
357
      op_i      : in  skip_op_t;
358
      c_o       : out boolean
359
    );
360
  end component;
361
 
362 2 arniml
end t400_comp_pack;
363
 
364
 
365
-------------------------------------------------------------------------------
366
-- File History:
367
--
368
-- $Log: not supported by cvs2svn $
369 112 arniml
-- Revision 1.6  2006/06/05 14:20:34  arniml
370
-- interface comments added
371
--
372 102 arniml
-- Revision 1.5  2006/05/27 19:11:33  arniml
373
-- updates for interrupt support
374
--
375 68 arniml
-- Revision 1.4  2006/05/22 00:03:08  arniml
376
-- io_in added
377
--
378 49 arniml
-- Revision 1.3  2006/05/21 21:47:40  arniml
379
-- route cko to ALU for INIL instruction
380
--
381 43 arniml
-- Revision 1.2  2006/05/20 02:48:17  arniml
382
-- timer module included
383
--
384 37 arniml
-- Revision 1.1.1.1  2006/05/06 01:56:44  arniml
385
-- import from local CVS repository, LOC_CVS_0_1
386
--
387 2 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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