-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat(query): support query for difftest-dpic data #557
base: master
Are you sure you want to change the base?
Conversation
It also works in Palladium with some viarable set as follows: And in Palladium, after we enable query feature, simulation speed will decrease from 450KHz to 280 KHz (20s -> 30s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
what is this query for? what's the relationship between DPIC and query?
-
should we always generate the query headers?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know much on the functionality of the query but the implementation can be improved.
Functions should be defined in src
and they will read the predefiend data structures generated by Scala. This is a better way to coordinate between different tools -- they follow some predefined interfaces, especially the C++ structs/classes.
Also, the query C++ functions look similar to ChiselDB. Should we provide some standard DB APIs in DiffTest?
These suggestions are only for future improvements. I don't mind this PR being merged first to help XS development.
| snprintf (query_path, 128, "%s/build/%s", getenv("NOOP_HOME"), "difftest_query.db"); | ||
| // remove exist file | ||
| FILE* fp = fopen(query_path, "r"); | ||
| if (fp) { fclose(fp); remove(query_path);} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these common C++ code should be put in src/test/csrc
instead of the Scala code. If we can define the clear data structures for the query, then only the data structures should be generated by Scala. Similar to how DiffState is generated and used, and how the coverage metrics are defined.
Also, when put in src
, these C++ code can be formatted. The current form in Scala does not look good.
No description provided.