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
3adc2f8d
Unverified
Commit
3adc2f8d
authored
Jan 02, 2019
by
Clifford Wolf
Committed by
GitHub
Jan 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into master
parents
050cc693
3efc101f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
13 deletions
+55
-13
bigsim/.gitignore
+3
-0
bigsim/Makefile
+6
-1
bigsim/navre/rtl/softusb_navre.v
+2
-0
bigsim/run.sh
+11
-2
simple/Makefile
+1
-1
simple/alu/top.v
+4
-0
simple/run.sh
+28
-9
No files found.
bigsim/.gitignore
View file @
3adc2f8d
/.stamp
/*_cmos.status
/*_ice40.status
/*_falsify.status
/*/work_sim
/*/work_cmos
/*/work_ice40
/*/work_falsify
/*/.stamp_sim
/*/.stamp_cmos
/*/.stamp_ice40
/*/.stamp_falsify
bigsim/Makefile
View file @
3adc2f8d
...
...
@@ -5,12 +5,16 @@ clean::
rm
-f
.stamp
define
template
work
::
$(addprefix $(1)/.stamp_
,
sim $(2))
work
::
$(addprefix $(1)/.stamp_
,
sim
falsify
$(2))
$(1)/.stamp_sim
:
bash run.sh
$
(
1
)
sim
touch
$$
@
$(1)/.stamp_falsify
:
$(1)/.stamp_sim
bash run.sh
$
(
1
)
falsify
touch
$$
@
$(1)/.stamp_cmos
:
$(1)/.stamp_sim
bash run.sh
$
(
1
)
cmos
touch
$$
@
...
...
@@ -21,6 +25,7 @@ $(1)/.stamp_ice40: $(1)/.stamp_sim
clean
::
rm
-rf
$
(
1
)
/.stamp_
*
$
(
1
)
/work_
*
rm
-f
$
(
1
)
_cmos.status
$
(
1
)
_ice40.status
$
(
1
)
_falsify.status
endef
$(eval
$(call
template,navre,cmos
ice40))
...
...
bigsim/navre/rtl/softusb_navre.v
View file @
3adc2f8d
...
...
@@ -136,7 +136,9 @@ reg [7:0] GPR_Rr;
always
@
(
*
)
begin
case
(
Rr
)
default:
GPR_Rr
=
GPR_Rr8
;
`ifndef
BUG
5'd24
:
GPR_Rr
=
U
[
7
:
0
]
;
`endif
5'd25
:
GPR_Rr
=
U
[
15
:
8
]
;
5'd26
:
GPR_Rr
=
pX
[
7
:
0
]
;
5'd27
:
GPR_Rr
=
pX
[
15
:
8
]
;
...
...
bigsim/run.sh
View file @
3adc2f8d
...
...
@@ -16,6 +16,9 @@ case "$2" in
sim
)
iverilog_cmd
=
"
$iverilog_cmd
$rtl_files
"
;;
falsify
)
iverilog_cmd
=
"
$iverilog_cmd
-DBUG
$rtl_files
"
;;
cmos
)
yosys
-ql
synthlog.txt
-p
"synth -top
$TOP
; abc -g cmos4; write_verilog synth.v"
$rtl_files
iverilog_cmd
=
"
$iverilog_cmd
synth.v"
...
...
@@ -36,10 +39,16 @@ $iverilog_cmd
vvp
-N
sim | pv
-l
>
output.txt
if
[
"
$2
"
!=
"sim"
]
;
then
if
[
"
$2
"
=
"falsify"
]
;
then
if
cmp output.txt ../work_sim/output.txt
;
then
echo
FAIL
>
../../
${
1
}
_
${
2
}
.status
else
echo
pass
>
../../
${
1
}
_
${
2
}
.status
fi
elif
[
"
$2
"
!=
"sim"
]
;
then
if
cmp output.txt ../work_sim/output.txt
;
then
echo
pass
>
../../
${
1
}
_
${
2
}
.status
else
echo
fail
>
../../
${
1
}
_
${
2
}
.status
echo
FAIL
>
../../
${
1
}
_
${
2
}
.status
fi
fi
simple/Makefile
View file @
3adc2f8d
...
...
@@ -6,7 +6,7 @@ clean::
define
template
$(foreach
design,$(1),
$(foreach
script,$(2),
$(foreach
script,
verify
falsify
$(2),
work
::
$(design)/work_$(script)/.stamp
$(design)/work_$(script)/.stamp
:
...
...
simple/alu/top.v
View file @
3adc2f8d
...
...
@@ -13,7 +13,11 @@ module top (
4
:
dout
<=
dinA
<<
dinB
;
5
:
dout
<=
dinA
&
dinB
;
6
:
dout
<=
dinA
|
dinB
;
`ifndef
BUG
7
:
dout
<=
dinA
^
dinB
;
`else
7
:
dout
<=
-
dinA
^
dinB
;
`endif
endcase
end
endmodule
simple/run.sh
View file @
3adc2f8d
...
...
@@ -2,22 +2,41 @@
set
-ex
test
-d
$1
test
-f
scripts/
$2
.ys
if
[
"
$2
"
!=
"verify"
-a
"
$2
"
!=
"falsify"
]
;
then
test
-f
scripts/
$2
.ys
fi
rm
-rf
$1
/work_
$2
mkdir
$1
/work_
$2
cd
$1
/work_
$2
yosys
-ql
yosys.log ../../scripts/
$2
.ys
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v
if
[
"
$2
"
=
"verify"
]
;
then
iverilog
-o
testbench ../testbench.v ../../common.v ../top.v
elif
[
"
$2
"
=
"falsify"
]
;
then
iverilog
-DBUG
-o
testbench ../testbench.v ../../common.v ../top.v
else
yosys
-ql
yosys.log ../../scripts/
$2
.ys
iverilog
-o
testbench ../testbench.v ../../common.v synth.v
$(
yosys-config
--datdir
/common/simcells.v
)
fi
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
echo
fail
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
fail
>
${
1
}
_
${
2
}
.status
if
[
"
$2
"
=
"falsify"
]
;
then
if
vvp
-N
testbench
>
testbench.log 2>&1
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
!
grep
'ERROR'
testbench.log
||
grep
'OKAY'
testbench.log
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
echo
pass
>
${
1
}
_
${
2
}
.status
fi
else
echo
pass
>
${
1
}
_
${
2
}
.status
if
!
vvp
-N
testbench
>
testbench.log 2>&1
;
then
grep
'ERROR'
testbench.log
echo
FAIL
>
${
1
}
_
${
2
}
.status
elif
grep
'ERROR'
testbench.log
||
!
grep
'OKAY'
testbench.log
;
then
echo
FAIL
>
${
1
}
_
${
2
}
.status
else
echo
pass
>
${
1
}
_
${
2
}
.status
fi
fi
touch .stamp
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