O
Olaf Petzold
Guest
Hi,
the code below produces the warning:
Synthesis Warning: Reset signal 'status' is not in the sensitivity
list of process 'proc'.
Well, after adding this to the sensitivity list I've got the error:
Cannot read output "status".
How stupid is Modelsim (or me)? If I change entity signal status to
inout type, it compiles but that isn't what I want. In my code the
recod is more complex. How can I fix this?
Thanks
Olaf
---8<---
library ieee;
use ieee.std_logic_1164.all;
package pkg_foo is
type status_t is record
ok : std_logic;
end record status_t;
procedure reset_status (signal status : out status_t);
end package pkg_foo;
library ieee;
use ieee.std_logic_1164.all;
use work.pkg_foo.all;
entity foo is
port (
clk : in std_logic;
reset : in std_logic;
status : out status_t);
end entity foo;
architecture behaviorial of foo is
begin
proc: process (clk, reset) is
begin
if (reset = '1') then
reset_status(status);
elsif rising_edge(clk) then
status.ok <= '1';
end if;
end process proc;
end architecture behaviorial;
package body pkg_foo is
procedure reset_status (signal status : out status_t) is
begin
status.ok <= '0';
end procedure reset_status;
end package body pkg_foo;
--->8---
the code below produces the warning:
Synthesis Warning: Reset signal 'status' is not in the sensitivity
list of process 'proc'.
Well, after adding this to the sensitivity list I've got the error:
Cannot read output "status".
How stupid is Modelsim (or me)? If I change entity signal status to
inout type, it compiles but that isn't what I want. In my code the
recod is more complex. How can I fix this?
Thanks
Olaf
---8<---
library ieee;
use ieee.std_logic_1164.all;
package pkg_foo is
type status_t is record
ok : std_logic;
end record status_t;
procedure reset_status (signal status : out status_t);
end package pkg_foo;
library ieee;
use ieee.std_logic_1164.all;
use work.pkg_foo.all;
entity foo is
port (
clk : in std_logic;
reset : in std_logic;
status : out status_t);
end entity foo;
architecture behaviorial of foo is
begin
proc: process (clk, reset) is
begin
if (reset = '1') then
reset_status(status);
elsif rising_edge(clk) then
status.ok <= '1';
end if;
end process proc;
end architecture behaviorial;
package body pkg_foo is
procedure reset_status (signal status : out status_t) is
begin
status.ok <= '0';
end procedure reset_status;
end package body pkg_foo;
--->8---