I'm using assert VHDL statements to check global constants and generic parameters in VHDL architectures, if they obey to the supported parameter set of a VHDL design.
An always true
assert statement is reported in the log. I think this is a bug.
Example: assert TRUE report "This should not be visible in the LSE log." severity NOTE;
Here is the complete test example:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity assert_test is
end entity;
architecture rtl of assert_test is
type T_VENDOR is (VENDOR_ALTERA, VENDOR_LATTICE, VENDOR_XILINX);
constant VENDOR : T_VENDOR := VENDOR_LATTICE;
begin -- line 39
assert TRUE report "This should not be visible in the LSE log." severity NOTE;
genInfer : if ((VENDOR = VENDOR_LATTICE) or (VENDOR = VENDOR_XILINX)) generate
assert FALSE report "Inside genInfer" severity NOTE;
end generate;
genAltera : if (VENDOR = VENDOR_ALTERA) generate
assert FALSE report "Inside genAltera" severity NOTE;
end generate;
-- line 48
assert ((VENDOR = VENDOR_ALTERA) or (VENDOR = VENDOR_LATTICE) or (VENDOR = VENDOR_XILINX))
report "Vendor '" & T_VENDOR'image(VENDOR) & "' not yet supported."
severity failure;
-- line 52
-- workaround
genAssert : if (not ((VENDOR = VENDOR_ALTERA) or (VENDOR = VENDOR_LATTICE) or (VENDOR = VENDOR_XILINX))) generate
assert FALSE report "Vendor '" & T_VENDOR'image(VENDOR) & "' not yet supported." severity failure;
end generate;
end architecture;
Here is my LSE log:
INFO - synthesis: d:/.../assert_test.vhdl(40): Found User declared VHDL assert of type Note: "This should not be visible in the LSE log.". VHDL-1700
INFO - synthesis: d:/.../assert_test.vhdl(43): Found User declared VHDL assert of type Note: "Inside genInfer". VHDL-1700
INFO - synthesis: d:/.../assert_test.vhdl(51): Found User declared VHDL assert of type Failure: "Vendor 'vendor_lattice' not yet supported.". VHDL-1700 Top module name (VHDL): assert_test
- Can anyone confim this behavior?
- It's a bug, isn't it?
Workaround:
Placing the assert
statements into a generate
statements, works as a workaround.