- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have errors that I want the compiler to check for inside a funciton, but Quartus just seems to jump over them. As an example if I create the following function:
function test_error(test : boolean) return boolean is
begin
assert false report "Error Message" severity error;
return not test;
endfunction;
and use the function inside a vhdl file that is sythesized in a Quartus project:
architecture arch of ent is
constant test_bool : boolean := test_error(false);
being
...
The function works (test_bool is set to true) but no error are reported in Quartus. Anybody have any suggestions?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try setting the severity level to Failure. Its worked for me in the past when Ive checked generic values for illegal combinations. Ive done it from asserts directly in the architecture (they dont need to be inside a function) and inside function calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply Tricky.
No luck with setting the severity to Failure. I'm not having any issues with using assert within an architecture, it just seems to be within functions that's not working. As a work around I'm thinking I could switch the function to a procedure that also outputs a string and then put an assert statement in the architecture that assert the error if the string is not empty, but I'd prefer to not have to do something like that (seems very hacky). I'm using Quartus 10.1, so I'm going to try updating to the latest version and see if it helps any.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a procedure wont work because it has to be called within a process, and Quartus wont evaluate a process like that.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page