# Exporting Component Description of CORE_ABC to TCL
# Family: PolarFire
# Part Number: MPF300TS-1FCG1152I
# Create and Configure the core component CORE_ABC
create_and_configure_core -core_vlnv Actel:DirectCore:COREABC:$COREABCver -component_name {CORE_ABC} -params {\
"ABCCODE:    
// Turn on DFE and EYE monitor
    
// Assert PMA  Reset 
    IOWRT 0x011
//SER_RSTPD 
    APBWRT DAT 0 0x4078 0x00000003 
    APBWRT DAT 0 0x8078 0x00000003 
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x00000032 
    APBWRT DAT 0 0x804C 0x00000032 
//  Turn on DFE and deassert PMA reset 
//SER_RSTPD
    APBWRT DAT 0 0x4078 0x00000001 
    APBWRT DAT 0 0x8078 0x00000001
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x00000010 
    APBWRT DAT 0 0x804C 0x00000010
//LSRT Assert and deassert on Q2_lane2 and Q2_lane3    
    IOWRT 0x001
    APBWRT DAT 0 0x4068 0x00000D0D
    APBWRT DAT 0 0x8068 0x00000D0D
    APBWRT DAT 0 0x4068 0x00000404
    APBWRT DAT 0 0x8068 0x00000404
    
//Mode selction
$sel
    IOREAD
    NOP
    NOP
    NOP
    JUMP IF INPUT0  $xcvr_powerdown
    NOP
    NOP
    JUMP IF INPUT1  $xcvr_off_txpll_off
    NOP
    NOP
    JUMP IF INPUT2  $xcvr_on_txpll_on
    NOP
    NOP
    JUMP $sel
    
    
//----------------------------------------------xcvr power down
$xcvr_powerdown
// Assert PMA  Reset 
    IOWRT 0x011
//SER_RSTPD 
    APBWRT DAT 0 0x4078 0x00000003 
    APBWRT DAT 0 0x8078 0x00000003 
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x00000032 
    APBWRT DAT 0 0x804C 0x00000032 
//  Power down XCVR and deassert PMA reset 
//SER_RSTPD
    APBWRT DAT 0 0x4078 0x00000004 
    APBWRT DAT 0 0x8078 0x00000004
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x00000001 
    APBWRT DAT 0 0x804C 0x00000001
//LSRT Assert and deassert on Q2_lane2 and Q2_lane3
    IOWRT 0x001
    APBWRT DAT 0 0x4068 0x00000D0D
    APBWRT DAT 0 0x8068 0x00000D0D  
    APBWRT DAT 0 0x4068 0x00000404
    APBWRT DAT 0 0x8068 0x00000404
    JUMP $done
    
//----------------------------------------------xcvr off and txpll off
$xcvr_off_txpll_off
// Assert PMA  Reset 
    IOWRT 0x011
//SER_RSTPD 
    APBWRT DAT 0 0x4078 0x00000007 
    APBWRT DAT 0 0x8078 0x00000007 
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x0000002F 
    APBWRT DAT 0 0x804C 0x0000002F 

//LSRT Assert and deassert on Q2_lane2 and Q2_lane3
    IOWRT 0x001
    APBWRT DAT 0 0x4068 0x00000D0D
    APBWRT DAT 0 0x8068 0x00000D0D  
 
//TX PLL Powerdown
    IOWRT 0x011
    APBWRT DAT 1 0x0008 0x0820010
    JUMP $done
    
//---------------------------------------------xcvr on and txpll on
$xcvr_on_txpll_on
// Assert PMA  Reset 
    IOWRT 0x011
//SER_RSTPD 
    APBWRT DAT 0 0x4078 0x00000003 
    APBWRT DAT 0 0x8078 0x00000003 
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x00000032 
    APBWRT DAT 0 0x804C 0x00000032 
//  Power up XCVR and deassert PMA reset 
//SER_RSTPD
    APBWRT DAT 0 0x4078 0x00000001 
    APBWRT DAT 0 0x8078 0x00000001
//DES_RSTPD 
    APBWRT DAT 0 0x404C 0x0000003C 
    APBWRT DAT 0 0x804C 0x0000003C
//LSRT Assert and deassert on Q2_lane2 and Q2_lane3
    IOWRT 0x001
    APBWRT DAT 0 0x4068 0x00000D0D
    APBWRT DAT 0 0x8068 0x00000D0D
    APBWRT DAT 0 0x4068 0x00000404
    APBWRT DAT 0 0x8068 0x00000404 
//TX PLL Power on
    IOWRT 0x011
    APBWRT DAT 1 0x0008 0x1800010
    JUMP $done
    
$done
    NOP
    NOP
    JUMP $sel
    HALT
    "  \
"ACT_CALIBRATIONDATA:true"  \
"APB_AWIDTH:16"  \
"APB_DWIDTH:32"  \
"APB_SDEPTH:2"  \
"APB_TIMEOUT_COUNT:80"  \
"CODEHEXDUMP:"  \
"CODEHEXDUMP2:"  \
"DEBUG:true"  \
"EN_ACM:false"  \
"EN_ADD:true"  \
"EN_ALURAM:false"  \
"EN_AND:true"  \
"EN_CALL:true"  \
"EN_DATAM:2"  \
"EN_INC:true"  \
"EN_INDIRECT:false"  \
"EN_INT:0"  \
"EN_IOREAD:true"  \
"EN_IOWRT:true"  \
"EN_MULT:0"  \
"EN_OR:true"  \
"EN_PUSH:true"  \
"EN_RAM:true"  \
"EN_RAM_ECC:false"  \
"EN_SHL:true"  \
"EN_SHR:true"  \
"EN_XOR:true"  \
"HI_REL:false"  \
"ICWIDTH:8"  \
"IFWIDTH:5"  \
"IIWIDTH:5"  \
"IMEM_APB_ACCESS:0"  \
"INITDATAWIDTH:32"  \
"INITWIDTH:11"  \
"INSMODE:0"  \
"INVALID_STACK_ACC:true"  \
"IOWIDTH:9"  \
"ISRADDR:1"  \
"MAX_NVMDWIDTH:32"  \
"STWIDTH:4"  \
"TESTMODE:0"  \
"UNIQ_STRING:CORE_ABC_CORE_ABC_0"  \
"UNIQ_STRING_LENGTH:19"  \
"VERILOGCODE:"  \
"VERILOGVARS:"  \
"ZRWIDTH:0"   }
# Exporting Component Description of CORE_ABC to TCL done
