
/*
 * Structures for model: msopen
 *
 * Automatically generated by cmpp preprocessor
 *
 * !!! DO NOT EDIT !!!
 *
 */


#include "ngspice/ngspice.h"
#include <stdio.h>
#include "ngspice/devdefs.h"
#include "ngspice/ifsim.h"
#include "ngspice/mifdefs.h"
#include "ngspice/mifproto.h"
#include "ngspice/mifparse.h"


static IFparm MIFmPTable[] = {
    IOP("w", 0, IF_REAL, "width"),
    IOP("model", 1, IF_INTEGER, "Model type"),
    IOP("disp", 2, IF_INTEGER, "Dispersion type"),
    IOP("msopen_model", 3, IF_INTEGER, "MSOpen model"),
    IOP("er", 4, IF_REAL, "Substrate dielectric permittivity"),
    IOP("h", 5, IF_REAL, "Substrate thickness"),
    IOP("t", 6, IF_REAL, "Metal strip thickness"),
    IOP("tand", 7, IF_REAL, "Substrate dielectric loss"),
    IOP("rho", 8, IF_REAL, "Metal resistance"),
    IOP("d", 9, IF_REAL, "RMS Substrate roughness"),
};


static Mif_Port_Type_t MIFportEnum0[] = {
    MIF_DIFF_CONDUCTANCE,
};


static char *MIFportStr0[] = {
    "gd",
};


static Mif_Conn_Info_t MIFconnTable[] = {
  {
    "p1",
    "terminals",
    MIF_INOUT,
    MIF_DIFF_CONDUCTANCE,
    "gd",
    1,
    MIFportEnum0,
    MIFportStr0,
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
  },
};

static union Mif_Parse_Value w_default[] = {
    { .rvalue=1.000000e-03 },
};

static union Mif_Parse_Value model_default[] = {
    { .ivalue=0 },
};

static union Mif_Parse_Value disp_default[] = {
    { .ivalue=0 },
};

static union Mif_Parse_Value msopen_model_default[] = {
    { .ivalue=0 },
};

static union Mif_Parse_Value er_default[] = {
    { .rvalue=9.800000e+00 },
};

static union Mif_Parse_Value h_default[] = {
    { .rvalue=1.000000e-03 },
};

static union Mif_Parse_Value t_default[] = {
    { .rvalue=3.500000e-05 },
};

static union Mif_Parse_Value tand_default[] = {
    { .rvalue=2.000000e-04 },
};

static union Mif_Parse_Value rho_default[] = {
    { .rvalue=2.200000e-08 },
};

static union Mif_Parse_Value d_default[] = {
    { .rvalue=1.500000e-07 },
};


static Mif_Param_Info_t MIFparamTable[] = {
  {
    "w",
    "width",
    MIF_REAL,
    1,
    w_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "model",
    "Model type",
    MIF_INTEGER,
    1,
    model_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "disp",
    "Dispersion type",
    MIF_INTEGER,
    1,
    disp_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "msopen_model",
    "MSOpen model",
    MIF_INTEGER,
    1,
    msopen_model_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "er",
    "Substrate dielectric permittivity",
    MIF_REAL,
    1,
    er_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "h",
    "Substrate thickness",
    MIF_REAL,
    1,
    h_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "t",
    "Metal strip thickness",
    MIF_REAL,
    1,
    t_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "tand",
    "Substrate dielectric loss",
    MIF_REAL,
    1,
    tand_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "rho",
    "Metal resistance",
    MIF_REAL,
    1,
    rho_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
  {
    "d",
    "RMS Substrate roughness",
    MIF_REAL,
    1,
    d_default,
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    { .bvalue=MIF_FALSE },
    MIF_FALSE,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_FALSE,
    0,
    MIF_TRUE,
  },
};


extern void cm_msopen(Mif_Private_t *);

static int val_terms             = 0;
static int val_numNames          = 0;
static int val_numInstanceParms  = 0;
static int val_numModelParms     = 10;
static int val_sizeofMIFinstance = sizeof(MIFinstance);
static int val_sizeofMIFmodel    = sizeof(MIFmodel);

SPICEdev cm_msopen_info = {
    .DEVpublic = {
        .name = "msopen",
        .description = "Microstrip open end",
        .terms = &val_terms,
        .numNames = &val_numNames,
        .termNames = NULL,
        .numInstanceParms = &val_numInstanceParms,
        .instanceParms = NULL,
        .numModelParms = &val_numModelParms,
        .modelParms = MIFmPTable,
        .flags = 0,

        .cm_func = cm_msopen,
        .num_conn = 1,
        .conn = MIFconnTable,
        .num_param = 10,
        .param = MIFparamTable,
        .num_inst_var = 0,
        .inst_var = NULL,
    },

    .DEVparam = NULL,
    .DEVmodParam = MIFmParam,
    .DEVload = MIFload,
    .DEVsetup = MIFsetup,
    .DEVunsetup = MIFunsetup,
    .DEVpzSetup = NULL,
    .DEVtemperature = NULL,
    .DEVtrunc = MIFtrunc,
    .DEVfindBranch = NULL,
    .DEVacLoad = MIFload,
    .DEVaccept = NULL,
    .DEVdestroy = NULL,
    .DEVmodDelete = MIFmDelete,
    .DEVdelete = MIFdelete,
    .DEVsetic = NULL,
    .DEVask = MIFask,
    .DEVmodAsk = MIFmAsk,
    .DEVpzLoad = NULL,
    .DEVconvTest = MIFconvTest,
    .DEVsenSetup = NULL,
    .DEVsenLoad = NULL,
    .DEVsenUpdate = NULL,
    .DEVsenAcLoad = NULL,
    .DEVsenPrint = NULL,
    .DEVsenTrunc = NULL,
    .DEVdisto = NULL,
    .DEVnoise = NULL,
    .DEVsoaCheck = NULL,
    .DEVinstSize = &val_sizeofMIFinstance,
    .DEVmodSize = &val_sizeofMIFmodel,

#ifdef CIDER
    .DEVdump = NULL,
    .DEVacct = NULL,
#endif

#ifdef KLU
    .DEVbindCSC = MIFbindCSC,
    .DEVbindCSCComplex = MIFbindCSCComplex,
    .DEVbindCSCComplexToReal = MIFbindCSCComplexToReal,
#endif
};

