Forum Discussion
Altera_Forum
Honored Contributor
16 years agozero-time oscillation
I have an error message :Error:" Zero-time oscillation in node "|welch|aufsummierer:inst6|Add8~82" at time 0.65 ns. Check the design or vector source file for combinational loop". when i use a functional simulation, i don´t know what to do:
LIBRARY ieee; USE ieee.std_logic_1164.all; USE IEEE.numeric_std.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Entity Declaration ENTITY aufsummierer IS -- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE! PORT ( enable: IN STD_LOGIC; clock : IN STD_LOGIC; resultreal : IN STD_LOGIC_VECTOR(23 downto 0); resultim : IN STD_LOGIC_VECTOR(23 downto 0); ausgang : out std_logic_vector ( 27 downto 0 ) ); -- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE! END aufsummierer; -- Architecture Body ARCHITECTURE aufsummierer_architecture OF aufsummierer IS signal zaehler : natural range 0 to 15; signal ausgang0: std_logic_vector (27 downto 0); signal ausgang1: std_logic_vector (27 downto 0); signal ausgang2: std_logic_vector (27 downto 0); signal ausgang3: std_logic_vector (27 downto 0); signal ausgang4: std_logic_vector (27 downto 0); signal ausgang5: std_logic_vector (27 downto 0); signal ausgang6: std_logic_vector (27 downto 0); signal ausgang7: std_logic_vector (27 downto 0); signal ausgang8: std_logic_vector (27 downto 0); signal ausgang9: std_logic_vector (27 downto 0); signal ausgang10: std_logic_vector (27 downto 0); signal ausgang11: std_logic_vector (27 downto 0); signal ausgang12: std_logic_vector (27 downto 0); signal ausgang13: std_logic_vector (27 downto 0); signal ausgang14: std_logic_vector (27 downto 0); signal ausgang15: std_logic_vector (27 downto 0); BEGIN Process ( clock , enable) begin If clock = '1' and clock'event and enable = '1' then If zaehler = 15 then zaehler <= 0; else zaehler <= zaehler +1; end if; end if; Case zaehler is WHEN 0 => ausgang0 <= ausgang0 + resultreal;ausgang <= ausgang0; WHEN 1 => ausgang1 <= ausgang1 + resultreal;ausgang <= ausgang1; WHEN 2 => ausgang2 <=ausgang2 + resultreal;ausgang <= ausgang2; WHEN 3 => ausgang3 <=ausgang3 + resultreal;ausgang <= ausgang3; WHEN 4 => ausgang4 <=ausgang4 + resultreal;ausgang <= ausgang4; WHEN 5 => ausgang5 <=ausgang5 + resultreal;ausgang <= ausgang5; WHEN 6 => ausgang6 <=ausgang6 + resultreal;ausgang <= ausgang6; WHEN 7 => ausgang7 <=ausgang7 + resultreal;ausgang <= ausgang7; WHEN 8 => ausgang8 <=ausgang8 + resultreal;ausgang <= ausgang8; WHEN 9 => ausgang9 <=ausgang9 + resultreal;ausgang <= ausgang9; WHEN 10 => ausgang10 <=ausgang10 + resultreal;ausgang <= ausgang10; WHEN 11 => ausgang11 <=ausgang11 + resultreal;ausgang <= ausgang11; WHEN 12 => ausgang12 <=ausgang12 + resultreal;ausgang <= ausgang12; WHEN 13 => ausgang13 <=ausgang13 + resultreal;ausgang <= ausgang13; WHEN 14 => ausgang14 <=ausgang14 + resultreal;ausgang <= ausgang14; WHEN 15 => ausgang15 <=ausgang15 + resultreal;ausgang <= ausgang15; end case; end process; end aufsummierer_architecture; can anybody help me with this topic?2 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- can anybody help me with this topic? --- Quote End --- It depend on what you want. If you want to keep the old ausgangX value, place your case block inside the clock loop, like Daixiwen said. If you just want to add another ausgangX to resultreal, without a memory function, you have to replace: --- Quote Start --- WHEN 0 => ausgang0 <= ausgang0 + resultreal;ausgang <= ausgang0; --- Quote End --- with WHEN 0 => ausgang <= ausgang0 + resultreal; for every line. Regards, Ton - Altera_Forum
Honored Contributor
Keep your case block inside the cloked part of the process, if you don't, you are creating an infinite look when you synthesize.