Returns operating point information of the device with the drain current as (swept) independent variable. :param W: Width of the device in [m] :type W: float :param L: Length of the device in [m] :type L: float :param M: Number of devices i
(self, ID, VD, VS, VB, f, step=None)
| 54 | self.step = False |
| 55 | |
| 56 | def getOPid(self, ID, VD, VS, VB, f, step=None): |
| 57 | """ |
| 58 | Returns operating point information of the device with the drain |
| 59 | current as (swept) independent variable. |
| 60 | |
| 61 | :param W: Width of the device in [m] |
| 62 | :type W: float |
| 63 | |
| 64 | :param L: Length of the device in [m] |
| 65 | :type L: float |
| 66 | |
| 67 | :param M: Number of devices in parallel |
| 68 | :type M: int |
| 69 | |
| 70 | :param ID: Drain current [A] |
| 71 | :type ID: float |
| 72 | |
| 73 | :param VD: Drain voltage with respect to ground in [V] |
| 74 | :type VD: float |
| 75 | |
| 76 | :param VS: Source voltage with respect to ground in [V] |
| 77 | :type VS: float |
| 78 | |
| 79 | :param VB: Bulk voltage with respect to ground in [V] |
| 80 | :type VB: float |
| 81 | |
| 82 | :param step: Step data for ID; list with start value, number of values |
| 83 | and stop value. Defaults to None |
| 84 | """ |
| 85 | if not isinstance(step, list) or len(step) != 3: |
| 86 | stepStart = '{ID}' |
| 87 | stepNum = '1' |
| 88 | stepStep = '0' |
| 89 | else: |
| 90 | stepStart = str(float(step[0])) |
| 91 | stepNum = str(int(step[1])) |
| 92 | stepStep = str(float(step[2])) |
| 93 | self.step = True |
| 94 | txt = 'MOS_OP_I\n' |
| 95 | txt += '.param ID = %s\n'%(ID) |
| 96 | txt += '.param VD = %s\n'%(VD) |
| 97 | txt += '.param VS = %s\n'%(VS) |
| 98 | txt += '.param VB = %s\n'%(VB) |
| 99 | txt += '.param L = %s\n'%(self.L) |
| 100 | txt += '.param W = %s\n'%(self.W) |
| 101 | txt += '.param M = %s\n'%(self.M) |
| 102 | txt += '.param freq = %s\n'%(f) |
| 103 | txt += '.param num = %s\n'%(stepNum) |
| 104 | txt += '.param start = %s\n'%(stepStart) |
| 105 | txt += '.param delta = %s\n'%(stepStep) |
| 106 | txt += '.param select = 0\n\n' |
| 107 | txt += '%s\n\n'%(self.lib) |
| 108 | # MOS with voltage feedback loop for creating the gate-source voltage |
| 109 | txt += 'M1_OP d1 g1 s1 b1 %s W={W} L={L} M={M}\n'%(self.dev) |
| 110 | # LOOP and DC voltages |
| 111 | txt += 'V5 s1 0 {VS}\nV6 b1 0 {VB}\nV7 d1 1 {VD}\nE1 g1 d1 1 0 100\nI1 0 1 {ID}\n' |
| 112 | # MOS for parameter measurement |
| 113 | txt += 'M1 d2 g2 s2 b2 %s W={W} L={L} M={M}\n'%(self.dev) |
no test coverage detected