Skip to content

Commit

Permalink
remove the word map
Browse files Browse the repository at this point in the history
  • Loading branch information
quekyj committed Dec 6, 2023
1 parent 3f488ff commit fda46df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/binary_gray.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class BinaryToGrayConverter extends Module {
///
/// The [GrayToBinaryConverter] class represents a module that takes a Gray
/// code value as input and produces the equivalent binary representation as
/// output. It internally uses the [grayToBinaryMap] function for the
/// output. It internally uses the [grayToBinary] function for the
/// conversion
class GrayToBinaryConverter extends Module {
/// The binary representation output of the converter.
Expand Down Expand Up @@ -109,7 +109,7 @@ class GrayToBinaryConverter extends Module {
for (var i = 0; i < (1 << inputWidth); i++)
CaseItem(Const(i, width: inputWidth), [
binaryVal <
Const(grayToBinaryMap(LogicValue.ofInt(i, inputWidth)),
Const(grayToBinary(LogicValue.ofInt(i, inputWidth)),
width: inputWidth),
]),
],
Expand All @@ -127,7 +127,7 @@ class GrayToBinaryConverter extends Module {
/// on XOR operation with the previous binary bit.
///
/// Return [LogicValue] representing the binary representation.
static LogicValue grayToBinaryMap(LogicValue gray) {
static LogicValue grayToBinary(LogicValue gray) {
final reverseGray = gray.reversed;
final grayList = reverseGray.toList();
var previousBit = LogicValue.zero;
Expand Down

0 comments on commit fda46df

Please sign in to comment.