Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17049 Discussions

Can I use priority/unique modifiers on if statement?

Jacobinho86
Beginner
1,138 Views

Hi, hopefully a quick question, I am programming a decoder with a series of if-else statements, and I want to tell the synthesis tool that all clauses should be evaluated in parallel, for that I know that I can add the "unique" modifier to the first if (as stated in section 7.10.1 of this book: https://link.springer.com/book/10.1007/0-387-36495-1), but when I try to run the "analysis & synthesis" process I get back the following error (Quartus Prime Version 23.1 std.0 Build 991 11/28/2023 SC Lite Edition):

 

"10170 Verilog HDL syntax error at codificador_prioridad.sv(8) near text: 'if'; expecting 'case' ..."

 

So, does this mean that the tool does not implement such syntax? Or it is not a supported syntax in Systemverilog (e.g. the book is lying)? Or is that the standard implemented by the tool is not updated?

 

Kind Regards

Labels (1)
0 Kudos
1 Solution
_AK6DN_
Valued Contributor II
1,114 Views

It might help if you show the relevant lines of the .sv file under question.

Otherwise we are just shooting in the dark not knowing exactly what you coded.

 

There is this tho ... https://www.intel.com/content/www/us/en/programmable/quartushelp/17.0/mapIdTopics/jka1465580571884.htm

 

Capture.PNG

 

View solution in original post

0 Kudos
5 Replies
_AK6DN_
Valued Contributor II
1,115 Views

It might help if you show the relevant lines of the .sv file under question.

Otherwise we are just shooting in the dark not knowing exactly what you coded.

 

There is this tho ... https://www.intel.com/content/www/us/en/programmable/quartushelp/17.0/mapIdTopics/jka1465580571884.htm

 

Capture.PNG

 

0 Kudos
Jacobinho86
Beginner
1,018 Views

Thanks! This is exactly what I needed.

 

Regards

0 Kudos
sstrell
Honored Contributor III
1,060 Views

As mentioned, unique is only for case statements since more than one condition can match with a Verilog case statement.  if-else implies a priority encoder so that is not what you want.  You should be using a case statement and if there is the possibility of more than one condition matching the expression you are evaluating, then you can add unique to it.

0 Kudos
RichardTanSY_Intel
1,032 Views

I believe the community have answered your inquiry. Do you have further inquiry in regards to this?

 

Regards,

Richard Tan

 

0 Kudos
RichardTanSY_Intel
1,003 Views

 I'm pleased to know that your question has been addressed. 

 

Now, I will transition this thread to community support. If you have any further questions or concerns, please don't hesitate to reach out.

Thank you and have a great day!

 

Best Regards,

Richard Tan

 

0 Kudos
Reply