arshad_mir said:In my earlier query, what I wanted to mention is:
if (tick_ip'event) then
clock_out <= '1';
else
clock_out <= '0';
end if;
I am not able to synthesize it.
arshad_mir said:In my earlier query, what I wanted to mention is:
if (tick_ip'event) then
clock_out <= '1';
else
clock_out <= '0';
end if;
I am not able to synthesize it.
process (clk,reset_n)
begin
if reset_n = '0' then
signal_d <= '0';
elsif clk'event and clk = '1' then
signal_d <= signal;
if signal_d /= signal then -- edge detection
output <= '1';
else
output <= '0';
end if;
end if;
end process;
WA said:If you are using VHDL, I think this can't be done.
....
The problem is you are trying to use the same signal twice.
Now, concerning your problem - I'm pretty sure this is because you are trying to assign to the same signal in different processes. This could lead to problems, because the same signal is forced by several drivers.
--Illegal syntax (more then one clock per process)
PROCESS (clk)
Begin
IF (clk'EVENT and clk = '1') THEN
IF (load = '1') THEN
q <= p;
END IF;
END IF;
IF (clk'EVENT and clk = '1') THEN
IF (count_ena = '1') THEN
p <= q+1;
END IF;
END IF;
END PROCESS
--Possible coding or will I have error message?
PROCESS (clk)
Begin
IF (clk'EVENT and clk = '0') THEN
IF (load = '1') THEN
q <= p;
END IF;
ELSIF (clk'EVENT and clk = '1') THEN
IF (count_ena = '1') THEN
q <= q+1;
END IF;
ELSE
q <= q; -- do nothing
END IF;
END PROCESS;
PROCESS (clk)
BEGIN
IF (clk'EVENT and clk = '1') THEN
IF (load = '1') THEN
q <= p;
END IF;
END IF;
END PROCESS;
PROCESS(CLK)
BEGIN
IF (clk'EVENT and clk = '1') THEN
IF (count_ena = '1') THEN
p <= q+1;
END IF;
END IF;
END PROCESS
PROCESS (clk)
BEGIN
IF (clk'EVENT and clk = '0') THEN
IF (load = '1') THEN
q <= p;
END IF;
ELSIF (clk'EVENT and clk = '1') THEN
^^^^^^^
you are trying to use clock twice inside the same process.
even after you put these 2 IFs in different processes you have to
make some re-coding, because your trying to drive the same signal
(signal q) in both processes.
IF (count_ena = '1') THEN
q <= q+1;
END IF;
ELSE
q <= q; -- do nothing
END IF;
END PROCESS;
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?