logical net 'NET' has no load

Ive seen posts on this error in VHDL a few times around here, but I am still unsure how to get rid of this error so my nets don't get removed. Here is the code that is causing the error:

library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all;

entity BLINK is

PORT( SA: IN STD_LOGIC_VECTOR (19 downto 0); --Offending input vector pin2: OUT STD_LOGIC := '0'; clk: IN STD_LOGIC);

end BLINK;

architecture FLASH of BLINK is

CONSTANT count: INTEGER:=8330000; SIGNAL t: INTEGER:= 0; SIGNAL sig: STD_LOGIC:='0'; SIGNAL state: STD_LOGIC; CONSTANT address: STD_LOGIC_VECTOR (19 downto 0) := X"002E8"; SIGNAL BASEADDRESS: STD_LOGIC_VECTOR (19 downto 0); SIGNAL ADD: STD_LOGIC_VECTOR (2 downto 0);

begin

PROCESS (clk, SA) --SA is placed in sensitivity list begin

BASEADDRESS

Reply to
Matt
Loading thread data ...

The signals BASEADDRESS and ADD are not used, so any assignment to them is being optimized away. Then you are left with input signals that do nothing, and that's where the warning message is coming from. Connect those signals to something, and the logic won't be optimized away.

As is is, you have one output, and it is forced to '0', so I would be surprized if there was _any_ logic left.

Reply to
LittleAlex

Isn't BASEADDRESS being used in the IF statement?

IF(BASEADDRESS=address) THEN

also, ADD is used in a similar switch case later in the code, I removed it just to keep it short.

Thanks, Matt

Reply to
Matt

You could post your whole code, that would help.

Usually you only have clk in the sensitivity list for synchronous operation unless you are doing an asynchonous reset or something more exotic.

I think LittleAlex is right that something is being optimised away. You could try pin2

Reply to
Brad Smallridge

BASEADDRESS is used in the IF statement, but it doesn't actually "do" anything. If it's equal to something, ADD gets set, but ADD isn't used for anything, so that assignment is a "don't care", so the comparison doesn't matter, so ...

Reply to
LittleAlex

Thanks for the replies. By adding: ADD

Reply to
Matt

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.