From b81df3fe0de24c78ab8c98dbae94e45e36876132 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Fri, 22 Jan 2021 14:06:16 +0100 Subject: [PATCH] 064-gtp-channel-conf: add minor fixes to document missing features Features enabled with these fixes: - IN_USE (this seems to have 9 bits, so -c has been set to 9) - RXLPM_LF_CFG: this had wrong settings in the automatically generated attrs.json file, which resulted in many bits to be absent - RXSLIDE_MODE: this behaves as a tag group Signed-off-by: Alessandro Comodi --- fuzzers/064-gtp-channel-conf/Makefile | 4 +--- fuzzers/064-gtp-channel-conf/attrs.json | 6 +++--- fuzzers/064-gtp-channel-conf/bits.dbf | 2 ++ fuzzers/064-gtp-channel-conf/generate.py | 18 +++++++++++++----- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/fuzzers/064-gtp-channel-conf/Makefile b/fuzzers/064-gtp-channel-conf/Makefile index 058b3f34..ebf729c9 100644 --- a/fuzzers/064-gtp-channel-conf/Makefile +++ b/fuzzers/064-gtp-channel-conf/Makefile @@ -19,8 +19,6 @@ FUZDIR ?= ${PWD} all: database -# generate.sh / top_generate.sh call make, hence the command must -# have a + before it. $(SPECIMENS_OK): $(SPECIMENS_DEPS) mkdir -p ${BUILD_DIR} bash ${XRAY_DIR}/utils/top_generate.sh $(subst /OK,,$@) @@ -39,7 +37,7 @@ clean: database: ${BUILD_DIR}/segbits_gtp_channelx.db ${BUILD_DIR}/segbits_gtp_channelx.rdb: $(SPECIMENS_OK) - ${XRAY_SEGMATCH} -o ${BUILD_DIR}/segbits_gtp_channelx.rdb $$(find $(SPECIMENS) -name "segdata_gtp_channel_[0123]*") + ${XRAY_SEGMATCH} -c 9 -o ${BUILD_DIR}/segbits_gtp_channelx.rdb $$(find $(SPECIMENS) -name "segdata_gtp_channel_[0123]*") ${BUILD_DIR}/segbits_gtp_channelx.db: ${BUILD_DIR}/segbits_gtp_channelx.rdb ${XRAY_DBFIXUP} --db-root ${BUILD_DIR} --zero-db bits.dbf \ diff --git a/fuzzers/064-gtp-channel-conf/attrs.json b/fuzzers/064-gtp-channel-conf/attrs.json index bca5f76d..f852a255 100644 --- a/fuzzers/064-gtp-channel-conf/attrs.json +++ b/fuzzers/064-gtp-channel-conf/attrs.json @@ -291,8 +291,8 @@ }, "RXLPM_LF_CFG": { "type": "BIN", - "values": [3, 65535], - "digits": 16 + "values": [262144], + "digits": 18 }, "RXLPM_HF_CFG": { "type": "BIN", @@ -1164,4 +1164,4 @@ "values": [8461835120962772112965625], "digits": 83 } -} \ No newline at end of file +} diff --git a/fuzzers/064-gtp-channel-conf/bits.dbf b/fuzzers/064-gtp-channel-conf/bits.dbf index e69de29b..0ec75595 100644 --- a/fuzzers/064-gtp-channel-conf/bits.dbf +++ b/fuzzers/064-gtp-channel-conf/bits.dbf @@ -0,0 +1,2 @@ +00_519 01_519 +28_519 29_519 diff --git a/fuzzers/064-gtp-channel-conf/generate.py b/fuzzers/064-gtp-channel-conf/generate.py index 45655e81..19dd98ee 100644 --- a/fuzzers/064-gtp-channel-conf/generate.py +++ b/fuzzers/064-gtp-channel-conf/generate.py @@ -13,7 +13,7 @@ import json import os from enum import Enum -from prjxray.segmaker import Segmaker +from prjxray.segmaker import Segmaker, add_site_group_zero INT = "INT" BIN = "BIN" @@ -97,10 +97,18 @@ def main(): else: assert param_type == STR - for param_value in param_values: - segmk.add_site_tag( - site, "{}.{}".format(param, param_value), - value == param_value) + # The RXSLIDE_MODE parameter has overlapping bits + # for its possible values. We need to treat it + # differently + if param == "RXSLIDE_MODE": + add_site_group_zero( + segmk, site, "{}.".format(param), param_values, + "OFF", value) + else: + for param_value in param_values: + segmk.add_site_tag( + site, "{}.{}".format(param, param_value), + value == param_value) for param in ["TXUSRCLK", "TXUSRCLK2", "TXPHDLYTSTCLK", "SIGVALIDCLK", "RXUSRCLK", "RXUSRCLK2", "DRPCLK",