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
5e97a7d8
Commit
5e97a7d8
authored
Sep 19, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update assert_area.py
parent
d4da1447
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
architecture/synth_xilinx_dsp/assert_area.py
+7
-7
No files found.
architecture/synth_xilinx_dsp/assert_area.py
View file @
5e97a7d8
...
...
@@ -34,17 +34,17 @@ for fn in glob.glob('*.v'):
count_DFF
=
0
if
Mreg
and
(
A
>
25
or
B
>
18
):
count_DFF
+=
A
+
B
if
not
macc
:
count_DFF
-=
1
# For pure multipliers
, expect last slice to absorb
# at least one register
if
not
macc
and
(
A
>
25
)
^
(
B
>
18
)
:
count_DFF
-=
1
# For pure multipliers
with just one big dimension,
#
expect last slice to absorb
at least one register
if
Preg
and
(
A
>
25
or
B
>
18
):
count_DFF
+=
A
+
B
if
macc
:
count_DFF
+=
5
# In my testcases, accumulator is always
# 5bits bigger than multiplier result
el
se
:
count_DFF
-=
1
# For pure multipliers
, expect last slice to absorb
# at least one register
el
if
(
A
>
25
)
^
(
B
>
18
)
:
count_DFF
-=
1
# For pure multipliers
with just one big dimension,
#
expect last slice to absorb
at least one register
# TODO: More assert on number of CARRY and LUTs
count_CARRY
=
''
if
not
macc
and
(
A
<=
25
or
B
<=
18
):
...
...
@@ -56,7 +56,7 @@ for fn in glob.glob('*.v'):
print
(
'''
`ifndef _AUTOTB
module __test ;
wire [4095:0] assert_area = "cd {0}; select t:DSP48E1 -assert-
count
{1}; select t:FD* -assert-max {2}{3}";
wire [4095:0] assert_area = "cd {0}; select t:DSP48E1 -assert-
max
{1}; select t:FD* -assert-max {2}{3}";
endmodule
`endif
'''
.
format
(
os
.
path
.
splitext
(
fn
)[
0
],
count_MAC
,
count_DFF
,
count_CARRY
),
file
=
f
)
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