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

Subversion Repositories csa

[/] [csa/] [trunk/] [rtl/] [decrypt.v] - Diff between revs 42 and 49

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

Rev 42 Rev 49
Line 72... Line 72...
                        , .valid   (dec_valid)
                        , .valid   (dec_valid)
                        , .ogroup  (ogroup)
                        , .ogroup  (ogroup)
                        , .obytes  (obytes)
                        , .obytes  (obytes)
                );
                );
 
 
//
 
//// decrypt
 
//reg  [8*8-1:0] db;
 
//reg            db_valid;
 
//
 
//wire [56*8-1:0]kk_decrypt;
 
//wire [ 8*8-1:0]ck_decrypt;
 
//
 
//assign   kk_decrypt = (using_even_odd_key) ? odd_kk : even_kk ; 
 
//assign   ck_decrypt = (using_even_odd_key) ? odd_ck : even_ck ; 
 
//
 
//wire [8*8-1:0] sc_sb;
 
//wire [8*8-1:0] sc_cb;
 
//wire           init;
 
//wire           sc_en;
 
//wire           last;
 
//
 
//assign sc_sb = group;
 
//assign init  = group_id == 5'h00;
 
//assign last  = group_id == 5'd22;
 
//reg     [2:0] last_cnt;
 
//reg     last_run;
 
//assign sc_en = group_valid;
 
//
 
//stream_cypher sc(  
 
//                    .clk   (clk)
 
//                  , .rst   (rst)
 
//                  , .en    (sc_en)
 
//                  , .init  (init)
 
//                  , .ck    (ck_decrypt)
 
//                  , .sb    (sc_sb)
 
//                  , .cb    (sc_cb)
 
//                  );
 
//
 
//wire [ 8*8-1:0]   bco;
 
//reg  [ 8*8-1:0]   bc;
 
//reg  [ 8*8-1:0]   ib;
 
//block_decypher bcm(
 
//                          .kk (kk_decrypt)
 
//                        , .ib (ib[8*8-1:0])
 
//                        , .bd (bco)
 
//                        );
 
//
 
//
 
//always @(posedge clk)
 
//if(rst)
 
//begin
 
//        db <= 64'h00;
 
//        ib <= 128'h00000000000000000000000000000000;
 
//        bc <= 64'hffffffffffffffff;
 
//        last_cnt<=3'h0;
 
//        last_run<=1'h0;
 
//end
 
//else
 
//begin
 
//        db_valid<=1'h0;                        
 
//        if(group_valid_d)
 
//        begin
 
//                bc<=bco;
 
//                if(init)
 
//                begin
 
//                        ib<={ ib[8*8-1:0],sc_cb };
 
//                        db<=bco^sc_cb;
 
//                end
 
//                else
 
//                begin
 
//                        ib<={ ib[8*8-1:0],sc_cb^sc_sb };
 
//                        db<=bco^sc_cb^sc_sb;
 
//                end
 
//                if(group_id>1'h0)
 
//                begin
 
//                        db_valid<=1'h1;                        
 
//                end
 
//
 
//                if(last)
 
//                        last_run<=1'h1;
 
//
 
//        end
 
//        if(last_run)
 
//        begin
 
//                last_cnt<=last_cnt+3'h1;
 
//                if(last_cnt==3'h7)
 
//                begin
 
//                        db_valid<=1'h1;                        
 
//                        db<=bco;
 
//                        last_run<=1'h0;
 
//                end
 
//
 
//        end
 
//end
 
//
 
 
 
 
 
ts_serial_out ts_serial_out(
ts_serial_out ts_serial_out(
                          .clk      (clk)
                          .clk      (clk)
                        , .rst      (rst)
                        , .rst      (rst)
                        , .group    (ogroup)
                        , .group    (ogroup)
                        , .bytes    (obytes)
                        , .bytes    (obytes)

powered by: WebSVN 2.1.0

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