Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cMIPS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Roberto Hexsel
cMIPS
Commits
c6d65b7c
Commit
c6d65b7c
authored
9 years ago
by
Roberto Hexsel
Browse files
Options
Downloads
Patches
Plain Diff
changed run.sh so simulator may read from stdin
parent
9e086881
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cMIPS/bin/build.sh
+5
-6
5 additions, 6 deletions
cMIPS/bin/build.sh
cMIPS/bin/run.sh
+15
-6
15 additions, 6 deletions
cMIPS/bin/run.sh
with
20 additions
and
12 deletions
cMIPS/bin/build.sh
+
5
−
6
View file @
c6d65b7c
...
@@ -36,7 +36,7 @@ exit 1
...
@@ -36,7 +36,7 @@ exit 1
if
[
!
-v
tree
]
;
then
if
[
!
-v
tree
]
;
then
# you must set the location of the cMIPS root directory in the variable tree
# you must set the location of the cMIPS root directory in the variable tree
# tree=${HOME}/cMIPS
# tree=${HOME}/cMIPS
# tree=${HOME}/cmips
-code
/cMIPS
# tree=${HOME}/cmips/cMIPS
export
tree
=
"
$(
echo
$PWD
|
sed
-e
's:^\(/.*/cMIPS\)/.*:\1:'
)
"
export
tree
=
"
$(
echo
$PWD
|
sed
-e
's:^\(/.*/cMIPS\)/.*:\1:'
)
"
fi
fi
...
@@ -59,7 +59,6 @@ if [ $pkg_vhd -nt $c_ld -o\
...
@@ -59,7 +59,6 @@ if [ $pkg_vhd -nt $c_ld -o\
"
${
bin
}
"
/edMemory.sh
-v
||
errorED
||
exit
1
"
${
bin
}
"
/edMemory.sh
-v
||
errorED
||
exit
1
fi
fi
# cd "${obj}"
cd
"
${
srcVHDL
}
"
cd
"
${
srcVHDL
}
"
...
@@ -67,7 +66,7 @@ simulator=tb_cmips
...
@@ -67,7 +66,7 @@ simulator=tb_cmips
pkg
=
"packageWires.vhd packageMemory.vhd packageExcp.vhd"
pkg
=
"packageWires.vhd packageMemory.vhd packageExcp.vhd"
src
=
"altera.vhd macnica.vhd
aux.vhd
memory.vhd cache.vhd instrcache.vhd ram.vhd rom.vhd units.vhd io.vhd uart.vhd fpu.vhd pipestages.vhd exception.vhd core.vhd tb_cMIPS.vhd"
src
=
"
aux.vhd
altera.vhd macnica.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd rom.vhd units.vhd io.vhd uart.vhd fpu.vhd pipestages.vhd exception.vhd core.vhd tb_cMIPS.vhd"
# build simulator
# build simulator
#ghdl --clean
#ghdl --clean
...
@@ -86,9 +85,9 @@ src="altera.vhd macnica.vhd aux.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd
...
@@ -86,9 +85,9 @@ src="altera.vhd macnica.vhd aux.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd
# NOTE: when you add a new sourcefile to this project, you must include it
# NOTE: when you add a new sourcefile to this project, you must include it
# with "ghdl -i newFile.vhd" so that learns about it. It may be
# with "ghdl -i newFile.vhd" so that
ghdl
learns about it. It may be
# a good idea to remove ./.last_import
f
o force a full rebuild.
# a good idea to remove ./.last_import
t
o force a full rebuild.
# Of course, newFile.vhd must be added to the $src variable.
# Of course, newFile.vhd must be added to the $src variable
(above)
.
# if never imported sources, do it now
# if never imported sources, do it now
if
[
!
-f
.last_import
]
;
then
if
[
!
-f
.last_import
]
;
then
...
...
This diff is collapsed.
Click to expand it.
cMIPS/bin/run.sh
+
15
−
6
View file @
c6d65b7c
...
@@ -40,7 +40,7 @@ OPTIONS:
...
@@ -40,7 +40,7 @@ OPTIONS:
-t T number of time-units to run (default
${
length
}
)
-t T number of time-units to run (default
${
length
}
)
-u U unit of time scale {m,u,n,p} (default
${
unit
}
s)
-u U unit of time scale {m,u,n,p} (default
${
unit
}
s)
-n send simulator output do /dev/null, else to v_cMIPS.vcd
-n send simulator output do /dev/null, else to v_cMIPS.vcd
-w invoke GTKWAVE
-w invoke GTKWAVE
-- stdin will not read input from keyboard
-v F gtkwave configuration file (e.g. pipe.sav, default v.sav)
-v F gtkwave configuration file (e.g. pipe.sav, default v.sav)
EOF
EOF
}
}
...
@@ -77,10 +77,19 @@ gfile=${gtkwconf%%.sav}
...
@@ -77,10 +77,19 @@ gfile=${gtkwconf%%.sav}
sav
=
"
${
tree
}
"
/
${
gfile
}
.sav
sav
=
"
${
tree
}
"
/
${
gfile
}
.sav
"
${
bin
}
"
/build.sh
&&
\
"
${
bin
}
"
/build.sh
||
(
usage
;
exit
1
)
"
${
simulator
}
"
--ieee-asserts
=
disable
--stop-time
=
${
length
}${
unit
}
s
\
--vcd
=
${
visual
}
# --wave=${visual%.vcd}.ghw
options
=
"--ieee-asserts=disable --stop-time=
${
length
}${
unit
}
s --vcd=
${
visual
}
"
if
[
-v
$WAVE
]
;
then
exec
"
${
simulator
}
"
$options
test
-v
$WAVE
||
gtkwave
-O
/dev/null
${
visual
}
${
sav
}
else
"
${
simulator
}
"
$options
||
gtkwave
-O
/dev/null
${
visual
}
${
sav
}
fi
# --wave=${visual%.vcd}.ghw
\ No newline at end of file
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