M
Madhu
Guest
Hello,
I understand that, initial values for signals are not supported for
synthesis. My problem is with the reset signal. For instance in the
below code,
***********************************************************
library IEEE;
use IEEE.std_logic_1164.all;
entity example is
port (
clock: in STD_LOGIC;
enable: in std_logic;
datain: in STD_LOGIC;
dataout: out STD_LOGIC
);
end gsr;
architecture example_ arch of example is
signal reset:std_logic;
signal enable: integer range 0 to 10;
begin
process(clock,reset) is
begin
if(rising_edge(clock)) then
if(reset='1') then
reset='0';
end if;
if(reset='0') then
if(enable ='0') then
dataout<='0';
end if;--enable
if(enable='1')then
dataout<=datain;
end if;--enable
end if;--reset
end if;--rising edge
end process;
end example_arch;
I expect "reset" signal to be high for just one clock cycle, at the
start of the process and after the first clock cycle "reset" to be low
through out the process. That can expect to work for simulation if I
initialize reset signal to 1.
signal reset:std_logic:='1';
But, it wouldn't help for synthesis. How can I tackle with this
situation ?
Thanks for your time !!
I understand that, initial values for signals are not supported for
synthesis. My problem is with the reset signal. For instance in the
below code,
***********************************************************
library IEEE;
use IEEE.std_logic_1164.all;
entity example is
port (
clock: in STD_LOGIC;
enable: in std_logic;
datain: in STD_LOGIC;
dataout: out STD_LOGIC
);
end gsr;
architecture example_ arch of example is
signal reset:std_logic;
signal enable: integer range 0 to 10;
begin
process(clock,reset) is
begin
if(rising_edge(clock)) then
if(reset='1') then
reset='0';
end if;
if(reset='0') then
if(enable ='0') then
dataout<='0';
end if;--enable
if(enable='1')then
dataout<=datain;
end if;--enable
end if;--reset
end if;--rising edge
end process;
end example_arch;
I expect "reset" signal to be high for just one clock cycle, at the
start of the process and after the first clock cycle "reset" to be low
through out the process. That can expect to work for simulation if I
initialize reset signal to 1.
signal reset:std_logic:='1';
But, it wouldn't help for synthesis. How can I tackle with this
situation ?
Thanks for your time !!