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 wide (>32 bit) task arguments #359

Closed
veripoolbot opened this issue Jun 21, 2011 · 8 comments
Closed

DPI problem with wide (>32 bit) task arguments #359

veripoolbot opened this issue Jun 21, 2011 · 8 comments
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Chandan Egbert
Original Redmine Issue: 359 from https://www.veripool.org
Original Date: 2011-06-21
Original Assignee: Wilson Snyder (@wsnyder)


When a task whose argument is wider than 32 bits is exported as a DPI call, calling the task from C appears to do nothing. The generated C code does not seem to assign the passed arguments to the internal variable. Run the attached example with "sh doit.sh" to see the problem.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-06-21T15:38:40Z


There are several DPI fixes in the git version, is this against that or the release?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Chandan Egbert
Original Date: 2011-06-21T16:46:33Z


It is against the very latest I pulled from git last night.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-06-21T19:00:24Z


Hints on debugging:

You can see the internals.txt file in the distribution directory.

Modify test_regress/t_dpi_export.v to show the problem.

Then run test_regress/t/t_dpi_export.pl --debug.
and/or --debugi-V3Task 9

You'll see the test_regress/obj_dir/t_dpi_export/.tree files and probably see the relevant additions of DPI wrapper code occurs in the _task.tree step. So, the code is probably
broken in V3Task.cpp.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-06-22T00:45:48Z


I noted the t_dpi_export.v test already had a 96 bit task, and checks that the value gets passed. You might want to compare that with your failing case to see what's different.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Chandan Egbert
Original Date: 2011-06-22T18:28:36Z


Actually, t_dpi_export.v has a 95 bit task (input bit [94:0] i ...). If I change it to 96 bits or 128 bits, I see the problem. It seems like there is an issue with integer multiples of 32 bits.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-06-22T18:32:40Z


Ahh, a big hint. Do you want to stab more at repairing this?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Chandan Egbert
Original Date: 2011-06-22T19:25:35Z


I spent a few hours trying to nail down the cause of the problem, but no luck. I will look at it more on the weekend and if I need help, I'll yell.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-06-29T00:47:32Z


Had a few minutes to took a look, it's an emitter problem. Fixed in git.

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

2 participants