Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
18
Issues
18
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Platform-independent core collection
Commits
c3844bc6
Commit
c3844bc6
authored
Jun 05, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate_cdc_constraints: handle gc_sync_word_*
Fix some warnings
parent
a67a0f49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
8 deletions
+45
-8
generate_cdc_constraints.tcl
tools/generate_cdc_constraints.tcl
+45
-8
No files found.
tools/generate_cdc_constraints.tcl
View file @
c3844bc6
...
...
@@ -28,15 +28,21 @@
## obtain one at https://mozilla.org/MPL/2.0/.
##-------------------------------------------------------------------------------
# Note: you can make sure all warnings for unmatched pins are displayed using:
# set_msg_config -id "Vivado 12-508" -limit 999999
proc
generate_gc_sync_constraints
{
f_out
}
{
set the_cells
[
get_cells -hier -filter
{
REF_NAME=~gc_sync*
}
]
set count 0
foreach cell
$the
_cells
{
#skip gc_sync_ffs instances (as they contain a gc_sync inside
)
if
{[
string
first
"gc_sync_ffs"
[
get_property REF_NAME
[
get_cells
$cell
]]]
!= -1
}
{
puts
$f
_out
"#WARNING: skip gc_sync_ffs cell '
$cell
'"
#skip non gc_sync instances
(
as they contain a gc_sync inside
)
set name
[
get_property REF_NAME
$cell
]
if
{[
string
first
"gc_sync_ffs"
"
$name
"
]
!= -1
||
[
string
first
"gc_sync_word_"
"
$name
"
]
!= -1
||
[
string
first
"gc_sync_register"
"
$name
"
]
!= -1
}
{
puts
$f
_out
"#NOTE: skip '
$name
' cell '
$cell
'"
continue
}
...
...
@@ -51,7 +57,7 @@ proc generate_gc_sync_constraints { f_out } {
}
if
{
"
$dst
_ff"
==
""
}
{
puts
$f
_out
"#WARNING: can't find destination FF for cell '
$cell
'"
puts
$f
_out
"#WARNING: can't find destination FF for
sync
cell '
$cell
'"
continue
}
...
...
@@ -88,10 +94,8 @@ proc generate_gc_sync_register_constraints { f_out } {
set dst_ff_clr
[
get_pins -hier -filter
"name=~
$cell
/sync*_*
[
*
]
/CLR"
]
}
puts
$dst
_ff
if
{
"
$dst
_ff"
==
""
}
{
puts
$f
_out
"#WARNING: can't find destination FF for cell '
$cell
'"
puts
$f
_out
"#WARNING: can't find destination FF for
sync reg
cell '
$cell
'"
continue
}
...
...
@@ -99,7 +103,7 @@ proc generate_gc_sync_register_constraints { f_out } {
set src_ff
[
get_cells -of_objects
[
get_pins -filter
{
IS_LEAF && DIRECTION == OUT
}
-of_objects
[
get_nets -segments -of_objects
$dst
_ff
]]]
set clk_period
[
get_property PERIOD
[
lindex
$clk
0
]
]
puts
"
Cell:
$cell
, src
$src
_ff, dst
$dst
_ff, clock
$clk
, period
$clk
_period"
puts
$f
_out
"#
Cell:
$cell
, src
$src
_ff, dst
$dst
_ff, clock
$clk
, period
$clk
_period"
puts
$f
_out
"set_max_delay
$clk
_period -quiet -datapath_only -from {
$src
_ff } -to {
$dst
_ff }"
puts
$f
_out
"set_bus_skew
$clk
_period -quiet -from {
$src
_ff } -to {
$dst
_ff }"
...
...
@@ -112,6 +116,37 @@ proc generate_gc_sync_register_constraints { f_out } {
return
$count
}
proc
generate_gc_sync_word_constraints
{
f_out
}
{
set the_cells
[
get_cells -hier -filter
{
REF_NAME=~gc_sync_word_*
}
]
set count 0
foreach cell
$the
_cells
{
set src_ffs
[
get_pins
"
$cell
/gc_sync_word_data_reg
[
*
]
/Q"
]
if
{
"
$src
_ffs"
==
""
}
{
puts
$f
_out
"#WARNING: can't find source FF for cell '
$cell
'"
continue
}
puts
$f
_out
"#Cell:
$cell
"
foreach src_ff
$src
_ffs
{
set src_nets
[
get_nets -segments -of_objects
$src
_ff
]
set dst_pins
[
get_pins -filter
{
DIRECTION==IN
}
-of_objects
$src
_nets
]
set dst_ff
[
get_cells -of_objects
$dst
_pins
]
set clk
[
get_clocks -of_objects
[
get_pins -filter
{
REF_PIN_NAME=~C
}
-of
$dst
_ff
]
]
set clk_period
[
get_property PERIOD
[
lindex
$clk
0
]
]
puts
$f
_out
"set_max_delay
$clk
_period -datapath_only -from {
$src
_ff } -to {
$dst
_ff }"
}
incr count
}
return
$count
}
proc
generate_gc_reset_multi_aasd_constraints
{
f_out
}
{
set the_cells
[
get_cells -hier -filter
{
REF_NAME=~gc_reset_multi_aasd*
}
]
set count 0
...
...
@@ -167,10 +202,12 @@ set f_out [open "gencores_constraints.xdc" w]
set
n_gc_sync_cells
[
generate_gc_sync_constraints
$f
_out
]
set
n_gc_sync_register_cells
[
generate_gc_sync_register_constraints
$f
_out
]
set
n_gc_reset_multi_aasd_cells
[
generate_gc_reset_multi_aasd_constraints
$f
_out
]
set
n_gc_sync_word_cells
[
generate_gc_sync_word_constraints
$f
_out
]
#set n_gc_falsepath_waiver_cells [ generate_gc_falsepath_waiver_constraints $f_out
]
puts
"gencores CDC statistics: "
puts
" - gc_sync:
$n
_gc_sync_cells instances"
puts
" - gc_sync_register:
$n
_gc_sync_register_cells instances"
puts
" - gc_sync_word:
$n
_gc_sync_word_cells instances"
puts
" - gc_reset_multi_aasd:
$n
_gc_reset_multi_aasd_cells instances"
#puts " - gc_falsepath_waiver: $n_gc_falsepath_waiver_cells instances"
...
...
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