A
arkaitz
Guest
Hi,
I have a FF in my design whose reset and set are separate conditions:
process( rst, clk )
begin
if ( rst = '1' ) then
output <= '0';
elsif ( clk'event and clk = '1' ) then
if ( set = '1' ) then
output <= '1';
end if;
if ( reset = '1' ) then
output <= '0';
end if;
end if;
end process;
This works fine but now I want the reset condition to be a rising edge
detector signal, so:
process( rst, clk )
begin
if ( rst = '1' );
aux <= '0';
if ( clk'event and clk = '1' ) then
aux <= input;
end if;
end process;
reset <= not(aux) and input;
The "input" signal is synchronous to my design and periodical but its
period is about 16 times the clock period. When I execute the
functional simulationwith ModelSim SE 5.6f, the "reset" signal appears
as a glitch since the "input" and "aux" signals change their values in
the same clock edge.
Because of this, the "output" signal is never reseted.
I believe that the timing simulation may vary and the design could
work correctly because of the "clock to output" of the FFs, but I'n
not sure.
Any suggestions?
Thanks in advance,
Arkaitz.
---------------------------
Electronics Area
IKERLAN
Pş J. M. Arizmendiarrieta, 2
20500 Arrasate (Gipuzkoa)
---------------------------
I have a FF in my design whose reset and set are separate conditions:
process( rst, clk )
begin
if ( rst = '1' ) then
output <= '0';
elsif ( clk'event and clk = '1' ) then
if ( set = '1' ) then
output <= '1';
end if;
if ( reset = '1' ) then
output <= '0';
end if;
end if;
end process;
This works fine but now I want the reset condition to be a rising edge
detector signal, so:
process( rst, clk )
begin
if ( rst = '1' );
aux <= '0';
if ( clk'event and clk = '1' ) then
aux <= input;
end if;
end process;
reset <= not(aux) and input;
The "input" signal is synchronous to my design and periodical but its
period is about 16 times the clock period. When I execute the
functional simulationwith ModelSim SE 5.6f, the "reset" signal appears
as a glitch since the "input" and "aux" signals change their values in
the same clock edge.
Because of this, the "output" signal is never reseted.
I believe that the timing simulation may vary and the design could
work correctly because of the "clock to output" of the FFs, but I'n
not sure.
Any suggestions?
Thanks in advance,
Arkaitz.
---------------------------
Electronics Area
IKERLAN
Pş J. M. Arizmendiarrieta, 2
20500 Arrasate (Gipuzkoa)
---------------------------