OpenCores
URL https://opencores.org/ocsvn/gost28147-89/gost28147-89/trunk

Subversion Repositories gost28147-89

[/] [gost28147-89/] [trunk/] [rtl/] [gost89_sbox.v] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 fanatid
module gost89_sbox(
2
  input      [63:0] sbox,
3
  input      [3:0]  in,
4
  output reg [3:0]  out
5
);
6
  always @(in or sbox)
7
    case (in)
8
      4'h0: out <= sbox[63:60];
9
      4'h1: out <= sbox[59:56];
10
      4'h2: out <= sbox[55:52];
11
      4'h3: out <= sbox[51:48];
12
      4'h4: out <= sbox[47:44];
13
      4'h5: out <= sbox[43:40];
14
      4'h6: out <= sbox[39:36];
15
      4'h7: out <= sbox[35:32];
16
      4'h8: out <= sbox[31:28];
17
      4'h9: out <= sbox[27:24];
18
      4'ha: out <= sbox[23:20];
19
      4'hb: out <= sbox[19:16];
20
      4'hc: out <= sbox[15:12];
21
      4'hd: out <= sbox[11:8];
22
      4'he: out <= sbox[7:4];
23
      4'hf: out <= sbox[3:0];
24
    endcase
25
endmodule

powered by: WebSVN 2.1.0

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