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

system verilog system functions in quartus integrated Synthesis

Altera_Forum
Honored Contributor II
2,574 Views

Is there ability to use sv system function such as $ceil, $pow etc to caluculate module parameters (localparmeters)?  

For example something like that parameter integer N_COEFF_ACCUM =($ceil(( SUMM1 + SUMM2 - SUMM3) * CLK_FREQUENCY)); 

SUMM1, SUMM2, SUMM3 are real parameter
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
1,381 Views

hey Radamaher, 

 

Doesn't look like it's gonna work. 

http://quartushelp.altera.com/14.0/mergedprojects/hdl/vlog/vlog_list_support.htm 

http://quartushelp.altera.com/current/master.htm#mergedprojects/hdl/vlog/vlog_support_2001.htm 

http://quartushelp.altera.com/15.0/mergedprojects/hdl/vlog/vlog_list_sys_vlog.htm 

 

doesn't show that those maths functions / conversion functions are supported in Quartus. 

 

sad but true... 

but just my opinion based on what the docs say...
0 Kudos
Altera_Forum
Honored Contributor II
1,381 Views

Quartus really does not support the system function based on my previous experience. I did few simple mathematic tricks in my coding to get the ceil function but not applicable to your case. So, you can try and verify the suggestion below as workaround.  

 

1) Put result ( SUMM1 + SUMM2 - SUMM3) * CLK_FREQUENCY) into real parameter => parameter real real_result = (( SUMM1 + SUMM2 - SUMM3) * CLK_FREQUENCY)); 

2) Put result ( SUMM1 + SUMM2 - SUMM3) * CLK_FREQUENCY) into integer parameter => parameter integer int_result = (( SUMM1 + SUMM2 - SUMM3) * CLK_FREQUENCY)); 

3) Check whether "real_result" variable larger than "int_result" variable  

4) If steps is true , then add 1 value into the "int_result" variable
0 Kudos
Reply