Skip to content

Commit

Permalink
odb dft: creating dbScanList and also supporting dbBTerm as chain si …
Browse files Browse the repository at this point in the history
…and so

Signed-off-by: Felipe Garay <[email protected]>
  • Loading branch information
fgaray committed Mar 20, 2024
1 parent 1a54406 commit b12d042
Show file tree
Hide file tree
Showing 15 changed files with 455 additions and 108 deletions.
37 changes: 27 additions & 10 deletions src/odb/include/odb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class dbPowerDomain;
class dbPowerSwitch;
class dbScanChain;
class dbScanInst;
class dbScanList;
class dbScanPartition;
class dbScanPin;
class dbTechLayer;
Expand Down Expand Up @@ -7635,24 +7636,31 @@ class dbScanChain : public dbObject
public:
dbSet<dbScanPartition> getScanPartitions() const;

dbSet<dbScanInst> getScanInsts() const;
dbSet<dbScanList> getScanLists() const;

// User Code Begin dbScanChain
const std::string& getName() const;

void setName(std::string_view name);

void setScanIn(dbBTerm* scan_in);
dbBTerm* getScanIn() const;
void setScanIn(dbITerm* scan_in);
std::variant<dbBTerm*, dbITerm*> getScanIn() const;

void setScanOut(dbBTerm* scan_out);
dbBTerm* getScanOut() const;
void setScanOut(dbITerm* scan_out);
std::variant<dbBTerm*, dbITerm*> getScanOut() const;

void setScanEnable(dbBTerm* scan_enable);
dbBTerm* getScanEnable() const;
void setScanEnable(dbITerm* scan_enable);
std::variant<dbBTerm*, dbITerm*> getScanEnable() const;

const std::string& getTestMode() const;
void setTestMode(std::string_view test_mode);
void setTestMode(dbBTerm* test_mode);
void setTestMode(dbITerm* test_mode);
std::variant<dbBTerm*, dbITerm*> getTestMode() const;

void setTestModeName(const std::string& test_mode_name);
const std::string& getTestModeName() const;

static dbScanChain* create(dbDft* dft);
// User Code End dbScanChain
Expand Down Expand Up @@ -7689,14 +7697,23 @@ class dbScanInst : public dbObject
void setAccessPins(const AccessPins& access_pins);
AccessPins getAccessPins() const;

std::vector<dbInst*> getInsts() const;
dbInst* getInst() const;

static dbScanInst* create(dbScanChain* scan_chain, dbInst* inst);
static dbScanInst* create(dbScanChain* scan_chain,
const std::vector<dbInst*>& insts);
static dbScanInst* create(dbScanList* scan_list, dbInst* inst);
// User Code End dbScanInst
};

class dbScanList : public dbObject
{
public:
dbSet<dbScanInst> getScanInsts() const;

// User Code Begin dbScanList
dbScanInst* add(dbInst* inst);
static dbScanList* create(dbScanChain* scan_chain);
// User Code End dbScanList
};

class dbScanPartition : public dbObject
{
public:
Expand Down
1 change: 1 addition & 0 deletions src/odb/include/odb/dbObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ enum dbObjectType
dbPowerSwitchObj,
dbScanChainObj,
dbScanInstObj,
dbScanListObj,
dbScanPartitionObj,
dbScanPinObj,
dbTechLayerObj,
Expand Down
6 changes: 6 additions & 0 deletions src/odb/src/codeGenerator/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@
},
{
"first": "dbScanChain",
"second": "dbScanList",
"type": "1_n",
"tbl_name": "scan_lists_"
},
{
"first": "dbScanList",
"second": "dbScanInst",
"type": "1_n",
"tbl_name": "scan_insts_"
Expand Down
11 changes: 8 additions & 3 deletions src/odb/src/codeGenerator/schema/scan/dbScanChain.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,26 @@
},
{
"name": "scan_in_",
"type": "dbId<dbBTerm>",
"type": "dbId<dbScanPin>",
"flags": ["private"]
},
{
"name": "scan_out_",
"type": "dbId<dbBTerm>",
"type": "dbId<dbScanPin>",
"flags": ["private"]
},
{
"name": "scan_enable_",
"type": "dbId<dbBTerm>",
"type": "dbId<dbScanPin>",
"flags": ["private"]
},
{
"name": "test_mode_",
"type": "dbId<dbScanPin>",
"flags": ["private"]
},
{
"name": "test_mode_name_",
"type": "std::string",
"flags": ["private"]
}
Expand Down
7 changes: 4 additions & 3 deletions src/odb/src/codeGenerator/schema/scan/dbScanInst.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"flags": ["private"]
},
{
"name": "insts_",
"type": "dbVector<dbId<dbInst>>",
"name": "inst_",
"type": "dbId<dbInst>",
"flags": ["private"]
},
{
Expand Down Expand Up @@ -68,6 +68,7 @@
"cpp_includes": [
"dbScanPin.h",
"dbDft.h",
"dbScanChain.h"
"dbScanChain.h",
"dbScanList.h"
]
}
7 changes: 7 additions & 0 deletions src/odb/src/codeGenerator/schema/scan/dbScanList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "dbScanList",
"type": "dbObject",
"cpp_includes": [
"dbScanChain.h"
]
}
1 change: 1 addition & 0 deletions src/odb/src/db/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ add_library(db
dbPowerSwitch.cpp
dbScanChain.cpp
dbScanInst.cpp
dbScanList.cpp
dbScanPartition.cpp
dbScanPin.cpp
dbTechLayer.cpp
Expand Down
1 change: 1 addition & 0 deletions src/odb/src/db/dbObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static const char* name_tbl[] = {"dbDatabase",
"dbPowerSwitch",
"dbScanChain",
"dbScanInst",
"dbScanList",
"dbScanPartition",
"dbScanPin",
"dbTechLayer",
Expand Down
Loading

0 comments on commit b12d042

Please sign in to comment.