DPI problem with vector task arguments
|Assignee:||Wilson Snyder||% Done:||
Verilator version: Verilator 3.812 2011/04/06 rev verilator_3_811-18-ga20b4f2
When a task with vector input arguments is exported as a DPI call, gcc fails with the complaint
error: invalid operands of types 'int' and 'const svBitVecVal*' to binary 'operator&'
when compiling V<base>__ALLcls.cpp. The problem is that the argument is passed by reference, but not dereferenced before assignment. Run the example with "sh doit.sh" to see the problem.
Updated by Chandan Egbert about 2 years ago
Attached is the example and a patch that fixes the problem
Updated by Wilson Snyder about 2 years ago
- Status changed from New to Resolved
- Assignee set to Wilson Snyder
Your patch was close; it only needed to be done on bit vector types not non-vector types.
Fixed in git for 3.813.
Also available in: Atom