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

Convert BitVector(1) to bool for python simulator m.Bit #25

Merged
merged 2 commits into from
Sep 11, 2018

Conversation

leonardt
Copy link
Owner

This is required for simulating single bit inputs in the python simulator. The issue is that make_value (

def make_value(port, value):
) converts Bit values to BitVector(1). This is fine for the verilator target, which we're mainly using, but the PythonSimulator got updated to only support passing bool for Bit, so we do an unpacking here. Not sure if there's a better solution for this, perhaps this is fine as a temporary workaround until we introduce the Bit type in the bit_vector package.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 175

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 79.228%

Totals Coverage Status
Change from base Build 167: 0.2%
Covered Lines: 431
Relevant Lines: 544

💛 - Coveralls

@leonardt leonardt merged commit 8a6a9c9 into master Sep 11, 2018
@leonardt leonardt deleted the patch-bit-python branch September 11, 2018 22:21
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

3 participants