K
Kim Enkovaara
Hi,
I have small problems understanding what the 1076-1993
Ch. 4.3.2.2/490
"The type of the actual (after applying the conversion function
or type conversion. if present in the actual part) must be the
same as the type of the corresponding formal, if the mode of the
formal is IN, INOUT, or LINKAGE, and if the actual is not open.
Similarly, if the mode of the formal is OUT, INOUT, BUFFER, or
LINKAGE, and if the actual is not open, then the type of the
formal (after applying the conversion function or type
conversion, if present in the formal part) must be the same as
the corresponding actual."
really means. Take a look of the following code example. Should
it compile or not. Traditionally simulators have compiled it,
but now I have found one that does not compile it. And the
vendor says that the code is invalid.
The problem comes to what does the "corresponding actual"
in the standard text mean. Is it the actual before or after
the type conversion?
--ram.vhd---
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY ram IS
PORT(
d: IN std_logic_vector(35 DOWNTO 0));
END;
ARCHITECTURE ram_arch OF ram IS
BEGIN
END;
---toplevel.vhd--------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY dut_top IS
END;
ARCHITECTURE dut_bench_arch OF dut_top IS
SIGNAL data : unsigned(35 DOWNTO 0);
COMPONENT ram
PORT (
d : INOUT std_logic_vector(35 DOWNTO 0));
END COMPONENT;
BEGIN
test:ram
PORT MAP (
d => std_logic_vector(data));
END;
Regards,
--Kim
I have small problems understanding what the 1076-1993
Ch. 4.3.2.2/490
"The type of the actual (after applying the conversion function
or type conversion. if present in the actual part) must be the
same as the type of the corresponding formal, if the mode of the
formal is IN, INOUT, or LINKAGE, and if the actual is not open.
Similarly, if the mode of the formal is OUT, INOUT, BUFFER, or
LINKAGE, and if the actual is not open, then the type of the
formal (after applying the conversion function or type
conversion, if present in the formal part) must be the same as
the corresponding actual."
really means. Take a look of the following code example. Should
it compile or not. Traditionally simulators have compiled it,
but now I have found one that does not compile it. And the
vendor says that the code is invalid.
The problem comes to what does the "corresponding actual"
in the standard text mean. Is it the actual before or after
the type conversion?
--ram.vhd---
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY ram IS
PORT(
d: IN std_logic_vector(35 DOWNTO 0));
END;
ARCHITECTURE ram_arch OF ram IS
BEGIN
END;
---toplevel.vhd--------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY dut_top IS
END;
ARCHITECTURE dut_bench_arch OF dut_top IS
SIGNAL data : unsigned(35 DOWNTO 0);
COMPONENT ram
PORT (
d : INOUT std_logic_vector(35 DOWNTO 0));
END COMPONENT;
BEGIN
test:ram
PORT MAP (
d => std_logic_vector(data));
END;
Regards,
--Kim