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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [cpu_types.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trurl
-------------------------------------------------------------------
2
--!
3
--! PDP-8 Processor
4
--!
5
--! \brief
6
--!      CPU Type Definitions
7
--!
8
--! \details
9
--!      
10
--!
11
--! \file
12
--!      cpu_types.vhd
13
--!
14
--! \author
15
--!      Rob Doyle - doyle (at) cox (dot) net
16
--!
17
--------------------------------------------------------------------
18
--
19
--  Copyright (C) 2009, 2011, 2012 Rob Doyle
20
--
21
-- This source file may be used and distributed without
22
-- restriction provided that this copyright statement is not
23
-- removed from the file and that any derivative work contains
24
-- the original copyright notice and the associated disclaimer.
25
--
26
-- This source file is free software; you can redistribute it
27
-- and/or modify it under the terms of the GNU Lesser General
28
-- Public License as published by the Free Software Foundation;
29
-- version 2.1 of the License.
30
--
31
-- This source is distributed in the hope that it will be
32
-- useful, but WITHOUT ANY WARRANTY; without even the implied
33
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
34
-- PURPOSE. See the GNU Lesser General Public License for more
35
-- details.
36
--
37
-- You should have received a copy of the GNU Lesser General
38
-- Public License along with this source; if not, download it
39
-- from http://www.gnu.org/licenses/lgpl.txt
40
--
41
--------------------------------------------------------------------
42
--
43
-- Comments are formatted for doxygen
44
--
45
 
46
library ieee;                                                   --! IEEE Library
47
use ieee.std_logic_1164.all;                                    --! IEEE 1164
48
use ieee.numeric_std.all;                                       --! IEEE Numeric Standard
49
 
50
--
51
--! CPU Type Definition Package
52
--
53
 
54
package cpu_types is
55
 
56
    --!
57
    --! Type definitions common to everything.
58
    --!
59
 
60
    subtype  addr_t      is std_logic_vector( 0 to 11);         --! MA[0:11]
61
    subtype  xaddr_t     is std_logic_vector( 0 to 14);         --! EMA[0:2] & MA[0:11]
62
    subtype  data_t      is std_logic_vector( 0 to 11);         --! XD[0:11]
63
    subtype  ldata_t     is std_logic_vector( 0 to 12);         --! Data with Link bit
64
    subtype  field_t     is std_logic_vector( 0 to  2);         --! Address Field
65
    subtype  sf_t        is std_logic_vector( 0 to  6);         --! Save Field Type
66
    subtype  page_t      is std_logic_vector( 0 to  4);         --! Address Page
67
    subtype  word_t      is std_logic_vector( 0 to  6);         --! Address Word
68
    subtype  sc_t        is std_logic_vector( 0 to  4);         --! SC Reg Type
69
    subtype  swDATA_t    is data_t;                             --! Switch Data type
70
    subtype  eaeir_t     is std_logic_vector( 0 to  3);         --! EAE IR
71
    subtype  eae_t       is std_logic_vector( 0 to 24);         --! EAE Register
72
    subtype  devNUM_t    is std_logic_vector( 0 to  5);         --! IOT Device Number
73
    subtype  devOP_t     is std_logic_vector( 0 to  2);         --! IOT OP Code
74
 
75
    --!
76
    --! OPCODES
77
    --!
78
 
79
    subtype  opcode_t   is std_logic_vector(0 to  2);
80
    constant opAND      : opcode_t := "000";                    --! AND Opcode
81
    constant opTAD      : opcode_t := "001";                    --! TAD Opcode
82
    constant opISZ      : opcode_t := "010";                    --! ISZ Opcode
83
    constant opDCA      : opcode_t := "011";                    --! DCA Opcode
84
    constant opJMS      : opcode_t := "100";                    --! JMS Opcode
85
    constant opJMP      : opcode_t := "101";                    --! JMP Opcode
86
    constant opIOT      : opcode_t := "110";                    --! IOT Opcode
87
    constant opOPR      : opcode_t := "111";                    --! OPR Opcode
88
 
89
    --!
90
    --! MRI Addressing Modes
91
    --!
92
 
93
    subtype  amode_t    is std_logic_vector(0 to  1);
94
    constant amDZ       : amode_t := "00";                      --! Direct, Zero Page
95
    constant amDC       : amode_t := "01";                      --! Direct, Current Page
96
    constant amIZ       : amode_t := "10";                      --! Indirect, Zero Page
97
    constant amIC       : amode_t := "11";                      --! Indirect, Currnt Page
98
 
99
    --!
100
    --! EAE Opcodes
101
    --!
102
 
103
    constant opEAENOP   : EAEIR_t := "0000";                    --! EAE NOP Opcode
104
    constant opEAEACS   : EAEIR_t := "0001";                    --! EAE ACS Opcode
105
    constant opEAEMUY   : EAEIR_t := "0010";                    --! EAE MUY Opcode
106
    constant opEAEDVI   : EAEIR_t := "0011";                    --! EAE DVI Opcode
107
    constant opEAENMI   : EAEIR_t := "0100";                    --! EAE NMI Opcode
108
    constant opEAESHL   : EAEIR_t := "0101";                    --! EAE SHL Opcode
109
    constant opEAEASR   : EAEIR_t := "0110";                    --! EAE ASR Opcode
110
    constant opEAELSR   : EAEIR_t := "0111";                    --! EAE LSR Opcode
111
    constant opEAESCA   : EAEIR_t := "1000";                    --! EAE SCA Opcode
112
    constant opEAEDAD   : EAEIR_t := "1001";                    --! EAE DAD Opcode
113
    constant opEAEDST   : EAEIR_t := "1010";                    --! EAE DST Opcode
114
    constant opEAEDPSZ  : EAEIR_t := "1100";                    --! EAE DPSZ Opcode
115
    constant opEAEDPIC  : EAEIR_t := "1101";                    --! EAE DPIC Opcode
116
    constant opEAEDCM   : EAEIR_t := "1110";                    --! EAE DCM Opcode
117
    constant opEAESAM   : EAEIR_t := "1111";                    --! EAE SAM Opcode
118
 
119
    --!
120
    --! CPU Configuration
121
    --!
122
 
123
    subtype  swCPU_t    is std_logic_vector(0 to 3);
124
    constant swPDP8     : swCPU_t := "0000";                    --! Straight Eight
125
    constant swPDP8S    : swCPU_t := "0001";                    --! PDP-8/S
126
    constant swPDP8I    : swCPU_t := "0010";                    --! PDP-8/I
127
    constant swPDP8L    : swCPU_t := "0011";                    --! PDP-8/L
128
    constant swPDP8E    : swCPU_t := "0100";                    --! PDP-8/E/F/M
129
    constant swPDP8F    : swCPU_t := "0100";                    --! PDP-8/E/F/M
130
    constant swPDP8M    : swCPU_t := "0100";                    --! PDP-8/E/F/M
131
    constant swPDP8A    : swCPU_t := "0101";                    --! PDP-8/A
132
    constant swHD6100   : swCPU_t := "0110";                    --! HD6100
133
    constant swHD6120   : swCPU_t := "0111";                    --! HD6120
134
 
135
    --!
136
    --! Device Control (c0, c1) Pins
137
    --!  C1 high causes read after write
138
    --!  C0 high causes AC to be cleared
139
    --!
140
 
141
    subtype  devc_t     is std_logic_vector(0 to 1);
142
    constant devWR      : devc_t := "00";                       --! Device WR
143
    constant devRD      : devc_t := "01";                       --! Device Read with OR
144
    constant devWRCLR   : devc_t := "10";                       --! Device Write with clear
145
    constant devRDCLR   : devc_t := "11";                       --! Device Read with clear
146
 
147
    --!
148
    --! Bus Operation
149
    --!
150
 
151
    type busOP_t is (
152
        busopNOP,                                               --! IDLE/NOP
153
        busopRESET,                                             --! Reset
154
        busopIOCLR,                                             --! IOCLR
155
        busopFETCHaddr,                                         --! Instruction Fetch Addr
156
        busopFETCHdata,                                         --! Instruction Fetch Data
157
        busopWRIB,                                              --! Write with XMA     = IB
158
        busopRDIBaddr,                                          --! Read addr with XMA = IB
159
        busopRDIBdata,                                          --! Read data with XMA = IB
160
        busopWRIF,                                              --! Write with XMA     = IF
161
        busopRDIFaddr,                                          --! Read addr with XMA = IF
162
        busopRDIFdata,                                          --! Read data with XMA = IF
163
        busopWRDF,                                              --! Write with XMA     = DF
164
        busopRDDFaddr,                                          --! Read addr with XMA = DF
165
        busopRDDFdata,                                          --! Read data with XMA = DF
166
        busopWRZF,                                              --! Write with XMA     = 0
167
        busopRDZFaddr,                                          --! Read addr with XMA = 0
168
        busopRDZFdata,                                          --! Read data with XMA = 0
169
        busopWRIOT,                                             --! IOT Write
170
        busopRDIOT                                              --! IOT Read
171
    );
172
 
173
    --!
174
    --! Options Configuration
175
    --!
176
 
177
    type swOPT_t is record
178
        KE8             : std_logic;                            --! KE8 - Extended Arithmetic Element Provided
179
        KM8E            : std_logic;                            --! KM8E - Extended Memory Provided
180
        TSD             : std_logic;                            --! Time Share Disable
181
        SP0             : std_logic;                            --! Spare 0
182
        SP1             : std_logic;                            --! Spare 1
183
        SP2             : std_logic;                            --! Spare 2
184
        SP3             : std_logic;                            --! Spare 3
185
        STARTUP         : std_logic;                            --! Boot to Panel Mode (HD6120)
186
    end record;
187
 
188
    --!
189
    --! Registers
190
    --!
191
 
192
    type regs_t is record
193
        PC              : data_t;                               --! PC Register
194
        AC              : data_t;                               --! AC Register
195
        IR              : data_t;                               --! IR Register
196
        MA              : data_t;                               --! MA Register
197
        MD              : data_t;                               --! MD Register
198
        MQ              : data_t;                               --! MQ Register
199
        ST              : data_t;                               --! ST Register
200
        SC              : data_t;                               --! SC Register
201
        XMA             : field_t;                              --! XMA Register
202
    end record;
203
 
204
    --!
205
    --! Bus Signals
206
    --!
207
 
208
    type bus_t is record
209
        addr            : addr_t;                               --! Address Bus Output
210
        eaddr           : field_t;                              --! Extended Address
211
        data            : data_t;                               --! Data Bus Output
212
        ioclr           : std_logic;                            --! IO Clear
213
        dataf           : std_logic;                            --! Data Field
214
        ifetch          : std_logic;                            --! Instruction Fetch
215
        memsel          : std_logic;                            --! Asserted during memory operations
216
        rd              : std_logic;                            --! Read
217
        wr              : std_logic;                            --! Write
218
        lxpar           : std_logic;                            --! Load Panel Address Register
219
        lxmar           : std_logic;                            --! Load Memory Address Register
220
        lxdar           : std_logic;                            --! Load Device Address Register
221
        dmagnt          : std_logic;                            --! DMA Grant
222
        intgnt          : std_logic;                            --! INT Grant
223
    end record;
224
 
225
    --!
226
    --! CPU Output Bus
227
    --!
228
 
229
    type cpu_t is record
230
        regs            : regs_t;                               --! Registers
231
        buss            : bus_t;                                --! Bus Signals
232
        run             : std_logic;                            --! Run
233
    end record;
234
 
235
    --!
236
    --! Device DMA Output(s)
237
    --!
238
 
239
    type dma_t is record
240
        req             : std_logic;                            --! DMA Request
241
        rd              : std_logic;                            --! DMA Read
242
        wr              : std_logic;                            --! DMA Write
243
        memsel          : std_logic;                            --! DMA Memsel
244
        lxmar           : std_logic;                            --! DMA LXMAR
245
        lxpar           : std_logic;                            --! DMA LXPAR
246
        addr            : addr_t;                               --! DMA Address
247
        eaddr           : field_t;                              --! Extended Address
248
    end record;
249
 
250
    constant nullDMA    : dma_t := ('0', '0', '0', '0', '0', '0',
251
                                    (others => '0'), (others => '0'));
252
 
253
    --!
254
    --! Device Output Bus
255
    --!
256
 
257
    type dev_t is record
258
        ack             : std_logic;                            --! Bus Ack
259
        data            : data_t;                               --! Data Out
260
        devc            : devc_t;                               --! Device Control
261
        skip            : std_logic;                            --! Skip
262
        cpreq           : std_logic;                            --! Control Panel Request
263
        intr            : std_logic;                            --! Interrupt Request
264
        dma             : dma_t;                                --! DMA
265
    end record;
266
 
267
    constant nullDEV    : dev_t := ('0', (others => '0'), devWR, '0', '0', '0', nullDMA);
268
 
269
    --!
270
    --! Control Switches
271
    --!
272
 
273
    type swCNTL_t is record
274
        boot            : std_logic;                            --! Boot Switch
275
        lock            : std_logic;                            --! Panel Lock Switch
276
        loadADDR        : std_logic;                            --! Load Address Switch
277
        loadEXTD        : std_logic;                            --! Load Extended Address Switch
278
        clear           : std_logic;                            --! Clear Switch
279
        cont            : std_logic;                            --! Continue Switch
280
        exam            : std_logic;                            --! Examine Switch
281
        halt            : std_logic;                            --! Halt Switch
282
        step            : std_logic;                            --! Single Step Switch
283
        dep             : std_logic;                            --! Deposit Switch
284
    end record;
285
 
286
    --!
287
    --! System stuff
288
    --!
289
 
290
    type sys_t is record
291
        clk             : std_logic;                            --! Clock
292
        rst             : std_logic;                            --! Async: Reset
293
    end record;
294
 
295
    --!
296
    --! AC Operations
297
    --!
298
 
299
    type acOP_t is (
300
        acopNOP,                        --! LAC <- LAC
301
        acopIAC,                        --! IAC
302
        acopBSW,                        --! BSW
303
        acopRAL,                        --! RAL
304
        acopRTL,                        --! RTL
305
        acopR3L,                        --! R3L (HD6120 only)
306
        acopRAR,                        --! RAR
307
        acopRTR,                        --! RTR
308
        acopSHL0,                       --! LAC <- (LAC << 1) & '0'
309
        acopSHL1,                       --! LAC <- (LAC << 1) & '1'
310
        acopLSR,                        --! LAC <- '0' & (LAC >> 1)
311
        acopASR,                        --! LAC <-  L  & (LAC >> 1)
312
        acopUNDEF1,                     --! RAL RAR
313
        acopUNDEF2,                     --! RTL RTR
314
        acopPC,                         --! PC
315
        acopCML,                        --!  0   0   0  CML
316
        acopCMA,                        --!  0   0  CMA  0
317
        acopCMACML,                     --!  0   0  CMA CML
318
        acopCLL,                        --!  0  CLL  0   0
319
        acopCLLCML,                     --!  0  CLL  0  CML
320
        acopCLLCMA,                     --!  0  CLL CMA  0
321
        acopCLLCMACML,                  --!  0  CLL CMA CML
322
        acopCLA,                        --! CLA  0   0   0
323
        acopCLACML,                     --! CLA  0   0  CML    
324
        acopCLACMA,                     --! CLA  0  CMA  0
325
        acopCLACMACML,                  --! CLA  0  CMA CML
326
        acopCLACLL,                     --! CLA CLL  0   0
327
        acopCLACLLCML,                  --! CLA CLL  0  CML
328
        acopCLACLLCMA,                  --! CLA CLL CMA  0
329
        acopCLACLLCMACML,               --! CLA CLL CMA CML
330
        acopRDF0,                       --! RDF0 (HD6120)
331
        acopRIF0,                       --! RIF0 (HD6120)
332
        acopRIB0,                       --! RIB0 (HD6120)
333
        acopRDF1,                       --! RDF1 (PDP8)
334
        acopRIF1,                       --! RIF1 (PDP8)
335
        acopRIB1,                       --! RIB1 (PDP8)
336
        acopPRS,                        --!
337
        acopGTF1,                       --! HD6120 GTF
338
        acopGTF2,                       --! PDP8 GTF
339
        acopGCF,                        --!
340
        acopEAELAC,                     --! LAC <- EAE(0 to 12)
341
        acopEAEZAC,                     --! LAC <- '0' & EAE(1 to 12)
342
        acopSUBMD,                      --! LAC <- LAC - MD
343
        acopADDMD,                      --! LAC <- LAC + MD
344
        acopADDMDP1,                    --! LAC <- LAC + MD + 1
345
        acopANDMD,                      --! LAC <- L & (AC and MD)
346
        acopORMD,                       --! LAC <- L & (AC or MD)
347
        acopMQSUB,                      --! LAC <- MQ - AC
348
        acopMQ,                         --! LAC <- L & MQ
349
        acopZMQ,                        --! LAC <- '0' & MQ
350
        acopMQP1,                       --! LAC <- MQ + 1
351
        acopNEGMQ,                      --! LAC <- -MQ
352
        acopNOTMQ,                      --! LAC <- not(MQ)
353
        acopORMQ,                       --! LAC <- L & (AC or MQ)
354
        acopSCA,                        --! LAC <- L & (AC or SC)
355
        acopSP1,                        --! LAC <- '0' & SP1
356
        acopSP2,                        --! LAC <- '0' & SP2
357
        acopLAS,                        --! LAC <- L & SR
358
        acopOSR                         --! LAC <- L & (AC or SR)
359
    );
360
 
361
    --!
362
    --! BTSTRP Operation
363
    --!
364
 
365
    type btstrpOP_t is (
366
        btstrpopNOP,                    --! BTSTRP <- BTSTRP
367
        btstrpopCLR,                    --! BTSTRP <- '0'
368
        btstrpopSET                     --! BTSTRP <- '1'
369
    );
370
 
371
    --!
372
    --! CTRLFF Operation
373
    --!
374
 
375
    type ctrlffOP_t is (
376
        ctrlffopNOP,                    --! CTRLFF <- CTRLFF
377
        ctrlffopCLR,                    --! CTRLFF <- '0'
378
        ctrlffopSET                     --! CTRLFF <- '1'
379
    );
380
 
381
    --!
382
    --! Data Field Operation
383
    --!
384
 
385
    type dfOP_t is (
386
        dfopNOP,                        --! DF <- DF
387
        dfopCLR,                        --! DF <- "000"
388
        dfopAC9to11,                    --! DF <- AC(9 to 11)
389
        dfopIR6to8,                     --! DF <- IR(6 to  8)
390
        dfopSF4to6,                     --! DF <- SF(4 to  6)
391
        dfopSR9to11                     --! DF <- SR(9 to 11)
392
    );
393
 
394
    --!
395
    --! EAE Mode
396
    --!
397
 
398
    type eaeOP_t is (
399
        eaeopNOP,                       --! EAE <- EAE
400
        eaeopMUY                        --! EAE <- (MQ * MD) + AC;
401
      --eaeopASRMD,                     --! EAE ASR MD
402
      --eaeopLSRMD,                     --! EAE LSR MD
403
      --eaeopSHLMD                      --! EAE SHL MD
404
    );
405
 
406
    --!
407
    --! EAE Mode operation
408
    --!
409
 
410
    type emodeOP_t is (
411
        emodeopNOP,                     --! eaeModeA <- eaeModeA
412
        emodeopCLR,                     --! eaeModeA <- '0'
413
        emodeopSET                      --! eaeModeA <- '1'
414
    );
415
 
416
    --!
417
    --! Force Zero Operation
418
    --!
419
 
420
    type fzOP_t is (
421
        fzopNOP,                        --! FZ <- FZ
422
        fzopCLR,                        --! FZ <- '0'
423
        fzopSET                         --! FZ <- '1'
424
    );
425
 
426
    --!
427
    --! Greater Than Flag Operation
428
    --!
429
 
430
    type gtfOP_t is (
431
        gtfopNOP,                       --! GT <- GT
432
        gtfopCLR,                       --! GT <- '0'
433
        gtfopSET,                       --! GT <- '1'
434
        gtfopAC1                        --! GT <- AC(1)
435
    );
436
 
437
    --!
438
    --! Halt Trap Operation
439
    --!
440
 
441
    type hlttrpOP_t is (
442
        hlttrpopNOP,                    --! HLTTRP <- HLTTRP
443
        hlttrpopCLR,                    --! HLTTRP <- '0'
444
        hlttrpopSET                     --! HLTTRP <- '1'
445
    );
446
 
447
    --!
448
    --! Interrupt Enable Delay Operation
449
    --!
450
 
451
    type idOP_t is (
452
        idopNOP,                        --! ID <- II
453
        idopCLR,                        --! ID <- '0'
454
        idopSET                         --! ID <- '1'
455
    );
456
 
457
    --!
458
    --! Interrupt Enable Operation
459
    --!
460
 
461
    type ieOP_t is (
462
        ieopNOP,                        --! IE <- IE
463
        ieopCLR,                        --! IE <- '0'
464
        ieopSET                         --! IE <- '1'
465
    );
466
 
467
    --!
468
    --! Interrupt Inhibit Operation
469
    --!
470
 
471
    type iiOP_t is (
472
        iiopNOP,                        --! II <- II
473
        iiopCLR,                        --! II <- '0'
474
        iiopSET                         --! II <- '1'
475
    );
476
 
477
    --!
478
    --! IB Operation
479
    --!
480
 
481
    type ibOP_t is (
482
        ibopNOP,                        --! IB <- INB
483
        ibopCLR,                        --! IB <- "000"
484
        ibopAC6to8,                     --! IB <- AC(6 to 8)
485
        ibopIR6to8,                     --! IB <- IR(6 to 8)
486
        ibopSF1to3                      --! IB <- SF(1 to 3)
487
    );
488
 
489
    --!
490
    --! IF Operation
491
    --!
492
 
493
    type ifOP_t is (
494
        ifopNOP,                        --! IF <- IF
495
        ifopCLR,                        --! IF <- "000"
496
        ifopIB,                         --! IF <- IB
497
        ifopSR6to8                      --! IF <- SR(6 to 8)
498
    );
499
 
500
    --!
501
    --! Instruction Register Operation
502
    --!
503
 
504
    type irOP_t is (
505
        iropNOP,                        --! IR <- IR
506
        iropMD                          --! IR <- MD (Fetch)
507
    );
508
 
509
    --!
510
    --! Memory Address operations
511
    --!
512
 
513
    type maOP_t is (
514
        maopNOP,                        --! MA <- MA
515
        maop0000,                       --! MA <- o"0000"
516
        maopINC,                        --! MA <- MA + 1
517
        maopZP,                         --! MA <- zeroPage & IR(5 to 11)
518
        maopCP,                         --! MA <- currPage & IR(5 to 11)
519
        maopIR,                         --! MA <- IR
520
        maopPC,                         --! MA <- PC
521
        maopPCP1,                       --! MA <- PC + 1
522
        maopMB,                         --! MA <- MB
523
        maopMD,                         --! MA <- MD
524
        maopMDP1,                       --! MA <- MD + 1
525
        maopSP1,                        --! MA <- SP1
526
        maopSP1P1,                      --! MA <- SP1 + 1
527
        maopSP2,                        --! MA <- SP2
528
        maopSP2P1,                      --! MA <- SP2 + 1
529
        maopSR                          --! MA <- SR
530
    );
531
 
532
    --!
533
    --! Memory Buffer operation
534
    --!
535
 
536
    type mbOP_t is (
537
        mbopNOP,                        --! MB <- MB
538
        mbopAC,                         --! MB <- AC
539
        mbopMA,                         --! MB <- MA
540
        mbopMD,                         --! MB <- MD
541
        mbopMQ,                         --! MB <- MQ
542
        mbopMDP1,                       --! MB <- MD + 1
543
        mbopPC,                         --! MB <- PC
544
        mbopPCP1,                       --! MB <- PC + 1
545
        mbopSR                          --! MB <- SR
546
    );
547
 
548
    --!
549
    --! Multiplier/Quotient Operations
550
    --!
551
 
552
    type mqOP_t is (
553
        mqopNOP,                        --! MQ <- MQ
554
        mqopCLR,                        --! MQ <- "0000"
555
        mqopSET,                        --! MQ <- "7777"
556
        mqopSHL0,                       --! MQ <- (MQ << 1) + 0
557
        mqopSHL1,                       --! MQ <- (MQ << 1) + 1
558
        mqopAC,                         --! MQ <- AC
559
        mqopMD,                         --! MQ <- MD
560
        mqopADDMD,                      --! MQ <- MQ + MD
561
        mqopACP1,                       --! MQ <- AC + 1
562
        mqopNEGAC,                      --! MQ <- -AC
563
        mqopEAE,                        --! MQ <- low(EAE)
564
        mqopSHR0,                       --! MQ <- '0' & MQ(0 to 10)
565
        mqopSHR1                        --! MQ <- '1' & MQ(0 to 10)
566
    );
567
 
568
    --!
569
    --! MQA Operations
570
    --!
571
 
572
    type mqaOP_t is (
573
        mqaopNOP,                       --! MQA <- MQA
574
        mqaopCLR,                       --! MQA <- "0000"
575
        mqaopMQ,                        --! MQA <- MQ
576
        mqaopSHL                        --! MQA <- (MQA << 1)
577
    );
578
 
579
    --!
580
    --! Program Counter Operations
581
    --!
582
 
583
    type pcOP_t is (
584
        pcopNOP,                        --! PC <- PC
585
        pcop0000,                       --! PC <- "0000"
586
        pcop0001,                       --! PC <- "0001"
587
        pcop7777,                       --! PC <- "7777"
588
        pcopINC,                        --! PC <- PC + 1
589
        pcopMA,                         --! PC <- MA
590
        pcopMAP1,                       --! PC <- MA + 1
591
        pcopMB,                         --! PC <- MB
592
        pcopMBP1,                       --! PC <- MB + 1
593
        pcopMD,                         --! PC <- MD
594
        pcopMDP1,                       --! PC <- MD + 1
595
        pcopSR,                         --! PC <- SR
596
        pcopZP,                         --! PC <- "00000"     & IR(5 to 11)
597
        pcopCP,                         --! PC <- MA(0 to 4)  & IR(5 to 11) 
598
        pcopZPP1,                       --! PC <- ("00000"    & IR(5 to 11)) + "1"
599
        pcopCPP1                        --! PC <- (MA(0 to 4) & IR(5 to 11)) + "1"
600
    );
601
 
602
    --!
603
    --! Panel Data Flag Operation
604
    --!
605
 
606
    type pdfOP_t is (
607
        pdfopNOP,                       --! PDF <- PDF
608
        pdfopCLR,                       --! PDF <- '0'
609
        pdfopSET                        --! PDF <- '1'
610
    );
611
 
612
    --!
613
    --! Panel Execute Operation
614
    --!
615
 
616
    type pexOP_t is (
617
        pexopNOP,                       --! PEXFF <- PEXFF
618
        pexopCLR,                       --! PEXFF <- '0'
619
        pexopSET                        --! PEXFF <- '1'
620
    );
621
 
622
    --!
623
    --! Panel Trap Operation
624
    --!
625
 
626
    type pnltrpOP_t is (
627
        pnltrpopNOP,                    --! PNLTRP <- PNLTRP
628
        pnltrpopCLR,                    --! PNLTRP <- '0'
629
        pnltrpopSET                     --! PNLTRP <- '1'
630
    );
631
 
632
    --!
633
    --! Power-up Trap Operation
634
    --!
635
 
636
    type pwrtrpOP_t is (
637
        pwrtrpopNOP,                    --! PWRTRP <- PWRTRP
638
        pwrtrpopCLR,                    --! PWRTRP <- '0'
639
        pwrtrpopSET                     --! PWRTRP <- '1'
640
    );
641
 
642
    --!
643
    --! Shift Count Operation
644
    --!
645
 
646
    type scOP_t is (
647
        scopNOP,                        --! SC <- SP
648
        scopCLR,                        --! SC <- "00000"
649
        scopSET,                        --! SC <- "11111"
650
        scop12,                         --! SC <- "01100"
651
        scopAC7to11,                    --! SC <- AC(7 to 11)
652
        scopMD7to11,                    --! SC <- MD(7 to 11)
653
        scopNOTMD7to11,                 --! SC <- not(MD(7 to 11))
654
        scopINC,                        --! SC <- SC + 1
655
        scopDEC,                        --! SC <- SC - 1
656
        scopMDP1                        --! SC <- MD(7 to 11) + 1
657
    );
658
 
659
    --!
660
    --! Stack Pointer Operation
661
    --!
662
 
663
    type spOP_t is (
664
        spopNOP,                        --! SP <- SP
665
        spopCLR,                        --! SP <- o"0000"
666
        spopAC,                         --! SP <- AC
667
        spopINC,                        --! SP <- SP + 1
668
        spopDEC                         --! SP <- SP - 1
669
    );
670
 
671
    --!
672
    --! User Buffer Operations
673
    --!
674
 
675
    type ubOP_t is (
676
        ubopNOP,
677
        ubopCLR,
678
        ubopSET,
679
        ubopAC5,                        --! UB <- AC(5)
680
        ubopSF                          --! UB <- SF
681
    );
682
 
683
    --!
684
    --! User Flag Operations
685
    --!
686
 
687
    type ufOP_t is (
688
        ufopNOP,                        --! UF <- UF
689
        ufopCLR,                        --! UF <- '0'
690
        ufopSET,                        --! UF <- '1'
691
        ufopUB                          --! UF <- UB
692
    );
693
 
694
    --!
695
    --! Save Flags Operations
696
    --!
697
 
698
    type sfOP_t is (
699
        sfopNOP,                        --! SF <- SF
700
        sfopUBIBDF                      --! SF <- UB & IB & DF
701
    );
702
 
703
    --!
704
    --! Switch Register Operations
705
    --!
706
 
707
    type srOP_t is (
708
        sropNOP,                        --! SR <- SR
709
        sropAC                          --! SR <- AC
710
    );
711
 
712
    --!
713
    --! User Mode Trap Operation
714
    --!
715
 
716
    type usrtrpOP_t is (
717
        usrtrpopNOP,                    --! USRTRP <- USRTRP
718
        usrtrpopCLR,                    --! USRTRP <- '0'
719
        usrtrpopSET                     --! USRTRP <- '1'
720
    );
721
 
722
    --!
723
    --! Extended Memory Address Operations
724
    --!
725
 
726
    type xmaOP_t is (
727
        xmaopNOP,                       --! XMA <- XMA
728
        xmaopCLR,                       --! XMA <- "000"
729
        xmaopDF,                        --! XMA <- DF
730
        xmaopIF,                        --! XMA <- IF/INF
731
        xmaopIB                         --! XMA <- IB
732
    );
733
 
734
end cpu_types;

powered by: WebSVN 2.1.0

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