My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions | Variables
check_spice.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <float.h>
#include <ctype.h>
#include "constants.h"
#include "check_spice.h"
#include "qucs_producer.h"
#include "hash.h"
#include "qucsdefs.h"
Include dependency graph for check_spice.cpp:

Go to the source code of this file.

Classes

struct  spice_device_t
 
struct  spice_device_table_t
 
struct  node_translation_t
 
struct  unit_translation_t
 
struct  property_translation_t
 
struct  property_field_t
 

Macros

#define foreach_value(values, val)
 
#define VAL_IS_NUMBER(val)
 
#define VAL_IS_DONE(val)   ((val) == NULL || (val)->hint & HINT_DONE)
 

Functions

struct value_tnetlist_reverse_values (struct value_t *values)
 
struct pair_tnetlist_reverse_pairs (struct pair_t *pairs)
 
struct node_tnetlist_reverse_nodes (struct node_t *nodes)
 
struct pair_tnetlist_append_pairs (struct pair_t *p1, struct pair_t *p2)
 
struct value_tnetlist_append_values (struct value_t *v1, struct value_t *v2)
 
struct node_tnetlist_append_nodes (struct node_t *n1, struct node_t *n2)
 
void netlist_free_pair (struct pair_t *pair)
 
struct pair_tspice_del_property (struct pair_t *root, struct pair_t *pair)
 
void spice_adjust_alias_properties (struct definition_t *def, struct pair_t *pair)
 
void spice_adjust_properties (struct definition_t *def)
 
void spice_destroy (void)
 
struct definition_tspice_del_definition (struct definition_t *root, struct definition_t *def)
 
void spice_add_last_hint (struct value_t *val, int hint)
 
void spice_set_last_hint (struct value_t *val, int hint)
 
struct definition_tspice_checker_intern (struct definition_t *root)
 
int spice_checker (void)
 

Variables

struct definition_tdefinition_root = NULL
 
struct definition_tsubcircuit_root = NULL
 
struct definition_tdevice_root = NULL
 
int spice_errors = 0
 
char * spice_title = NULL
 
struct define_t spice_definition_available []
 
struct spice_device_t spice_devices []
 
struct spice_device_table_t spice_device_table []
 
struct node_translation_t node_translations []
 
struct unit_translation_t unit_translations []
 
struct property_translation_t property_translations []
 
struct node_tspice_nodes = NULL
 

Macro Definition Documentation

#define foreach_value (   values,
  val 
)
Value:
for ((val) = (values); (val) != NULL; (val) = (val)->next) \
if (!((val)->hint & HINT_DONE))

Definition at line 179 of file check_spice.cpp.

#define VAL_IS_DONE (   val)    ((val) == NULL || (val)->hint & HINT_DONE)

Definition at line 1381 of file check_spice.cpp.

#define VAL_IS_NUMBER (   val)
Value:
((val) != NULL && \
(val)->hint & (HINT_NUMBER | HINT_NODE) && \
!((val)->hint & HINT_DONE))

Definition at line 1376 of file check_spice.cpp.

Function Documentation

struct node_t* netlist_append_nodes ( struct node_t n1,
struct node_t n2 
)
read

Definition at line 241 of file check_spice.cpp.

struct pair_t* netlist_append_pairs ( struct pair_t p1,
struct pair_t p2 
)
read

Definition at line 221 of file check_spice.cpp.

struct value_t* netlist_append_values ( struct value_t v1,
struct value_t v2 
)
read

Definition at line 231 of file check_spice.cpp.

void netlist_free_pair ( struct pair_t pair)

Definition at line 593 of file check_spice.cpp.

Here is the caller graph for this function:

struct node_t* netlist_reverse_nodes ( struct node_t nodes)
read

Definition at line 209 of file check_spice.cpp.

struct pair_t* netlist_reverse_pairs ( struct pair_t pairs)
read

Definition at line 197 of file check_spice.cpp.

struct value_t* netlist_reverse_values ( struct value_t values)
read

Definition at line 185 of file check_spice.cpp.

void spice_add_last_hint ( struct value_t val,
int  hint 
)

Definition at line 3045 of file check_spice.cpp.

void spice_adjust_alias_properties ( struct definition_t def,
struct pair_t pair 
)

Definition at line 1055 of file check_spice.cpp.

Here is the caller graph for this function:

void spice_adjust_properties ( struct definition_t def)

Definition at line 1071 of file check_spice.cpp.

Here is the call graph for this function:

int spice_checker ( void  )

Definition at line 3069 of file check_spice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

struct definition_t* spice_checker_intern ( struct definition_t root)
read

Definition at line 3059 of file check_spice.cpp.

Here is the caller graph for this function:

struct definition_t* spice_del_definition ( struct definition_t root,
struct definition_t def 
)
read

Definition at line 1208 of file check_spice.cpp.

struct pair_t* spice_del_property ( struct pair_t root,
struct pair_t pair 
)
read

Definition at line 601 of file check_spice.cpp.

Here is the call graph for this function:

void spice_destroy ( void  )

Definition at line 1192 of file check_spice.cpp.

Here is the caller graph for this function:

void spice_set_last_hint ( struct value_t val,
int  hint 
)

Definition at line 3052 of file check_spice.cpp.

Variable Documentation

struct definition_t* definition_root = NULL

Definition at line 47 of file check_spice.cpp.

struct definition_t* device_root = NULL

Definition at line 49 of file check_spice.cpp.

struct node_translation_t node_translations[]
struct property_translation_t property_translations[]
Initial value:
= {
{ NULL, "CCS", "Cjs" },
{ NULL, "VA", "Vaf" },
{ NULL, "VB", "Var" },
{ NULL, "IK", "Ikf" },
{ NULL, "PE", "Vje" },
{ NULL, "ME", "Mje" },
{ NULL, "PC", "Vjc" },
{ NULL, "MC", "Mjc" },
{ NULL, "PS", "Vjs" },
{ NULL, "MS", "Mjs" },
{ NULL, "VTO", "Vt0" },
{ NULL, "U0", "Uo" },
{ NULL, "CJO", "Cj0" },
{ "C", "IC", "V" },
{ "L", "IC", "I" },
{ NULL, "Z0", "Z" },
{ "R", "TC", "Tc1" },
{ NULL, NULL, NULL }
}
struct define_t spice_definition_available[]

Definition at line 96 of file check_spice.cpp.

struct spice_device_table_t spice_device_table[]
Initial value:
= {
{ "Q", "BJT" },
{ "J", "JFET", },
{ "M", "MOSFET" },
{ "D", "Diode" },
{ "V", "Vdc" },
{ "I", "Idc" },
{ "G", "VCCS" },
{ "E", "VCVS" },
{ "F", "CCCS" },
{ "H", "CCVS" },
{ "K", "Tr" },
{ "S", "Relais" },
{ "T", "TLIN4P" },
{ NULL, NULL }
}
struct spice_device_t spice_devices[]
Initial value:
= {
{ "NPN", "BJT", "npn" },
{ "PNP", "BJT", "pnp" },
{ "NJF", "JFET", "nfet" },
{ "PJF", "JFET", "pfet" },
{ "NMOS", "MOSFET", "nfet" },
{ "PMOS", "MOSFET", "pfet" },
{ "D", "Diode", NULL },
{ "SW", "Relais", NULL },
{ "VSWITCH", "Relais", NULL },
{ "RES", "R", NULL },
{ "R", "R", NULL },
{ "C", "C", NULL },
{ NULL, NULL, NULL }
}
int spice_errors = 0

Definition at line 50 of file check_spice.cpp.

struct node_t* spice_nodes = NULL

Definition at line 1691 of file check_spice.cpp.

char* spice_title = NULL

Definition at line 51 of file check_spice.cpp.

struct definition_t* subcircuit_root = NULL

Definition at line 48 of file check_spice.cpp.

struct unit_translation_t unit_translations[]
Initial value:
= {
{ "OHM", "Ohm" },
{ "OHMS", "Ohm" },
{ "MHO", "S" },
{ "S", "s" },
{ "H", "H" },
{ "F", "F" },
{ "HZ", "Hz" },
{ "V", "V" },
{ "VOLT", "V" },
{ "A", "A" },
{ "M", "m" },
{ NULL, NULL }
}