forked from wrcad/xictools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new files, should have been in last commit
- Loading branch information
Showing
2 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
/*========================================================================* | ||
* * | ||
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA * | ||
* http://wrcad.com * | ||
* Copyright (C) 2018 Whiteley Research Inc., all rights reserved. * | ||
* Author: Stephen R. Whiteley, except as indicated. * | ||
* * | ||
* As fully as possible recognizing licensing terms and conditions * | ||
* imposed by earlier work from which this work was derived, if any, * | ||
* this work is released under the Apache License, Version 2.0 (the * | ||
* "License"). You may not use this file except in compliance with * | ||
* the License, and compliance with inherited licenses which are * | ||
* specified in a sub-header below this one if applicable. A copy * | ||
* of the License is provided with this distribution, or you may * | ||
* obtain a copy of the License at * | ||
* * | ||
* http://www.apache.org/licenses/LICENSE-2.0 * | ||
* * | ||
* See the License for the specific language governing permissions * | ||
* and limitations under the License. * | ||
* * | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- * | ||
* INFRINGEMENT. IN NO EVENT SHALL WHITELEY RESEARCH INCORPORATED * | ||
* OR STEPHEN R. WHITELEY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * | ||
* USE OR OTHER DEALINGS IN THE SOFTWARE. * | ||
* * | ||
*========================================================================* | ||
* XicTools Integrated Circuit Design System * | ||
* * | ||
* WRspice Circuit Simulation and Analysis Tool: Device Library * | ||
* * | ||
*========================================================================* | ||
$Id:$ | ||
*========================================================================*/ | ||
|
||
#include "inddefs.h" | ||
|
||
|
||
int | ||
INDdev::askModl(const sGENmodel *genmod, int which, IFdata *data) | ||
{ | ||
const sINDmodel *model = static_cast<const sINDmodel*>(genmod); | ||
IFvalue *value = &data->v; | ||
// Need to override this for non-real returns. | ||
data->type = IF_REAL; | ||
|
||
switch (which) { | ||
case IND_MOD_M: | ||
value->rValue = model->INDm; | ||
break; | ||
default: | ||
return (E_BADPARM); | ||
} | ||
return (OK); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
/*========================================================================* | ||
* * | ||
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA * | ||
* http://wrcad.com * | ||
* Copyright (C) 2018 Whiteley Research Inc., all rights reserved. * | ||
* Author: Stephen R. Whiteley, except as indicated. * | ||
* * | ||
* As fully as possible recognizing licensing terms and conditions * | ||
* imposed by earlier work from which this work was derived, if any, * | ||
* this work is released under the Apache License, Version 2.0 (the * | ||
* "License"). You may not use this file except in compliance with * | ||
* the License, and compliance with inherited licenses which are * | ||
* specified in a sub-header below this one if applicable. A copy * | ||
* of the License is provided with this distribution, or you may * | ||
* obtain a copy of the License at * | ||
* * | ||
* http://www.apache.org/licenses/LICENSE-2.0 * | ||
* * | ||
* See the License for the specific language governing permissions * | ||
* and limitations under the License. * | ||
* * | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- * | ||
* INFRINGEMENT. IN NO EVENT SHALL WHITELEY RESEARCH INCORPORATED * | ||
* OR STEPHEN R. WHITELEY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * | ||
* USE OR OTHER DEALINGS IN THE SOFTWARE. * | ||
* * | ||
*========================================================================* | ||
* XicTools Integrated Circuit Design System * | ||
* * | ||
* WRspice Circuit Simulation and Analysis Tool: Device Library * | ||
* * | ||
*========================================================================* | ||
$Id:$ | ||
*========================================================================*/ | ||
|
||
#include "inddefs.h" | ||
|
||
|
||
int | ||
INDdev::setModl(int param, IFdata *data, sGENmodel *genmod) | ||
{ | ||
sINDmodel *model = static_cast<sINDmodel*>(genmod); | ||
IFvalue *value = &data->v; | ||
|
||
switch (param) { | ||
case IND_MOD_L: | ||
break; | ||
case IND_MOD_M: | ||
model->INDm = value->rValue; | ||
model->INDmGiven = true; | ||
break; | ||
default: | ||
return (E_BADPARM); | ||
} | ||
return (OK); | ||
} | ||
|