From 48d2b051900478e612ba4d52e495d520771369f8 Mon Sep 17 00:00:00 2001 From: Felipe Garay Date: Wed, 15 Nov 2023 10:38:31 -0800 Subject: [PATCH] WIP: Adding structures for DFT data sharing Signed-off-by: Felipe Garay --- src/odb/include/odb/db.h | 45 ++++++++++++++++ src/odb/include/odb/dbObject.h | 3 ++ .../schema/scan/dbScanChain._json_ | 53 +++++++++++++++++++ .../codeGenerator/schema/scan/dbScanInst.json | 27 ++++++++++ .../schema/scan/dbScanPartition.json | 24 +++++++++ .../codeGenerator/schema/scan/dbScanPin.json | 14 +++++ src/odb/src/db/CMakeLists.txt | 3 ++ src/odb/src/db/dbObject.cpp | 3 ++ 8 files changed, 172 insertions(+) create mode 100644 src/odb/src/codeGenerator/schema/scan/dbScanChain._json_ create mode 100644 src/odb/src/codeGenerator/schema/scan/dbScanInst.json create mode 100644 src/odb/src/codeGenerator/schema/scan/dbScanPartition.json create mode 100644 src/odb/src/codeGenerator/schema/scan/dbScanPin.json diff --git a/src/odb/include/odb/db.h b/src/odb/include/odb/db.h index c7fef2859f9..3f540ae7202 100644 --- a/src/odb/include/odb/db.h +++ b/src/odb/include/odb/db.h @@ -138,6 +138,9 @@ class dbModule; class dbNetTrack; class dbPowerDomain; class dbPowerSwitch; +class dbScanInst; +class dbScanPartition; +class dbScanPin; class dbTechLayer; class dbTechLayerAreaRule; class dbTechLayerArraySpacingRule; @@ -7515,6 +7518,48 @@ class dbPowerSwitch : public dbObject // User Code End dbPowerSwitch }; +class dbScanInst : public dbObject +{ + public: + enum SCAN_INST_TYPE + { + OneBit, + ShiftRegister, + BlackBox + }; + void setBits(uint bits); + + uint getBits() const; +}; + +class dbScanPartition : public dbObject +{ + public: + void setStart(dbScanPin start); + + dbScanPin getStart() const; + + void setStop(dbScanPin stop); + + dbScanPin getStop() const; + + void setName(std::string name); + + std::string getName() const; +}; + +class dbScanPin : public dbObject +{ + public: + void setBterm(dbId bterm); + + dbId getBterm() const; + + void setIterm(dbId iterm); + + dbId getIterm() const; +}; + class dbTechLayer : public dbObject { public: diff --git a/src/odb/include/odb/dbObject.h b/src/odb/include/odb/dbObject.h index 73890703b4f..8d961e36218 100644 --- a/src/odb/include/odb/dbObject.h +++ b/src/odb/include/odb/dbObject.h @@ -99,6 +99,9 @@ enum dbObjectType dbNetTrackObj, dbPowerDomainObj, dbPowerSwitchObj, + dbScanInstObj, + dbScanPartitionObj, + dbScanPinObj, dbTechLayerObj, dbTechLayerAreaRuleObj, dbTechLayerArraySpacingRuleObj, diff --git a/src/odb/src/codeGenerator/schema/scan/dbScanChain._json_ b/src/odb/src/codeGenerator/schema/scan/dbScanChain._json_ new file mode 100644 index 00000000000..bddd539dee5 --- /dev/null +++ b/src/odb/src/codeGenerator/schema/scan/dbScanChain._json_ @@ -0,0 +1,53 @@ +{ + "name": "dbScanChain", + "type": "dbObject", + "fields": [ + { + "name": "name", + "type": "char *" + }, + { + "name": "length", + "type": "uint" + }, + { + "name": "cells", + "type": "dbVector" + }, + { + "name": "scanIn", + "type": "dbScanPin" + }, + { + "name": "scanOut", + "type": "dbScanPin" + }, + { + "name": "scanClock", + "type": "dbScanPin" + }, + { + "name": "scanEnable", + "type": "dbScanPin" + }, + { + "name": "testMode", + "type": "char *" + }, + { + "name": "partitions", + "type": "dbVector" + }, + { + "name": "scanInsts", + "type": "dbVector" + } + ], + "h_includes": [ + "dbVector.h", + "dbScanPin.h" + ], + "cpp_includes": [ + "dbScanPin.h" + ] +} diff --git a/src/odb/src/codeGenerator/schema/scan/dbScanInst.json b/src/odb/src/codeGenerator/schema/scan/dbScanInst.json new file mode 100644 index 00000000000..e396c307933 --- /dev/null +++ b/src/odb/src/codeGenerator/schema/scan/dbScanInst.json @@ -0,0 +1,27 @@ +{ + "name": "dbScanInst", + "type": "dbObject", + "fields": [ + { + "name": "bits", + "type": "uint" + } + ], + "enums": [ + { + "name": "SCAN_INST_TYPE", + "public": true, + "values": [ + "OneBit", + "ShiftRegister", + "BlackBox" + ] + } + ], + "h_includes": [ + "dbScanPin.h" + ], + "cpp_includes": [ + "dbScanPin.h" + ] +} diff --git a/src/odb/src/codeGenerator/schema/scan/dbScanPartition.json b/src/odb/src/codeGenerator/schema/scan/dbScanPartition.json new file mode 100644 index 00000000000..b141f2efec2 --- /dev/null +++ b/src/odb/src/codeGenerator/schema/scan/dbScanPartition.json @@ -0,0 +1,24 @@ +{ + "name": "dbScanPartition", + "type": "dbObject", + "fields": [ + { + "name": "start", + "type": "dbScanPin" + }, + { + "name": "stop", + "type": "dbScanPin" + }, + { + "name": "name", + "type": "std::string" + } + ], + "h_includes": [ + "dbScanPin.h" + ], + "cpp_includes": [ + "dbScanPin.h" + ] +} diff --git a/src/odb/src/codeGenerator/schema/scan/dbScanPin.json b/src/odb/src/codeGenerator/schema/scan/dbScanPin.json new file mode 100644 index 00000000000..4ae53753486 --- /dev/null +++ b/src/odb/src/codeGenerator/schema/scan/dbScanPin.json @@ -0,0 +1,14 @@ +{ + "name": "dbScanPin", + "type": "dbObject", + "fields": [ + { + "name": "bterm", + "type": "dbId" + }, + { + "name": "iterm", + "type": "dbId" + } + ] +} diff --git a/src/odb/src/db/CMakeLists.txt b/src/odb/src/db/CMakeLists.txt index b50bb24593a..272d850601b 100644 --- a/src/odb/src/db/CMakeLists.txt +++ b/src/odb/src/db/CMakeLists.txt @@ -100,6 +100,9 @@ add_library(db dbNetTrack.cpp dbPowerDomain.cpp dbPowerSwitch.cpp + dbScanInst.cpp + dbScanPartition.cpp + dbScanPin.cpp dbTechLayer.cpp dbTechLayerAreaRule.cpp dbTechLayerArraySpacingRule.cpp diff --git a/src/odb/src/db/dbObject.cpp b/src/odb/src/db/dbObject.cpp index b595809f3af..90e2977e899 100644 --- a/src/odb/src/db/dbObject.cpp +++ b/src/odb/src/db/dbObject.cpp @@ -103,6 +103,9 @@ static const char* name_tbl[] = {"dbDatabase", "dbNetTrack", "dbPowerDomain", "dbPowerSwitch", + "dbScanInst", + "dbScanPartition", + "dbScanPin", "dbTechLayer", "dbTechLayerAreaRule", "dbTechLayerArraySpacingRule",