notes
来自「ngspice又一个电子CAD仿真软件代码.功能更全」· 代码 · 共 37 行
TXT
37 行
Some comments on keeping track of where the solution is:There are 3 places that the internal state variables can be hiding: 1. In the (psi,n,p) triple of a node (pNode). 2. In the solution vectors (dcSolution, copiedSolution). 3. In the state tables (pDevice->devStates[]). To access node variables use: pNode->psi pNode->nConc pNode->pConc To access solution vectors use: solution[ pNode->psiEqn ] solution[ pNode->nEqn ] solution[ pNode->pEqn ] To access state vector X (0,1,etc.) use: *(pDevice->devStateX + pNode->nodePsi) *(pDevice->devStateX + pNode->nodeN) *(pDevice->devStateX + pNode->nodeP)There are several functions that copy from one form of theseto another: storeInitialGuess: dcSolution <- nodevars biasSolve: nodevars <- dcSolution (DC) state0 <- nodevars <- dcSolution (Transient) saveState: nodevars <- state1 (Transient)In addition the main device-level Newton iteration copies duringthe computation of currents and derivatives: state0 <- dcSolutionand the function predict() does a forward prediction step usingthe previous state: nodevars <- predict(state1) (Transient)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?