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

Subversion Repositories apbtoaes128

[/] [apbtoaes128/] [trunk/] [pli/] [bfm_ecb/] [aes_bfm_decryption_dma_ecb.h] - Diff between revs 5 and 9

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

Rev 5 Rev 9
Line 138... Line 138...
                                }
                                }
 
 
                  break;
                  break;
 
 
                  case WRITE:
                  case WRITE:
 
 
 
 
                                if(counter == 0)
                                if(counter == 0)
                                {
                                {
 
 
 
 
 
 
 
                                        if(counter_write == 10 || counter_write == 11 || counter_write == 12 || counter_write == 13 )
 
                                        {
 
 
 
                                                v_ecb.value.integer = 0;
 
                                                vpi_get_value(dma_req_wr,&v_ecb);
 
 
 
 
 
                                                if(v_ecb.value.integer == 1)
 
                                                {
 
                                                        v_ecb.value.integer = 1;
 
                                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
 
                                                        counter_write++;
 
                                                        counter++;
 
                                                }
 
 
 
                                        }
 
 
 
                                        if(counter_write < 10)
 
                                        {
                                        counter_write++;
                                        counter_write++;
                                        counter++;
                                        counter++;
 
 
                                        v_ecb.value.integer = 1;
                                        v_ecb.value.integer = 1;
                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
 
 
 
                                        }
 
 
                                }else if(counter == 1)
                                }else if(counter == 1)
                                {
                                {
 
 
                                        v_ecb.value.integer = 0;
                                        v_ecb.value.integer = 0;
Line 339... Line 362...
                                {
                                {
                                        counter_write = 0;
                                        counter_write = 0;
 
 
                                        STATE =WAIT_SR;
                                        STATE =WAIT_SR;
 
 
 
 
 
 
 
 
 
 
                                }
                                }
 
 
                  break;
                  break;
 
 
                  case WAIT_SR:
                  case WAIT_SR:
Line 364... Line 383...
 
 
                                        v_ecb.value.integer = 1;
                                        v_ecb.value.integer = 1;
                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
 
 
 
 
                                }else if(counter == 1)
 
                                {
 
                                        v_ecb.value.integer = 0;
 
                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
 
 
 
                                        counter=0;
 
                                }
 
 
 
                                v_ecb.value.integer = 0;
                                v_ecb.value.integer = 0;
                                vpi_get_value(PRDATA,&v_ecb);
                                vpi_get_value(PRDATA,&v_ecb);
 
 
                                if(v_ecb.value.integer == 1)
                                if(v_ecb.value.integer == 1)
                                {
                                {
                                        STATE = READ_DOUTR;
                                        STATE = READ_DOUTR;
 
                                                counter=1;
 
                                        }
 
 
                                        t_ecb.type = vpiScaledRealTime;
 
                                        t_ecb.real = 0;
                                }else if(counter == 1)
                                        v_ecb.format=vpiIntVal;
                                {
                                        v_ecb.value.integer = ADDR_AES_DOUTR;
                                        v_ecb.value.integer = 0;
                                        vpi_put_value(PADDR, &v_ecb, &t_ecb, vpiTransportDelay);
                                        vpi_put_value(PENABLE, &v_ecb, NULL, vpiNoDelay);
 
 
 
                                        counter=0;
                                }
                                }
 
 
 
 
                  break;
                  break;
 
 

powered by: WebSVN 2.1.0

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