mirror of https://github.com/openXC7/prjxray.git
Update database
Signed-off-by: Clifford Wolf <clifford@clifford.at> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
8eee91472e
commit
4df3a9bce7
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys, re
|
||||
import sys, os, re
|
||||
|
||||
sys.path.append("../../../utils/")
|
||||
from segmaker import segmaker
|
||||
|
|
@ -58,6 +58,14 @@ for tile, pips_srcs_dsts in tiledata.items():
|
|||
elif src_dst[1] not in dsts:
|
||||
segmk.addtag(tile, "%s.%s" % (dst, src), 0)
|
||||
|
||||
segmk.compile()
|
||||
def bitfilter(frame_idx, bit_idx):
|
||||
assert os.getenv("XRAY_DATABASE") == "artix7"
|
||||
if frame_idx == 0 and bit_idx == 48:
|
||||
return False
|
||||
if frame_idx == 1 and bit_idx == 31:
|
||||
return False
|
||||
return frame_idx in [0, 1]
|
||||
|
||||
segmk.compile(bitfilter=bitfilter)
|
||||
segmk.write()
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class segmaker:
|
|||
self.tags[site] = dict()
|
||||
self.tags[site][name] = value
|
||||
|
||||
def compile(self):
|
||||
def compile(self, bitfilter=None):
|
||||
print("Compiling segment data.")
|
||||
|
||||
self.segments_by_type = dict()
|
||||
|
|
@ -60,8 +60,11 @@ class segmaker:
|
|||
if wordidx not in self.bits[base_frame]:
|
||||
continue
|
||||
for bit_frame, bit_wordidx, bit_bitidx in self.bits[base_frame][wordidx]:
|
||||
bitname = "%02d_%02d" % (bit_frame - base_frame, 32*(bit_wordidx - segdata["baseaddr"][1]) + bit_bitidx)
|
||||
segments[segname]["bits"].add(bitname)
|
||||
bitname_frame = bit_frame - base_frame
|
||||
bitname_bit = 32*(bit_wordidx - segdata["baseaddr"][1]) + bit_bitidx
|
||||
if bitfilter is None or bitfilter(bitname_frame, bitname_bit):
|
||||
bitname = "%02d_%02d" % (bitname_frame, bitname_bit)
|
||||
segments[segname]["bits"].add(bitname)
|
||||
|
||||
if tilename in self.tags:
|
||||
add_segbits()
|
||||
|
|
|
|||
Loading…
Reference in New Issue