OpenCores
URL https://opencores.org/ocsvn/rc4-prbs/rc4-prbs/trunk

Subversion Repositories rc4-prbs

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /rc4-prbs/trunk
    from Rev 10 to Rev 9
    Reverse comparison

Rev 10 → Rev 9

/rc4.v
18,7 → 18,7
*/
 
 
`include "/home/alfred/docto/FPGADesign/rc4-prbs/trunk/rc4.inc"
`include "rc4.inc"
 
module rc4(clk,rst,output_ready,password_input,K);
 
40,7 → 40,6
reg [7:0] key[0:`KEY_SIZE-1];
// S array
reg [7:0] S[0:256];
reg [9:0] discardCount;
 
// Key-scheduling state
`define KSS_KEYREAD 4'h0
111,7 → 110,6
KSState <= `KSS_CRYPTO;
i <= 8'h01;
j <= 8'h00;
discardCount <= 10'h0;
end
else begin
i <= i + 1;
138,9 → 136,7
S[i] <= S[j];
S[j] <= S[i]; // We can do this because of verilog.
K <= S[ S[i]+S[j] ];
if (discardCount<1000)
discardCount<=discardCount+1;
else output_ready <= 1; // Valid K at output
output_ready <= 1; // Valid K at output
i <= i+1;
KSState <= `KSS_CRYPTO;
end

powered by: WebSVN 2.1.0

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