Skip to content

Commit

Permalink
date and naming fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
desmonddak committed Jan 31, 2025
1 parent f637956 commit 22557be
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/src/arbiters/arbiter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// arbiter.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/arbiters/mask_round_robin_arbiter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// mask_round_robin_arbiter.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/arbiters/priority_arbiter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// priority_arbiter.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/arbiters/rotate_round_robin_arbiter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// rotate_round_robin_arbiter.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/arbiters/stateful_arbiter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// stateful_arbiter.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/arithmetic/divider.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2024 Intel Corporation
// Copyright (C) 2024-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// divider.dart
Expand Down
2 changes: 0 additions & 2 deletions lib/src/arithmetic/float_to_fixed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import 'package:rohd/rohd.dart';
import 'package:rohd_hcl/rohd_hcl.dart';

// TODO(desmonddak): Should FloatToFixed be abstract?

/// [FloatToFixed] converts a floating point input to a signed
/// fixed-point output following Q notation (Qm.n format) as introduced by
/// (Texas Instruments)[https://www.ti.com/lit/ug/spru565b/spru565b.pdf].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class FloatingPointMultiplierSimple extends FloatingPointMultiplier {
super.name})
: super(
definitionName: 'FloatingPointMultiplierSimple_'
'E${a.exponent.width}M${a.mantissa.width}') {
'E${a.exponent.width}M${a.mantissa.width}'
'${outProduct != null ? '_OE${outProduct.exponent.width}_'
'OM${outProduct.mantissa.width}' : ''}') {
if (exponentWidth < a.exponent.width) {
throw RohdHclException('product exponent width must be >= '
' input exponent width');
Expand Down
2 changes: 1 addition & 1 deletion lib/src/arithmetic/ripple_carry_adder.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// ripple_carry_adder.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/binary_gray.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// binary_gray.dart
Expand Down
4 changes: 2 additions & 2 deletions lib/src/edge_detector.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2024 Intel Corporation
// Copyright (C) 2024-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// edge_detector.dart
Expand Down Expand Up @@ -40,7 +40,7 @@ class EdgeDetector extends Module {
String? name,
}) : super(
name: name ?? '${edgeType.name}_edge_detector',
definitionName: 'EdgeDetector_W${signal.width}') {
definitionName: 'EdgeDetector_T${edgeType.name}') {
if (signal.width != 1 ||
(resetValue is Logic && resetValue.width != 1) ||
(resetValue is LogicValue && resetValue.width != 1)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/encodings/one_hot_to_binary.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// one_hot_to_binary.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/memory/memory.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// memory.dart
Expand Down
6 changes: 4 additions & 2 deletions lib/src/rotate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ abstract class _Rotate extends Module {
{int? maxAmount, super.name = 'rotate'})
: maxAmount = min(maxAmount ?? original.width,
pow(2, rotateAmount.width).toInt() - 1),
super(definitionName: '_Rotate_${_direction}_W${original.width}') {
super(definitionName: 'Rotate_${_direction.name}_W${original.width}') {
original = addInput('original', original, width: original.width);
rotateAmount =
addInput('rotate_amount', rotateAmount, width: rotateAmount.width);
Expand Down Expand Up @@ -108,7 +108,9 @@ class _RotateFixed extends Module {
/// Rotates [original] by [rotateAmount] to the [_direction].
_RotateFixed(this._direction, Logic original, this.rotateAmount,
{super.name = 'rotate_fixed'})
: super(definitionName: 'rotate_${_direction.name}_by_$rotateAmount') {
: super(
definitionName: 'RotateFixed_${_direction.name}_'
'by_$rotateAmount') {
original = addInput('original', original, width: original.width);
addOutput('rotated', width: original.width);

Expand Down
2 changes: 1 addition & 1 deletion lib/src/serialization/deserializer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2025 Intel Corporation
// Copyright (C) 2024-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// deserializer.dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/serialization/serializer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2025 Intel Corporation
// Copyright (C) 2024-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// serializer.dart
Expand Down
3 changes: 2 additions & 1 deletion lib/src/shift_register.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class ShiftRegister extends Module {
}) : width = dataIn.width,
super(
name: '${dataName}_shift_register',
definitionName: 'ShiftRegister_W${dataIn.width}') {
definitionName: 'ShiftRegister_W${dataIn.width}'
'_D$depth') {
dataIn = addInput('${dataName}_in', dataIn, width: width);
clk = addInput('clk', clk);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//

import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'package:rohd/rohd.dart';
import 'package:rohd_hcl/rohd_hcl.dart';
Expand Down Expand Up @@ -295,6 +296,7 @@ void main() {
final multiply =
FloatingPointMultiplierSimple(fp1, fp2, outProduct: fpout);
await multiply.build();
File('widem.sv').writeAsStringSync(multiply.generateSynth());
final computed = multiply.product.floatingPointValue;

expect(computed, equals(expected), reason: '''
Expand Down
2 changes: 1 addition & 1 deletion test/configurator_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// configurator_test.dart
Expand Down

0 comments on commit 22557be

Please sign in to comment.