H
Hilko
Guest
Hi,
i try to prevent my compiler (Altera Quartus) from optimizing away some
signals. Therefore i assign parallel to my logic some "default-logic"
with weak signals. The shortened source code follows ...
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
-------------------------------------------------------------------------------
entity test is
port (
reset_n: in std_logic;
clk : in std_logic;
a_in : in std_logic;
b_out : out std_logic_vector(7 downto 0)
);
end entity test;
-------------------------------------------------------------------------------
architecture arch of test is
signal b : unsigned(7 downto 0);
begin
-- ========================================
-- default logic start
-- ========================================
b <= (others => 'L');
-- ========================================
-- default logic end
-- ========================================
main : process(reset_n, clk) is
begin
if reset_n = '0' then
b <= (others => '0');
elsif rising_edge(clk) then
if a_in = '1' then
b <= x"0A";
else
b <= x"0B";
end if;
end if;
b_out <= std_logic_vector(b);
end process main;
end architecture arch;
The following error occurs
Error (10028): Can't resolve multiple constant drivers for net "b[7]"
at formatter.vhd(31)
What is wrong ?
Thanks in advance,
Hilko
i try to prevent my compiler (Altera Quartus) from optimizing away some
signals. Therefore i assign parallel to my logic some "default-logic"
with weak signals. The shortened source code follows ...
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
-------------------------------------------------------------------------------
entity test is
port (
reset_n: in std_logic;
clk : in std_logic;
a_in : in std_logic;
b_out : out std_logic_vector(7 downto 0)
);
end entity test;
-------------------------------------------------------------------------------
architecture arch of test is
signal b : unsigned(7 downto 0);
begin
-- ========================================
-- default logic start
-- ========================================
b <= (others => 'L');
-- ========================================
-- default logic end
-- ========================================
main : process(reset_n, clk) is
begin
if reset_n = '0' then
b <= (others => '0');
elsif rising_edge(clk) then
if a_in = '1' then
b <= x"0A";
else
b <= x"0B";
end if;
end if;
b_out <= std_logic_vector(b);
end process main;
end architecture arch;
The following error occurs
Error (10028): Can't resolve multiple constant drivers for net "b[7]"
at formatter.vhd(31)
What is wrong ?
Thanks in advance,
Hilko