From b9ed938d6df35ac311b9b55a18987844769ce6b3 Mon Sep 17 00:00:00 2001 From: Torsten Meissner Date: Wed, 5 Oct 2011 22:18:06 +0200 Subject: [PATCH] register mode_i and iv_i only if start_i is high --- cbcdes/rtl/cbcdes.vhd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cbcdes/rtl/cbcdes.vhd b/cbcdes/rtl/cbcdes.vhd index c5a9a5a..c1611fa 100644 --- a/cbcdes/rtl/cbcdes.vhd +++ b/cbcdes/rtl/cbcdes.vhd @@ -97,13 +97,15 @@ begin s_iv <= (others => '0'); s_datain <= (others => '0'); elsif(rising_edge(clk_i)) then - s_reset <= reset_i; + s_reset <= reset_i; if(valid_i = '1' and s_ready = '1') then - s_mode <= mode_i; s_start <= start_i; - s_iv <= iv_i; s_datain <= data_i; end if; + if(valid_i = '1' and s_ready = '1' and start_i = '1') then + s_mode <= mode_i; + s_iv <= iv_i; + end if; end if; end process inputregister;