2017-10-18 12:04:02 +02:00
|
|
|
#!/bin/bash
|
2020-04-16 10:50:39 +02:00
|
|
|
# Copyright (C) 2017-2020 The Project X-Ray Authors.
|
|
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a ISC-style
|
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
|
# https://opensource.org/licenses/ISC
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: ISC
|
2017-11-15 01:59:39 +01:00
|
|
|
|
2018-10-23 22:17:07 +02:00
|
|
|
# $1: DB type
|
|
|
|
|
# $2: filename to merge in
|
|
|
|
|
|
2017-10-18 12:04:02 +02:00
|
|
|
set -ex
|
|
|
|
|
test $# = 2
|
2017-11-13 01:50:26 +01:00
|
|
|
test -e "$2"
|
|
|
|
|
|
|
|
|
|
tmp1=`mktemp -p .`
|
|
|
|
|
tmp2=`mktemp -p .`
|
2019-03-05 16:35:40 +01:00
|
|
|
LOCKFILE="/tmp/segbits_$1.db.lock"
|
|
|
|
|
LOCKTIMEOUT=30 # 30s timeout
|
|
|
|
|
LOCKID=222
|
2017-11-13 01:50:26 +01:00
|
|
|
|
2018-11-14 00:15:34 +01:00
|
|
|
function finish {
|
|
|
|
|
echo "Cleaning up temp files"
|
|
|
|
|
rm -f "$tmp1"
|
|
|
|
|
rm -f "$tmp2"
|
|
|
|
|
}
|
|
|
|
|
trap finish EXIT
|
|
|
|
|
|
2017-11-16 21:21:36 +01:00
|
|
|
db=$XRAY_DATABASE_DIR/$XRAY_DATABASE/segbits_$1.db
|
2019-03-05 16:35:40 +01:00
|
|
|
|
|
|
|
|
# if the DB exists acquire a lock
|
|
|
|
|
if [ -f $db ]; then
|
|
|
|
|
eval "exec $LOCKID>$LOCKFILE"
|
|
|
|
|
# the lock is automatically released on script exit
|
|
|
|
|
flock --timeout $LOCKTIMEOUT $LOCKID
|
|
|
|
|
if [ ! $? -eq 0 ]; then
|
|
|
|
|
echo "Timeout while waiting for lock"
|
|
|
|
|
finish
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
2018-12-10 06:37:14 +01:00
|
|
|
# Check existing DB
|
|
|
|
|
if [ -f $db ] ; then
|
|
|
|
|
${XRAY_PARSEDB} --strict "$db"
|
|
|
|
|
fi
|
2019-03-05 16:35:40 +01:00
|
|
|
|
2018-12-10 06:37:14 +01:00
|
|
|
# Check new DB
|
|
|
|
|
${XRAY_PARSEDB} --strict "$2"
|
2017-11-16 21:21:36 +01:00
|
|
|
|
2018-10-23 22:17:07 +02:00
|
|
|
# Fuzzers verify L/R data is equivilent
|
|
|
|
|
# However, expand back to L/R to make downstream tools not depend on this
|
|
|
|
|
# in case we later find exceptions
|
|
|
|
|
|
2019-01-08 15:08:30 +01:00
|
|
|
ismask=false
|
2017-11-13 01:50:26 +01:00
|
|
|
case "$1" in
|
|
|
|
|
clbll_l)
|
|
|
|
|
sed < "$2" > "$tmp1" \
|
|
|
|
|
-e 's/^CLB\.SLICE_X0\./CLBLL_L.SLICEL_X0./' \
|
|
|
|
|
-e 's/^CLB\.SLICE_X1\./CLBLL_L.SLICEL_X1./' ;;
|
|
|
|
|
clbll_r)
|
|
|
|
|
sed < "$2" > "$tmp1" \
|
|
|
|
|
-e 's/^CLB\.SLICE_X0\./CLBLL_R.SLICEL_X0./' \
|
|
|
|
|
-e 's/^CLB\.SLICE_X1\./CLBLL_R.SLICEL_X1./' ;;
|
|
|
|
|
clblm_l)
|
|
|
|
|
sed < "$2" > "$tmp1" \
|
|
|
|
|
-e 's/^CLB\.SLICE_X0\./CLBLM_L.SLICEM_X0./' \
|
|
|
|
|
-e 's/^CLB\.SLICE_X1\./CLBLM_L.SLICEL_X1./' ;;
|
|
|
|
|
clblm_r)
|
|
|
|
|
sed < "$2" > "$tmp1" \
|
|
|
|
|
-e 's/^CLB\.SLICE_X0\./CLBLM_R.SLICEM_X0./' \
|
|
|
|
|
-e 's/^CLB\.SLICE_X1\./CLBLM_R.SLICEL_X1./' ;;
|
2017-11-16 21:21:36 +01:00
|
|
|
|
2018-02-06 15:49:53 +01:00
|
|
|
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./' ;;
|
|
|
|
|
|
2018-10-23 22:17:07 +02:00
|
|
|
bram_l.block_ram)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^BRAM\./BRAM_L./' ;;
|
|
|
|
|
bram_r.block_ram)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^BRAM\./BRAM_R./' ;;
|
|
|
|
|
|
2017-11-16 21:21:36 +01:00
|
|
|
int_l)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^INT\./INT_L./' ;;
|
|
|
|
|
int_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^INT\./INT_R./' ;;
|
|
|
|
|
|
2017-12-01 17:08:39 +01:00
|
|
|
hclk_l)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^HCLK\./HCLK_L./' ;;
|
|
|
|
|
hclk_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^HCLK\./HCLK_R./' ;;
|
|
|
|
|
|
2019-02-08 23:23:39 +01:00
|
|
|
clk_hrow_bot_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CLK_HROW\./CLK_HROW_BOT_R./' ;;
|
|
|
|
|
clk_hrow_top_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CLK_HROW\./CLK_HROW_TOP_R./' ;;
|
|
|
|
|
|
2019-02-12 19:55:41 +01:00
|
|
|
clk_bufg_bot_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CLK_BUFG\./CLK_BUFG_BOT_R./' ;;
|
|
|
|
|
clk_bufg_top_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CLK_BUFG\./CLK_BUFG_TOP_R./' ;;
|
|
|
|
|
|
2019-03-15 14:47:46 +01:00
|
|
|
hclk_cmt)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
hclk_cmt_l)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^HCLK_CMT\./HCLK_CMT_L./' ;;
|
|
|
|
|
|
2019-02-12 22:22:29 +01:00
|
|
|
clk_bufg_rebuf)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2018-12-18 02:54:30 +01:00
|
|
|
liob33)
|
2019-03-01 01:36:02 +01:00
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOB33\./LIOB33./' ;;
|
|
|
|
|
|
|
|
|
|
riob33)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOB33\./RIOB33./' ;;
|
2018-12-18 02:54:30 +01:00
|
|
|
|
2022-11-08 11:31:50 +01:00
|
|
|
riob18)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOB18\./RIOB18./' ;;
|
|
|
|
|
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
liob18)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOB18\./LIOB18./' ;;
|
|
|
|
|
|
|
|
|
|
mask_liob18)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOB18\./LIOB18./' ;;
|
|
|
|
|
|
2019-07-15 12:37:10 +02:00
|
|
|
lioi3)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI3\./LIOI3./' ;;
|
|
|
|
|
|
2019-07-23 13:35:21 +02:00
|
|
|
lioi3_tbytesrc)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI3\./LIOI3_TBYTESRC./' ;;
|
|
|
|
|
|
|
|
|
|
lioi3_tbyteterm)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI3\./LIOI3_TBYTETERM./' ;;
|
|
|
|
|
|
2019-07-15 12:37:10 +02:00
|
|
|
rioi3)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI3\./RIOI3./' ;;
|
|
|
|
|
|
2022-11-08 11:31:50 +01:00
|
|
|
rioi)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI\./RIOI./' ;;
|
|
|
|
|
|
2019-07-23 13:35:21 +02:00
|
|
|
rioi3_tbytesrc)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI3\./RIOI3_TBYTESRC./' ;;
|
|
|
|
|
|
2022-11-08 11:31:50 +01:00
|
|
|
rioi_tbytesrc)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI\./RIOI_TBYTESRC./' ;;
|
|
|
|
|
|
2019-07-23 13:35:21 +02:00
|
|
|
rioi3_tbyteterm)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI3\./RIOI3_TBYTETERM./' ;;
|
|
|
|
|
|
2022-11-08 11:31:50 +01:00
|
|
|
rioi_tbyteterm)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI\./RIOI_TBYTETERM./' ;;
|
|
|
|
|
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
lioi)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI\./LIOI./' ;;
|
|
|
|
|
|
|
|
|
|
lioi_tbytesrc)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI\./LIOI_TBYTESRC./' ;;
|
|
|
|
|
|
|
|
|
|
lioi_tbyteterm)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^IOI\./LIOI_TBYTETERM./' ;;
|
|
|
|
|
|
2019-06-26 21:39:50 +02:00
|
|
|
cmt_top_r_upper_t)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CMT_UPPER_T\./CMT_TOP_R_UPPER_T./' ;;
|
|
|
|
|
|
|
|
|
|
cmt_top_l_upper_t)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CMT_UPPER_T\./CMT_TOP_L_UPPER_T./' ;;
|
|
|
|
|
|
2020-10-02 23:44:41 +02:00
|
|
|
cmt_top_r_lower_b)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CMT_LOWER_B\./CMT_TOP_R_LOWER_B./' ;;
|
|
|
|
|
|
|
|
|
|
cmt_top_l_lower_b)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^CMT_LOWER_B\./CMT_TOP_L_LOWER_B./' ;;
|
|
|
|
|
|
2019-06-25 15:32:14 +02:00
|
|
|
cfg_center_mid)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2019-06-26 09:41:11 +02:00
|
|
|
hclk_ioi3)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2022-11-08 11:31:50 +01:00
|
|
|
hclk_ioi)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2021-01-13 11:29:56 +01:00
|
|
|
pcie_bot)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2021-02-03 17:03:53 +01:00
|
|
|
pcie_int_interface_l)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^PCIE_INT_INTERFACE\./PCIE_INT_INTERFACE_L./' ;;
|
|
|
|
|
|
|
|
|
|
pcie_int_interface_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^PCIE_INT_INTERFACE\./PCIE_INT_INTERFACE_R./' ;;
|
|
|
|
|
|
2021-01-14 16:24:43 +01:00
|
|
|
gtp_common)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2021-01-18 15:35:32 +01:00
|
|
|
gtp_common_mid_left)
|
2021-01-22 14:44:20 +01:00
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_COMMON\./GTP_COMMON_MID_LEFT./' ;;
|
2021-01-18 15:35:32 +01:00
|
|
|
|
|
|
|
|
gtp_common_mid_right)
|
2021-01-22 14:44:20 +01:00
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_COMMON\./GTP_COMMON_MID_RIGHT./' ;;
|
2021-01-18 15:35:32 +01:00
|
|
|
|
2021-01-19 13:31:09 +01:00
|
|
|
gtp_channel_0)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_0./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_1)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_1./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_2)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_2./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_3)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_3./' ;;
|
|
|
|
|
|
2021-01-19 14:33:37 +01:00
|
|
|
gtp_channel_0_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_0_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_1_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_1_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_2_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_2_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_3_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_3_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_0_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_0_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_1_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_1_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_2_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_2_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtp_channel_3_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_CHANNEL\./GTP_CHANNEL_3_MID_RIGHT./' ;;
|
|
|
|
|
|
2021-02-02 17:36:01 +01:00
|
|
|
gtp_int_interface_l)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_INT_INTERFACE\.GTPE2_INT/GTP_INT_INTERFACE_L\.GTPE2_INT_LEFT/' ;;
|
|
|
|
|
|
|
|
|
|
gtp_int_interface_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTP_INT_INTERFACE\.GTPE2_INT/GTP_INT_INTERFACE_R\.GTPE2_INT_R/' ;;
|
|
|
|
|
|
|
|
|
|
gtp_int_interface)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2025-02-07 01:25:11 +01:00
|
|
|
gtx_common)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
|
|
|
|
gtx_common_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_COMMON\./GTX_COMMON_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_common_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_COMMON\./GTX_COMMON_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_0)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_0./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_1)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_1./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_2)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_2./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_3)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_3./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_0_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_0_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_1_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_1_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_2_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_2_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_3_mid_left)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_3_MID_LEFT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_0_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_0_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_1_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_1_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_2_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_2_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_channel_3_mid_right)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_CHANNEL\./GTX_CHANNEL_3_MID_RIGHT./' ;;
|
|
|
|
|
|
|
|
|
|
gtx_int_interface_l)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_INT_INTERFACE\.GTXE2_INT/GTX_INT_INTERFACE_L\.GTXE2_INT_LEFT/' ;;
|
|
|
|
|
|
|
|
|
|
gtx_int_interface_r)
|
|
|
|
|
sed < "$2" > "$tmp1" -e 's/^GTX_INT_INTERFACE\.GTXE2_INT/GTX_INT_INTERFACE_R\.GTXE2_INT_R/' ;;
|
|
|
|
|
|
|
|
|
|
gtx_int_interface)
|
|
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2017-11-16 21:21:36 +01:00
|
|
|
mask_*)
|
|
|
|
|
db=$XRAY_DATABASE_DIR/$XRAY_DATABASE/$1.db
|
2019-01-08 15:08:30 +01:00
|
|
|
ismask=true
|
2017-11-16 21:21:36 +01:00
|
|
|
cp "$2" "$tmp1" ;;
|
|
|
|
|
|
2017-11-13 01:50:26 +01:00
|
|
|
*)
|
|
|
|
|
echo "Invalid mode: $1"
|
|
|
|
|
rm -f "$tmp1" "$tmp2"
|
|
|
|
|
exit 1
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
touch "$db"
|
2019-01-08 15:08:30 +01:00
|
|
|
if $ismask ; then
|
|
|
|
|
sort -u "$tmp1" "$db" | grep -v '<.*>' > "$tmp2" || true
|
|
|
|
|
else
|
|
|
|
|
# tmp1 must be placed second to take precedence over old bad entries
|
2019-05-16 15:56:58 +02:00
|
|
|
if ! $ismask ; then
|
|
|
|
|
db_origin=$XRAY_DATABASE_DIR/$XRAY_DATABASE/segbits_$1.origin_info.db
|
|
|
|
|
if [ ! -f $db_origin ] ; then
|
|
|
|
|
touch "$db_origin"
|
|
|
|
|
fi
|
|
|
|
|
python3 ${XRAY_DIR}/utils/mergedb.py --out "$db_origin" "$db_origin" "$tmp1" --track_origin
|
|
|
|
|
fi
|
2020-10-08 20:18:27 +02:00
|
|
|
python3 ${XRAY_DIR}/utils/mergedb.py --out "$tmp2" "$db" "$tmp1"
|
2019-01-08 15:08:30 +01:00
|
|
|
fi
|
2018-12-10 06:37:14 +01:00
|
|
|
# Check aggregate db for consistency and make canonical
|
2018-11-13 00:40:24 +01:00
|
|
|
${XRAY_PARSEDB} --strict "$tmp2" "$db"
|