mirror of https://github.com/openXC7/prjxray.git
Improve 013-intpips fuzzer
Signed-off-by: Clifford Wolf <clifford@clifford.at> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
a2f4ab2082
commit
1adf9b7676
|
|
@ -9,14 +9,17 @@ segmk = segmaker("design.bits")
|
|||
|
||||
tiledata = dict()
|
||||
pipdata = dict()
|
||||
ignpip = set()
|
||||
|
||||
print("Loading tags from design.txt.")
|
||||
with open("design.txt", "r") as f:
|
||||
for line in f:
|
||||
tile, pip, src, dst = line.split()
|
||||
tile, pip, src, dst, pnum, pdir = line.split()
|
||||
_, pip = pip.split(".")
|
||||
_, src = src.split("/")
|
||||
_, dst = dst.split("/")
|
||||
pnum = int(pnum)
|
||||
pdir = int(pdir)
|
||||
|
||||
if tile not in tiledata:
|
||||
tiledata[tile] = {
|
||||
|
|
@ -34,6 +37,15 @@ with open("design.txt", "r") as f:
|
|||
tiledata[tile]["srcs"].add(src)
|
||||
tiledata[tile]["dsts"].add(dst)
|
||||
|
||||
if pdir == 0:
|
||||
tiledata[tile]["srcs"].add(dst)
|
||||
tiledata[tile]["dsts"].add(src)
|
||||
|
||||
if pnum == 1 or pdir == 0 or \
|
||||
re.match(r"^LVB?(_L)?[0-9]", src) or \
|
||||
re.match(r"^LVB?(_L)?[0-9]", dst):
|
||||
ignpip.add(pip)
|
||||
|
||||
for tile, pips_srcs_dsts in tiledata.items():
|
||||
pips = pips_srcs_dsts["pips"]
|
||||
srcs = pips_srcs_dsts["srcs"]
|
||||
|
|
@ -41,9 +53,9 @@ for tile, pips_srcs_dsts in tiledata.items():
|
|||
|
||||
for pip, src_dst in pipdata.items():
|
||||
src, dst = src_dst
|
||||
if re.match(r"^LVB?(_L)?[0-9]", src) or re.match(r"^LVB?(_L)?[0-9]", dst):
|
||||
continue
|
||||
if pip in pips:
|
||||
if pip in ignpip:
|
||||
pass
|
||||
elif pip in pips:
|
||||
segmk.addtag(tile, "%s.%s" % (dst, src), 1)
|
||||
elif src_dst[1] not in dsts:
|
||||
segmk.addtag(tile, "%s.%s" % (dst, src), 0)
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ proc write_txtdata {filename} {
|
|||
set fp [open $filename w]
|
||||
foreach tile [get_tiles [regsub -all {CLBL[LM]} [get_tiles -of_objects [get_sites -of_objects [get_pblocks roi]]] INT]] {
|
||||
puts "Dumping pips from tile $tile"
|
||||
foreach pip [get_pips -filter {IS_DIRECTIONAL} -of_objects $tile] {
|
||||
foreach pip [get_pips -of_objects $tile] {
|
||||
if {[get_nets -quiet -of_objects $pip] != {}} {
|
||||
set src_wire [get_wires -uphill -of_objects $pip]
|
||||
set dst_wire [get_wires -downhill -of_objects $pip]
|
||||
if {[llength [get_nodes -uphill -of_objects [get_nodes -of_objects $dst_wire]]] != 1} {
|
||||
puts $fp "$tile $pip $src_wire $dst_wire"
|
||||
}
|
||||
set num_pips [llength [get_nodes -uphill -of_objects [get_nodes -of_objects $dst_wire]]]
|
||||
set dir_prop [get_property IS_DIRECTIONAL $pip]
|
||||
puts $fp "$tile $pip $src_wire $dst_wire $num_pips $dir_prop"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue