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
Hide 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
;
endmodule
module
dump
;
initial
begin
$
display
(
"A 3"
)
;
$
display
(
"B 3"
)
;
...
...
test/core/paramtype.v
View file @
543b4590
module
top
;
endmodule
module
dump
;
initial
begin
// generated by running a commercial simulator
$
display
(
"m_def 0 00000000000000000000000000000001 1"
)
;
...
...
test/core/struct_part_select.sv
View file @
543b4590
...
...
@@ -83,4 +83,5 @@ module Example;
end
endmodule
module
top
;
Example
e
()
;
endmodule
test/core/struct_part_select.v
View file @
543b4590
...
...
@@ -60,4 +60,5 @@ module Example;
end
endmodule
module
top
;
Example
e
()
;
endmodule
test/lib/functions.sh
View file @
543b4590
...
...
@@ -17,6 +17,7 @@ simulate() {
sim_top
=
$3
shift
3
# compile the files
sim_vcd_tmp
=
$SHUNIT_TMPDIR
/simvcdtmp
sim_prog
=
$SHUNIT_TMPDIR
/simprog.exe
iv_output
=
`
iverilog
\
-Wall
\
...
...
@@ -24,23 +25,17 @@ simulate() {
-Wno-portbind
\
-o
$sim_prog
\
-g2005
\
-DTEST_VCD
=
"
\"
$sim_vcd
\"
"
\
-DTEST_VCD
=
"
\"
$sim_vcd
_tmp
\"
"
\
-DTEST_TOP
=
$sim_top
\
$SCRIPT_DIR
/tb_dumper.v
\
"
$@
"
2>&1
`
assertTrue
"iverilog on
$1
failed"
$?
if
[
-n
"
$iv_output
"
]
;
then
assertNull
"iverilog emitted warnings:"
"
$iv_output
"
echo
"
$iv_output
"
fi
assertNull
"iverilog emitted warnings:
\n
$iv_output
"
"
$iv_output
"
# run the simulation
$sim_prog
>
$sim_log
.temp
$sim_prog
>
$sim_log
assertTrue
"simulating
$1
failed"
$?
assertExists
$sim_vcd
# remove the date from the VCD
sed
-i
.orig
-e
"1,3d"
$sim_vcd
# remove extraneous log lines
cat
$sim_log
.temp |
grep
-v
"VCD info: dumpfile"
>
$sim_log
sed
-e
"1,3d"
<
$sim_vcd_tmp
>
$sim_vcd
}
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