5

This simple test leads to an error while compiling with modelsim whereas Quartus is fine to go through the whole synthesis/fitter process.

library ieee;
use ieee.std_logic_1164.all;

entity submodule is
port(
  four_bits_input  : in  std_logic_vector(3 downto 0);
  four_bits_output : out std_logic_vector(3 downto 0)
);
end entity;

architecture behav of submodule is
begin
  four_bits_output <= four_bits_input;
end architecture;

-------------------------------------------------------

library ieee;
use ieee.std_logic_1164.all;

entity globally_static_test is
port (
  one_bits_input   : in std_logic;
  three_bits_input : in std_logic_vector(2 downto 0);
  four_bits_output : out std_logic_vector(3 downto 0)
);
end entity;

architecture behav of globally_static_test is
begin

submodule_inst : entity work.submodule
port map(
   four_bits_input  => one_bits_input & three_bits_input  -- Modelsim Error is here.
  ,four_bits_output => four_bits_output
);

end architecture;

Modelsim error is the well known :

(vcom-1436) Actual expression (infix expression) of formal "four_bits_input" is not globally static.

I have seen this type of affectation in wrapper a lot in different companies and on several projects.

My question is : "Who is actually right ? Modelsim or Quartus".

Edit :

I've first made the test with the following versions

  • Modelsim v10.5b Intel FPGA Starter Edition - VHDL 2002
  • Quartus Prime 17.1 - VHDL 1993

Then I changed the Modelsim compilation option to use VHDL 2008 and the error is gone.

grorel
  • 1,408
  • 15
  • 21
  • "Duplicate" of https://electronics.stackexchange.com/questions/244453/does-vhdl-permit-logic-operation-in-port-map (The link is to EE-SE) – Oldfart May 17 '18 at 13:18
  • 1
    Your question may not have a reproducible error. What VHDL revisions are you using for the two tools (and what versions are they)? In IEEE Std 1076-2008 6.5.6.3 Port clauses an actual that is a non-static expression elaborates an anonymous signal as the target, used as the actual associated with the formal (which supplies the type and constraint, `four_bits_input has a locally static subtype). –  May 17 '18 at 22:36
  • I edited my post to add the tools and VHDL versions. I think it may be time for me to use VHDL-2008 as default in my projects. – grorel May 18 '18 at 12:28

0 Answers0