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
4c5c142e
Commit
4c5c142e
authored
Aug 13, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some SB_CARRY/SB_LUT asserts for ice40
parent
d6f001d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
architecture/synth_ice40_dsp/assert_area.py
+4
-3
No files found.
architecture/synth_ice40_dsp/assert_area.py
View file @
4c5c142e
...
...
@@ -31,8 +31,9 @@ for fn in glob.glob('*.v'):
count_DFF
+=
A
+
B
# TODO: More assert on number of CARRY and LUTs
count_CARRY
=
''
if
A
<=
16
or
B
<=
16
:
if
(
A
<=
16
or
B
<=
16
)
and
A
%
16
!=
1
and
B
%
16
!=
1
:
count_CARRY
=
'; select t:SB_CARRY -assert-none; select t:SB_LUT -assert-none'
;
count_DFF
=
0
bn
,
_
=
os
.
path
.
splitext
(
fn
)
...
...
@@ -40,7 +41,7 @@ for fn in glob.glob('*.v'):
print
(
'''
`ifndef _AUTOTB
module __test ;
wire [4095:0] assert_area = "cd {0}; select t:SB_MAC16 -assert-count {1}; select t:SB_DFF* -assert-max {2}";
wire [4095:0] assert_area = "cd {0}; select t:SB_MAC16 -assert-count {1}; select t:SB_DFF* -assert-max {2}
{3}
";
endmodule
`endif
'''
.
format
(
os
.
path
.
splitext
(
fn
)[
0
],
count_MAC
,
count_DFF
),
file
=
f
)
'''
.
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