gonzui


Format: Advanced Search

mtkernel_3/include/tk/sysdepend/cpu/core/rxv2/cpudef.hbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    micro T-Kernel 3.00.01
    4:  *
    5:  *    Copyright (C) 2006-2020 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.2.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2020/05/29.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: /*
   15:  *      cpudef.h
   16:  *
   17:  *      CPU dependent definition  (RXv2 core depended)
   18:  */
   19: 
   20: #ifndef __TK_CPUDEF_CORE_H__
   21: #define __TK_CPUDEF_CORE_H__
   22: 
   23: #include <config.h>
   24: 
   25: /*
   26:  * Using Coprocessor
   27:  *   TA_COP0            FPU ( = TA_FPU)
   28:  *   TA_COP1            DSP
   29:  *   TA_COP2 & 3        unused
   30:  */
   31: 
   32: #if USE_FPU && USE_DSP
   33: #define TA_COPS         (TA_COP0|TA_COP1)
   34: #elif USE_FPU
   35: #define TA_COPS         TA_COP0
   36: #elif USE_DSP
   37: #define TA_COPS         TA_COP1
   38: #else
   39: #define TA_COPS         0
   40: #endif
   41: 
   42: #define TA_FPU          TA_COP0
   43: 
   44: /*
   45:  * Coprocessor number (depend on CPU)
   46:  */
   47: #define COPNO_0         0              /* FPU */
   48: #define COPNO_1         1              /* DSP */
   49: 
   50: 
   51: /*---------------------------------------------------------------------- */
   52: /*
   53:  * General purpose register             tk_get_reg tk_set_reg
   54:  */
   55: typedef struct t_regs {
   56:         VW     r[15];      /* General purpose register R1-R15 */
   57: } T_REGS;
   58: 
   59: /*
   60:  * Exception-related register           tk_get_reg tk_set_reg
   61:  */
   62: typedef struct t_eit {
   63:         void   *pc;      /* Program counter */
   64:         VW     psw;        /* Status register */
   65: } T_EIT;
   66: 
   67: /*
   68:  * Control register                     tk_get_reg tk_set_reg
   69:  */
   70: typedef struct t_cregs {
   71:         void   *ssp;     /* System stack pointer R0 */
   72: } T_CREGS;
   73: 
   74: /*
   75:  * Coprocessor registers
   76:  */
   77: 
   78: typedef struct t_cop0reg {
   79:         VW     fpsw;               /* Floating Point Status register */
   80: } T_COP0REG;
   81: 
   82: typedef struct t_cop1reg {
   83:         UW     acc0lo;
   84:         UW     acc0hi;
   85:         VW     acc0gu;             /* Accumulator 0 */
   86:         UW     acc1lo;
   87:         UW     acc1hi;
   88:         VW     acc1gu;             /* Accumulator 1 */
   89: } T_COP1REG;
   90: 
   91: typedef struct t_copregs {
   92:         T_COP0REG      cop0;        /* COP0: FPU */
   93:         T_COP1REG      cop1;        /* COP1: DSP */
   94: } T_COPREGS;
   95: 
   96: 
   97: #endif /* __TK_CPUDEF_CORE_H__ */