ERIC.C
Newbie level 2
Dear Friends,
Can someone please advice what's wrong with my code? I found this error when I run the functional simulation. Error: Zero-time oscillation in node
Below is my code.
Can someone please advice what's wrong with my code? I found this error when I run the functional simulation. Error: Zero-time oscillation in node
Below is my code.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity Lab6_Synchronous_5bit_enable_up_down_counter is port ( Clock, Enable, UpDn, Rst :in std_logic; Output :out std_logic_vector(4 downto 0)); end Lab6_Synchronous_5bit_enable_up_down_counter; architecture Synchronous_5bit_enable_up_down_counter of Lab6_Synchronous_5bit_enable_up_down_counter is signal count:std_logic_vector(4 downto 0); signal s : std_logic; begin s<= Enable and Clock; process (Clock, UpDn) begin if rst = '1' then count <= "00000"; elsif s='1' then if UpDn = '1' then count <= count+1; else count <= count-1; end if; else count <= count; end if; end process; output <=count; end Synchronous_5bit_enable_up_down_counter;
Last edited: