Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPI problem with > 32 bit but <= 64 bit args #423

Closed
veripoolbot opened this issue Nov 29, 2011 · 2 comments
Closed

DPI problem with > 32 bit but <= 64 bit args #423

veripoolbot opened this issue Nov 29, 2011 · 2 comments
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Chandan Egbert
Original Redmine Issue: 423 from https://www.veripool.org
Original Date: 2011-11-29
Original Assignee: Chandan Egbert


Verilator 3.830 generates code that causes a C++ syntax error. The following verilog code

module sub(value);
     parameter WIDTH = 40;

     output [WIDTH-1:0] value;

     reg [WIDTH-1:0] value;

     task set_value(input bit [WIDTH-1:0] v);
         value = v;
     endtask

     export "DPI-C" task set_value;
endmodule

fails with the following gcc error:

Vt_dpi_qw.cpp: In static member function 'static void Vt_dpi_qw::set_value(const svBitVecVal*)':
Vt_dpi_qw.cpp:100: error: invalid type argument of 'unary *'
Vt_dpi_qw.cpp:100: error: invalid type argument of 'unary *'

A test case (in the style of test_regress) and a patch to src/V3Task.cpp are attached.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-11-29T02:16:09Z


So wonderful to get patches and tests!

Applied in git towards 3.831.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-01-20T12:10:57Z


In 3.831.

@veripoolbot veripoolbot added the resolution: fixed Closed; fixed label Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant