Skip to content

Commit

Permalink
Make initialization to null
Browse files Browse the repository at this point in the history
  • Loading branch information
quekyj committed Dec 1, 2022
1 parent 71b050f commit 0d756e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/utilities/simcompare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ abstract class SimCompare {
static bool iverilogVector(
Module module,
List<Vector> vectors, {
String moduleName = '',
String? moduleName,
bool dontDeleteTmpFiles = false,
bool dumpWaves = false,
List<String> iverilogExtraArgs = const [],
Expand All @@ -161,11 +161,11 @@ abstract class SimCompare {
}
}

final topModule = moduleName == '' ? module.definitionName : moduleName;
final allSignals = vectors
.map((e) => [...e.inputValues.keys, ...e.expectedOutputValues.keys])
.reduce((a, b) => [...a, ...b])
.toSet();
final topModule = moduleName ?? module.definitionName;
final allSignals = <String>{
for (final e in vectors) ...e.inputValues.keys,
for (final e in vectors) ...e.expectedOutputValues.keys,
};
final localDeclarations =
allSignals.map((e) => 'logic ${signalDeclaration(e)};').join('\n');
final moduleConnections = allSignals.map((e) => '.$e($e)').join(', ');
Expand Down

0 comments on commit 0d756e3

Please sign in to comment.