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

Testers2+interprocesstester #798

Closed
wants to merge 172 commits into from
Closed

Conversation

ucbjrl
Copy link
Contributor

@ucbjrl ucbjrl commented Mar 9, 2018

Type of change: other enhancement

Impact: API addition (no impact on existing code)

Development Phase: implementation

Add verilator/VCS (untested) backends.
Use TesterOptions to choose tester backend.
Run BasicTest on firrtl and verilator backends.
I've integrated the resource and backend code from chisel-testers preserving their commit history.
We can eliminate this if desired.

dt27182 and others added 30 commits May 1, 2016 18:36
consider multiple instances of the same module
do not dump ir files
Added GCDSpec which does GCD but uses peek poke tester
Changed router to not be ignored, it works for me
Fixed style errors in string interpolation
but generate different test-benches for gate-level simulation
Use TesterOptionsManager.
Use backendName to choose tester backend.
Rename VCS/Verilator tester backends.
Provide basic commend editing support.
…interprocesstester

Copy resources from chisel-testers.
Cache unadulterated signal names (don't add dut.name).
This will not work if we try to access signals for nested modules, but I don't think the current code supports that anyway. Add whatever prefix is required for the specific backend when we interrogate it for the actual signal.
Fix getDataNames() so it doesn't automatically add the top level name for an aggregate since these don't exist in some simulation environments (i.e., we need to synthesize them from their actual components).
Set the targetDirName something other than "."
Add scoping to resource names.
Support firrtl and verilator backends for BasicTest.scala.
@ucbjrl ucbjrl requested a review from ducky64 March 9, 2018 21:00
@ducky64
Copy link
Contributor

ducky64 commented Mar 9, 2018

Um, I don't think now is the right time to add 2k LoC to new testers.
Yes, we do need Verilator / VCS / etc support sometime. But it should be done right. Definitely not before the new testers API and core abstractions have stabilized. And not with a 2k LoC code dump.

kevintownsend and others added 18 commits March 9, 2018 13:33
PiperOrigin-RevId: 187258707
Add JNITestAPI.java interface and cpp implementation.
We need to use System.load() to load the compiled (but fixed) cpp code,
but use dlopen/dlsym/dlclose in the fixed cpp code to load the shared library since Java doesn't provide an explicit unload (dlclose) mechanism.
Tease apart the pieces im sim_api.h so we can use them from both separate process ans shared library verilator implementations.
Remove unused imports.
Modify the generated verilator <Module>.mk to add rules to build shared library version of the simulator.
Use multiline string literal to compose the harness code.
Much cleanup and testing required.
TODO:
 - we hang un failed expects with some possibly JNI related semaphore.
 - break up finish/abort/unload so they're composable.
Eliminate hang on failure.
Clear errors before test start and report them at test end.
Revert to more of original design (reduce exception interception), but intercept at a higher level.
Remove waiting.acquire() in run() method in exception processing so we get to call threadFinished() and scheduler() after the thread's demise.
Synchronize access to allThreads.
Move thread manipulation code into ThreadedBackend - killAllTesterThreads().
If autoclonetype is unable to determine an outer class, this attempts to insert a null (and give a deprecation warning), preserving old behavior (in some cases) where the new behavior doesn't work.

This doesn't provide full compatibility with old autoclonetype: this does not attempt null insertion in the general first argument (if it's not an outer class reference). Reasoning is that inserting a null for an explicit argument is probably not the right thing to do, and will likely cause a difficult-to-debug NullPointerException (whereas that would be unlikely for an outer class, which is not always referenced in Bundle subclass code).
# Conflicts:
#	build.sbt
#	src/main/scala/chisel3/tester/FirrterpreterBackend.scala
#	src/main/scala/chisel3/tester/Testers2.scala
#	src/main/scala/chisel3/tester/ThreadedBackend.scala
@edwardcwang
Copy link
Contributor

Moving discussion to ucb-bar/chiseltest#28

@edwardcwang edwardcwang deleted the testers2+interprocesstester branch March 15, 2019 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet