Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
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
SoCLabs
NanoSoC Tech
Commits
1e23e6d5
Commit
1e23e6d5
authored
1 year ago
by
dwf1m12
Browse files
Options
Downloads
Patches
Plain Diff
Fix VCS simulation and clean up sim makefile
parent
0c48b4f6
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
flows/makefile.simulate
+29
-28
29 additions, 28 deletions
flows/makefile.simulate
with
29 additions
and
28 deletions
flows/makefile.simulate
+
29
−
28
View file @
1e23e6d5
...
@@ -22,7 +22,7 @@ MTI_VC_OPTIONS += -f $(TBENCH_VC) $(ADP_OPTIONS)
...
@@ -22,7 +22,7 @@ MTI_VC_OPTIONS += -f $(TBENCH_VC) $(ADP_OPTIONS)
MTI_RUN_OPTIONS
=
-voptargs
=
+acc
MTI_RUN_OPTIONS
=
-voptargs
=
+acc
# VCS options
# VCS options
VCS_OPTIONS
=
+vcs+lic+wait +v2k +lint
=
all,noTMR,noVCDE
-debug
VCS_OPTIONS
=
+vcs+lic+wait +v2k
-sverilog
-override_timescale
=
1ns/1ps
+lint
=
all,noTMR,noVCDE
-debug
VCS_SIM_OPTION
=
+vcs+lic+wait +vcs+flush+log
-assert
nopostproc
VCS_SIM_OPTION
=
+vcs+lic+wait +vcs+flush+log
-assert
nopostproc
VCS_VC_OPTIONS
=
-f
$(
TBENCH_VC
)
$(
ADP_OPTIONS
)
VCS_VC_OPTIONS
=
-f
$(
TBENCH_VC
)
$(
ADP_OPTIONS
)
...
@@ -73,28 +73,38 @@ compile_mti: NANOSOC_DEFINES += IMEM_0_RAM_PRELOAD
...
@@ -73,28 +73,38 @@ compile_mti: NANOSOC_DEFINES += IMEM_0_RAM_PRELOAD
compile_vcs
:
NANOSOC_DEFINES += IMEM_0_RAM_PRELOAD
compile_vcs
:
NANOSOC_DEFINES += IMEM_0_RAM_PRELOAD
compile_xm
:
NANOSOC_DEFINES += IMEM_0_RAM_PRELOAD
compile_xm
:
NANOSOC_DEFINES += IMEM_0_RAM_PRELOAD
# Generate verilog .vc filelist from flists
flist_vfiles_nanosoc
:
gen_defs
@
if
[
!
-d
$(
SIM_DIR
)
]
;
then
\
mkdir
-p
$(
SIM_DIR
);
\
fi
@
if
[
!
-d
$(
SIM_DIR
)
/logs
]
;
then
\
mkdir
-p
$(
SIM_DIR
)
/logs
;
\
fi
@
cd
$(
SIM_DIR
);
python
$(
SOCLABS_SOCTOOLS_FLOW_DIR
)
/bin/filelist_compile.py
-f
$(
TBENCH_VC
)
-a
-v
-o
tbench.vc
# ------- VCS -----------
# ------- VCS -----------
# Compile RTL
# Compile RTL
compile_vcs
:
gen_defs
compile_vcs
:
gen_defs flist_vfiles_nanosoc
vcs
$(
VCS_OPTIONS
)
$(
VCS_VC_OPTIONS
)
$(
DEFINES_VC
)
|
tee
compile_vcs.log
cd
$(
SIM_DIR
);
vcs
$(
VCS_OPTIONS
)
-f
tbench.vc
$(
DEFINES_VC
)
|
tee
compile_vcs.log
# Run simulation in batch mode
# Run simulation in batch mode
run_vcs
:
code
run_vcs
:
code compile_vcs
@
if
[
!
-d
logs
]
;
then
\
@
echo
quit
>
$(
SIM_DIR
)
/quit.do
mkdir
logs
;
\
cd
$(
SIM_DIR
);
./simv
$(
VCS_SIM_OPTION
)
-define
ADP_FILE
=
adp.cmd < quit.do |
tee
logs/run_
$(
TESTNAME
)
.log
;
fi
@
echo
quit
>
quit.do
./simv
$(
VCS_SIM_OPTION
)
< quit.do |
tee
logs/run_
$(
TESTNAME
)
.log
;
# Run simulation in interactive mode
# Run simulation in interactive mode
sim_vcs
:
code
sim_vcs
:
code
compile_vcs
./simv
-gui
+vcs+lic+wait +vcs+flush+log &
cd
$(
SIM_DIR
);
./simv
-gui
+vcs+lic+wait +vcs+flush+log &
# ------- XM -----------
# ------- XM -----------
# Compile RTL
# Compile RTL
compile_xm
:
bootrom gen_defs
compile_xm
:
bootrom gen_defs
flist_vfiles_nanosoc
@
echo
ADP_FILE
@
echo
ADP_FILE
@
echo
$(
ADP_OPTIONS
)
@
echo
$(
ADP_OPTIONS
)
cd
$(
SIM_DIR
);
xmprep +overwrite
$(
XM_VC_OPTIONS
)
$(
DEFINES_VC
)
+debug
-timescale
1ns/1ps
-top
$(
TB_TOP
)
|
tee
compile_xm.log
cd
$(
SIM_DIR
);
xmprep +overwrite
$(
XM_VC_OPTIONS
)
$(
DEFINES_VC
)
+debug
-timescale
1ns/1ps
-top
$(
TB_TOP
)
|
tee
compile_xm.log
...
@@ -105,9 +115,6 @@ compile_xm : bootrom gen_defs
...
@@ -105,9 +115,6 @@ compile_xm : bootrom gen_defs
# Run simulation in batch mode
# Run simulation in batch mode
run_xm
:
code compile_xm
run_xm
:
code compile_xm
@
if
[
!
-d
$(
SIM_DIR
)
/logs
]
;
then
\
mkdir
$(
SIM_DIR
)
/logs
;
\
fi
@
echo
run
>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo
run
>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo exit
>>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo exit
>>
$(
SIM_DIR
)
/run.tcl.tmp
@
mv
$(
SIM_DIR
)
/run.tcl.tmp
$(
SIM_DIR
)
/run.tcl
@
mv
$(
SIM_DIR
)
/run.tcl.tmp
$(
SIM_DIR
)
/run.tcl
...
@@ -120,21 +127,11 @@ sim_xm : code compile_xm
...
@@ -120,21 +127,11 @@ sim_xm : code compile_xm
# ------- MTI -----------
# ------- MTI -----------
# Compile RTL
# Compile RTL
compile_mti
:
bootrom gen_defs
compile_mti
:
bootrom gen_defs flist_vfiles_nanosoc lib_mti
@
mkdir
-p
$(
SIM_DIR
)
cd
$(
SIM_DIR
);
vlog
-incr
-lint
+v2k
-f
tbench.vc
$(
ADP_OPTIONS
)
$(
DEFINES_VC
)
|
tee
compile_mti.log
@
cd
$(
SIM_DIR
)
@
if
[
-d
work
]
;
then
\
true
;
\
else
\
vlib work
;
\
fi
cd
$(
SIM_DIR
);
vlog
-incr
-lint
+v2k
$(
MTI_VC_OPTIONS
)
$(
DEFINES_VC
)
|
tee
compile_mti.log
# Run simulation in batch mode
# Run simulation in batch mode
run_mti
:
code compile_mti
run_mti
:
code compile_mti
@
if
[
!
-d
$(
SIM_DIR
)
/logs
]
;
then
\
mkdir
$(
SIM_DIR
)
/logs
;
\
fi
@
echo
"run -all"
>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo
"run -all"
>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo
"quit -f"
>>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo
"quit -f"
>>
$(
SIM_DIR
)
/run.tcl.tmp
@
mv
$(
SIM_DIR
)
/run.tcl.tmp
$(
SIM_DIR
)
/run.tcl
@
mv
$(
SIM_DIR
)
/run.tcl.tmp
$(
SIM_DIR
)
/run.tcl
...
@@ -152,7 +149,11 @@ sim_mti : code compile_mti
...
@@ -152,7 +149,11 @@ sim_mti : code compile_mti
# Create work directory
# Create work directory
lib_mti
:
lib_mti
:
vlib work
@
if
[
-d
$(
SIM_DIR
)
/work
]
;
then
\
true
;
\
else
\
vlib
$(
SIM_DIR
)
/work
;
\
fi
# Generate Make filelist from flists
# Generate Make filelist from flists
flist_makefile_nanosoc
:
gen_defs
flist_makefile_nanosoc
:
gen_defs
...
...
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