| #!/usr/bin/env python3 |
| # Copyright 2020 The Skywater PDK Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| |
| import re |
| |
| dotcor_headers = [ |
| """ |
| * Default Corner File created by discrete_corners |
| * Number of BINS: 1 |
| * 9 Parameters |
| """, |
| """ |
| ************************************************************ |
| * PROCESS MONTE CARLO CORNER SIMULATION FILE * |
| ************************************************************ |
| * |
| * Created by: qhc |
| * Created on: Thu May 08 11:13:30 -0400 2014 |
| * |
| * These models are experimental - they are not yet a substitute for corner simulation signoff. |
| * |
| * To use: |
| * .include "critical_params.cor" |
| * .include "monte.cor" |
| * |
| * Non Monte Carlo analysis will yield TT simulations by default. |
| * |
| * Spectre Usage Example: |
| * mc1 montecarlo variations=process seed=1 numruns=10 |
| * |
| .option scale = 1.0u |
| * |
| * Included invariant parameter file: |
| .include "invariant.cor" |
| * |
| * Derivative Parameters: |
| * |
| """, |
| """ |
| * model.hed |
| **************************************************************** |
| * cypress proprietary model header |
| * tech= s8pir-10r |
| * model rev 3.6 |
| * matching etd BI |
| * matching tdr CZ |
| * matching MRGA BH |
| * release fr td 02/17/14 |
| * maturity level 3 |
| * based on si yes (see readme.txt in KYCC:/tools/cmc/meas/s8/MRS_2456) |
| * Model syntax compatible with Spectre |
| * hspice version 2005.09 |
| **************************************************************** |
| """, |
| """ |
| * File created for mismatch simulations |
| * Device: NHV |
| """, |
| """ |
| // |
| // BSIMTran Version 0.1.24, Created on 4-26-2002 |
| // Username: pxg |
| // Command Line: /home/pxg/config/cydir/bin/lnx86/bsimtran nmos.rf nmos -p -nsonos_e latch_bol_e.pm nhv_ov.pm ndiode_nvs_iv.mod ndiode_nvs_cv.mod latch_bol_e_wafer.pm3 |
| // Working Directory: /home/pxg/rams/s8/models.3.3/flash_sonos/rev_model/parallel_fnpass/combined |
| // Time: Tue Sep 16 16:01:42 2008 |
| // Rule File: nmos.rf |
| // Output File: latch_bol_e_wafer.pm3 |
| // Input Files: |
| // (1) latch_bol_e.pm |
| // (2) nhv_ov.pm |
| // (3) ndiode_nvs_iv.mod |
| // (4) ndiode_nvs_cv.mod |
| // copyright, Cypress Semiconductor, 2002 |
| // BSIM3.V3 NMOS Model |
| """, |
| ] |
| |
| |
| dotcor_formula = [ |
| """ |
| * |
| * |
| * sonos_p, Bin 000, W = 0.45, L = 0.22 |
| * |
| """, |
| """ |
| * |
| * fnpass, Bin 000, W = 0.45, L = 0.15 |
| * |
| """, |
| ] |
| |
| dotcor_inc = [ |
| """ |
| * RF MOS PARAMETERS |
| .inc "nshort_rf_base_b_sf.cor" |
| .inc "nlowvt_rf_base_b_sf.cor" |
| .inc "nhv_rf_base_b_sf.cor" |
| .inc "pshort_rf_base_b_sf.cor" |
| .inc "nshort_rf_mm.cor" |
| .inc "nlowvt_rf_mm.cor" |
| .inc "nhv_rf_mm.cor" |
| .inc "pshort_rf_mm.cor" |
| .inc "pmedlvt_rf_sf_discrete.cor" |
| .inc "pmedlvt_rf_mm.cor" |
| """, |
| """ |
| **Include files in ../../../s8x/ directory |
| .inc "../../s8x/Models/correl1.cor" |
| .inc "models.all" |
| * RF MOS PARAMETERS: Correlation follows the same factors as Analog models |
| .inc "nshort_rf_base_b_ttcorreln.cor" |
| .inc "nlowvt_rf_base_b_ttcorrelp.cor" |
| .inc "nhv_rf_base_b_ttcorreln.cor" |
| .inc "pshort_rf_base_b_ttcorreln.cor" |
| .inc "nshort_rf_mm.cor" |
| .inc "nlowvt_rf_mm.cor" |
| .inc "nhv_rf_mm.cor" |
| .inc "pshort_rf_mm.cor" |
| .inc "pmedlvt_rf_tt_discrete.cor" |
| .inc "pmedlvt_rf_mm.cor" |
| """, |
| ] |
| |
| |
| RE_SPICE_INC = re.compile("^(.inc|.include|include)\s*(?P<quote>['\"])(?P<inc>.*?)(?P=quote)\s*$") |
| |