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

Subversion Repositories apbtoaes128

[/] [apbtoaes128/] [trunk/] [pli/] [aes_bfm_generate.h] - Diff between revs 4 and 5

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 4 Rev 5
Line 70... Line 70...
////
////
//// from http://www.opencores.org/lgpl.shtml
//// from http://www.opencores.org/lgpl.shtml
////
////
////
////
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
 
 
static int aes_bfm_generate_calltf(char*user_data)
static int aes_bfm_generate_calltf(char*user_data)
{
{
 
 
 
 
        vpiHandle PRESETn = vpi_handle_by_name("AES_GLADIC_tb.PRESETn", NULL);
        vpiHandle PRESETn = vpi_handle_by_name("AES_GLADIC_tb.PRESETn", NULL);
        vpiHandle i = vpi_handle_by_name("AES_GLADIC_tb.i", NULL);
        vpiHandle i = vpi_handle_by_name("AES_GLADIC_tb.i", NULL);
 
 
        v_generate.format=vpiIntVal;
        v_generate.format=vpiIntVal;
        vpi_get_value(PRESETn, &v_generate);
        vpi_get_value(PRESETn, &v_generate);
 
 
        if(v_generate.value.integer == 1)
        if(v_generate.value.integer == 1)
        {
        {
 
 
                        FIPS_ENABLE = FIPS;
                        FIPS_ENABLE = FIPS;
//                      type_bfm = AES_WR_ONLY;
                        type_bfm = AES_WR_ONLY;
//                      type_bfm = AES_WR_ERROR_DINR_ONLY;
//                      type_bfm = AES_WR_ERROR_DINR_ONLY;
//                      type_bfm = AES_WR_ERROR_DOUTR_ONLY;
//                      type_bfm = AES_WR_ERROR_DOUTR_ONLY;
 
 
//                      type_bfm = ECB_ENCRYPTION;
//                      type_bfm = ECB_ENCRYPTION;
//                      type_bfm = ECB_DECRYPTION;
//                      type_bfm = ECB_DECRYPTION;
Line 101... Line 101...
//                      type_bfm = ECB_DERIVATION_DECRYPTION_DMA;
//                      type_bfm = ECB_DERIVATION_DECRYPTION_DMA;
 
 
//                      type_bfm = ECB_ENCRYPTION_CCFIE;
//                      type_bfm = ECB_ENCRYPTION_CCFIE;
//                      type_bfm = ECB_DECRYPTION_CCFIE;
//                      type_bfm = ECB_DECRYPTION_CCFIE;
//                      type_bfm = ECB_DERIVATION_DECRYPTION_CCFIE;
//                      type_bfm = ECB_DERIVATION_DECRYPTION_CCFIE;
                        type_bfm = ECB_KEY_GEN_CCFIE;
//                      type_bfm = ECB_KEY_GEN_CCFIE;
 
 
 
//                      type_bfm = CBC_ENCRYPTION;
 
//                      type_bfm = CBC_DECRYPTION;
 
//                      type_bfm = CBC_DERIVATION_DECRYPTION;
 
//                      type_bfm = CBC_KEY_GEN;
 
 
 
//                      type_bfm = CBC_ENCRYPTION_DMA;
 
//                      type_bfm = CBC_DECRYPTION_DMA;
 
//                      type_bfm = CBC_DERIVATION_DECRYPTION_DMA;
 
//                      type_bfm = CBC_KEY_GEN_DMA;
 
 
 
//                      type_bfm = CBC_ENCRYPTION_CCFIE;
 
//                      type_bfm = CBC_DECRYPTION_CCFIE;
 
//                      type_bfm = CBC_DERIVATION_DECRYPTION_CCFIE;
 
//                      type_bfm = CBC_KEY_GEN_CCFIE;
 
 
 
//                      type_bfm = CTR_ENCRYPTION;
 
//                      type_bfm = CTR_DECRYPTION;
 
//                      type_bfm = CTR_KEY_GEN;
 
//                      type_bfm = CTR_DERIVATION_DECRYPTION;
 
 
 
 
 
//                      type_bfm = CTR_ENCRYPTION_DMA;
 
//                      type_bfm = CTR_DECRYPTION_DMA;
 
//                      type_bfm = CTR_KEY_GEN_DMA;
 
//                      type_bfm = CTR_DERIVATION_DECRYPTION_DMA;
 
 
 
 
 
//                      type_bfm = CTR_ENCRYPTION_CCFIE;
 
//                      type_bfm = CTR_DECRYPTION_CCFIE;
 
//                      type_bfm = CTR_KEY_GEN_CCFIE;
 
//                      type_bfm = CTR_DERIVATION_DECRYPTION_CCFIE;
 
 
                        if(PACKETS_GENERATED == MAX_ITERATIONS)
                        if(PACKETS_GENERATED == MAX_ITERATIONS)
                        {
                        {
                                v_generate.value.integer = 1;
                                v_generate.value.integer = 1;
                                vpi_put_value(i, &v_generate, NULL, vpiNoDelay);
                                vpi_put_value(i, &v_generate, NULL, vpiNoDelay);

powered by: WebSVN 2.1.0

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