Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
RTSD
HDL
Commits
1b23ccda
Commit
1b23ccda
authored
10 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Use mk_execute() to do the compile IP.
parent
bf1aaacb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/modelsim/commands.do
+27
-8
27 additions, 8 deletions
tools/modelsim/commands.do
with
27 additions
and
8 deletions
tools/modelsim/commands.do
+
27
−
8
View file @
1b23ccda
...
...
@@ -97,7 +97,7 @@ proc lp {{arg_lib ""}} {
#-------------------------------------------------------------------------------
proc
project_mk_cmds
{}
{
return
{
clean
compile
files
make
test
vmake
}
;
#
mk
with
arg_cmd
=
""
will
default
to
"make"
return
{
clean
execute
compile
files
make
test
vmake
}
;
#
mk
with
arg_cmd
=
""
will
default
to
"make"
}
# Get commands from the mk args
...
...
@@ -108,6 +108,7 @@ proc parse_for_cmds arg_list {
echo
"mk \[commands\] \[projects\]"
echo
" possible commands are:"
echo
" clean: removes the library files"
echo
" execute: runs compile IP scripts"
echo
" compile: runs project compileall"
echo
" files: list files in compile order"
echo
" help: displays this help"
...
...
@@ -204,6 +205,25 @@ proc mk_clean {arg_lib} {
}
}
proc
mk_execute
{
arg_lib
}
{
# if there are compile scripts for IP files then first use use mk_execute to compile those into this work
set
compile_ip
[
read_lib_compile_ip_file
$arg_lib
]
if
{[
llength
$compile_ip
]
>
0
}
{
echo
"\[mk execute $arg_lib\]"
set
sim
[
simdir
$arg_lib
]
lp
$arg_lib
# create work library if it does not already exist
if
{
!
[
file
exists
"$sim/work"
]}
then
{
vlib
work
}
global
env
;
#
Make
global
env
()
variable
known
locally.
This
is
necessary
for
$env
(
*
)
in
compile
IP
tcl
script
,
alternatively
use
$
::
env
(
*
)
in
compile
IP
tcl
scrip
foreach
ip
$compile_ip
{
echo
"do $ip"
do
$ip
}
}
}
proc
mk_compile
{
arg_lib
}
{
set
sim
[
simdir
$arg_lib
]
if
{[
string
compare
[
env
]
"<No Context>"
]
!=
0
}
{
...
...
@@ -212,17 +232,13 @@ proc mk_compile {arg_lib} {
}
echo
"\[mk compile $arg_lib\]"
lp
$arg_lib
# recreate work library
if
{[
file
exists
"$sim/work"
]}
then
{
vdel
-
lib
$sim
/
work
-
all
}
vlib
work
# if there are compile scripts for IP files then first compile those into this work
global
env
;
#
Make
global
env
()
variable
known
locally.
This
is
necessary
for
$env
(
*
)
in
compile
IP
tcl
script
,
alternatively
use
$
::
env
(
*
)
in
compile
IP
tcl
scrip
set
compile_ip
[
read_lib_compile_ip_file
$arg_lib
]
foreach
ip
$compile_ip
{
echo
"do $ip"
do
$ip
}
# and then first execute any IP compile scripts
mk_execute
$arg_lib
# and then compile the HDL
project
compileall
}
...
...
@@ -245,8 +261,11 @@ proc mk_vmake {arg_lib} {
# so to be compatible for both names always use work to generate the makefile
echo
[
exec
vmake
-
fullsrcpath
work
>
$sim
/
makefile
]
}
# recreate work library
vdel
-
lib
$sim
/
work
-
all
vlib
work
# and then first execute any IP compile scripts
mk_execute
$arg_lib
}
proc
mk_make
{
arg_lib
}
{
...
...
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