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

Add convenience method for zeroing all inputs #31

Merged
merged 3 commits into from
Sep 17, 2018
Merged

Conversation

leonardt
Copy link
Owner

Useful for setting up tests where you want all inputs initialized to
zero.

Useful for setting up tests where you want all inputs initialized to
zero.
@coveralls
Copy link

coveralls commented Sep 16, 2018

Pull Request Test Coverage Report for Build 246

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 80.75%

Files with Coverage Reduction New Missed Lines %
fault/verilator_target.py 1 98.51%
Totals Coverage Status
Change from base Build 226: -0.3%
Covered Lines: 495
Relevant Lines: 613

💛 - Coveralls

Copy link
Collaborator

@rsetaluri rsetaluri left a comment

Choose a reason for hiding this comment

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

Approved mod nits.

fault/tester.py Outdated
def zero_inputs(self):
for name, port in self.circuit.IO.ports.items():
if port.isinput():
self.poke(getattr(self.circuit, name), 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: self.poke(self.circuit.interface.ports[name], 0)

@leonardt leonardt merged commit 6b794ba into master Sep 17, 2018
@leonardt leonardt deleted the zero-inputs branch September 17, 2018 01:31
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.

3 participants