Skip to content

Commit

Permalink
Merge pull request #252 from d-m-bailey/pulse
Browse files Browse the repository at this point in the history
Changes for version 1.1.3
  • Loading branch information
d-m-bailey authored May 20, 2022
2 parents c67fa57 + 85a1768 commit 6295fd9
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Installation
Requirements:
- gcc 4.9.3
- python 2.7.10
- bison 3.0.1 (only if making changes to parser or compiling from github)
- bison 3.3 (only if making changes to the parser or compiling from github)

GUI requirements:
- kivy 1.10.0
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT(CVC, [1.1.2], [cvc@shuharisystem.com])
AC_INIT(CVC, [1.1.3], [cvc@shuharisystem.com])
AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADERS([config.h])
AC_USE_SYSTEM_EXTENSIONS
Expand Down
51 changes: 51 additions & 0 deletions src/CConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,57 @@ bool CFullConnection::IsPossibleHiZ(CCvcDb * theCvcDb) {
return(false);
}

/**
* \brief HasParallelShort: Check connected devices for parallel short.
*
* Only parallel devices of the same type that are fully on are considered shorted.
*/
bool CFullConnection::HasParallelShort(CCvcDb * theCvcDb) {
netId_t myDrainId, mySourceId;
CFullConnection myParallelDeviceConnections;
// Choose the least connected pin as the drain
if ( theCvcDb->connectionCount_v[drainId].SourceDrainCount() < theCvcDb->connectionCount_v[sourceId].SourceDrainCount() ) {
myDrainId = drainId;
mySourceId = sourceId;
} else {
myDrainId = sourceId;
mySourceId = drainId;
}
modelType_t myModelType = device_p->model_p->type;
assert( IsMos_(myModelType) );
myModelType = IsNmos_(myModelType) ? NMOS : PMOS;
for ( auto device_it = theCvcDb->firstSource_v[myDrainId]; device_it != UNKNOWN_DEVICE; device_it = theCvcDb->nextSource_v[device_it] ) {
if ( device_it == deviceId ) continue; // same device
if ( myModelType == NMOS && ! IsNmos_(theCvcDb->deviceType_v[device_it] )) continue; // skip non-matching device types
if ( myModelType == PMOS && ! IsPmos_(theCvcDb->deviceType_v[device_it] )) continue; // skip non-matching device types
if ( theCvcDb->drainNet_v[device_it] != mySourceId ) continue; // not parallel
theCvcDb->MapDeviceNets(device_it, myParallelDeviceConnections);
if ( myModelType == NMOS && IsKnownVoltage_(myParallelDeviceConnections.simGateVoltage)
&& myParallelDeviceConnections.simGateVoltage > myParallelDeviceConnections.minDrainVoltage + myParallelDeviceConnections.device_p->model_p->Vth ) {
return true;
} else if ( myModelType == PMOS && IsKnownVoltage_(myParallelDeviceConnections.simGateVoltage)
&& myParallelDeviceConnections.simGateVoltage < myParallelDeviceConnections.maxDrainVoltage + myParallelDeviceConnections.device_p->model_p->Vth ) {
return true;
}
}
for ( auto device_it = theCvcDb->firstDrain_v[myDrainId]; device_it != UNKNOWN_DEVICE; device_it = theCvcDb->nextDrain_v[device_it] ) {
if ( device_it == deviceId ) continue; // same device
if ( myModelType == NMOS && ! IsNmos_(theCvcDb->deviceType_v[device_it] )) continue; // skip non-matching device types
if ( myModelType == PMOS && ! IsPmos_(theCvcDb->deviceType_v[device_it] )) continue; // skip non-matching device types
if ( theCvcDb->sourceNet_v[device_it] != mySourceId ) continue; // not parallel
theCvcDb->MapDeviceNets(device_it, myParallelDeviceConnections);
if ( myModelType == NMOS && IsKnownVoltage_(myParallelDeviceConnections.simGateVoltage)
&& myParallelDeviceConnections.simGateVoltage > myParallelDeviceConnections.minSourceVoltage + myParallelDeviceConnections.device_p->model_p->Vth ) {
return true;
} else if ( myModelType == PMOS && IsKnownVoltage_(myParallelDeviceConnections.simGateVoltage)
&& myParallelDeviceConnections.simGateVoltage < myParallelDeviceConnections.maxSourceVoltage + myParallelDeviceConnections.device_p->model_p->Vth ) {
return true;
}
}
return false;

}

bool CFullConnection::IsTransferGate(deviceId_t theNmos, deviceId_t thePmos, CCvcDb * theCvcDb) {
netId_t myPmosGateNet = theCvcDb->gateNet_v[thePmos];
string myOrigin = ( theCvcDb->inverterNet_v[myPmosGateNet] == UNKNOWN_NET )
Expand Down
1 change: 1 addition & 0 deletions src/CConnection.hh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public:
void SetUnknownVoltage();
void SetMinMaxLeakVoltagesAndFlags(CCvcDb * theCvcDb);
bool IsPossibleHiZ(CCvcDb * theCvcDb);
bool HasParallelShort(CCvcDb * theCvcDb);
bool IsTransferGate(deviceId_t theNmos, deviceId_t thePmos, CCvcDb * theCvcDb);
bool IsPumpCapacitor();

Expand Down
7 changes: 5 additions & 2 deletions src/CCvcDb_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,10 @@ void CCvcDb::FindFloatingInputErrors() {
deviceStatus_v[device_it][SIM_INACTIVE] = true; // ignore true floating input gates (not possible floating)
}
if ( cvcParameters.cvcIgnoreVthFloating && IsAlwaysOff(myConnections) ) continue; // skips Hi-Z input that is never on
if ( ! myHasLeakPath && cvcParameters.cvcIgnoreNoLeakFloating
&& connectionCount_v[net_it].SourceDrainCount() == 0 ) continue; // skip no leak floating
bool myIsPhysicallyFloating = connectionCount_v[net_it].SourceDrainCount() == 0;
if ( ! myHasLeakPath && cvcParameters.cvcIgnoreNoLeakFloating && myIsPhysicallyFloating ) continue; // skip no leak floating
bool myHasParallelShort = myConnections.HasParallelShort(this);
if ( myHasParallelShort && ( cvcParameters.cvcIgnoreNoLeakFloating || ! myIsPhysicallyFloating ) ) continue; // skip devices that have source/drain shorted
if ( myHasLeakPath || connectionCount_v[net_it].SourceDrainCount() == 0 ) { // physically floating gates too
if ( IncrementDeviceError(myConnections.deviceId, HIZ_INPUT) < cvcParameters.cvcCircuitErrorLimit || cvcParameters.cvcCircuitErrorLimit == 0 ) {
if ( ! myHasLeakPath ) errorFile << "* No leak path" << endl;
Expand All @@ -1043,6 +1045,7 @@ void CCvcDb::FindFloatingInputErrors() {
if ( IsFloatingGate(myConnections) ) continue; // Already processed previously
for ( deviceId_t device_it = firstGate_v[net_it]; device_it != UNKNOWN_DEVICE; device_it = nextGate_v[device_it] ) {
MapDeviceNets(device_it, myConnections);
if ( myConnections.HasParallelShort(this) ) continue; // skip devices that have source/drain shorted
bool myHasLeakPath = HasLeakPath(myConnections);
if ( myHasLeakPath ) {
if ( IncrementDeviceError(myConnections.deviceId, HIZ_INPUT) < cvcParameters.cvcCircuitErrorLimit || cvcParameters.cvcCircuitErrorLimit == 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/Cvc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef CVC_H_
#define CVC_H_

#define CVC_VERSION "1.1.2"
#define CVC_VERSION "1.1.3"

extern bool gDebug_cvc;
extern bool gSetup_cvc;
Expand Down

0 comments on commit 6295fd9

Please sign in to comment.