Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checker: allow dangling CARRY outputs EDA-3235 #910

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions planning/src/RS/rsCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ bool do_check_blif(CStr cfn,

ls << "-----\n";
{
uint nISERD = 0, nDSP38 = 0, nDSP19X = 0, nTDP_RAM36K = 0, nTDP_RAM18K = 0;
bfile.countMOGs(nISERD, nDSP38, nDSP19X, nTDP_RAM36K, nTDP_RAM18K);
uint nISERD = 0, nDSP38 = 0, nDSP19X = 0,
nTDP_RAM36K = 0, nTDP_RAM18K = 0, nCARRY = 0;
bfile.countMOGs(nISERD, nDSP38, nDSP19X, nTDP_RAM36K, nTDP_RAM18K, nCARRY);
ls << "----- #I_SERDES= " << nISERD << endl;
ls << "----- #DSP19X= " << nDSP19X << endl;
ls << "----- #DSP38= " << nDSP38 << endl;
ls << "----- #TDP_RAM36K= " << nTDP_RAM36K << endl;
ls << "----- #TDP_RAM18KX2= " << nTDP_RAM18K << endl;
ls << "----- #CARRY= " << nCARRY << endl;
}
ls << "-----\n";
ls << "----- PinGraph: " << bfile.pinGraphFile_ << endl;
Expand Down
24 changes: 14 additions & 10 deletions planning/src/file_io/pln_blif_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ uint BLIF_file::printNodes(std::ostream& os) const noexcept {
return n;
}

os << "--- nodes (" << n << ") :" << endl;
os << "----- nodes (" << n << ") :" << endl;
for (uint i = 1; i <= n; i++) {
const BNode& nd = nodePool_[i];
CStr pts = nd.cPrimType();
Expand All @@ -641,7 +641,8 @@ uint BLIF_file::printNodes(std::ostream& os) const noexcept {
prnArray(os, A, sz, " ");
}

if (trace_ >= 5) {
bool hasSigs = bool(nd.inPins_.size()) or bool(nd.inSigs_.size());
if (trace_ >= 5 and hasSigs) {
const string* A = nd.inPins_.data();
size_t sz = nd.inPins_.size();
os_printf(os, " ##inPins=%zu ", sz);
Expand Down Expand Up @@ -819,9 +820,10 @@ void BLIF_file::countBUFs(uint& nIBUF, uint& nOBUF, uint& nCBUF) const noexcept

void BLIF_file::countMOGs(uint& nISERD,
uint& nDSP38, uint& nDSP19,
uint& nRAM36, uint& nRAM18
uint& nRAM36, uint& nRAM18,
uint& nCARRY
) const noexcept {
nISERD = nDSP38 = nDSP19 = nRAM36 = nRAM18 = 0;
nISERD = nDSP38 = nDSP19 = nRAM36 = nRAM18 = nCARRY = 0;
uint nn = numNodes();
if (nn == 0)
return;
Expand Down Expand Up @@ -851,6 +853,10 @@ void BLIF_file::countMOGs(uint& nISERD,
}
if (pt == TDP_RAM18KX2) {
nRAM18++;
continue;
}
if (pt == CARRY) {
nCARRY++;
}
}
}
Expand Down Expand Up @@ -1815,7 +1821,7 @@ bool BLIF_file::linkNodes() noexcept {
int pinIndex = -1;
BNode* par = findFabricParent(nd.id_, nd.out_, pinIndex);
if (!par) {
if (nd.is_RAM() or nd.is_DSP()) {
if (nd.is_RAM() or nd.is_DSP() or nd.is_CARRY()) {
const string& net = nd.out_;
uint rid = nd.realId(*this);
BNode& realNd = bnodeRef(rid);
Expand All @@ -1826,7 +1832,7 @@ bool BLIF_file::linkNodes() noexcept {
assert(dataTerm < int64_t(realData.size()));
if (dataTerm < 0)
continue;
// RAM or DSP output bits may be unused
// RAM or DSP or CARRY output bits may be unused
if (trace_ >= 4) {
lprintf("skipping dangling cell output issue for %s at line %u\n",
realNd.cPrimType(), realNd.lnum_);
Expand Down Expand Up @@ -2293,10 +2299,8 @@ bool BLIF_file::createPinGraph() noexcept {
// lputs3();
kid = pg_.findNode(key);
if (kid) {
if (trace_ >= 8) {
lprintf("\t\t ___ found nid %u '%s' for key %zu",
kid, pg_.cnodeName(kid), key);
}
lprintf("\t\t ___ found nid %u '%s' for key %zu",
kid, pg_.cnodeName(kid), key);
}
else {
kid = pg_.insK(key);
Expand Down
5 changes: 4 additions & 1 deletion planning/src/file_io/pln_blif_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ struct BLIF_file : public fio::MMapReader
bool is_clockLess_DSP() const noexcept {
return isClockLess_ and prim::pr_is_DSP(ptype_);
}
bool is_CARRY() const noexcept {
return ptype_ == prim::CARRY;
}

bool canDriveClockNode() const noexcept {
return isTopInput() or is_CLK_BUF() or ptype_ == prim::I_SERDES;
Expand Down Expand Up @@ -322,7 +325,7 @@ struct BLIF_file : public fio::MMapReader
void countBUFs(uint& nIBUF, uint& nOBUF, uint& nCBUF) const noexcept;

void countMOGs(uint& nISERD, uint& nDSP38, uint& nDSP19X,
uint& nRAM36, uint& nRAM18) const noexcept;
uint& nRAM36, uint& nRAM18, uint& nCARRY) const noexcept;

uint typeHist(prim::Prim_t t) const noexcept { return typeHistogram_[t]; }

Expand Down
2 changes: 1 addition & 1 deletion planning/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static const char* _pln_VERSION_STR = "pln0361";
static const char* _pln_VERSION_STR = "pln0362";

#include "RS/rsEnv.h"
#include "util/pln_log.h"
Expand Down
Loading