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

Quartus reports:can't pass value from actual to argument xxx.

Altera_Forum
Honored Contributor II
1,005 Views

Consider the following code: 

interface test_if# ( parameter BITW = 16 ); logic sigs; endinterface package test_pkg; function automatic int test_calc(int bitw); return bitw + 1; endfunction endpackage module test_mod# ( parameter BITW = 8 ) ( input bit clk, input wire rst); test_if# (.BITW(BITW)) tifi(); localparam int bitw_ofcalc = test_pkg::test_calc($size(tifi.sigs,1)); // on this line Quartus reports error message: can't pass value from actual to argument bitw initial $warning("DEBUG: bitw_ofcalc = %0d", bitw_ofcalc);  

 

When synthesizing, quartus's integrated synthesizer report an error message just like the comments in code. 

I don't know what's wrong in code, could any one help me? Thanks very much!
0 Kudos
0 Replies
Reply