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
b9550055
Commit
b9550055
authored
Jul 15, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initial tests for DSP muls
parent
e5dabce1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
architecture/Makefile
+1
-0
architecture/synth_xilinx_dsp/assert_area.py
+24
-0
architecture/synth_xilinx_dsp/run-test.sh
+31
-0
No files found.
architecture/Makefile
View file @
b9550055
...
...
@@ -72,6 +72,7 @@ $(eval $(call template,synth_xilinx_error,synth_xilinx_fully_selected synth_xili
ifeq
($(ENABLE_HEAVY_TESTS),1)
$(eval
$(call
template,synth_xilinx_srl,synth_xilinx_srl))
$(eval
$(call
template,synth_xilinx_mux,synth_xilinx_mux))
$(eval
$(call
template,synth_xilinx_dsp,synth_xilinx_dsp))
endif
#greenpak4
...
...
architecture/synth_xilinx_dsp/assert_area.py
0 → 100755
View file @
b9550055
#!/usr/bin/python3
import
glob
import
re
import
os
re_mux
=
re
.
compile
(
r'mul_(\d+)_(\d+)\.v'
)
for
fn
in
glob
.
glob
(
'*.v'
):
m
=
re_mux
.
match
(
fn
)
if
not
m
:
continue
A
,
B
=
map
(
int
,
m
.
group
(
1
,
2
))
bn
,
_
=
os
.
path
.
splitext
(
fn
)
with
open
(
fn
,
'a'
)
as
f
:
print
(
'''
`ifndef _AUTOTB
module __test ;
wire [4095:0] assert_area = "cd; select t:DSP48E1 -assert-count 1";
endmodule
`endif
'''
,
file
=
f
)
architecture/synth_xilinx_dsp/run-test.sh
0 → 100755
View file @
b9550055
#!/bin/bash
set
-e
OPTIND
=
1
seed
=
""
# default to no seed specified
while
getopts
"S:"
opt
do
case
"
$opt
"
in
S
)
arg
=
"
${
OPTARG
#
"
${
OPTARG
%%[![
:space:]]
*
}
"
}
"
# remove leading space
seed
=
"SEED=
$arg
"
;;
esac
done
shift
"
$((
OPTIND-1
))
"
# check for Icarus Verilog
if
!
which iverilog
>
/dev/null
;
then
echo
"
$0
: Error: Icarus Verilog 'iverilog' not found."
exit
1
fi
#wget https://raw.githubusercontent.com/YosysHQ/yosys-bench/master/verilog/benchmarks_small/mul/generate.py -O generate_mul.py -o /dev/null
cp ~/yosys/yosys-bench/verilog/benchmarks_small/mul/generate.py generate_mul.py
python3 generate_mul.py
python3 ../assert_area.py
${
MAKE
:-
make
}
-f
../../../../tools/autotest.mk
$seed
*
.v
EXTRA_FLAGS
=
"
\
-p 'design -copy-to __test __test;
\
synth_xilinx -abc9;
\
design -copy-from __test *;
\
select -assert-any __test;
\
script -scriptwire __test/w:assert_area'
\
-l ../../../../../techlibs/xilinx/cells_sim.v"
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