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
d9bfd3b7
Commit
d9bfd3b7
authored
15 years ago
by
Ludovic Apvrille
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
52df28b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ui/interactivesimulation/JFrameInteractiveSimulation.java
+67
-0
67 additions, 0 deletions
...ui/interactivesimulation/JFrameInteractiveSimulation.java
with
67 additions
and
0 deletions
src/ui/interactivesimulation/JFrameInteractiveSimulation.java
+
67
−
0
View file @
d9bfd3b7
...
...
@@ -1658,6 +1658,16 @@ public class JFrameInteractiveSimulation extends JFrame implements ActionListene
sendCommandWithPositiveInt
(
"run-x-commands"
);
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_RUN_EXPLORATION
].
getActionCommand
()))
{
sendCommand
(
"run-exploration"
);
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_RUN_TO_NEXT_BUS_TRANSFER
].
getActionCommand
()))
{
toNextBusTransfer
();
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_RUN_UNTIL_CPU_EXECUTES
].
getActionCommand
()))
{
runUntilCPUExecutes
();
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_RUN_UNTIL_MEMORY_ACCESS
].
getActionCommand
()))
{
toNextMemoryTransfer
();
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_RUN_UNTIL_TASK_EXECUTES
].
getActionCommand
()))
{
runUntilTaskExecutes
();
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_RUN_UNTIL_CHANNEL_ACCESS
].
getActionCommand
()))
{
runUntilChannelAccess
();
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_SAVE_VCD
].
getActionCommand
()))
{
sendSaveTraceCommand
(
"0"
);
}
else
if
(
command
.
equals
(
actions
[
InteractiveSimulationActions
.
ACT_SAVE_HTML
].
getActionCommand
()))
{
...
...
@@ -1712,6 +1722,63 @@ public class JFrameInteractiveSimulation extends JFrame implements ActionListene
}
}
public
void
toNextBusTransfer
()
{
int
id
=
getIDFromString
(
busIDs
[
busses
.
getSelectedItem
());
if
(
id
!=
-
1
)
{
sendCommand
(
"run-to-next-transfer-on-bus "
+
id
);
}
}
public
void
runUntilCPUExecutes
()
{
int
id
=
getIDFromString
(
cpuIDs
[
cpus
.
getSelectedItem
());
if
(
id
!=
-
1
)
{
sendCommand
(
"run-until-cpu-executes "
+
id
);
}
}
public
void
toNextMemoryTransfer
()
{
int
id
=
getIDFromString
(
memIDs
[
mems
.
getSelectedItem
());
if
(
id
!=
-
1
)
{
sendCommand
(
"run-until-memory-access "
+
id
);
}
}
public
void
runUntilTaskExecutes
()
{
int
id
=
getIDFromString
(
taskIDs
[
tasks
.
getSelectedItem
());
if
(
id
!=
-
1
)
{
sendCommand
(
"run-until-task-executes "
+
id
);
}
}
public
void
runUntilChannelAccess
()
{
int
id
=
getIDFromString
(
chanIDs
[
chans
.
getSelectedItem
());
if
(
id
!=
-
1
)
{
sendCommand
(
"run-until-channel-access "
+
id
);
}
}
public
int
getIDFromString
(
String
s
)
{
int
index0
=
s
.
indexOf
(
"("
);
int
index1
=
s
.
indexOf
(
")"
);
if
((
index0
<
0
)
||
(
index1
<
0
)
||
(
index1
<
index0
))
{
return
-
1
;
}
String
in
=
s
.
substring
(
index0
+
1
,
index1
);
try
{
return
Integer
.
decode
(
in
).
intValue
();
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"Wrong string: "
+
in
);
}
return
-
1
;
}
public
void
addBreakPoint
(
int
_commandID
)
{
System
.
out
.
println
(
"Add breakpoint: "
+
_commandID
);
// Check whether that breakpoint is already listed or not
...
...
This diff is collapsed.
Click to expand it.
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