Skip to content

Commit

Permalink
Rephrase initialisation check menu and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danilovesky committed Nov 25, 2020
1 parent 66344d3 commit 16adb1a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ci/help/checkHelp.txt.min
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ checkCircuitCycles(work) - check if the Circuit 'work' is free from cyclic paths
checkCircuitDeadlockFreeness(work) - check the Circuit 'work' for deadlock freeness
checkCircuitOutputPersistency(work) - check the Circuit 'work' for output persistency
checkCircuitReachAssertion(work, data) - check the Circuit 'work' for REACH assertion 'data'
checkCircuitReset(work) - check if the Circuit 'work' is correctly initialised via input ports
checkCircuitReset(work) - check if the Circuit 'work' is correctly initialised via currently forced input ports
checkCircuitSignalAssertion(work, data) - check the Circuit 'work' for signal assertion 'data'
checkCircuitStrictImplementation(work) - check the Circuit 'work' for strict implementation of its signals according to the environment
checkDfsCombined(work) - combined check of the DFS 'work' for deadlock freeness and output persistency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private void initPluginManager() {
ScriptableCommandUtils.registerCommand(ResetActiveHighInsertionCommand.class, "insertCircuitResetActiveHigh",
"insert active-high reset into the Circuit 'work'");
ScriptableCommandUtils.registerCommand(ResetVerificationCommand.class, "checkCircuitReset",
"check if the Circuit 'work' is correctly initialised via input ports");
"check if the Circuit 'work' is correctly initialised via currently forced input ports");

// Path breaker attributes and Scan insertion
ScriptableCommandUtils.registerCommand(PathBreakerSelfloopPinsTagCommand.class, "tagCircuitPathBreakerSelfloopPins",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
public class ResetVerificationCommand extends AbstractVerificationCommand
implements ScriptableCommand<Boolean> {

private static final String TITLE = "Verification result";

@Override
public String getDisplayName() {
return "Initialisation via forced primary inputs";
return "Initialisation via currently forced input ports";
}

@Override
Expand Down Expand Up @@ -54,22 +56,24 @@ public Boolean execute(WorkspaceEntry we) {
problematicContacts.add(contact);
}
}

if (problematicContacts.isEmpty()) {
DialogUtils.showInfo("The circuit is fully initialised via forced inputs");
DialogUtils.showInfo("The circuit is fully initialised via the currently forced input ports.", TITLE);
return true;
} else {
final Framework framework = Framework.getInstance();
if (framework.isInGuiMode()) {
final Toolbox toolbox = framework.getMainWindow().getCurrentToolbox();
toolbox.selectTool(toolbox.getToolInstance(InitialisationAnalyserTool.class));
}
Collection<String> refs = ReferenceHelper.getReferenceList(circuit, problematicContacts);
String msg = "The circuit cannot be initialised via forced inputs.\n" +
TextUtils.wrapMessageWithItems("Problematic signal", refs);
}

DialogUtils.showError(msg);
return false;
Framework framework = Framework.getInstance();
if (framework.isInGuiMode()) {
Toolbox toolbox = framework.getMainWindow().getCurrentToolbox();
toolbox.selectTool(toolbox.getToolInstance(InitialisationAnalyserTool.class));
}

Collection<String> refs = ReferenceHelper.getReferenceList(circuit, problematicContacts);
String msg = "The currently forced input ports are insufficient to fully initialised the circuit.\n" +
TextUtils.wrapMessageWithItems("Problematic signal", refs);

DialogUtils.showError(msg, TITLE);
return false;
}

private boolean checkPrerequisites(WorkspaceEntry we) {
Expand Down

0 comments on commit 16adb1a

Please sign in to comment.