Issue #359
DPI problem with wide (>32 bit) task arguments
| Status: | Closed | Start date: | 06/21/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% |
|
| Category: | TranslationError | |||
| Target version: | - |
Description
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.
History
Updated by Wilson Snyder 11 months ago
- Status changed from New to Assigned
- Assignee set to Wilson Snyder
There are several DPI fixes in the git version, is this against that or the release?
Updated by Chandan Egbert 11 months ago
It is against the very latest I pulled from git last night.
Updated by Wilson Snyder 11 months ago
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.
Updated by Wilson Snyder 11 months ago
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.
Updated by Chandan Egbert 11 months ago
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.
Updated by Wilson Snyder 11 months ago
Ahh, a big hint. Do you want to stab more at repairing this?
Updated by Chandan Egbert 11 months ago
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.
Updated by Wilson Snyder 11 months ago
- Status changed from Assigned to Closed
Had a few minutes to took a look, it's an emitter problem. Fixed in git.
Also available in: Atom
![[logo]](/img/veripool_small.png)