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

vpi_get of vpiSize property broken #680

Closed
veripoolbot opened this issue Sep 27, 2013 · 6 comments
Closed

vpi_get of vpiSize property broken #680

veripoolbot opened this issue Sep 27, 2013 · 6 comments
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Rich Porter
Original Redmine Issue: 680 from https://www.veripool.org
Original Date: 2013-09-27
Original Assignee: Rich Porter


vpi_get(vpiSize, regHandle) always returns zero. The existing test case only checks memories and memory words, not regular reg's.

I'll create a new test case and a patch.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Rich Porter
Original Date: 2013-10-06T19:20:30Z


Fix on branch vpi-vpiSize-680 at https://github.com/rporter/verilator, but test case fails due to #681.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-10-07T02:12:40Z


Big patch!

Some mostly minor stuff:

  1. Why is rangep() renamed to range()? It returns a pointer so normally would have a p suffix.

  2. Some changes to dovpi_scan() seem like just tab-to-space changes, please do a "diff" and see if you can avoid some of these.

  3. test_regress/t/simulator.h is a fine addition, please add the standard copyright and let's put it into a new test_regress/t/include directory. Also I'd suggest it is called something along the lines of TestSimulator.h or similar and the class as "TestSimulator", as classes are usually capitalized. Please also add "const" to the appropriate accessors. Finally what do you expect to use "is_free()" for - seems a bit strange for a test.

  4. I don't understand the changing of $stop to $finish; if there's an error with this change won't it be missed?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Rich Porter
Original Date: 2013-10-08T19:57:32Z


Big patch!

Mostly it's a merge from the vpi-memory branch of commits that didn't make into the previous patch. These were mainly to do with supporting Icarus, that's most of the deltas there.

But I botched conflicts in the merge and ended up changing the rangep back to range because of sloppy checking on my part. Ditto white space. Sorry about that. I've made some changes and a git diff master reports sensible changes. There are a few whitespace changes left but these are replacing spaces with a tab to align with existing.

I've added the header as TestSimulator.h. Accessors const'ed. is_free() was a placeholder; I've removed it.

$stop to $finish was an Icarus thing. It falls back to the command line on $stop, but I have subsequently found a "don't fall back to command line on $stop" switch so have reverted them.

t_vpi_var still doesn't pass on Icarus but a suprising amount works (and agrees with verilator). It's a monster of a test (that I'm partly responsible for) and I've spent far too much time on it. If it was split into sensible chunks ... perhaps later.

t_vpi_get doesn't pass on verilator because of #681. If we close that down I can update this test so it passes.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Rich Porter
Original Date: 2013-10-11T14:00:04Z


I've removed the port checks for verilator in t_vpi_get.

The vpi-vpiSize-680 branch diff looks ok now, but t_select_index2 fails. I didn't run a baseline, but am presuming it was already broken as it fails on the master branch I have (it needs a few extra lines in the .pl file).

There's also a small conflict in t_vpi_var.cpp because of a few lines added in vpi-callback-679 branch.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-10-14T00:07:42Z


Pushed to git towards 3.854.

Thanks for the great work (again!). I took the liberty of making a few minor changes to TestSimulator.h, I made it a static class so all of the instance() calls weren't needed, made accessors for each simulator, made it work for VCS, and also added TestVpi.h.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-11-27T01:15:03Z


In 3.854.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels 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 type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

1 participant