diff --git a/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp b/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp index 468419f8480f2a706118546dec75e5daecb52f0c..c28531e0497b496b28467a64fb7eae5959881fc9 100644 --- a/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp +++ b/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp @@ -64,7 +64,7 @@ SingleCoreCPU::SingleCoreCPU(ID iID, std::string iName, WorkloadSource* iSchedul //, _pipelineSizeTimesExeci(_pipelineSize * _timePerExeci) //,_missrateTimesPipelinesize(_brachingMissrate*_pipelineSize) { - //std::cout << "Time per EXECIiiiiiiiiiiiiiiiiiiiiii: " << _timePerExeci << "\n"; + std::cout << "Time per EXECIiiiiiiiiiiiiiiiiiiiiii: " << _timePerExeci << "\n"; //_transactList.reserve(BLOCK_SIZE); } diff --git a/simulators/c++2/src_simulator/definitions.h b/simulators/c++2/src_simulator/definitions.h index 7cfbf5b1f594f536cac06dfcb26d9ae253d6dd2d..5a01faf5c8a62098814d5e1c84369cfffd1840c7 100644 --- a/simulators/c++2/src_simulator/definitions.h +++ b/simulators/c++2/src_simulator/definitions.h @@ -89,7 +89,7 @@ using std::max; //cost of a send/wait command #define WAIT_SEND_VLEN 1 //activate tis flag to take penalties (energy mode, branch prediction, context switch) into account -#undef PENALTIES_ENABLED +#define PENALTIES_ENABLED //enables the state hash feature #undef STATE_HASH_ENABLED //enables listerns for interactive simulation, switch off for fast simulation in command line mode diff --git a/src/avatartranslator/modelchecker/AvatarModelChecker.java b/src/avatartranslator/modelchecker/AvatarModelChecker.java index c1eb97e3883530ef59b1d9ef9094260d530382f9..ac329dcefe6bd85fa571f84cd535081afe06738d 100644 --- a/src/avatartranslator/modelchecker/AvatarModelChecker.java +++ b/src/avatartranslator/modelchecker/AvatarModelChecker.java @@ -96,10 +96,12 @@ public class AvatarModelChecker implements Runnable, myutil.Graph { private SpecificationLiveness livenessInfo; public AvatarModelChecker(AvatarSpecification _spec) { - //spec = _spec; - //TraceManager.addDev("Before clone:\n" + spec); - spec = _spec.advancedClone(); - //TraceManager.addDev("After clone:\n" + spec); + if (_spec != null) { + //spec = _spec; + //TraceManager.addDev("Before clone:\n" + spec); + spec = _spec.advancedClone(); + //TraceManager.addDev("After clone:\n" + spec); + } ignoreEmptyTransitions = true; ignoreConcurrenceBetweenInternalActions = true; studyReachability = false; @@ -216,6 +218,10 @@ public class AvatarModelChecker implements Runnable, myutil.Graph { // No other study are authorized at the same time // + if (spec == null) { + return false; + } + if (livenessInfo == null) { return false; } @@ -224,11 +230,18 @@ public class AvatarModelChecker implements Runnable, myutil.Graph { livenessDone = false; studyReachability = false; computeRG = false; + + + startModelChecking(); return true; } public void startModelChecking() { + if (spec == null) { + return; + } + stoppedBeforeEnd = false; stateID = 0; nbOfDeadlocks = 0; @@ -576,6 +589,13 @@ public class AvatarModelChecker implements Runnable, myutil.Graph { //TraceManager.addDev("Similar state found State=" + newState.getHash(blockValues) + "\n" + newState + "\nsimilar=" + similar.getHash(blockValues) + "\n" + similar); link.destinationState = similar; + + // If liveness, must verify that from similar it is possible to go to the considered + // state or not. + + if (studyLiveness) { + } + } if (studyLiveness && (!tr.livenessFound)) { TraceManager.addDev("Liveness: path without the element found"); diff --git a/src/ui/DiplodocusMethodologyPanel.java b/src/ui/DiplodocusMethodologyPanel.java index 171b6d5cfbfc37b80e2273dab8f2e169111970b6..80d1507cada225c4f8ad0f24afe512f127ad8410 100755 --- a/src/ui/DiplodocusMethodologyPanel.java +++ b/src/ui/DiplodocusMethodologyPanel.java @@ -81,7 +81,7 @@ public class DiplodocusMethodologyPanel extends TURTLEPanel { TGComponent tgc1 = dmd.addComponent(350, 100, TGComponentManager.DIPLODODUSMETHODOLOGY_REF_APPLICATION, false); TGComponent tgc2 = dmd.addComponent(850, 100, TGComponentManager.DIPLODODUSMETHODOLOGY_REF_ARCHITECTURE, false); TGComponent tgc3 = dmd.addComponent(600, 300, TGComponentManager.DIPLODODUSMETHODOLOGY_REF_MAPPING, false); - TGComponent tgc4 = dmd.addComponent(600, 100, TGComponentManager.DIPLODODUSMETHODOLOGY_REF_CP, false); + TGComponent tgc4 = dmd.addComponent(600, 100, TGComponentManager.DIPLODODUSMETHODOLOGY_REF_CP, false); //Connectors @@ -95,7 +95,7 @@ public class DiplodocusMethodologyPanel extends TURTLEPanel { p2.setFree(false); dmd.getComponentList().add(0, tgco); - // cp -> mapping + // cp -> mapping p1 = tgc4.getTGConnectingPointAtIndex(0); p2 = tgc3.getTGConnectingPointAtIndex(2); listPoint = new Vector(); diff --git a/src/ui/diplodocusmethodology/DiplodocusMethodologyDiagramName.java b/src/ui/diplodocusmethodology/DiplodocusMethodologyDiagramName.java index c14b5f70a6fcade6763b08e20604999ccebf1c1f..102952c4c7e878743ead885b542d54c792874cb2 100755 --- a/src/ui/diplodocusmethodology/DiplodocusMethodologyDiagramName.java +++ b/src/ui/diplodocusmethodology/DiplodocusMethodologyDiagramName.java @@ -125,9 +125,14 @@ public class DiplodocusMethodologyDiagramName extends TGCScalableWithoutInternal onMe = true; } - if ((y+Y_MARGIN) > (getFather().getY()+getFather().getHeight())) { - return; - } + if (getFather() == null) { + return; + } + + if ((y+Y_MARGIN) > (getFather().getY()+getFather().getHeight())) { + return; + } + //TraceManager.addDev("Internal drawing ..."); int currentMaxX;