- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Link Copied
0 Replies
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