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
d4da1447
Commit
d4da1447
authored
Sep 19, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable testing dffe on ice40 DSPs
parent
c42bb714
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
architecture/synth_ice40_dsp/assert_area.py
+7
-0
architecture/synth_ice40_dsp/generate_mul.py
+1
-1
architecture/synth_ice40_dsp/mul_16_16_keepABP_.v
+1
-1
No files found.
architecture/synth_ice40_dsp/assert_area.py
View file @
d4da1447
...
...
@@ -10,6 +10,7 @@ for fn in glob.glob('*.v'):
m
=
re_mux
.
match
(
fn
)
if
not
m
:
continue
macc
=
False
A
,
B
=
map
(
int
,
m
.
group
(
1
,
3
))
Asigned
,
Bsigned
=
m
.
group
(
2
,
4
)
Areg
=
'A'
in
m
.
group
(
5
)
...
...
@@ -29,6 +30,12 @@ for fn in glob.glob('*.v'):
count_DFF
+=
A
+
B
if
Preg
and
(
A
>
16
or
B
>
16
):
count_DFF
+=
A
+
B
if
macc
:
count_DFF
+=
5
# In my testcases, accumulator is always
# 5bits bigger than multiplier result
elif
(
A
>
16
)
^
(
B
>
16
):
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
(
A
<=
16
or
B
<=
16
)
and
A
%
16
!=
1
and
B
%
16
!=
1
:
...
...
architecture/synth_ice40_dsp/generate_mul.py
View file @
d4da1447
...
...
@@ -6,4 +6,4 @@ ARange = ['16','16s','17','17s','24','24s','31','31s','32','32s','33','33s','47'
BRange
=
[
'15'
,
'15s'
,
'16'
,
'16s'
,
'17'
,
'17s'
,
'24'
,
'24s'
,
'31'
,
'31s'
,
'32'
,
'32s'
]
if
__name__
==
"__main__"
:
gen_mul
(
ARange
,
BRange
)
gen_mul
(
ARange
,
BRange
,
"ABP"
)
architecture/synth_ice40_dsp/mul_16_16_keepABP_.v
View file @
d4da1447
...
...
@@ -23,7 +23,7 @@ endmodule
`ifndef
_
AUTOTB
module
__
test
;
wire
[
4095
:
0
]
assert_area
=
"cd mul_16_16_keepABP_; select t:SB_MAC16 -assert-count 1; select t:SB_DFF* -assert-count
64
"
;
wire
[
4095
:
0
]
assert_area
=
"cd mul_16_16_keepABP_; select t:SB_MAC16 -assert-count 1; select t:SB_DFF* -assert-count
32
"
;
endmodule
`endif
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