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

232 add a mechanism for generating random logic values #362

Conversation

quekyj
Copy link
Contributor

@quekyj quekyj commented May 15, 2023

Description & Motivation

LogicValue is a useful type since it supports arbitrary width in an efficient representation. For testing purposes, it might be desirable to generate a random value on a bus of arbitrary width. The built-in Dart randomization only randomizes up to 2^32, which means users have to invent their own little code snippets to generate random numbers bigger than 32 bits.

Related Issue(s)

Fix #232

Testing

Add unit test to test random generation of the LogicValue.

Backwards-compatibility

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

No

Documentation

Included in the public documentation.

@quekyj quekyj marked this pull request as draft May 16, 2023 05:32
quekyj and others added 2 commits May 16, 2023 13:33
lib/src/values/values.dart Outdated Show resolved Hide resolved
lib/src/values/values.dart Outdated Show resolved Hide resolved
lib/src/values/values.dart Outdated Show resolved Hide resolved
lib/src/values/values.dart Outdated Show resolved Hide resolved
lib/src/values/values.dart Outdated Show resolved Hide resolved
test/logic_value_test.dart Outdated Show resolved Hide resolved
test/logic_value_test.dart Show resolved Hide resolved
test/logic_value_test.dart Show resolved Hide resolved
test/logic_value_test.dart Show resolved Hide resolved
test/logic_value_test.dart Outdated Show resolved Hide resolved
@quekyj quekyj marked this pull request as ready for review May 19, 2023 06:32
@quekyj quekyj requested a review from mkorbel1 May 19, 2023 06:32
lib/src/values/random_logic_value.dart Outdated Show resolved Hide resolved
@quekyj quekyj requested a review from mkorbel1 May 29, 2023 08:44
@quekyj quekyj requested a review from mkorbel1 May 31, 2023 12:40
lib/src/values/random_logic_value.dart Outdated Show resolved Hide resolved
lib/src/values/random_logic_value.dart Show resolved Hide resolved
lib/src/values/random_logic_value.dart Show resolved Hide resolved
test/logic_value_test.dart Outdated Show resolved Hide resolved
lib/src/values/random_logic_value.dart Outdated Show resolved Hide resolved
lib/src/values/random_logic_value.dart Show resolved Hide resolved
lib/src/values/random_logic_value.dart Show resolved Hide resolved
lib/src/values/random_logic_value.dart Outdated Show resolved Hide resolved
lib/src/values/random_logic_value.dart Outdated Show resolved Hide resolved
test/logic_value_test.dart Outdated Show resolved Hide resolved
test/logic_value_test.dart Outdated Show resolved Hide resolved
@quekyj quekyj requested a review from mkorbel1 June 2, 2023 03:58
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! Nice work!

@mkorbel1 mkorbel1 merged commit a5637af into intel:main Jun 7, 2023
@quekyj quekyj deleted the 232-add-a-mechanism-for-generating-random-logic-values branch August 8, 2023 05:12
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.

Add a mechanism for generating random LogicValues
2 participants