1 /* 2 * CConnectionCount.hh 3 * 4 * Copyright 2014-2020 D. Mitch Bailey cvc at shuharisystem dot com 5 * 6 * This file is part of cvc. 7 * 8 * cvc is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * cvc is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with cvc. If not, see <http://www.gnu.org/licenses/>. 20 * 21 * You can download cvc from https://github.com/d-m-bailey/cvc.git 22 */ 23 24 #ifndef CCONNECTIONCOUNT_HH_ 25 #define CCONNECTIONCOUNT_HH_ 26 27 #include "Cvc.hh" 28 29 class CConnectionCount { 30 public: 31 deviceId_t sourceCount = 0; 32 deviceId_t drainCount = 0; 33 deviceId_t gateCount = 0; 34 // deviceId_t bulkCount = 0; 35 CStatus sourceDrainType = bitset<8>(0); 36 SourceDrainCount()37 inline deviceId_t SourceDrainCount() { return sourceCount + drainCount; }; 38 }; 39 40 class CConnectionCountVector : public vector<CConnectionCount> { 41 public: 42 }; 43 44 #include "CCvcDb.hh" 45 46 class CDeviceCount { 47 public: 48 netId_t netId; 49 deviceId_t resistorCount = 0; 50 deviceId_t nmosCount = 0; 51 deviceId_t pmosCount = 0; 52 deviceId_t activeNmosCount = 0; 53 deviceId_t activePmosCount = 0; 54 deviceId_t nmosGateCount = 0; 55 deviceId_t pmosGateCount = 0; 56 // deviceId_t nmosBulkCount = 0; 57 // deviceId_t pmosBulkCount = 0; 58 deviceId_t capacitorCount = 0; 59 deviceId_t diodeCount = 0; 60 61 CDeviceCount(netId_t theNetId, CCvcDb * theCvcDb, instanceId_t theInstanceId = 0); 62 void Print(CCvcDb * theCvcDb_p); 63 64 }; 65 66 #endif /* CCONNECTIONCOUNT_HH_ */ 67