Merge pull request #24 from SymbiFlow/next-clifford

Get rid of hardcoded slices in some fuzzers
This commit is contained in:
Tim Ansell 2017-12-26 21:19:57 +01:00 committed by GitHub
commit 21fbacdb8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 42 deletions

View File

@ -21,8 +21,8 @@ write_checkpoint -force design.dcp
source ../../../utils/utils.tcl
if [regexp "_001$" [pwd]] {set tile [get_tiles HCLK_L_X36Y130]}
if [regexp "_002$" [pwd]] {set tile [get_tiles HCLK_R_X37Y130]}
if [regexp "_001$" [pwd]] {set tile [lindex [filter [roi_tiles] {TILE_TYPE == HCLK_L}] 0]}
if [regexp "_002$" [pwd]] {set tile [lindex [filter [roi_tiles] {TILE_TYPE == HCLK_R}] 0]}
set net [get_nets o_OBUF]
set pips [get_pips -of_objects $tile]

View File

@ -13,8 +13,11 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
+set -ex; make clean; make; make pushdb
clean:
rm -rf specimen_[0-9][0-9][0-9]/ tileconn.json
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -20,6 +20,8 @@ route_design
write_checkpoint -force design.dcp
# write_bitstream -force design.bit
source ../../../utils/utils.tcl
proc print_tile_pair {fp t1 t2} {
set t1 [get_tiles $t1]
set t2 [get_tiles $t2]
@ -47,41 +49,31 @@ proc print_tile_pair {fp t1 t2} {
}
}
proc print_tile_pairs {fp lst} {
for {set i 1} {$i < [llength $lst]} {incr i} {
print_tile_pair $fp [lindex $lst [expr $i - 1]] [lindex $lst $i]
}
}
set tiles [roi_tiles]
set horz_cache [dict create]
set vert_cache [dict create]
set fp [open "tilepairs.txt" w]
if {$::env(XRAY_DATABASE) == "artix7"} {
# horizontal pairs
print_tile_pairs $fp "INT_R_X13Y114 CLBLL_R_X13Y114 CLBLL_L_X14Y114 INT_L_X14Y114 INT_R_X15Y114"
print_tile_pairs $fp "VBRK_X29Y125 CLBLM_L_X10Y120 INT_L_X10Y120 INT_R_X11Y120 CLBLM_R_X11Y120 VBRK_X34Y125 CLBLL_L_X12Y120"
print_tile_pairs $fp "CLBLL_R_X17Y113 VFRAME_X47Y118"
print_tile_pairs $fp "HCLK_VBRK_X29Y130 HCLK_CLB_X30Y130 HCLK_L_X31Y130 HCLK_R_X32Y130 HCLK_CLB_X33Y130 HCLK_VBRK_X34Y130 HCLK_CLB_X35Y130"
print_tile_pairs $fp "HCLK_CLB_X46Y130 HCLK_VFRAME_X47Y130"
print_tile_pairs $fp "T_TERM_INT_X31Y156 T_TERM_INT_X32Y156"
print_tile_pairs $fp "BRKH_CLB_X10Y99 BRKH_INT_X10Y99 BRKH_INT_X11Y99 BRKH_CLB_X11Y99"
print_tile_pairs $fp "BRKH_B_TERM_INT_X36Y104 BRKH_B_TERM_INT_X37Y104"
foreach tile $tiles {
set tile_type [get_property TILE_TYPE $tile]
set grid_x [get_property GRID_POINT_X $tile]
set grid_y [get_property GRID_POINT_Y $tile]
# vertical pairs
print_tile_pairs $fp "CLBLM_L_X10Y115 CLBLM_L_X10Y114"
print_tile_pairs $fp "INT_L_X10Y115 INT_L_X10Y114"
print_tile_pairs $fp "INT_R_X11Y115 INT_R_X11Y114"
print_tile_pairs $fp "CLBLM_R_X11Y115 CLBLM_R_X11Y114"
print_tile_pairs $fp "VBRK_X34Y120 VBRK_X34Y119"
print_tile_pairs $fp "CLBLL_L_X12Y115 CLBLL_L_X12Y114"
print_tile_pairs $fp "CLBLL_R_X13Y115 CLBLL_R_X13Y115"
print_tile_pairs $fp "VFRAME_X47Y120 VFRAME_X47Y119"
print_tile_pairs $fp "T_TERM_INT_X31Y156 INT_L_X10Y149"
print_tile_pairs $fp "T_TERM_INT_X32Y156 INT_R_X11Y149"
print_tile_pairs $fp "CLBLM_L_X10Y100 BRKH_CLB_X10Y99"
print_tile_pairs $fp "INT_L_X10Y100 BRKH_INT_X10Y99"
print_tile_pairs $fp "INT_R_X11Y100 BRKH_INT_X11Y99"
print_tile_pairs $fp "CLBLM_R_X11Y100 BRKH_CLB_X11Y99"
print_tile_pairs $fp "INT_L_X12Y100 BRKH_B_TERM_INT_X36Y104"
print_tile_pairs $fp "INT_R_X13Y100 BRKH_B_TERM_INT_X37Y104"
set horz_tile [get_tiles -filter "GRID_POINT_X == [expr $grid_x + 1] && GRID_POINT_Y == $grid_y"]
set vert_tile [get_tiles -filter "GRID_POINT_Y == [expr $grid_y + 1] && GRID_POINT_X == $grid_x"]
set horz_type [get_property TILE_TYPE $horz_tile]
set vert_type [get_property TILE_TYPE $vert_tile]
if {! [dict exists $horz_cache $tile_type.$horz_type]} {
dict append horz_cache $tile_type.$horz_type
print_tile_pair $fp $tile $horz_tile
}
if {! [dict exists $vert_cache $tile_type.$vert_type]} {
dict append vert_cache $tile_type.$vert_type
print_tile_pair $fp $tile $vert_tile
}
}
close $fp

View File

@ -23,8 +23,11 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
+set -ex; make clean; make; make pushdb
clean:
rm -rf specimen_[0-9][0-9][0-9]/ ppips_clbl[ml]_[lr].txt ppips_int_[lr].txt
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -60,10 +60,11 @@ proc write_int_ppips_db {filename tile} {
close $fp
}
write_clb_ppips_db "ppips_clblm_l.txt" CLBLM_L_X10Y115
write_clb_ppips_db "ppips_clblm_r.txt" CLBLM_R_X11Y115
write_clb_ppips_db "ppips_clbll_l.txt" CLBLL_L_X12Y115
write_clb_ppips_db "ppips_clbll_r.txt" CLBLL_R_X13Y115
write_int_ppips_db "ppips_int_l.txt" INT_L_X12Y115
write_int_ppips_db "ppips_int_r.txt" INT_R_X13Y115
foreach tile_type {CLBLM_L CLBLM_R CLBLL_L CLBLL_R INT_L INT_R} {
set tiles [get_tiles -filter "TILE_TYPE == $tile_type"]
if {[llength $tiles] != 0} {
set tile [lindex $tiles 0]
write_clb_ppips_db "ppips_[string tolower $tile_type].txt" $tile
}
}

View File

@ -55,6 +55,13 @@ proc randplace_pblock {num pblock} {
}
}
proc roi_tiles {} {
return [get_tiles -filter "GRID_POINT_X >= $::env(XRAY_ROI_GRID_X1) && \
GRID_POINT_X < $::env(XRAY_ROI_GRID_X2) && \
GRID_POINT_Y >= $::env(XRAY_ROI_GRID_Y1) && \
GRID_POINT_Y < $::env(XRAY_ROI_GRID_Y2)"]
}
proc pblock_tiles {pblock} {
set clb_tiles [get_tiles -of_objects [get_sites -of_objects [get_pblocks $pblock]]]
set int_tiles [get_tiles [regsub -all {CLBL[LM]} $clb_tiles INT]]