Skip to content

Commit

Permalink
Sign multiplier for compatibility with existing spectre sweep
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian committed Nov 12, 2023
1 parent 74e9c78 commit f118531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pygmid/sweep/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ def _extract_sweep_params(self, sweep_output_directory, sweep_type="DC"):
params_names = ['ids', 'vth', 'igd', 'igs', 'gm',
'gmb', 'gds', 'cgg', 'cgs', 'cgd',
'cgb', 'cdd', 'cdg', 'css', 'csg', 'cjd', 'cjs']
pmos_signs = [-1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

nmos = {f"mn:{param}" : data.reshape((len(self._config['SWEEP']['VDS']), len(self._config['SWEEP']['VGS']))).T for param, data in zip(params_names,nmos_data)}
pmos = {f"mp:{param}" : data.reshape((len(self._config['SWEEP']['VDS']), len(self._config['SWEEP']['VGS']))).T for param, data in zip(params_names,pmos_data)}
pmos = {f"mp:{param}" : sign*data.reshape((len(self._config['SWEEP']['VDS']), len(self._config['SWEEP']['VGS']))).T for param, data, sign in zip(params_names,pmos_data,pmos_signs)}
# compatibility
nmos['mn:gmbs'] = nmos.pop('mn:gmb')
pmos['mp:gmbs'] = pmos.pop('mp:gmb')
Expand Down

0 comments on commit f118531

Please sign in to comment.