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

Subversion Repositories t400

[/] [t400/] [trunk/] [rtl/] [vhdl/] [t400_pack-p.vhd] - Blame information for rev 46

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

Line No. Rev Author Line
1 2 arniml
-------------------------------------------------------------------------------
2
--
3 46 arniml
-- $Id: t400_pack-p.vhd,v 1.2 2006-05-22 00:01:21 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
use ieee.numeric_std.all;
14
 
15
package t400_pack is
16
 
17
  -- Byte ---------------------------------------------------------------------
18
  subtype byte_t     is std_logic_vector(7 downto 0);
19
 
20
  -- Data word ----------------------------------------------------------------
21
  subtype dw_t       is std_logic_vector(3 downto 0);
22
 
23
  -- Misc ranges --------------------------------------------------------------
24
  subtype dw_range_t is natural range dw_t'range;
25
  subtype b_range_t  is natural range 5 downto 0;
26
  subtype br_range_t is natural range 5 downto 4;
27
  subtype bd_range_t is natural range 3 downto 0;
28
 
29
  -- B address ----------------------------------------------------------------
30
  subtype b_t        is std_logic_vector(b_range_t);
31
  subtype br_t       is std_logic_vector(br_range_t);
32
  subtype bd_t       is std_logic_vector(bd_range_t);
33
 
34
 
35
  -- Program counter ----------------------------------------------------------
36
  subtype pc_t       is unsigned(9 downto 0);
37
 
38
  -- Data memory address vector -----------------------------------------------
39
  subtype dm_addr_t  is std_logic_vector(5 downto 0);
40
 
41
  -- Decoder data -------------------------------------------------------------
42
  subtype dec_data_t is std_logic_vector(pc_t'range);
43
 
44
  -- Program counter operations -----------------------------------------------
45
  type    pc_op_t    is (PC_NONE,
46
                         PC_INC_PC,
47
                         PC_LOAD_6, PC_LOAD_7, PC_LOAD_8, PC_LOAD,
48
                         PC_POP,
49
                         PC_LOAD_A_M);
50
 
51
  -- Data memory controller operations ----------------------------------------
52
  type    dmem_op_t  is (DMEM_RB,
53
                         DMEM_WB_SRC_Q, DMEM_WB_SRC_DEC, DMEM_WB_SRC_A,
54
                         DMEM_RDEC,
55
                         DMEM_WB_SET_BIT, DMEM_WB_RES_BIT,
56
                         DMEM_WDEC_SRC_A);
57
  type    b_op_t     is (B_NONE,
58
                         B_SET_BD, B_SET_BR,
59
                         B_SET_B, B_SET_B_INC,
60
                         B_XOR_BR,
61
                         B_INC_BD,
62
                         B_DEC_BD);
63
 
64
  -- Stack operations ---------------------------------------------------------
65
  type    stack_op_t is (STACK_NONE,
66
                         STACK_PUSH,
67
                         STACK_POP);
68
 
69
  -- ALU operations -----------------------------------------------------------
70
  type    alu_op_t   is (ALU_NONE,
71
                         ALU_CLRA,
72
                         ALU_LOAD_M,
73
                         ALU_LOAD_Q, ALU_LOAD_G, ALU_LOAD_IN, ALU_LOAD_IL,
74
                         ALU_LOAD_BR, ALU_LOAD_BD,
75
                         ALU_LOAD_SIO,
76
                         ALU_ADD, ALU_ADD_10, ALU_ADD_C, ALU_ADD_DEC,
77
                         ALU_COMP,
78
                         ALU_RC, ALU_SC,
79
                         ALU_XOR);
80
 
81
  -- Skip operations ----------------------------------------------------------
82
  type    skip_op_t  is (SKIP_NONE,
83
                         SKIP_UPDATE,
84
                         SKIP_NOW,
85
                         SKIP_CARRY, SKIP_C,
86
                         SKIP_BD_UFLOW, SKIP_BD_OFLOW,
87
                         SKIP_LBI,
88
                         SKIP_A_M,
89
                         SKIP_G_ZERO, SKIP_G_BIT,
90
                         SKIP_M_BIT,
91
                         SKIP_TIMER);
92
 
93
  -- IO L port operations -----------------------------------------------------
94
  type    io_l_op_t  is (IOL_NONE,
95
                         IOL_LOAD_AM, IOL_LOAD_PM,
96
                         IOL_OUTPUT_L,
97
                         IOL_OUTPUT_Q);
98
 
99
  -- IO D port operations -----------------------------------------------------
100
  type    io_d_op_t  is (IOD_NONE,
101
                         IOD_LOAD);
102
 
103
  -- IO G port operations -----------------------------------------------------
104
  type    io_g_op_t  is (IOG_NONE,
105
                         IOG_LOAD_M,
106
                         IOG_LOAD_DEC);
107
 
108 46 arniml
  -- IO IN port operations ----------------------------------------------------
109
  type    io_in_op_t is (IOIN_NONE,
110
                         IOIN_INIL,
111
                         IOIN_LEI);
112
 
113 2 arniml
  -- SIO operations -----------------------------------------------------------
114
  type    sio_op_t   is (SIO_NONE,
115
                         SIO_LOAD);
116
 
117
  -- Mnemonics ----------------------------------------------------------------
118
  type    mnemonic_t is (-- Arithmetic instructions
119
                         MN_ASC,
120
                         MN_ADD,
121
                         MN_ADT,
122
                         MN_AISC,
123
                         MN_CASC,
124
                         MN_CLRA,
125
                         MN_COMP,
126
                         MN_NOP,
127
                         MN_C,
128
                         MN_XOR,
129
                         -- Transfer of control instructions
130
                         MN_JID,
131
                         MN_JMP,
132
                         MN_JP_JSRP,
133
                         MN_JSR,
134
                         MN_RET,
135
                         MN_RETSK,
136
                         -- Memory reference instructions
137
                         MN_LD,
138
                         MN_LDD_XAD,
139
                         MN_LQID,
140
                         MN_RMB,
141
                         MN_SMB,
142
                         MN_STII,
143
                         MN_X,
144
                         MN_XDS,
145
                         MN_XIS,
146
                         -- Register reference instructions
147
                         MN_CAB,
148
                         MN_CBA,
149
                         MN_LBI,
150
                         MN_XABR,
151
                         -- Test instructions
152
                         MN_SKC,
153
                         MN_SKE,
154
                         MN_SKMBZ,
155
                         MN_SKT,
156
                         -- Input/output instructions
157
                         MN_EXT,
158
                         MN_XAS);
159
 
160
end t400_pack;
161
 
162
 
163
-------------------------------------------------------------------------------
164
-- File History:
165
--
166
-- $Log: not supported by cvs2svn $
167 46 arniml
-- Revision 1.1.1.1  2006/05/06 01:56:45  arniml
168
-- import from local CVS repository, LOC_CVS_0_1
169
--
170 2 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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