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

Cases #386

Merged
merged 14 commits into from
Aug 29, 2023
Merged

Cases #386

merged 14 commits into from
Aug 29, 2023

Conversation

mjayasim9
Copy link
Contributor

Description & Motivation

Implemented a shorthand for creating a Conditional and Case. This is for the scenario where it is needed to assign/create a signal based on a condition, similar to a mux. The output is a single Logic signal. The width of the output signal is optional and if not specified, is inferred from the width of the conditions.

Related Issue(s)

Fix #304

Testing

Added 5 new testcases which test the expression and condition match as well as width mismatch exceptions.

Backwards-compatibility

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

No

Documentation

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

Yes, API docs

lib/src/modules/conditional.dart Outdated Show resolved Hide resolved
lib/src/modules/conditional.dart Show resolved Hide resolved
lib/src/modules/conditional.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.

Looking good! few more changes

lib/src/modules/conditional.dart Outdated Show resolved Hide resolved
lib/src/modules/conditional.dart Show resolved Hide resolved
lib/src/modules/conditional.dart Outdated Show resolved Hide resolved
test/gate_test.dart Outdated Show resolved Hide resolved
lib/src/modules/conditional.dart Outdated Show resolved Hide resolved
lib/src/modules/conditional.dart Outdated Show resolved Hide resolved
test/gate_test.dart Outdated Show resolved Hide resolved
test/gate_test.dart Outdated Show resolved Hide resolved
@mkorbel1
Copy link
Contributor

mkorbel1 commented Aug 1, 2023

Your markdown failure is my fault, fixing in #398

test/gate_test.dart Show resolved Hide resolved
test/gate_test.dart Show resolved Hide resolved
test/gate_test.dart 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.

I think this looks good to me, great work!

Just need to get the CI checks passing, looks like a minor lint issue.

@mkorbel1 mkorbel1 merged commit e00e350 into intel:main Aug 29, 2023
2 checks passed
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.

Implement a shorthand for case statements
2 participants