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

Fixes: 157 #203

Merged
merged 29 commits into from
Nov 22, 2022
Merged

Fixes: 157 #203

merged 29 commits into from
Nov 22, 2022

Conversation

akshay-wankhede
Copy link
Contributor

Description & Motivation

At present, signExtend uses Mux which generates a SystemVerilog which is not as elegant as the replication operator. This fix removes the use of Mux and introduces another component that generates a replication operator in the output SystemVerilog. Also, when the input signal has a width of 1, the output does not need to be swizzled.

Related Issue(s)

Fixes: 157

Testing

In addition to the existing signExtend tests, added:

  • test invalid bit replication
  • test single bit replication (when the bit value is 1)
  • test single bit replication (when the bit value is 0)

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No, this is not a breaking change.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No.

Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

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

Looks great!!

Just a couple little nits, but other than that this is really nice!

lib/src/modules/gates.dart Outdated Show resolved Hide resolved
lib/src/modules/gates.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

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

Looks great!

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.

Make signExtend generate prettier SystemVerilog
2 participants