-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "expression cannot be folded" error when dumping arrays
Fixes #979
- Loading branch information
Showing
5 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#0 issue979.mem[0][3:0] 1111 | ||
#0 issue979.mem[1][3:0] 0000 | ||
#1000000 issue979.mem[1][3:0] 0001 | ||
#1000000 issue979.mem[0][3:0] 0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
entity issue979 is | ||
generic ( | ||
DATA_WIDTH: integer := 4; | ||
FIFO_SIZE: integer := 36 | ||
); | ||
end entity; | ||
|
||
architecture sim of issue979 is | ||
function GetWidth ( | ||
rdwr_width : in integer | ||
) return integer is | ||
variable func_width : integer; | ||
begin | ||
return rdwr_width; | ||
end; | ||
constant mem_width : integer := GetWidth(DATA_WIDTH); | ||
type Two_D_array_type is array (1 downto 0) of bit_vector((mem_width - 1) downto 0); | ||
signal mem : Two_D_array_type; | ||
begin | ||
process | ||
begin | ||
mem(0) <= (others => '1'); | ||
wait for 1 ns; | ||
mem(0) <= (others => '0'); | ||
mem(1) <= (0 => '1', others => '0'); | ||
wait for 1 ns; | ||
std.env.finish; | ||
end process; | ||
end architecture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1045,3 +1045,4 @@ issue968 normal | |
issue971 normal,2008 | ||
ieee17 normal | ||
issue978 normal,vhpi | ||
issue979 wave,2008,dump-arrays |