Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Add vcs backend support #58

Closed
wants to merge 7 commits into from
Closed

Add vcs backend support #58

wants to merge 7 commits into from

Conversation

chick
Copy link
Contributor

@chick chick commented Aug 21, 2019

  • Create new VcsBackendAnnotation
  • Create support utilities for Vcs building tools
    • CopyVpiFiles move vpi and header files into place
    • GenVcsVerilogHarness Compile stuff
    • VcsAnnotations control behavior of the Vcs backend
  • Create VcsBackend, a trivial sub-classing of VerilatorBackend
  • Create VcsExecutive
    • constructs VcsBackEnd requirements calls the constructor
  • Create SimpleVcsTests
  • Added String to Uniquify Verilator and Vcs Tests
  • Test are ignored if VCS not present

- Create new VcsBackendAnnotation
- Create support utilities for Vcs building tools
  - CopyVpiFiles move vpi and header files into place
  - GenVcsVerilogHarness  Compile stuff
  - VcsAnnotations control behavior of the Vcs backend
- Create VcsBackend, a trivial sub-classing of VerilatorBackend
- Create VcsExecutive
  - constructs VcsBackEnd requirements calls the constructor
- Create SimpleVcsTests
- Added String to Uniquify Verilator and Vcs Tests
@chick chick added enhancement New feature or request DO NOT MERGE labels Aug 21, 2019
@chick chick requested a review from ducky64 August 21, 2019 21:05
@chick chick self-assigned this Aug 21, 2019
@chick
Copy link
Contributor Author

chick commented Aug 21, 2019

I am trying to find a setup where I can test this, will keep DO NOT MERGE label until then
But code should be reviewable now

@ducky64 ducky64 added this to the 0.1 Basic usability milestone Sep 16, 2019
Copy link
Member

@ducky64 ducky64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor comments, looks fine otherwise. I mainly looked at the test code, we could probably significantly clean up the main implementation some other day.

Files.createFile(vpiTabFilePath)
} catch {
case _: FileAlreadyExistsException =>
System.out.format("")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wat

@@ -8,7 +8,7 @@ import chisel3.tester.internal.VerilatorBackendAnnotation
import org.scalatest._

class VerilatorBasicTests extends FlatSpec with ChiselScalatestTester with Matchers {
behavior of "Testers2"
behavior of "Testers2_Verilator"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe cleaner as "Testers2 with Verilator"? I don't think you need an underscore in quotes?

import org.scalatest._

class VcsBasicTests extends FlatSpec with ChiselScalatestTester with Matchers {
behavior of "Testers2_Vcs"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, "testesr2 with vcs"?

}
}

it should "fail on poking outputs" in {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more like a testers2 infrastructure exception, not sure if it belongs in a VCS test?

}
}

it should "fail with user-defined message" in {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, is this VCS-specific? I don't think so, or at least the control paths are redundant with the fail-on-expect simple case?

- Fixed CopyVpiFiles
  - looks like this might fail if early file was there but a late one wasn't
  - this code came from chisel-testers
- Fix top level test names
  - behavior of "Testers2 with Vcs"
  - behavior of "Testers2 with Verilator"
- Shortened VCS to just see if a simple circuit will build and simulate.
  - in long run we still need mechanism to run an arbitrary test with arbitrary backend
@sequencer
Copy link
Collaborator

Hello @chick. what’s the currently progress on vcs porting to tester2.
I’m writing a new unittest framework for rocketchip with tester2 as backend.
I think it would be really great to see it on mainstream.

- Create new VcsBackendAnnotation
- Create support utilities for Vcs building tools
  - CopyVpiFiles move vpi and header files into place
  - GenVcsVerilogHarness  Compile stuff
  - VcsAnnotations control behavior of the Vcs backend
- Create VcsBackend, a trivial sub-classing of VerilatorBackend
- Create VcsExecutive
  - constructs VcsBackEnd requirements calls the constructor
- Create SimpleVcsTests
- Added String to Uniquify Verilator and Vcs Tests
- Suppress VCS tests if VCS not present in path
  - Updates to PR #58
  - Fixed CopyVpiFiles
    - looks like this might fail if early file was there but a late one wasn't
    - this code came from chisel-testers
  - Fix top level test names
    - behavior of "Testers2 with Vcs"
    - behavior of "Testers2 with Verilator"
  - Shortened VCS to just see if a simple circuit will build and simulate.
    - in long run we still need mechanism to run an arbitrary test with arbitrary backend
…d-vcs-backend-support

# Conflicts:
#	src/main/scala/chiseltest/internal/Testers2.scala
@CLAassistant
Copy link

CLA assistant check
All committers have signed the CLA.

chick added a commit that referenced this pull request Mar 24, 2020
- Create new VcsBackendAnnotation
- Create support utilities for Vcs building tools
  - CopyVpiFiles move vpi and header files into place
  - GenVcsVerilogHarness  Compile stuff
  - VcsAnnotations control behavior of the Vcs backend
- Create VcsBackend, a trivial sub-classing of VerilatorBackend
- Create VcsExecutive
  - constructs VcsBackEnd requirements calls the constructor
- Create SimpleVcsTests
- Added String to Uniquify Verilator and Vcs Tests
- Suppress VCS tests if VCS not present in path
  - Updates to PR #58
  - Fixed CopyVpiFiles
    - looks like this might fail if early file was there but a late one wasn't
    - this code came from chisel-testers
  - Fix top level test names
    - behavior of "Testers2 with Vcs"
    - behavior of "Testers2 with Verilator"
  - Shortened VCS to just see if a simple circuit will build and simulate.
    - in long run we still need mechanism to run an arbitrary test with arbitrary backend
- Create new VcsBackendAnnotation
- Create support utilities for Vcs building tools
  - CopyVpiFiles move vpi and header files into place
  - GenVcsVerilogHarness  Compile stuff
  - VcsAnnotations control behavior of the Vcs backend
- Create VcsBackend, a trivial sub-classing of VerilatorBackend
- Create VcsExecutive
  - constructs VcsBackEnd requirements calls the constructor
- Create SimpleVcsTests
- Added String to Uniquify Verilator and Vcs Tests
- Fixed CopyVpiFiles
  - looks like this might fail if early file was there but a late one wasn't
  - this code came from chisel-testers
- Fix top level test names
  - behavior of "Testers2 with Vcs"
  - behavior of "Testers2 with Verilator"
- Shortened VCS to just see if a simple circuit will build and simulate.
  - in long run we still need mechanism to run an arbitrary test with arbitrary backend

merged latest version of master then did lots and lots of cleanup
@chick
Copy link
Contributor Author

chick commented Mar 24, 2020

This should not be merged
It is superseded by PR #143

@chick chick closed this Mar 24, 2020
chick added a commit that referenced this pull request Mar 27, 2020
- Create new VcsBackendAnnotation
- Create support utilities for Vcs building tools
  - CopyVpiFiles move vpi and header files into place
  - GenVcsVerilogHarness  Compile stuff
  - VcsAnnotations control behavior of the Vcs backend
- Create VcsBackend, a trivial sub-classing of VerilatorBackend
- Create VcsExecutive
  - constructs VcsBackEnd requirements calls the constructor
- Create SimpleVcsTests
- Added String to Uniquify Verilator and Vcs Tests
- Suppress VCS tests if VCS not present in path
  - Updates to PR #58
  - Fixed CopyVpiFiles
    - looks like this might fail if early file was there but a late one wasn't
    - this code came from chisel-testers
  - Fix top level test names
    - behavior of "Testers2 with Vcs"
    - behavior of "Testers2 with Verilator"
  - Shortened VCS to just see if a simple circuit will build and simulate.
    - in long run we still need mechanism to run an arbitrary test with arbitrary backend
- Create new VcsBackendAnnotation
- Create support utilities for Vcs building tools
  - CopyVpiFiles move vpi and header files into place
  - GenVcsVerilogHarness  Compile stuff
  - VcsAnnotations control behavior of the Vcs backend
- Create VcsBackend, a trivial sub-classing of VerilatorBackend
- Create VcsExecutive
  - constructs VcsBackEnd requirements calls the constructor
- Create SimpleVcsTests
- Added String to Uniquify Verilator and Vcs Tests
- Fixed CopyVpiFiles
  - looks like this might fail if early file was there but a late one wasn't
  - this code came from chisel-testers
- Fix top level test names
  - behavior of "Testers2 with Vcs"
  - behavior of "Testers2 with Verilator"
- Shortened VCS to just see if a simple circuit will build and simulate.
  - in long run we still need mechanism to run an arbitrary test with arbitrary backend

merged latest version of master then did lots and lots of cleanup
@ekiwi ekiwi deleted the add-vcs-backend-support branch December 17, 2021 21:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants