Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
467c94f3
Commit
467c94f3
authored
5 years ago
by
Le Van Truong
Browse files
Options
Downloads
Patches
Plain Diff
Issue about infinity loop and Round Robin
parent
d96cdfd1
No related branches found
No related tags found
2 merge requests
!251
Revert c7faf42b
,
!250
Issue about infinity loop and Round Robin
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
simulators/c++2/src_simulator/arch/RRScheduler.cpp
+30
-7
30 additions, 7 deletions
simulators/c++2/src_simulator/arch/RRScheduler.cpp
ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java
+6
-6
6 additions, 6 deletions
.../src/test/java/tmltranslator/DiplodocusSimulatorTest.java
with
36 additions
and
13 deletions
simulators/c++2/src_simulator/arch/RRScheduler.cpp
+
30
−
7
View file @
467c94f3
...
@@ -97,13 +97,7 @@ TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
...
@@ -97,13 +97,7 @@ TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
}
}
}
}
}
}
if
(
aSourcePast
==
0
){
_nextTransaction
=
(
aSourceFuture
==
0
)
?
0
:
aSourceFuture
->
getNextTransaction
(
iEndSchedule
);
_lastSource
=
aSourceFuture
;
}
else
{
_nextTransaction
=
aSourcePast
->
getNextTransaction
(
iEndSchedule
);
_lastSource
=
aSourcePast
;
}
if
(
aSameTaskFound
){
if
(
aSameTaskFound
){
//std::cout << _name << ": Same source found " << _lastSource->toString() << "\n";
//std::cout << _name << ": Same source found " << _lastSource->toString() << "\n";
//if (_nextTransaction!=anOldTransaction){
//if (_nextTransaction!=anOldTransaction){
...
@@ -112,6 +106,28 @@ TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
...
@@ -112,6 +106,28 @@ TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
//_elapsedTime += anOldTransaction->getBranchingPenalty() + anOldTransaction->getOperationLength();
//_elapsedTime += anOldTransaction->getBranchingPenalty() + anOldTransaction->getOperationLength();
_elapsedTime
+=
anOldTransaction
->
getOperationLength
();
_elapsedTime
+=
anOldTransaction
->
getOperationLength
();
}
}
for
(
WorkloadList
::
iterator
i
=
_workloadList
.
begin
();
i
!=
_workloadList
.
end
();
++
i
){
(
*
i
)
->
schedule
(
iEndSchedule
);
//std::cout << _name << " schedules, before getCurrTransaction " << std::endl;
aTempTrans
=
(
*
i
)
->
getNextTransaction
(
iEndSchedule
);
//std::cout << "after getCurrTransaction " << std::endl;
if
(
aTempTrans
!=
0
&&
aTempTrans
->
getVirtualLength
()
!=
0
){
aRunnableTime
=
aTempTrans
->
getRunnableTime
();
if
(
aRunnableTime
<=
iEndSchedule
){
//Past
if
(
aRunnableTime
<
aLowestRunnableTimePast
){
aLowestRunnableTimePast
=
aRunnableTime
;
aSourcePast
=*
i
;
}
}
else
{
//Future
if
(
aRunnableTime
<
aLowestRunnableTimeFuture
){
aLowestRunnableTimeFuture
=
aRunnableTime
;
aSourceFuture
=*
i
;
}
}
}
}
//std::cout << "Not crashed\n" ;
//std::cout << "Not crashed\n" ;
}
else
{
}
else
{
//if (_lastSource==0)
//if (_lastSource==0)
...
@@ -120,6 +136,13 @@ TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
...
@@ -120,6 +136,13 @@ TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
//std::cout << _name << ": New source found " << _lastSource->toString() << "\n";
//std::cout << _name << ": New source found " << _lastSource->toString() << "\n";
_elapsedTime
=
0
;
_elapsedTime
=
0
;
}
}
if
(
aSourcePast
==
0
){
_nextTransaction
=
(
aSourceFuture
==
0
)
?
0
:
aSourceFuture
->
getNextTransaction
(
iEndSchedule
);
_lastSource
=
aSourceFuture
;
}
else
{
_nextTransaction
=
aSourcePast
->
getNextTransaction
(
iEndSchedule
);
_lastSource
=
aSourcePast
;
}
//if (_nextTransaction!=0){
//if (_nextTransaction!=0){
// _nextTransaction->setLength(min(_nextTransaction->getOperationLength(), _timeSlice-_elapsedTime));
// _nextTransaction->setLength(min(_nextTransaction->getOperationLength(), _timeSlice-_elapsedTime));
//}
//}
...
...
This diff is collapsed.
Click to expand it.
ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java
+
6
−
6
View file @
467c94f3
...
@@ -30,14 +30,14 @@ public class DiplodocusSimulatorTest extends AbstractUITest {
...
@@ -30,14 +30,14 @@ public class DiplodocusSimulatorTest extends AbstractUITest {
//final String [] MODELS = {"scp"};
//final String [] MODELS = {"scp"};
final
String
[]
MODELS
=
{
"scp"
,
"ssdf"
};
final
String
[]
MODELS
=
{
"scp"
,
"ssdf"
};
final
String
DIR_GEN
=
"test_diplo_simulator/"
;
final
String
DIR_GEN
=
"test_diplo_simulator/"
;
final
int
[]
NB_Of_STATES
=
{
173
,
1824
};
final
int
[]
NB_Of_STATES
=
{
422
,
1824
};
final
int
[]
NB_Of_TRANSTIONS
=
{
172
,
1823
};
final
int
[]
NB_Of_TRANSTIONS
=
{
421
,
1823
};
final
int
[]
MIN_CYCLES
=
{
2
1
0
,
4106
};
final
int
[]
MIN_CYCLES
=
{
20
9
,
4106
};
final
int
[]
MAX_CYCLES
=
{
315
,
4106
};
final
int
[]
MAX_CYCLES
=
{
864
,
4106
};
//model for daemon task
//model for daemon task
final
String
[]
MODELS_DAEMON
=
{
"daemontest1"
,
"daemontest2"
};
final
String
[]
MODELS_DAEMON
=
{
"daemontest1"
,
"daemontest2"
};
final
int
[]
NB_Of_DAEMON_STATES
=
{
12
,
1
2
4
};
final
int
[]
NB_Of_DAEMON_STATES
=
{
12
,
1
1
4
};
final
int
[]
NB_Of_DAEMON_TRANSTIONS
=
{
11
,
1
2
3
};
final
int
[]
NB_Of_DAEMON_TRANSTIONS
=
{
11
,
1
1
3
};
final
int
[]
MIN_DAEMON_CYCLES
=
{
181
,
2743
};
final
int
[]
MIN_DAEMON_CYCLES
=
{
181
,
2743
};
final
int
[]
MAX_DAEMON_CYCLES
=
{
181
,
2743
};
final
int
[]
MAX_DAEMON_CYCLES
=
{
181
,
2743
};
...
...
This diff is collapsed.
Click to expand it.
Le Van Truong
@le.truong
mentioned in commit
1d5c6639
·
5 years ago
mentioned in commit
1d5c6639
mentioned in commit 1d5c6639e22b2a8682c03b1258fb9e276c3bbe8e
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment