Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yosys-tests
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
yosys-tests
Commits
cb227ee5
Commit
cb227ee5
authored
Apr 26, 2019
by
Miodrag Milanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify statuses and FAIL test but not break
parent
9fe8fe2a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
142 additions
and
38 deletions
+142
-38
architecture/run.sh
+15
-4
backends/run.sh
+15
-4
bigsim/run.sh
+13
-3
equiv/run.sh
+14
-4
frontends/run.sh
+14
-4
misc/run.sh
+8
-3
regression/run.sh
+28
-11
simple/run.sh
+23
-3
verific/opers/run.sh
+6
-1
verific/sva/run.sh
+6
-1
No files found.
architecture/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
test
-f
scripts/
$2
.ys
test
-f
scripts/
$2
.ys
...
@@ -9,6 +9,12 @@ mkdir $1/work_$2
...
@@ -9,6 +9,12 @@ mkdir $1/work_$2
cd
$1
/work_
$2
cd
$1
/work_
$2
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
[
"
$1
"
=
"synth_ecp5"
]
;
then
if
[
"
$1
"
=
"synth_ecp5"
]
;
then
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/ecp5/cells_sim.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/ecp5/cells_sim.v
elif
[
"
$1
"
=
"synth_ecp5_wide_ffs"
]
;
then
elif
[
"
$1
"
=
"synth_ecp5_wide_ffs"
]
;
then
...
@@ -58,14 +64,19 @@ elif [ "$1" = "synth_greenpak4_wide_ffs" ]; then
...
@@ -58,14 +64,19 @@ elif [ "$1" = "synth_greenpak4_wide_ffs" ]; then
else
else
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v
fi
fi
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
grep
'ERROR'
testbench.log
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
touch .stamp
touch .stamp
backends/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
test
-f
scripts/
$2
.ys
test
-f
scripts/
$2
.ys
...
@@ -9,16 +9,27 @@ mkdir $1/work_$2
...
@@ -9,16 +9,27 @@ mkdir $1/work_$2
cd
$1
/work_
$2
cd
$1
/work_
$2
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
sed
-i
's/reg =/dummy =/'
./synth.v
sed
-i
's/reg =/dummy =/'
./synth.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
grep
'ERROR'
testbench.log
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
touch .stamp
touch .stamp
bigsim/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
source
$1
/config
source
$1
/config
mkdir
$1
/work_
$2
mkdir
$1
/work_
$2
cd
$1
/work_
$2
cd
$1
/work_
$2
...
@@ -36,18 +36,28 @@ for fn in $SIM; do
...
@@ -36,18 +36,28 @@ for fn in $SIM; do
iverilog_cmd
=
"
$iverilog_cmd
../sim/
$fn
"
iverilog_cmd
=
"
$iverilog_cmd
../sim/
$fn
"
done
done
$iverilog_cmd
$iverilog_cmd
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
vvp
-N
sim | pv
-l
>
output.txt
vvp
-N
sim | pv
-l
>
output.txt
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
[
"
$2
"
=
"falsify"
]
;
then
if
[
"
$2
"
=
"falsify"
]
;
then
if
cmp output.txt ../work_sim/output.txt
;
then
if
cmp output.txt ../work_sim/output.txt
;
then
echo
FAIL
>
../../
${
1
}
_
${
2
}
.status
echo
FAIL
>
../../
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
../../
${
1
}
_
${
2
}
.status
echo
PASS
>
../../
${
1
}
_
${
2
}
.status
fi
fi
elif
[
"
$2
"
!=
"sim"
]
;
then
elif
[
"
$2
"
!=
"sim"
]
;
then
if
cmp output.txt ../work_sim/output.txt
;
then
if
cmp output.txt ../work_sim/output.txt
;
then
echo
pass
>
../../
${
1
}
_
${
2
}
.status
echo
PASS
>
../../
${
1
}
_
${
2
}
.status
else
else
echo
FAIL
>
../../
${
1
}
_
${
2
}
.status
echo
FAIL
>
../../
${
1
}
_
${
2
}
.status
fi
fi
...
...
equiv/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
test
-f
scripts/
$2
.ys
test
-f
scripts/
$2
.ys
...
@@ -9,16 +9,26 @@ mkdir $1/work_$2
...
@@ -9,16 +9,26 @@ mkdir $1/work_$2
cd
$1
/work_
$2
cd
$1
/work_
$2
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
sed
-i
's/reg =/dummy =/'
./synth.v
sed
-i
's/reg =/dummy =/'
./synth.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
grep
'ERROR'
testbench.log
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
touch .stamp
touch .stamp
frontends/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
test
-f
scripts/
$2
.ys
test
-f
scripts/
$2
.ys
...
@@ -9,16 +9,26 @@ mkdir $1/work_$2
...
@@ -9,16 +9,26 @@ mkdir $1/work_$2
cd
$1
/work_
$2
cd
$1
/work_
$2
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
sed
-i
's/reg =/dummy =/'
./synth.v
sed
-i
's/reg =/dummy =/'
./synth.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
grep
'ERROR'
testbench.log
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
touch .stamp
touch .stamp
misc/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
test
-f
scripts/
$2
.ys
test
-f
scripts/
$2
.ys
...
@@ -9,11 +9,16 @@ mkdir $1/work_$2
...
@@ -9,11 +9,16 @@ mkdir $1/work_$2
cd
$1
/work_
$2
cd
$1
/work_
$2
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
grep
'Assert'
result.log
||
grep
'failed in'
result.log
||
grep
'fail'
result.log
||
grep
'ERROR'
result.log
;
then
if
grep
'Assert'
result.log
||
grep
'failed in'
result.log
||
grep
'fail'
result.log
||
grep
'ERROR'
result.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
touch .stamp
touch .stamp
regression/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
test
-f
scripts/
$2
.ys
test
-f
scripts/
$2
.ys
...
@@ -41,12 +41,12 @@ if [ "$1" = "issue_00089" ] ||\
...
@@ -41,12 +41,12 @@ if [ "$1" = "issue_00089" ] ||\
fi
fi
if
yosys
-ql
yosys.log ../../scripts/
$2
.ys
;
then
if
yosys
-ql
yosys.log ../../scripts/
$2
.ys
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
if
grep
"
$expected_string
"
yosys.log
;
then
if
grep
"
$expected_string
"
yosys.log
;
then
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
else
else
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
fi
fi
fi
fi
...
@@ -120,17 +120,22 @@ elif [ "$1" = "issue_00502" ] ||\
...
@@ -120,17 +120,22 @@ elif [ "$1" = "issue_00502" ] ||\
fi
fi
yosys
-ql
yosys.log ../../scripts/
$2
.ys
;
yosys
-ql
yosys.log ../../scripts/
$2
.ys
;
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
grep
"
$expected_string
"
result.log
;
then
if
grep
"
$expected_string
"
result.log
;
then
if
[
$expected
=
"1"
]
;
then
if
[
$expected
=
"1"
]
;
then
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
else
else
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
fi
fi
else
else
if
[
$expected
=
"1"
]
;
then
if
[
$expected
=
"1"
]
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
fi
fi
...
@@ -155,14 +160,26 @@ else
...
@@ -155,14 +160,26 @@ else
fi
fi
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
$iverilog_adds
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
$iverilog_adds
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
grep
'ERROR'
testbench.log
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
fi
fi
...
...
simple/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-d
$1
test
-d
$1
if
[
"
$2
"
!=
"verify"
-a
"
$2
"
!=
"falsify"
]
;
then
if
[
"
$2
"
!=
"verify"
-a
"
$2
"
!=
"falsify"
]
;
then
...
@@ -13,11 +13,31 @@ cd $1/work_$2
...
@@ -13,11 +13,31 @@ cd $1/work_$2
if
[
"
$2
"
=
"verify"
]
;
then
if
[
"
$2
"
=
"verify"
]
;
then
iverilog
-o
testbench ../testbench.v ../../common.v ../top.v
iverilog
-o
testbench ../testbench.v ../../common.v ../top.v
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
elif
[
"
$2
"
=
"falsify"
]
;
then
elif
[
"
$2
"
=
"falsify"
]
;
then
iverilog
-DBUG
-o
testbench ../testbench.v ../../common.v ../top.v
iverilog
-DBUG
-o
testbench ../testbench.v ../../common.v ../top.v
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
else
else
yosys
-ql
yosys.log ../../scripts/
$2
.ys
yosys
-ql
yosys.log ../../scripts/
$2
.ys
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
iverilog
-o
testbench ../testbench.v ../../common.v synth.v
$(
yosys-config
--datdir
/simcells.v
)
iverilog
-o
testbench ../testbench.v ../../common.v synth.v
$(
yosys-config
--datdir
/simcells.v
)
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
fi
fi
if
[
"
$2
"
=
"falsify"
]
;
then
if
[
"
$2
"
=
"falsify"
]
;
then
...
@@ -26,7 +46,7 @@ if [ "$2" = "falsify" ]; then
...
@@ -26,7 +46,7 @@ if [ "$2" = "falsify" ]; then
elif
!
grep
'ERROR'
testbench.log
||
grep
'OKAY'
testbench.log
;
then
elif
!
grep
'ERROR'
testbench.log
||
grep
'OKAY'
testbench.log
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
else
else
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
...
@@ -35,7 +55,7 @@ else
...
@@ -35,7 +55,7 @@ else
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
else
echo
pass
>
${
1
}
_
${
2
}
.status
echo
PASS
>
${
1
}
_
${
2
}
.status
fi
fi
fi
fi
...
...
verific/opers/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
trap
"echo FAIL >
$1
.status"
ERR
trap
"echo FAIL >
$1
.status"
ERR
yosys
-p
"
yosys
-p
"
...
@@ -19,6 +19,11 @@ yosys -p "
...
@@ -19,6 +19,11 @@ yosys -p "
miter -equiv -flatten A B miter
miter -equiv -flatten A B miter
sat -verify -prove trigger 0 miter
sat -verify -prove trigger 0 miter
"
"
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
echo
PASS
>
$1
.status
echo
PASS
>
$1
.status
verific/sva/run.sh
View file @
cb227ee5
#!/bin/bash
#!/bin/bash
set
-
e
x
set
-x
test
-f
$1
.sv
test
-f
$1
.sv
trap
"echo FAIL >
$1
.status"
ERR
trap
"echo FAIL >
$1
.status"
ERR
...
@@ -23,6 +23,11 @@ while read t; do
...
@@ -23,6 +23,11 @@ while read t; do
echo
"
$1
.sv"
echo
"
$1
.sv"
}
>
$1
.
$t
.sby
}
>
$1
.
$t
.sby
sby
-f
$1
.
$t
.sby
sby
-f
$1
.
$t
.sby
if
[
$?
!=
0
]
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
touch .stamp
exit
0
fi
done
< <
(
egrep
'^module (pass|fail)_[0-9][0-9]'
$1
.sv | gawk
'{ print $2; }'
;
)
done
< <
(
egrep
'^module (pass|fail)_[0-9][0-9]'
$1
.sv | gawk
'{ print $2; }'
;
)
echo
PASS
>
$1
.status
echo
PASS
>
$1
.status
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