Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
543b4590
Commit
543b4590
authored
Aug 01, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
streamline iverilog test wrapper
parent
a6111e20
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
10 deletions
+13
-10
test/core/package_scope.v
+3
-0
test/core/paramtype.v
+3
-0
test/core/struct_part_select.sv
+1
-0
test/core/struct_part_select.v
+1
-0
test/lib/functions.sh
+5
-10
No files found.
test/core/package_scope.v
View file @
543b4590
module
top
;
module
top
;
endmodule
module
dump
;
initial
begin
initial
begin
$
display
(
"A 3"
)
;
$
display
(
"A 3"
)
;
$
display
(
"B 3"
)
;
$
display
(
"B 3"
)
;
...
...
test/core/paramtype.v
View file @
543b4590
module
top
;
module
top
;
endmodule
module
dump
;
initial
begin
initial
begin
// generated by running a commercial simulator
// generated by running a commercial simulator
$
display
(
"m_def 0 00000000000000000000000000000001 1"
)
;
$
display
(
"m_def 0 00000000000000000000000000000001 1"
)
;
...
...
test/core/struct_part_select.sv
View file @
543b4590
...
@@ -83,4 +83,5 @@ module Example;
...
@@ -83,4 +83,5 @@ module Example;
end
end
endmodule
endmodule
module
top
;
module
top
;
Example
e
()
;
endmodule
endmodule
test/core/struct_part_select.v
View file @
543b4590
...
@@ -60,4 +60,5 @@ module Example;
...
@@ -60,4 +60,5 @@ module Example;
end
end
endmodule
endmodule
module
top
;
module
top
;
Example
e
()
;
endmodule
endmodule
test/lib/functions.sh
View file @
543b4590
...
@@ -17,6 +17,7 @@ simulate() {
...
@@ -17,6 +17,7 @@ simulate() {
sim_top
=
$3
sim_top
=
$3
shift
3
shift
3
# compile the files
# compile the files
sim_vcd_tmp
=
$SHUNIT_TMPDIR
/simvcdtmp
sim_prog
=
$SHUNIT_TMPDIR
/simprog.exe
sim_prog
=
$SHUNIT_TMPDIR
/simprog.exe
iv_output
=
`
iverilog
\
iv_output
=
`
iverilog
\
-Wall
\
-Wall
\
...
@@ -24,23 +25,17 @@ simulate() {
...
@@ -24,23 +25,17 @@ simulate() {
-Wno-portbind
\
-Wno-portbind
\
-o
$sim_prog
\
-o
$sim_prog
\
-g2005
\
-g2005
\
-DTEST_VCD
=
"
\"
$sim_vcd
\"
"
\
-DTEST_VCD
=
"
\"
$sim_vcd
_tmp
\"
"
\
-DTEST_TOP
=
$sim_top
\
-DTEST_TOP
=
$sim_top
\
$SCRIPT_DIR
/tb_dumper.v
\
$SCRIPT_DIR
/tb_dumper.v
\
"
$@
"
2>&1
`
"
$@
"
2>&1
`
assertTrue
"iverilog on
$1
failed"
$?
assertTrue
"iverilog on
$1
failed"
$?
if
[
-n
"
$iv_output
"
]
;
then
assertNull
"iverilog emitted warnings:
\n
$iv_output
"
"
$iv_output
"
assertNull
"iverilog emitted warnings:"
"
$iv_output
"
echo
"
$iv_output
"
fi
# run the simulation
# run the simulation
$sim_prog
>
$sim_log
.temp
$sim_prog
>
$sim_log
assertTrue
"simulating
$1
failed"
$?
assertTrue
"simulating
$1
failed"
$?
assertExists
$sim_vcd
# remove the date from the VCD
# remove the date from the VCD
sed
-i
.orig
-e
"1,3d"
$sim_vcd
sed
-e
"1,3d"
<
$sim_vcd_tmp
>
$sim_vcd
# remove extraneous log lines
cat
$sim_log
.temp |
grep
-v
"VCD info: dumpfile"
>
$sim_log
}
}
assertConverts
()
{
assertConverts
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment