Conversation
|
Looks promising. Do you have a test case you could add? |
|
While b4967b3 correctly parses the You may verify the issue by the test case provided below: -- length_attr.vhd
library ieee;
use ieee.std_logic_1164.all;
entity length_attr is
generic (
W : integer := 8
);
port(
a : in std_logic_vector(W-1 downto 0);
len_a : out integer
);
end entity length_attr;
architecture rtl of length_attr is
begin
len_a <= a'length;
end architecture rtl;
And get something like assign len_a = -1;It should ideally fall back to the range expression itself when the numeric width isn't static. assign len_a = W; |
|
@DanTGL I've managed to create a simple patch based on b4967b3, please follow the steps below to test it. git fetch upstream && \
git pull upstream master && \
git apply length_formal.patchThe patch now prefers using
Simultaneously use |
No description provided.