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
76cff445
Commit
76cff445
authored
Aug 15, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Less fancy
parent
4c5c142e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
architecture/synth_xilinx_dsp/assert_area.py
+6
-11
No files found.
architecture/synth_xilinx_dsp/assert_area.py
View file @
76cff445
...
...
@@ -15,22 +15,17 @@ for fn in glob.glob('*.v'):
Areg
=
'A'
in
m
.
group
(
5
)
Breg
=
'B'
in
m
.
group
(
5
)
Preg
=
'P'
in
m
.
group
(
5
)
if
A
<
B
:
A
,
B
=
B
,
A
Asigned
,
Bsigned
=
Bsigned
,
Asigned
if
not
(
Asigned
and
Bsigned
):
A
+=
1
B
+=
1
Asigned
=
Bsigned
=
1
if
A
<
B
:
A
,
B
=
B
,
A
Asigned
,
Bsigned
=
Bsigned
,
Asigned
if
A
==
25
:
X
=
1
# No headroom needed on single multiplier
else
:
X
=
(
A
+
23
)
//
24
if
B
==
18
:
Y
=
1
# No headroom needed on single multiplier
else
:
Y
=
(
B
+
16
)
//
17
X
=
1
+
max
(
0
,
A
-
25
+
16
)
//
17
Y
=
1
+
max
(
0
,
B
-
18
+
16
)
//
17
count_MAC
=
X
*
Y
count_DFF
=
0
if
Preg
and
(
A
>
25
or
B
>
18
):
count_DFF
+=
A
+
B
...
...
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