⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3_01chip

📁 大型risc处理器设计源代码,这是书中的代码 基于流水线的risc cpu设计
💻
📖 第 1 页 / 共 3 页
字号:
//----------------------------------------------------------------------------   p0000
//                                                                               p0001
// CHIP: module of processor TOOBSIE                                             p0002
//                                                                               p0003
// Signal encoding for 'external connections':                                   p0004
//  ACC_MODE:  00: byte access                                                   p0005
//             01: halfword access                                               p0006
//             10: word access                                                   p0007
//  BUS_PRO:    0: asynchronous bus protocol                                     p0008
//              1: synchronous bus protocol                                      p0009
//  CONFIG: 0????: parallel mode                                                 p0010
//          1????: serial mode                                                   p0011
//          ?00??: MPC off                                                       p0012
//          ?01??: MPC in RIB mode                                               p0013
//          ?10??: MPC in IC mode                                                p0014
//          ???00: BTC off                                                       p0015
//          ???1?: BTC stores CALLs                                              p0016
//          ????1: BTC stores BCCs                                               p0017
//  IRQ_ID:   000: bus error                                                     p0018
//            001: page fault                                                    p0019
//            010: misalign                                                      p0020
//      remaining: system environment and operating system                       p0021
//  KU_MODE:    0: memory access in user mode                                    p0022
//              1: memory access in kernel mode                                  p0023
//  nRMW:       0: read-modify-write memory access                               p0024
//              1: no read-modify-write memory access                            p0025
//  RnW:        0: write memory                                                  p0026
//              1: read memory                                                   p0027
//  nHLT:       0: disconnect CPU from data and address bus and halt             p0028
//              1: activate CPU                                                  p0029
//  nIRA:    1->0: acknowledge interrupt request                                 p0030
//  nIRQ:       0: system requests interrupt                                     p0031
//  nMHS:    1->0: begin of memory access                                        p0032
//           0->1: end of memory access                                          p0033
//  nMRQ:    1->0: request for memory access                                     p0034
//  FACC:       0: data access                                                   p0035
//              1: instruction access                                            p0036
//  nRESET:     0: reset CPU                                                     p0037
//              1: CPU working                                                   p0038
//                                                                               p0039
// Signal encoding for 'internal connections':                                   p0040
//  ALU_OPCODE:   0000: AND    0001: OR     0010: XOR                            p0041
//                0100: LSL    0101: LSR    0110: ASR    0111: ROT               p0042
//                1000: ADD    1001: ADDC   1010: SUB    1011: SUBC              p0043
//  BCU_ACC_DIR:    00: Load                                                     p0044
//                  01: Store                                                    p0045
//                  10: Swap                                                     p0046
//  BCU_ACC_MODE:  0??: MAU access                                               p0047
//                 1??: IFU access                                               p0048
//                 ?00: BYTE access                                              p0049
//                 ?01: DBYTE access                                             p0050
//                 ?10: QBYTE access                                             p0051
//  BCU_READY:       0: memory access not completed                              p0052
//                   1: memory access completed                                  p0053
//  BREAK_MEM_ACC:   0: memory access                                            p0054
//                   1: break memory access                                      p0055
//  CALL_NOW:        0: no NPC_BUS into RPC                                      p0056
//                   1: take NPC_BUS into RPC                                    p0057
//  CCLR:            0: no CCLR in IDU                                           p0058
//                   1: CCLR in IDU                                              p0059
//  DIS_ALU:         0: instruction execution                                    p0060
//                   1: no instruction execution                                 p0061
//  DIS_IDU:         0: instruction decoding                                     p0062
//                   1: no instruction decoding                                  p0063
//  DO_HALT:         0: no HALT in IDU                                           p0064
//                   1: HALT in IDU                                              p0065
//  DO_RETI:         0: no RETI in IDU                                           p0066
//                   1: RETI in IDU                                              p0067
//  DS_IN_IFU:       0: instruction has no delay slot                            p0068
//                   1: instruction is a CTR, delay slot in IFU                  p0069
//  EMERG_FETCH:     0: no interrupt in next step                                p0070
//                   1: start interrupt in next step                             p0071
//  EXCEPT_CTR:      0: no 'Delayed CTR' in IFU                                  p0072
//                   1: 'Delayed CTR' in IFU                                     p0073
//  EXCEPT_ID:     000: 'Delayed CTR'                                            p0074
//                 001: 'Privilege Violation'                                    p0075
//                 010: 'Illegal Instruction'                                    p0076
//                 011: 'Unimplemented Instruction'                              p0077
//           remaining: reserved                                                 p0078
//  EXCEPT_RQ:       0: no exception                                             p0079
//                   1: exception in IFU or IDU                                  p0080
//  FD_FLAGS,                                                                    p0081
//  FLAGS_FROM_ALU,                                                              p0082
//  IF_FLAGS:    bit 0: carry flag                                               p0083
//               bit 1: overflow flag                                            p0084
//               bit 2: zero flag                                                p0085
//               bit 3: negative flag                                            p0086
//  ID_KU_MODE,                                                                  p0087
//  IF_KU_MODE:      0: user mode                                                p0088
//                   1: kernel mode                                              p0089
//  IFU_CORRECT:     0: no branch correction                                     p0090
//                   1: IFU corrects last branch decision                        p0091
//  IFU_FETCH_RQ:    0: no instruction access                                    p0092
//                   1: access instruction in next step                          p0093
//  INT_STATE:      00: no interrupt                                             p0094
//                  01: internal interrupt (SWI or exception)                    p0095
//                  10: hardware interrupt                                       p0096
//  KILL_IDU:        0: deactivate all critical signals                          p0097
//                   1: set critical signals                                     p0098
//  LDST_ACC_NOW:    0: no MAU access                                            p0099
//                   1: MAU access                                               p0100
//  MAU_ACC_MODE2,                                                               p0101
//  MAU_ACC_MODE3: 0??: byte access, if LD/ST (word access, if SWP)              p0102
//                 1?0: halfword access, if LD/ST (word access, if SWP)          p0103
//                 1?1: word access                                              p0104
//  MAU_OPCODE2,                                                                 p0105
//  MAU_OPCODE3:   000: read without sign extension                              p0106
//                 001: read with sign extension                                 p0107
//                 010: store                                                    p0108
//                 011: swap access                                              p0109
//                 1??: transfer C3_BUS data to C4_BUS                           p0110
//  NEW_FLAGS:       0: no change of flags                                       p0111
//                   1: .F instruction changes flags                             p0112
//  SREG_ACC_DIR:    0: read special register, send to SREG_DATA                 p0113
//                   1: transfer B_BUS to special register                       p0114
//  SREG_ADDR:    0000: PC                       0001: RPC                       p0115
//                0010: LPC                      0011: SR                        p0116
//                0100: IR (no access)           0101: VBR                       p0117
//                0110: HISR                     0111: ECSR                      p0118
//                1000: SISR                     1001: HIRPC                     p0119
//                1010: ECRPC                    1011: SIRPC                     p0120
//                1100: HIADR                    1101: ECADR                     p0121
//  SWI_RQ:          0: no SWI                                                   p0122
//                   1: SWI in IDU                                               p0123
//  WORK_EX,                                                                     p0124
//  WORK_FD,                                                                     p0125
//  WORK_ID:         0: hold input register                                      p0126
//                   1: load input register                                      p0127

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -