-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expression cannot be folded #19
Comments
Not as easy to fix as the others unfortunately. Can you try with the latest version? |
Thanks. Seems, that my test case is not good enough. With the original code I am still getting the same error. |
Here a slightly different test case: entity comp7_bot is architecture rtl of comp7_bot is function cfunc (constant k : integer) return integer is constant cnum : integer := cfunc(num); begin library ieee; entity comp7 is architecture rtl of comp7 is
begin
end architecture; |
How about now? |
Better, but still not entirely working. Sorry: library ieee; entity comp8_bot is architecture rtl of comp8_bot is function cfunc (constant k : integer) return integer is function my_cfunc (constant k: integer) return integer is constant cnum : integer := my_cfunc(num); begin library ieee; entity comp8 is architecture rtl of comp8 is
begin
end architecture; |
Improved this some more in the above commit |
Thanks, good work. #19 is fine with the latest commit. I am getting now: array signals with more than one dimension are not supported yet. I am optimistic, that you are going to implement this feature in the near future? |
Yup it's on the TODO list |
I've added some support for multidimensional arrays now. Not sure if it'll work well enough for your code but I added a simple test case in commit 1524c98 which runs now. |
Thanks. Now with the new commit I am getting assertion "false" failed file "../../src/group.c", line 291. Maybe you could expand the error message there to determine the causing source code? |
Added location information in commit aa9ba32. I suspect it's something like foo(a)(x to y) which should be simple to support. Can you open a separate bug report for this? Thanks. |
My latest error was due a bad written testbench, so therefor no further action is necessary. Now I reach the |
Increased it to 512. Commit 3e8152 |
Thanks, now new assertion "!cgen_const_bounds(arg_types[1]" failed file cgen.c line 2277 function: cgen_fcall. |
I'm not actually sure why that assertion is there. I've removed it in commit 92bd8af |
No success, now I am getting an endless loop of "Broken module found, verification continues.", mixed with |
Bit of a guess but can you see if commit c882480 helps? |
With the latest commit a small change: now mixed message is %MASTER498 = alloca i32 |
Can you include a bit more of the output? There should be an error message before or after that line |
With the latest commits I am getting new errors in the analysis stage: type of aggregate is ambigous |
Should be fixed now |
Is fixed, so now previous error: The first error message is |
Can you include a bit more of the error message? It also might be helpful to include the relevant bit of generated LLVM IR which you can get with:
|
Have you got a function that looks something like this? function owns_master_slave(a, b, c, d : std_logic) return boolean; Maybe try narrowing it down to the places that call that. |
Good hint. This last error was caused by functions with the same name in different processes, something like this: |
Is there a variable called "master" in a process or function somewhere? |
The function name collision should be fixed now BTW |
Thanks a lot for fixing the last issue. Now a very ugly one:
library ieee;
use ieee.std_logic_1164.all;
entity comp6_bot is
generic (num : integer := 2 );
port (
x : in std_logic_vector(7 downto 0);
y : out std_logic_vector(7 downto 0) );
end entity;
architecture rtl of comp6_bot is
function cfunc (constant val : integer) return integer is
variable tmp : integer;
begin tmp := 0;
for i in 0 to 3 loop
tmp := tmp + val;
end loop;
return tmp;
end function cfunc;
constant cnum : integer := cfunc(num);
type m_a_t is array (cnum-1 downto 0) of std_logic_vector(num-1 downto 0);
signal ma : m_a_t;
begin
y <= x;
end architecture;
library ieee;
use ieee.std_logic_1164.all;
entity comp6 is
end entity;
architecture rtl of comp6 is
signal b: std_logic_vector(7 downto 0);
begin
end architecture;
The text was updated successfully, but these errors were encountered: