mirror of https://github.com/openXC7/prjxray.git
Fix dsp and bram mask generation
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
93d61a3297
commit
09e6426533
|
|
@ -87,7 +87,7 @@ def add_zero_bits(tile_type):
|
||||||
print(line, file=f)
|
print(line, file=f)
|
||||||
|
|
||||||
|
|
||||||
def update_mask(mask_db, *src_dbs):
|
def update_mask(mask_db, *src_dbs, offset=0):
|
||||||
bits = set()
|
bits = set()
|
||||||
mask_db_file = "%s/%s/mask_%s.db" % (
|
mask_db_file = "%s/%s/mask_%s.db" % (
|
||||||
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"), mask_db)
|
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"), mask_db)
|
||||||
|
|
@ -111,8 +111,12 @@ def update_mask(mask_db, *src_dbs):
|
||||||
for line in f:
|
for line in f:
|
||||||
line = line.split()
|
line = line.split()
|
||||||
for bit in line[1:]:
|
for bit in line[1:]:
|
||||||
if bit[0] != "!":
|
if bit[0] == "!":
|
||||||
bits.add(bit)
|
continue
|
||||||
|
if offset != 0:
|
||||||
|
m = re.match(r"(\d+)_(\d+)", bit)
|
||||||
|
bit = "%02d_%02d" % (int(m.group(1)), int(m.group(2)) + offset)
|
||||||
|
bits.add(bit)
|
||||||
|
|
||||||
if len(bits) > 0:
|
if len(bits) > 0:
|
||||||
with open(mask_db_file, "w") as f:
|
with open(mask_db_file, "w") as f:
|
||||||
|
|
@ -134,8 +138,13 @@ update_mask("clblm_r", "clblm_r", "int_r")
|
||||||
update_mask("hclk_l", "hclk_l")
|
update_mask("hclk_l", "hclk_l")
|
||||||
update_mask("hclk_r", "hclk_r")
|
update_mask("hclk_r", "hclk_r")
|
||||||
|
|
||||||
|
update_mask("bram_l", "bram_l")
|
||||||
|
update_mask("bram_r", "bram_r")
|
||||||
|
update_mask("dsp_l", "dsp_l")
|
||||||
|
update_mask("dsp_r", "dsp_r")
|
||||||
|
|
||||||
for k in range(5):
|
for k in range(5):
|
||||||
update_mask("bram%d_l" % k, "bram%d_l" % k, "int_l")
|
update_mask("bram_l", "int_l", offset=64*k)
|
||||||
update_mask("bram%d_r" % k, "bram%d_r" % k, "int_r")
|
update_mask("bram_r", "int_r", offset=64*k)
|
||||||
update_mask("dsp%d_l" % k, "dsp%d_l" % k, "int_l")
|
update_mask("dsp_l", "int_l", offset=64*k)
|
||||||
update_mask("dsp%d_r" % k, "dsp%d_r" % k, "int_r")
|
update_mask("dsp_r", "int_r", offset=64*k)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,16 @@ case "$1" in
|
||||||
-e 's/^CLB\.SLICE_X0\./CLBLM_R.SLICEM_X0./' \
|
-e 's/^CLB\.SLICE_X0\./CLBLM_R.SLICEM_X0./' \
|
||||||
-e 's/^CLB\.SLICE_X1\./CLBLM_R.SLICEL_X1./' ;;
|
-e 's/^CLB\.SLICE_X1\./CLBLM_R.SLICEL_X1./' ;;
|
||||||
|
|
||||||
|
dsp_l)
|
||||||
|
sed < "$2" > "$tmp1" -e 's/^DSP\./DSP_L./' ;;
|
||||||
|
dsp_r)
|
||||||
|
sed < "$2" > "$tmp1" -e 's/^DSP\./DSP_R./' ;;
|
||||||
|
|
||||||
|
bram_l)
|
||||||
|
sed < "$2" > "$tmp1" -e 's/^BRAM\./BRAM_L./' ;;
|
||||||
|
bram_r)
|
||||||
|
sed < "$2" > "$tmp1" -e 's/^BRAM\./BRAM_R./' ;;
|
||||||
|
|
||||||
int_l)
|
int_l)
|
||||||
sed < "$2" > "$tmp1" -e 's/^INT\./INT_L./' ;;
|
sed < "$2" > "$tmp1" -e 's/^INT\./INT_L./' ;;
|
||||||
int_r)
|
int_r)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue