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

Subversion Repositories apbtoaes128

[/] [apbtoaes128/] [trunk/] [rtl/] [control_unit.v] - Diff between revs 7 and 9

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

Rev 7 Rev 9
Line 249... Line 249...
                                state <= IDLE;
                                state <= IDLE;
                        else
                        else
                                state <= next_state;
                                state <= next_state;
        end
        end
 
 
assign encrypt_decrypt = (op_mode == ENCRYPTION || op_mode == KEY_DERIVATION ||
assign encrypt_decrypt = (op_mode == ENCRYPTION || op_mode == KEY_DERIVATION || state == GEN_KEY0
                                                                                                                state == GEN_KEY0   ||   state == GEN_KEY1       ||
                          ||   state == GEN_KEY1       ||state == GEN_KEY2   ||   state == GEN_KEY3       );
                                                                                                                state == GEN_KEY2   ||   state == GEN_KEY3       );
 
 
 
assign enc_dec = encrypt_decrypt | mode_ctr;
assign enc_dec = encrypt_decrypt | mode_ctr;
assign key_gen = (state == ROUND_KEY0);
assign key_gen = (state == ROUND_KEY0);
 
 
assign op_key_derivation = (op_mode == KEY_DERIVATION);
assign op_key_derivation = (op_mode == KEY_DERIVATION);
Line 473... Line 472...
                                begin
                                begin
                                        sbox_sel = COL_0;
                                        sbox_sel = COL_0;
                                        rk_sel = (last_round) ? MIXCOL_IN : MIXCOL_OUT;
                                        rk_sel = (last_round) ? MIXCOL_IN : MIXCOL_OUT;
                                        key_out_sel = KEY_0;
                                        key_out_sel = KEY_0;
                                        key_sel = KEY_OUT;
                                        key_sel = KEY_OUT;
 
 
                                        if(enc_dec)
                                        if(enc_dec)
                                                key_en = EN_KEY_1;
                                                key_en = EN_KEY_1;
                                        if((mode_cbc && last_round && !enc_dec) || (mode_ctr && last_round))
                                        if((mode_cbc && last_round && !enc_dec) || (mode_ctr && last_round))
                                                col_sel = INPUT;
                                                col_sel = INPUT;
                                        else
                                        else

powered by: WebSVN 2.1.0

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