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
630a4ee8
Commit
630a4ee8
authored
Sep 06, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
c53d348b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
architecture/synth_xilinx_dsp/assert_area.py
+8
-2
architecture/synth_xilinx_dsp/ug901b.v
+3
-1
No files found.
architecture/synth_xilinx_dsp/assert_area.py
View file @
630a4ee8
...
@@ -30,12 +30,18 @@ for fn in glob.glob('*.v'):
...
@@ -30,12 +30,18 @@ for fn in glob.glob('*.v'):
count_DFF
=
0
count_DFF
=
0
if
Mreg
and
(
A
>
25
or
B
>
18
):
if
Mreg
and
(
A
>
25
or
B
>
18
):
count_DFF
+=
A
+
B
-
1
count_DFF
+=
A
+
B
if
not
macc
:
count_DFF
-=
1
# For pure multipliers, expect last slice to absorb
# at least one register
if
Preg
and
(
A
>
25
or
B
>
18
):
if
Preg
and
(
A
>
25
or
B
>
18
):
count_DFF
+=
A
+
B
-
1
count_DFF
+=
A
+
B
if
macc
:
if
macc
:
count_DFF
+=
5
# In my testcases, accumulator is always
count_DFF
+=
5
# In my testcases, accumulator is always
# 5bits bigger than multiplier result
# 5bits bigger than multiplier result
else
:
count_DFF
-=
1
# For pure multipliers, expect last slice to absorb
# at least one register
# TODO: More assert on number of CARRY and LUTs
# TODO: More assert on number of CARRY and LUTs
count_CARRY
=
''
count_CARRY
=
''
if
not
macc
and
(
A
<=
25
or
B
<=
18
):
if
not
macc
and
(
A
<=
25
or
B
<=
18
):
...
...
architecture/synth_xilinx_dsp/ug901b.v
View file @
630a4ee8
...
@@ -51,6 +51,7 @@ generate
...
@@ -51,6 +51,7 @@ generate
endgenerate
endgenerate
endmodule
endmodule
(
*
gentb_skip
*
)
// Prevents Yosys' test_autotb from operating on this module
(
*
dont_touch
=
"yes"
*
)
(
*
dont_touch
=
"yes"
*
)
module
sfir_shifter
#(
parameter
dsize
=
16
,
nbtap
=
4
)
(
module
sfir_shifter
#(
parameter
dsize
=
16
,
nbtap
=
4
)
(
input
clk
,
input
clk
,
...
@@ -68,6 +69,7 @@ end
...
@@ -68,6 +69,7 @@ end
assign
dataout
=
tmp
[
2
*
nbtap
-
1
]
;
assign
dataout
=
tmp
[
2
*
nbtap
-
1
]
;
endmodule
endmodule
(
*
gentb_skip
*
)
// Prevents Yosys' test_autotb from operating on this module
module
sfir_even_symmetric_systolic_element
#(
parameter
dsize
=
16
)
(
module
sfir_even_symmetric_systolic_element
#(
parameter
dsize
=
16
)
(
input
clk
,
input
clk
,
input
signed
[
dsize
-
1
:
0
]
coeffin
,
datain
,
datazin
,
input
signed
[
dsize
-
1
:
0
]
coeffin
,
datain
,
datazin
,
...
@@ -98,7 +100,7 @@ endmodule
...
@@ -98,7 +100,7 @@ endmodule
`ifndef
_
AUTOTB
`ifndef
_
AUTOTB
module
__
test
;
module
__
test
;
wire
[
4095
:
0
]
assert_area
=
"cd ug901b;
select t:DSP48E1 -assert-count 1; select t:FDRE -assert-count 1; select -assert-none t:DSP48E1 t:BUFG t:FDR
E %% t:* %D"
;
wire
[
4095
:
0
]
assert_area
=
"cd ug901b;
flatten; select t:DSP48E1 -assert-count 4; select t:FDRE -assert-count 128; select t:SRL16E -assert-count 16; select -assert-none t:DSP48E1 t:BUFG t:FDRE t:SRL16
E %% t:* %D"
;
endmodule
endmodule
`endif
`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