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
d6f001d7
Commit
d6f001d7
authored
Aug 09, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More testing
parent
f3f90a5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
architecture/synth_ice40_dsp/assert_area.py
+4
-1
architecture/synth_xilinx_dsp/assert_area.py
+7
-5
architecture/synth_xilinx_dsp/generate_mul.py
+9
-0
No files found.
architecture/synth_ice40_dsp/assert_area.py
View file @
d6f001d7
...
@@ -29,7 +29,10 @@ for fn in glob.glob('*.v'):
...
@@ -29,7 +29,10 @@ for fn in glob.glob('*.v'):
count_DFF
+=
A
+
B
count_DFF
+=
A
+
B
if
Preg
and
(
A
>
16
or
B
>
16
):
if
Preg
and
(
A
>
16
or
B
>
16
):
count_DFF
+=
A
+
B
count_DFF
+=
A
+
B
# TODO: Assert on number of SB_CARRY and SB_LUT too
# TODO: More assert on number of CARRY and LUTs
count_CARRY
=
''
if
A
<=
16
or
B
<=
16
:
count_CARRY
=
'; select t:SB_CARRY -assert-none; select t:SB_LUT -assert-none'
;
bn
,
_
=
os
.
path
.
splitext
(
fn
)
bn
,
_
=
os
.
path
.
splitext
(
fn
)
...
...
architecture/synth_xilinx_dsp/assert_area.py
View file @
d6f001d7
...
@@ -32,9 +32,12 @@ for fn in glob.glob('*.v'):
...
@@ -32,9 +32,12 @@ for fn in glob.glob('*.v'):
Y
=
(
B
+
16
)
//
17
Y
=
(
B
+
16
)
//
17
count_MAC
=
X
*
Y
count_MAC
=
X
*
Y
count_DFF
=
0
count_DFF
=
0
if
Preg
:
if
Preg
and
(
A
>
25
or
B
>
18
)
:
count_DFF
+=
A
+
B
count_DFF
+=
A
+
B
# TODO: Assert on number of CARRY4s too
# TODO: More assert on number of CARRY and LUTs
count_CARRY
=
''
if
A
<=
25
or
B
<=
18
:
count_CARRY
=
'; select t:XORCY -assert-none; select t:LUT* -assert-none'
;
bn
,
_
=
os
.
path
.
splitext
(
fn
)
bn
,
_
=
os
.
path
.
splitext
(
fn
)
...
@@ -42,8 +45,7 @@ for fn in glob.glob('*.v'):
...
@@ -42,8 +45,7 @@ for fn in glob.glob('*.v'):
print
(
'''
print
(
'''
`ifndef _AUTOTB
`ifndef _AUTOTB
module __test ;
module __test ;
wire [4095:0] assert_area = "cd {0}; select t:DSP48E1 -assert-count {1}; select t:FD* -assert-max {2}";
wire [4095:0] assert_area = "cd {0}; select t:DSP48E1 -assert-count {1}; select t:FD* -assert-max {2}{3}";
// {3} {4} {5} {6} X={7} Y={8}
endmodule
endmodule
`endif
`endif
'''
.
format
(
os
.
path
.
splitext
(
fn
)[
0
],
count_MAC
,
count_DFF
,
A
,
B
,
Asigned
,
Bsigned
,
X
,
Y
),
file
=
f
)
'''
.
format
(
os
.
path
.
splitext
(
fn
)[
0
],
count_MAC
,
count_DFF
,
count_CARR
Y
),
file
=
f
)
architecture/synth_xilinx_dsp/generate_mul.py
0 → 100644
View file @
d6f001d7
#!/usr/bin/env python3
from
common_mul
import
gen_mul
ARange
=
[
'17'
,
'17s'
,
'18'
,
'18s'
,
'19'
,
'19s'
,
'24'
,
'24s'
,
'25'
,
'25s'
,
'36'
,
'36s'
,
'49'
,
'49s'
,
'50'
,
'50s'
,
'75'
,
'75s'
]
BRange
=
[
'17'
,
'17s'
,
'18'
,
'18s'
,
'19'
,
'19s'
,
'27'
,
'27s'
,
'34'
,
'34s'
,
'35'
,
'35s'
,
'36'
,
'36s'
]
if
__name__
==
"__main__"
:
gen_mul
(
ARange
,
BRange
)
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