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

Subversion Repositories apbtoaes128

[/] [apbtoaes128/] [trunk/] [pli/] [bfm_cbc/] [aes_bfm_encryption_ccfie_cbc.h] - Diff between revs 9 and 12

Show entire file | Details | Blame | View Log

Rev 9 Rev 12
Line 297... Line 297...
 
 
 
 
                                }else if(counter_write == 9)//ENABLE CR
                                }else if(counter_write == 9)//ENABLE CR
                                {
                                {
 
 
                                        v_ecb.value.integer = vector_address[counter_write];
                                        if(DATATYPE == TYPE_00)// NO DINR DOUTR SWAP DATA
 
                                        {
 
                                                v_ecb.value.integer = ADDR_AES_CR;
                                        vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
                                        vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
 
 
                                        v_ecb.value.integer = 545;
                                        v_ecb.value.integer = 545;
                                        vpi_put_value(PWDATA, &v_ecb, &t_ecb, vpiTransportDelay);
                                        vpi_put_value(PWDATA, &v_ecb, &t_ecb, vpiTransportDelay);
 
 
 
                                        }else if(DATATYPE == TYPE_01)// 16 BIT DINR DOUTR SWAP DATA
 
                                        {
 
                                                v_ecb.value.integer = ADDR_AES_CR;
 
                                                vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
 
 
 
                                                v_ecb.value.integer = 547;
 
                                                vpi_put_value(PWDATA, &v_ecb, &t_ecb, vpiTransportDelay);
 
 
 
                                        }else if(DATATYPE == TYPE_02)// 8 BIT DINR DOUTR SWAP DATA
 
                                        {
 
                                                v_ecb.value.integer = ADDR_AES_CR;
 
                                                vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
 
 
 
                                                v_ecb.value.integer = 549;
 
                                                vpi_put_value(PWDATA, &v_ecb, &t_ecb, vpiTransportDelay);
 
 
 
                                        }else if(DATATYPE == TYPE_03)// BIT DINR DOUTR SWAP DATA
 
                                        {
 
                                                v_ecb.value.integer = ADDR_AES_CR;
 
                                                vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
 
 
 
                                                v_ecb.value.integer = 551;
 
                                                vpi_put_value(PWDATA, &v_ecb, &t_ecb, vpiTransportDelay);
 
                                        }
 
 
                                }else if(counter_write > 9  &&  counter_write < 14) //WRITE DINR
                                }else if(counter_write > 9  &&  counter_write < 14) //WRITE DINR
                                {
                                {
 
 
                                        v_ecb.value.integer = ADDR_AES_DINR;
                                        v_ecb.value.integer = ADDR_AES_DINR;
                                        vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
                                        vpi_put_value(PADDR, &v_ecb, NULL, vpiNoDelay);
 
 
 
 
                                        if(FIPS_ENABLE == FIPS)
                                        if(FIPS_ENABLE == FIPS)
                                        {
                                        {
 
 
 
                                                if(DATATYPE == TYPE_00)
 
                                                {
 
 
                                                if(counter_write == 10)
                                                if(counter_write == 10)
                                                {
                                                {
                                                        a = a | TEXT_FIPS_CBC_NOT_DERIVATED[0];
                                                        a = a | TEXT_FIPS_CBC_NOT_DERIVATED[0];
                                                        a = a << 8;
                                                        a = a << 8;
                                                        a = a | TEXT_FIPS_CBC_NOT_DERIVATED[1];
                                                        a = a | TEXT_FIPS_CBC_NOT_DERIVATED[1];
Line 360... Line 390...
                                                        d = d | TEXT_FIPS_CBC_NOT_DERIVATED[15];
                                                        d = d | TEXT_FIPS_CBC_NOT_DERIVATED[15];
                                                        v_ecb.value.integer = d;
                                                        v_ecb.value.integer = d;
 
 
                                                }
                                                }
 
 
 
                                                }else if(DATATYPE > TYPE_00)
 
                                                {
 
 
 
 
 
                                                        if(counter_write == 10)
 
                                                        {
 
                                                                a = a | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[0];
 
                                                                a = a << 8;
 
                                                                a = a | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[1];
 
                                                                a = a << 8;
 
                                                                a = a | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[2];
 
                                                                a = a << 8;
 
                                                                a = a | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[3];
 
                                                                v_ecb.value.integer = a;
 
 
 
                                                        }else if(counter_write == 11)
 
                                                        {
 
                                                                b = b | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[4];
 
                                                                b = b << 8;
 
                                                                b = b | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[5];
 
                                                                b = b << 8;
 
                                                                b = b | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[6];
 
                                                                b = b << 8;
 
                                                                b = b | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[7];
 
                                                                v_ecb.value.integer = b;
 
 
 
                                                        }else if(counter_write == 12 )
 
                                                        {
 
 
 
                                                                c = c | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[8];
 
                                                                c = c << 8;
 
                                                                c = c | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[9];
 
                                                                c = c << 8;
 
                                                                c = c | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[10];
 
                                                                c = c << 8;
 
                                                                c = c | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[11];
 
                                                                v_ecb.value.integer = c;
 
 
 
                                                        }else if(counter_write == 13 )
 
                                                        {
 
                                                                d = d | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[12];
 
                                                                d = d << 8;
 
                                                                d = d | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[13];
 
                                                                d = d << 8;
 
                                                                d = d | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[14];
 
                                                                d = d << 8;
 
                                                                d = d | TEXT_FIPS_CBC_NOT_DATATYPE_DERIVATED[15];
 
                                                                v_ecb.value.integer = d;
 
 
 
                                                        }
 
 
 
                                                }
 
 
 
 
                                        }else if(FIPS_ENABLE == RANDOM_DATA)
                                        }else if(FIPS_ENABLE == RANDOM_DATA)
                                        {
                                        {
                                                v_ecb.value.integer = data_in(rd);
                                                v_ecb.value.integer = data_in(rd);
                                        }
                                        }

powered by: WebSVN 2.1.0

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