You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The 2008 LRM relaxed requirements for closely related array types to allow conversions when the elements are only closely related rather than exactly the same. This should allow conversion between, for example, an array of reals and an array of integers.
Expected behaviour
The test case below passes with Questa and Riviera-PRO but not with GHDL
How to reproduce?
entityentisendentity;
architecturetestofentisbeginp1: processisvariable i : integer_vector(1to3);
variable r : real_vector(1to3);
begin
i := (1, 2, 3);
r := real_vector(i);
assert r = (1.0, 2.0, 3.0);
r := (4.2, 5.9, 7.1);
i := integer_vector(r);
assert i = (4, 6, 7);
r := (1.0, real'left, 5.3);
-- i := integer_vector(r); -- Range errorwait;
endprocess;
endarchitecture;
Description
The 2008 LRM relaxed requirements for closely related array types to allow conversions when the elements are only closely related rather than exactly the same. This should allow conversion between, for example, an array of reals and an array of integers.
Expected behaviour
The test case below passes with Questa and Riviera-PRO but not with GHDL
How to reproduce?
Context
The text was updated successfully, but these errors were encountered: