/* ===========================================================================
 FILE    ifspec.ifs
 Copyright 2025 Vadim Kuznetsov

 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 */

NAME_TABLE:

Spice_Model_Name:      mlin
C_Function_Name:       cm_mlin
Description:           "Microstrip line"


PORT_TABLE:
Port_Name:             port1
Description:           "Microstrip terminals"
Direction:             inout
Default_Type:          hd
Allowed_Types:         [hd]
Vector:                no
Vector_Bounds:         -
Null_Allowed:          no

PORT_TABLE:
Port_Name:             port2
Description:           "Microstrip terminals"
Direction:             inout
Default_Type:          hd
Allowed_Types:         [hd]
Vector:                no
Vector_Bounds:         -
Null_Allowed:          no

PORT_TABLE:
Port_Name:             V1sens
Description:           "Sensing terminals"
Direction:             in
Default_Type:          vd
Allowed_Types:         [vd]
Vector:                no
Vector_Bounds:         -
Null_Allowed:          no

PORT_TABLE:
Port_Name:             V2sens
Description:           "Sensisng terminals"
Direction:             in
Default_Type:          vd
Allowed_Types:         [vd]
Vector:                no
Vector_Bounds:         -
Null_Allowed:          no


PARAMETER_TABLE:
Parameter_Name:        l
Description:           "length"
Data_Type:             real
Default_Value:         1e-2
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes


PARAMETER_TABLE:
Parameter_Name:        w
Description:           "width"
Data_Type:             real
Default_Value:         1e-3
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes


PARAMETER_TABLE:
Parameter_Name:        model
Description:           "Model type"
Data_Type:             int
Default_Value:         0
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes


PARAMETER_TABLE:
Parameter_Name:        disp
Description:           "Dispersion type"
Data_Type:             int
Default_Value:         0
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes

PARAMETER_TABLE:
Parameter_Name:        er
Description:           "Substrate dielectric permittivity"
Data_Type:             real
Default_Value:         9.8
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes

PARAMETER_TABLE:
Parameter_Name:        h
Description:           "Substrate thickness"
Data_Type:             real
Default_Value:         1e-3
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes

PARAMETER_TABLE:
Parameter_Name:        t
Description:           "Metal strip thickness"
Data_Type:             real
Default_Value:         35e-6
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes

PARAMETER_TABLE:
Parameter_Name:        tand
Description:           "Substrate dielectric loss"
Data_Type:             real
Default_Value:         2e-4
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes


PARAMETER_TABLE:
Parameter_Name:        rho
Description:           "Metal resistance"
Data_Type:             real
Default_Value:         0.022e-6
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes

PARAMETER_TABLE:
Parameter_Name:        d
Description:           "RMS Substrate roughness"
Data_Type:             real
Default_Value:         0.15e-6
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes


PARAMETER_TABLE:
Parameter_Name:        tranmodel
Description:           "TRAN model DC/FULL"
Data_Type:             int
Default_Value:         0
Limits:                -
Vector:                no
Vector_Bounds:         -
Null_Allowed:          yes


STATIC_VAR_TABLE:

Static_Var_Name:    sim_points_data
Description:        "local static data"
Data_Type:          pointer

