//--------------------------------------------------------------------
// Created by Microsemi SmartDesign Fri Mar 24 19:48:31 2017
// Parameters for COREABC
//--------------------------------------------------------------------


parameter ABCCODE = "//start
NOP


    APBWRT DAT8 0 0x0000 09
    APBWRT DAT8 0 0x0000 00 

$WelcomeMessage
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    NOP
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'E'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
     
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 '1'

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'o'
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'S'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'a'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'b'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'g'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'g'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'a'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'
   
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 '2'

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'o'
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'S'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'a'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'b'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'g'

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 's'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'l'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'f'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 's'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 't'
   
    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    
/////////////////////////////////////////   
    WAIT UNTIL INPUT2
    APBREAD 1 0x4
    APBWRT ACC 1 0x0 
    CMP DAT 0x31
    Jump IF Zero $Pattern1 
    CMP DAT 0x32
    Jump IF Zero $Pattern2   
    
$Pattern1
    APBWRT DAT8 0 0x0000 09
    WAIT UNTIL INPUT3
    //reset the data ready bit for apb read state machine
    //APBWRT DAT8 0 0x0000 00

//PRINT NGBG handle
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'h'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'a'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'd'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'l'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'v'   
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'a'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'l'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'u'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'

 
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13

    //read and write NGBG handle
    //APBREAD 0 0x9000
    APBREAD 0 0x9000
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    NOP
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    NOP

    
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'r'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'b'   
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'g'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 32
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'v'   
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'a'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'l'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'u'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13  
    
// Read NRBG value from APB slave and print it
    APBREAD 0 0x9004
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    NOP

    APBREAD 0 0x9008
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    NOP

    APBREAD 0 0x900c
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    NOP

    APBREAD 0 0x9010
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    SHR0
    WAIT UNTIL INPUT0
    APBWRT ACC 1 0x0
    NOP

    //reset the data ready bit for apb read state machine
    APBWRT DAT8 0 0x0000 00

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    
    NOP
    NOP
    NOP
    Jump $WelcomeMessage
    

$Pattern2
    APBWRT DAT8 0 0x0000 03
    WAIT UNTIL INPUT3
    //reset the data ready bit for apb read state machine
    APBWRT DAT8 0 0x0000 00

    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'd'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'o'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'n'
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 'e'



    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 10
    WAIT UNTIL INPUT0
    APBWRT DAT8 1 0x0 13
    
    NOP
    NOP
    NOP
    Jump $WelcomeMessage
    
    
    HALT 
    
    ";
parameter ACT_CALIBRATIONDATA = 1;
parameter APB_AWIDTH = 16;
parameter APB_DWIDTH = 32;
parameter APB_SDEPTH = 16;
parameter CODEHEXDUMP = "";
parameter CODEHEXDUMP2 = "";
parameter DEBUG = 1;
parameter EN_ACM = 0;
parameter EN_ADD = 1;
parameter EN_ALURAM = 0;
parameter EN_AND = 1;
parameter EN_CALL = 1;
parameter EN_DATAM = 2;
parameter EN_INC = 1;
parameter EN_INDIRECT = 0;
parameter EN_INT = 0;
parameter EN_IOREAD = 1;
parameter EN_IOWRT = 1;
parameter EN_MULT = 0;
parameter EN_OR = 1;
parameter EN_PUSH = 1;
parameter EN_RAM = 1;
parameter EN_SHL = 1;
parameter EN_SHR = 1;
parameter EN_XOR = 1;
parameter FAMILY = 24;
parameter HDL_license = "U";
parameter ICWIDTH = 11;
parameter IFWIDTH = 4;
parameter IIWIDTH = 4;
parameter IMEM_APB_ACCESS = 0;
parameter INITWIDTH = 11;
parameter INSMODE = 0;
parameter IOWIDTH = 1;
parameter ISRADDR = 1;
parameter MAX_NVMDWIDTH = 32;
parameter STWIDTH = 8;
parameter TESTBENCH = "User";
parameter TESTMODE = 0;
parameter UNIQ_STRING = "UART_top_COREABC_0";
parameter UNIQ_STRING_LENGTH = 18;
parameter VERILOGCODE = "";
parameter VERILOGVARS = "";
parameter VHDLCODE = "";
parameter VHDLVARS = "";
parameter ZRWIDTH = 0;
