utils.tcl: add get_tile_types function

Signed-off-by: Karol Gugala <kgugala@antmicro.com>
This commit is contained in:
Karol Gugala 2019-04-01 21:11:36 +02:00 committed by Tim 'mithro' Ansell
parent bb85f572c4
commit 64b39ffa29
1 changed files with 13 additions and 0 deletions

View File

@ -96,6 +96,19 @@ proc pblock_tiles {pblock} {
return [get_tiles "$clb_tiles $int_tiles"]
}
# returns list of unique tile types
proc get_tile_types {} {
set all_tiles [get_tiles]
set types {}
foreach tile $all_tiles {
set type [get_property TYPE $tile]
#ignore empty tiles
if {$type == "NULL"} { continue }
if {[lsearch -exact $types $type] == -1} {lappend types $type}
}
return $types
}
proc lintersect {lst1 lst2} {
set rlst {}
foreach el $lst1 {