Browse Source

new synchronous process for mode & valid signals

master
Torsten Meissner 13 years ago
parent
commit
804a359af4
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      des/rtl/verilog/des.v

+ 20
- 0
des/rtl/verilog/des.v View File

@ -35,6 +35,26 @@ module des
`include "des_pkg.v"
reg [0:17] valid;
reg [0:16] mode;
wire valid_o = valid[17];
always @(posedge clk_i, negedge reset_i) begin
if(~reset_i) begin
valid <= 0;
end
else begin
// shift registers
valid[1:17] <= valid[0:16];
valid[0] <= valid_i;
mode[1:16] <= mode[0:15];
mode[0] <= mode_i;
end
end
endmodule

Loading…
Cancel
Save