0

I am having trouble with a code I wrote. I keep getting an error when trying to simulate. Warning Warning C0007 : Architecture has unbound instance (ex. shifter2).

Here is my code. I am using DirectVHDL - PE

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

entity multi3 is
  port (   
    C : in std_logic_vector (7 downto 0);
    D : out std_logic_vector (10 downto 0));
end multi3;

architecture behavioral of multi3 is

component shifter
  port (
    Rin : in std_logic;
    A : in std_logic_vector(7 downto 0);
    B : out std_logic_vector(7 downto 0);
    Lout: out std_logic);
end component;

signal E, F : std_logic_vector (7 downto 0);
signal L1, L2 : std_logic;

begin

shifter1 : shifter port map('0',C,E,L1);

shifter2 : shifter port map('0',E,F,L2);

D<=('0' & L1 & L2 & F)+C;

end Behavioral;
Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44
  • 1
    Usually this means that you havent compiled the code for the component and the simulator cannot map the shifter blocks to actual source. I also note that DirectVHDL is a very very old simulator that you cannot buy any more. Any chance you might try something more up to date? GHDL is free and open source. – Tricky Nov 24 '19 at 08:21
  • 1
    Possible duplicate of ["Warning C0007 : Architecture has unbound instances" issue!](https://stackoverflow.com/questions/6151584/warning-c0007-architecture-has-unbound-instances-issue) –  Nov 24 '19 at 09:50
  • I am required to use Direct VHDL but I will give GHDL a try. – mand09001 Nov 24 '19 at 22:31
  • This seems like it's similar to the other post, I just didn't really understand the explanation to what might be causing the problem. https://stackoverflow.com/questions/6151584/warning-c0007-architecture-has-unbound-instances-issue – mand09001 Nov 24 '19 at 22:33
  • Your problem will be that either (i) you haven't compiled the entity `shifter` or (ii), if you have, that the entity is not absolutely identical to the component `shifter`, which means that you will need a _Configuration_. – Matthew Taylor Nov 25 '19 at 08:34
  • Your "I'll write a better one" fails on two counts. The analogy isn't valid and a default binding indication depends only on simple names of entities and components matching. See IEEE Std 1076-2008 7.3 Configuration specification (which can be implicit) and 7.3.3 Default binding indication. You'd expect an elaboration error if port types don't match not a warning your component is unbound. Something a [small example](https://i.stack.imgur.com/Fgikh.jpg) can demonstrate. –  Nov 25 '19 at 18:33
  • @user1155120 Why don't you think the analogy is valid? It works for me. – Matthew Taylor Nov 26 '19 at 09:36
  • "Your problem will that either" choice (ii) has nothing to do with binding, "not absolutely identical to the component" causes errors. Non-existent, unconnected or miss-connected pins are errors. The warning is about the 'part' name called out not matching a 'device' name in inventory. The OP in both questions is based on receiving a warning and not an error. The segue about 'direct instantiation' doesn't appear useful. 7.3 Configuration specification "A configuration specification associates binding information with component labels representing instances of a given component declaration." –  Nov 26 '19 at 12:23
  • Modelsim *error* for formals and actuals not matching is vsim-3807, for names not matching vsim-3817. –  Nov 27 '19 at 22:14

0 Answers0