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

Subversion Repositories apbtoaes128

[/] [apbtoaes128/] [trunk/] [rtl/] [datapath.v] - Diff between revs 8 and 9

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

Rev 8 Rev 9
Line 239... Line 239...
reg [ 1 : 0] rk_sel_pp1;
reg [ 1 : 0] rk_sel_pp1;
reg [ 1 : 0] rk_sel_pp2;
reg [ 1 : 0] rk_sel_pp2;
reg key_sel_pp1;
reg key_sel_pp1;
reg rk_out_sel_pp1, rk_out_sel_pp2;
reg rk_out_sel_pp1, rk_out_sel_pp2;
reg last_round_pp1, last_round_pp2;
reg last_round_pp1, last_round_pp2;
//reg end_aes_pp2;//end_aes_pp1, end_aes_pp2;
//reg end_aes_pp2,end_aes_pp1;//end_aes_pp2;
 
 
assign key_bus = key_mux_out;
assign key_bus = key_mux_out;
assign iv_bus = iv_mux_out;
assign iv_bus = iv_mux_out;
 
 
// Input Swap Unit
// Input Swap Unit
Line 316... Line 316...
                                else
                                else
                                begin
                                begin
                                                if(l == 3)
                                                if(l == 3)
                                                begin
                                                begin
                                                                if(iv_en[l] || iv_cnt_en)
                                                                if(iv_en[l] || iv_cnt_en)
                                                                        //iv[l] <= (iv_cnt_sel) ? iv[l] + 1'b1 : bus_in;
                                                                begin
 
                                                                        /*
 
                                                                        if(mode_ctr)
 
                                                                                iv[l] <= (iv_cnt_sel) ? iv[l] + 1'b1 : bus_in;
 
 
 
                                                                        else
 
                                                                                iv[l] <= (iv_cnt_sel) ? iv[l] : bus_in;
 
                                                                        */
 
 
                                                                        iv[l] <= (iv_cnt_sel) ? iv[l] : bus_in;
                                                                        iv[l] <= (iv_cnt_sel) ? iv[l] : bus_in;
                                                end
                                                end
 
                                                end
                                                else
                                                else
                                                begin
                                                begin
                                                                if(iv_en[l])
                                                                if(iv_en[l])
                                                                        iv[l] <= bus_in;
                                                                        iv[l] <= bus_in;
                                                end
                                                end
Line 506... Line 515...
 
 
assign add_rk_sel = (bypass_rk) ? rk_out_sel : rk_out_sel_pp2;
assign add_rk_sel = (bypass_rk) ? rk_out_sel : rk_out_sel_pp2;
 
 
assign add_rk_out = (add_rk_sel) ? add_rd : (last_round_pp2 ? sbox_pp2 : mix_out_dec);
assign add_rk_out = (add_rk_sel) ? add_rd : (last_round_pp2 ? sbox_pp2 : mix_out_dec);
 
 
assign end_aes = end_comp;//end_aes_pp2;
assign end_aes = end_comp;
 
 
// Pipeline Registers for Control Signals
// Pipeline Registers for Control Signals
always @(posedge clk, negedge rst_n)
always @(posedge clk, negedge rst_n)
        begin
        begin
                if(!rst_n)
                if(!rst_n)
Line 570... Line 579...
 
 
                                last_round_pp1 <= last_round;
                                last_round_pp1 <= last_round;
                                last_round_pp2 <= last_round_pp1;
                                last_round_pp2 <= last_round_pp1;
 
 
                                //end_aes_pp1 <= end_comp;
                                //end_aes_pp1 <= end_comp;
                                //end_aes_pp2 <= end_comp;
                                //end_aes_pp2 <= end_aes_pp1;
                        end
                        end
        end
        end
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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