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

Fix packed structs in DPI-C #1190

Closed
veripoolbot opened this issue Aug 8, 2017 · 3 comments
Closed

Fix packed structs in DPI-C #1190

veripoolbot opened this issue Aug 8, 2017 · 3 comments
Assignees
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Rob Stoddard
Original Redmine Issue: 1190 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


How do I make this a feature request?

In this bug, structs were added as a packed array of logic:
https://www.veripool.org/issues/181-Verilator-Support-struct-and-union

however, when I try to pass a structure to a DPI-C function I get this error:

%Error: /path/to/my/file.sv:23: Unsupported: DPI argument of type BASICDTYPE 'logic'
%Error: /path/to/my/file.sv:23: ... For best portability, use bit, byte, int, or longint

Even though my structure is defined as such:

typedef struct {
int ip_nrst;
int ei_fs_clk;
int ei_dsp_clk;
int m_drate;
int m_dcoef;
int i_voice;
int i_voice_stb;
int eo_dfs_clk;
int o_band;
int o_band_stb;
} iostruct;

I'll look into this and see what can be done, however, I know little about the internals of Verilator, so I'm probably not the person to try to fix this.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-08-11T23:07:55Z


I thought other simulators didn't support packed structs, but they seem to. Fixed in git towards 3.907.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-08-11T23:09:03Z


BTW unpacked structs is a much larger issue, so if you want to work on that please put it under a different issue.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-08-29T02:53:54Z


In 3.908.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants