Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
check_netlist.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cmath>
#include <assert.h>
#include <float.h>
#include "logging.h"
#include "strlist.h"
#include "netdefs.h"
#include "equation.h"
#include "check_netlist.h"
#include "constants.h"
#include "environment.h"
#include "variable.h"
#include "module.h"

Go to the source code of this file.

Functions

static int checker_count_nodes (struct definition_t *def)
 
static struct define_tchecker_find_definition (char *type, int action)
 
static int checker_find_property (const char *key, struct pair_t *pp)
 
static int checker_is_property (struct define_t *available, const char *key)
 
static int checker_count_definition (struct definition_t *root, const char *type, char *instance)
 
static struct value_tchecker_find_variable (struct definition_t *root, const char *type, const char *key, char *ident)
 
static struct value_tchecker_find_reference (struct definition_t *def, const char *key)
 
static struct value_tchecker_find_prop_value (struct definition_t *def, const char *key)
 
static int checker_find_property (struct definition_t *def, const char *key)
 
static struct value_tchecker_validate_reference (struct definition_t *def, const char *key)
 
static struct value_tchecker_find_substrate (struct definition_t *def, char *ident)
 
static variable * checker_add_variable (environment *env, char *var, int type, bool pass)
 
static int checker_resolve_variable (struct definition_t *root, struct definition_t *def, struct pair_t *pair, int type)
 
static int checker_evaluate_scale (struct value_t *value)
 
static int checker_count_definitions (struct definition_t *root, const char *type, int action)
 
static struct definition_tchecker_find_subcircuit (char *n)
 
static struct definition_tchecker_get_subcircuit (struct definition_t *def)
 
static int checker_count_nonlinearities (struct definition_t *root)
 
static int checker_count_action (struct definition_t *root, char *instance)
 
static int checker_validate_para_cycles (struct definition_t *root, char *instance, strlist *deps)
 
static int checker_validate_para (struct definition_t *root)
 
static struct definition_tchecker_find_port (struct definition_t *root)
 
static int checker_validate_ports (struct definition_t *root)
 
static int checker_validate_lists (struct definition_t *root)
 
static int checker_validate_actions (struct definition_t *root)
 
static int checker_validate_strips (struct definition_t *root)
 
static int checker_count_nodes (struct definition_t *root, char *n)
 
static int checker_count_nodesets (struct definition_t *root, char *n)
 
static int checker_validate_nodesets (struct definition_t *root)
 
static int netlist_checker_variables_intern (struct definition_t *root, environment *env)
 
int netlist_checker_variables (environment *env)
 
static int checker_value_in_prop_range (char *instance, struct define_t *def, struct pair_t *pp, struct property_t *prop)
 
static int checker_value_in_range (char *instance, struct define_t *def, struct pair_t *pp)
 
static struct definition_tchecker_build_subcircuits (struct definition_t *root)
 
static struct definition_tchecker_copy_subcircuit (struct definition_t *sub)
 
static void checker_xlat_subcircuit_nodes (struct definition_t *type, struct definition_t *inst, struct definition_t *sub)
 
static char * checker_subcircuit_node (char *type, char *instances, char *instance, char *node)
 
struct node_tnetlist_reverse_nodes (struct node_t *nodes)
 
static void checker_copy_subcircuit_nodes (struct definition_t *type, struct definition_t *inst, struct definition_t *sub, struct definition_t *copy, char *instances)
 
static struct node_tchecker_get_circuit_node (struct node_t *root, int n)
 
static void checker_cleanup_xlat_nodes (struct definition_t *sub)
 
static void checker_copy_circuit_nodes (struct definition_t *type, struct definition_t *inst, struct definition_t *sub, struct definition_t *copy, char *instances)
 
static struct definition_tchecker_find_last_definition (struct definition_t *root)
 
static char * checker_subcircuit_instance_list (strlist *instances)
 
static char * checker_subcircuit_instance (char *type, char *instances, char *instance, char *base)
 
static struct definition_tchecker_copy_subcircuits (struct definition_t *type, struct definition_t *inst, strlist **instances, environment *parent)
 
static int checker_validate_sub_cycles (struct definition_t *root, char *type, char *instance, strlist **deps)
 
static struct define_tnetlist_create_define (struct definition_t *def)
 
static void netlist_free_define (struct define_t *d)
 
static int checker_validate_properties (struct definition_t *root, struct definition_t *def, struct define_t *available)
 
static int checker_validate_subcircuits (struct definition_t *root)
 
static void netlist_free_nodes (struct node_t *node)
 
static void netlist_free_value (struct value_t *value)
 
static void netlist_free_pairs (struct pair_t *pp)
 
static void netlist_free_definition (struct definition_t *def)
 
struct definition_tnetlist_unchain_definition (struct definition_t *root, struct definition_t *cand)
 
static struct definition_tchecker_expand_subcircuits (struct definition_t *root, environment *parent)
 
static int netlist_checker_intern (struct definition_t *root)
 
void netlist_status (void)
 
static struct definition_tchecker_build_equations (struct definition_t *root, eqn::node **eroot)
 
static void checker_setup_env (struct definition_t *root, environment *env, eqn::node *eqns)
 
static void checker_subcircuit_args (struct definition_t *def, environment *env)
 
int netlist_checker (environment *env)
 
static void netlist_destroy_intern (struct definition_t *root)
 
void netlist_destroy (void)
 
void netlist_destroy_env (void)
 

Variables

struct definition_tdefinition_root = NULL
 
struct definition_tsubcircuit_root = NULL
 
environment * env_root = NULL
 
static int checker_sub_cycles = 0
 

Function Documentation

static variable* checker_add_variable ( environment *  env,
char *  var,
int  type,
bool  pass 
)
static

Definition at line 225 of file check_netlist.cpp.

static struct definition_t* checker_build_equations ( struct definition_t root,
eqn::node **  eroot 
)
static

Definition at line 2178 of file check_netlist.cpp.

static struct definition_t* checker_build_subcircuits ( struct definition_t root)
static

Definition at line 1225 of file check_netlist.cpp.

static void checker_cleanup_xlat_nodes ( struct definition_t sub)
static

Definition at line 1390 of file check_netlist.cpp.

static void checker_copy_circuit_nodes ( struct definition_t type,
struct definition_t inst,
struct definition_t sub,
struct definition_t copy,
char *  instances 
)
static

Definition at line 1408 of file check_netlist.cpp.

static struct definition_t* checker_copy_subcircuit ( struct definition_t sub)
static

Definition at line 1254 of file check_netlist.cpp.

static void checker_copy_subcircuit_nodes ( struct definition_t type,
struct definition_t inst,
struct definition_t sub,
struct definition_t copy,
char *  instances 
)
static

Definition at line 1333 of file check_netlist.cpp.

static struct definition_t* checker_copy_subcircuits ( struct definition_t type,
struct definition_t inst,
strlist **  instances,
environment *  parent 
)
static

Definition at line 1492 of file check_netlist.cpp.

static int checker_count_action ( struct definition_t root,
char *  instance 
)
static

Definition at line 560 of file check_netlist.cpp.

static int checker_count_definition ( struct definition_t root,
const char *  type,
char *  instance 
)
static

Definition at line 108 of file check_netlist.cpp.

static int checker_count_definitions ( struct definition_t root,
const char *  type,
int  action 
)
static

Definition at line 491 of file check_netlist.cpp.

static int checker_count_nodes ( struct definition_t def)
static

Definition at line 55 of file check_netlist.cpp.

static int checker_count_nodes ( struct definition_t root,
char *  n 
)
static

Definition at line 923 of file check_netlist.cpp.

static int checker_count_nodesets ( struct definition_t root,
char *  n 
)
static

Definition at line 940 of file check_netlist.cpp.

static int checker_count_nonlinearities ( struct definition_t root)
static

Definition at line 536 of file check_netlist.cpp.

static int checker_evaluate_scale ( struct value_t value)
static

Definition at line 370 of file check_netlist.cpp.

static struct definition_t* checker_expand_subcircuits ( struct definition_t root,
environment *  parent 
)
static

Definition at line 1962 of file check_netlist.cpp.

static struct define_t* checker_find_definition ( char *  type,
int  action 
)
static

Definition at line 66 of file check_netlist.cpp.

static struct definition_t* checker_find_last_definition ( struct definition_t root)
static

Definition at line 1454 of file check_netlist.cpp.

static struct definition_t* checker_find_port ( struct definition_t root)
static

Definition at line 652 of file check_netlist.cpp.

static struct value_t* checker_find_prop_value ( struct definition_t def,
const char *  key 
)
static

Definition at line 168 of file check_netlist.cpp.

static int checker_find_property ( const char *  key,
struct pair_t pp 
)
static

Definition at line 75 of file check_netlist.cpp.

static int checker_find_property ( struct definition_t def,
const char *  key 
)
static

Definition at line 183 of file check_netlist.cpp.

static struct value_t* checker_find_reference ( struct definition_t def,
const char *  key 
)
static

Definition at line 152 of file check_netlist.cpp.

static struct definition_t* checker_find_subcircuit ( char *  n)
static

Definition at line 511 of file check_netlist.cpp.

static struct value_t* checker_find_substrate ( struct definition_t def,
char *  ident 
)
static

Definition at line 209 of file check_netlist.cpp.

static struct value_t* checker_find_variable ( struct definition_t root,
const char *  type,
const char *  key,
char *  ident 
)
static

Definition at line 126 of file check_netlist.cpp.

static struct node_t* checker_get_circuit_node ( struct node_t root,
int  n 
)
static

Definition at line 1379 of file check_netlist.cpp.

static struct definition_t* checker_get_subcircuit ( struct definition_t def)
static

Definition at line 522 of file check_netlist.cpp.

static int checker_is_property ( struct define_t available,
const char *  key 
)
static

Definition at line 89 of file check_netlist.cpp.

static int checker_resolve_variable ( struct definition_t root,
struct definition_t def,
struct pair_t pair,
int  type 
)
static

Definition at line 246 of file check_netlist.cpp.

static void checker_setup_env ( struct definition_t root,
environment *  env,
eqn::node eqns 
)
static

Definition at line 2213 of file check_netlist.cpp.

static void checker_subcircuit_args ( struct definition_t def,
environment *  env 
)
static

Definition at line 2234 of file check_netlist.cpp.

static char* checker_subcircuit_instance ( char *  type,
char *  instances,
char *  instance,
char *  base 
)
static

Definition at line 1473 of file check_netlist.cpp.

static char* checker_subcircuit_instance_list ( strlist *  instances)
static

Definition at line 1463 of file check_netlist.cpp.

static char* checker_subcircuit_node ( char *  type,
char *  instances,
char *  instance,
char *  node 
)
static

Definition at line 1301 of file check_netlist.cpp.

static int checker_validate_actions ( struct definition_t root)
static

Definition at line 835 of file check_netlist.cpp.

static int checker_validate_lists ( struct definition_t root)
static

Definition at line 706 of file check_netlist.cpp.

static int checker_validate_nodesets ( struct definition_t root)
static

Definition at line 960 of file check_netlist.cpp.

static int checker_validate_para ( struct definition_t root)
static

Definition at line 609 of file check_netlist.cpp.

static int checker_validate_para_cycles ( struct definition_t root,
char *  instance,
strlist *  deps 
)
static

Definition at line 575 of file check_netlist.cpp.

static int checker_validate_ports ( struct definition_t root)
static

Definition at line 667 of file check_netlist.cpp.

static int checker_validate_properties ( struct definition_t root,
struct definition_t def,
struct define_t available 
)
static

Definition at line 1756 of file check_netlist.cpp.

static struct value_t* checker_validate_reference ( struct definition_t def,
const char *  key 
)
static

Definition at line 193 of file check_netlist.cpp.

static int checker_validate_strips ( struct definition_t root)
static

Definition at line 882 of file check_netlist.cpp.

static int checker_validate_sub_cycles ( struct definition_t root,
char *  type,
char *  instance,
strlist **  deps 
)
static

Definition at line 1600 of file check_netlist.cpp.

static int checker_validate_subcircuits ( struct definition_t root)
static

Definition at line 1826 of file check_netlist.cpp.

static int checker_value_in_prop_range ( char *  instance,
struct define_t def,
struct pair_t pp,
struct property_t prop 
)
static

Definition at line 1068 of file check_netlist.cpp.

static int checker_value_in_range ( char *  instance,
struct define_t def,
struct pair_t pp 
)
static

Definition at line 1195 of file check_netlist.cpp.

static void checker_xlat_subcircuit_nodes ( struct definition_t type,
struct definition_t inst,
struct definition_t sub 
)
static

Definition at line 1275 of file check_netlist.cpp.

int netlist_checker ( environment *  env)

Definition at line 2254 of file check_netlist.cpp.

static int netlist_checker_intern ( struct definition_t root)
static

Definition at line 2015 of file check_netlist.cpp.

int netlist_checker_variables ( environment *  env)

Definition at line 1060 of file check_netlist.cpp.

static int netlist_checker_variables_intern ( struct definition_t root,
environment *  env 
)
static

Definition at line 991 of file check_netlist.cpp.

static struct define_t* netlist_create_define ( struct definition_t def)
static

Definition at line 1665 of file check_netlist.cpp.

void netlist_destroy ( void  )

Definition at line 2323 of file check_netlist.cpp.

void netlist_destroy_env ( void  )

Definition at line 2336 of file check_netlist.cpp.

static void netlist_destroy_intern ( struct definition_t root)
static

Definition at line 2312 of file check_netlist.cpp.

static void netlist_free_define ( struct define_t d)
static

Definition at line 1733 of file check_netlist.cpp.

static void netlist_free_definition ( struct definition_t def)
static

Definition at line 1923 of file check_netlist.cpp.

static void netlist_free_nodes ( struct node_t node)
static

Definition at line 1884 of file check_netlist.cpp.

static void netlist_free_pairs ( struct pair_t pp)
static

Definition at line 1905 of file check_netlist.cpp.

static void netlist_free_value ( struct value_t value)
static

Definition at line 1896 of file check_netlist.cpp.

struct node_t* netlist_reverse_nodes ( struct node_t nodes)

Definition at line 1316 of file check_netlist.cpp.

void netlist_status ( void  )

Definition at line 2153 of file check_netlist.cpp.

struct definition_t * netlist_unchain_definition ( struct definition_t root,
struct definition_t cand 
)

Definition at line 1936 of file check_netlist.cpp.

Variable Documentation

int checker_sub_cycles = 0
static

Definition at line 532 of file check_netlist.cpp.

__BEGIN_DECLS struct definition_t * definition_root = NULL

Definition at line 50 of file check_netlist.cpp.

environment* env_root = NULL

Definition at line 52 of file check_netlist.cpp.

struct definition_t * subcircuit_root = NULL

Definition at line 51 of file check_netlist.cpp.