Qucs-core
0.0.19
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cmath>
#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"
Go to the source code of this file.
#define foreach_value | ( | values, | |
val | |||
) |
Definition at line 179 of file check_spice.cpp.
#define VAL_IS_DONE | ( | val | ) | ((val) == NULL || (val)->hint & HINT_DONE) |
Definition at line 1383 of file check_spice.cpp.
#define VAL_IS_NUMBER | ( | val | ) |
((val) != NULL && \ (val)->hint & (HINT_NUMBER | HINT_NODE) && \ !((val)->hint & HINT_DONE))
Definition at line 1378 of file check_spice.cpp.
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.
static void netlist_destroy_intern | ( | struct definition_t * | root | ) | [static] |
Definition at line 1185 of file check_spice.cpp.
static void netlist_free_definition | ( | struct definition_t * | def | ) | [static] |
Definition at line 1172 of file check_spice.cpp.
static void netlist_free_nodes | ( | struct node_t * | node | ) | [static] |
Definition at line 859 of file check_spice.cpp.
void netlist_free_pair | ( | struct pair_t * | pair | ) |
Definition at line 593 of file check_spice.cpp.
static void netlist_free_pairs | ( | struct pair_t * | pair | ) | [static] |
Definition at line 869 of file check_spice.cpp.
static void netlist_free_value | ( | struct value_t * | value | ) | [static] |
Definition at line 576 of file check_spice.cpp.
static void netlist_free_values | ( | struct value_t * | value | ) | [static] |
Definition at line 584 of file check_spice.cpp.
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.
static void spice2g6_nxtpwr | ( | int * | seq, |
int | nd | ||
) | [static] |
Definition at line 2178 of file check_spice.cpp.
static struct definition_t* spice_add_definition | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 1161 of file check_spice.cpp.
static struct definition_t* spice_add_edd_equation | ( | struct definition_t * | root, |
struct definition_t * | def, | ||
int | p, | ||
struct definition_t ** | i, | ||
struct definition_t ** | q | ||
) | [static, read] |
Definition at line 2143 of file check_spice.cpp.
void spice_add_last_hint | ( | struct value_t * | val, |
int | hint | ||
) |
Definition at line 3047 of file check_spice.cpp.
static struct definition_t* spice_add_Model | ( | struct definition_t * | def | ) | [static, read] |
Definition at line 1726 of file check_spice.cpp.
static void spice_add_property | ( | struct definition_t * | root, |
const char * | type, | ||
const char * | key, | ||
char * | value | ||
) | [static] |
Definition at line 1671 of file check_spice.cpp.
void spice_adjust_alias_properties | ( | struct definition_t * | def, |
struct pair_t * | pair | ||
) |
Definition at line 1057 of file check_spice.cpp.
static void spice_adjust_default_properties | ( | struct definition_t * | def | ) | [static] |
Definition at line 977 of file check_spice.cpp.
static void spice_adjust_device | ( | struct definition_t * | def, |
struct definition_t * | trandef | ||
) | [static] |
Definition at line 620 of file check_spice.cpp.
static void spice_adjust_instance | ( | struct definition_t * | def | ) | [static] |
Definition at line 1142 of file check_spice.cpp.
static void spice_adjust_isource_nodes | ( | struct definition_t * | left, |
struct definition_t * | right | ||
) | [static] |
Definition at line 1253 of file check_spice.cpp.
static void spice_adjust_optional_properties | ( | struct definition_t * | def | ) | [static] |
Definition at line 1001 of file check_spice.cpp.
void spice_adjust_properties | ( | struct definition_t * | def | ) |
Definition at line 1073 of file check_spice.cpp.
static void spice_adjust_vsource_nodes | ( | struct definition_t * | up, |
struct definition_t * | dn | ||
) | [static] |
Definition at line 1241 of file check_spice.cpp.
static void spice_append_node | ( | struct definition_t * | def, |
char * | node | ||
) | [static] |
Definition at line 1126 of file check_spice.cpp.
static void spice_append_pair | ( | struct definition_t * | def, |
const char * | prop, | ||
const char * | value, | ||
int | replace | ||
) | [static] |
Definition at line 1107 of file check_spice.cpp.
int spice_checker | ( | void | ) |
Definition at line 3071 of file check_spice.cpp.
struct definition_t * spice_checker_intern | ( | struct definition_t * | root | ) | [read] |
Definition at line 3061 of file check_spice.cpp.
static void spice_collect_external_nodes | ( | struct definition_t * | def | ) | [static] |
Definition at line 1697 of file check_spice.cpp.
static int spice_count_nodes | ( | struct definition_t * | def | ) | [static] |
Definition at line 851 of file check_spice.cpp.
static int spice_count_real_values | ( | struct value_t * | values | ) | [static] |
Definition at line 1388 of file check_spice.cpp.
static int spice_count_values | ( | struct value_t * | values | ) | [static] |
Definition at line 1638 of file check_spice.cpp.
static char* spice_coupled_instance | ( | struct definition_t * | k1, |
struct definition_t * | k2, | ||
struct definition_t * | k3 | ||
) | [static] |
Definition at line 1816 of file check_spice.cpp.
static struct definition_t* spice_create_definition | ( | struct definition_t * | base, |
const char * | type | ||
) | [static, read] |
Definition at line 1266 of file check_spice.cpp.
static char* spice_create_eqnstr | ( | struct definition_t * | def, |
int | p, | ||
char | type | ||
) | [static] |
Definition at line 2134 of file check_spice.cpp.
static char* spice_create_intern_node | ( | void | ) | [static] |
Definition at line 1231 of file check_spice.cpp.
static char* spice_create_intern_nodeset | ( | void | ) | [static] |
Definition at line 2908 of file check_spice.cpp.
static char* spice_create_intern_para | ( | void | ) | [static] |
Definition at line 1580 of file check_spice.cpp.
static struct definition_t* spice_create_para | ( | struct definition_t * | base | ) | [static, read] |
Definition at line 1615 of file check_spice.cpp.
static char* spice_create_poly | ( | struct value_t * | prop, |
int | nd, | ||
int | integrate | ||
) | [static] |
Definition at line 2241 of file check_spice.cpp.
static struct value_t* spice_create_value | ( | const char * | ident | ) | [static, read] |
Definition at line 360 of file check_spice.cpp.
struct definition_t* spice_del_definition | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [read] |
Definition at line 1210 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.
void spice_destroy | ( | void | ) |
Definition at line 1194 of file check_spice.cpp.
static int spice_evaluate_points | ( | char ** | type, |
double | start, | ||
double | stop, | ||
double | points | ||
) | [static] |
Definition at line 1591 of file check_spice.cpp.
static const char* spice_evaluate_scale | ( | char * | value, |
char ** | endptr, | ||
double * | factor | ||
) | [static] |
Definition at line 324 of file check_spice.cpp.
static double spice_evaluate_value | ( | struct value_t * | value | ) | [static] |
Definition at line 557 of file check_spice.cpp.
static void spice_extract_properties | ( | struct definition_t * | def, |
struct value_t * | values, | ||
struct property_field_t * | field | ||
) | [static] |
Definition at line 1321 of file check_spice.cpp.
static struct definition_t* spice_find_coupled | ( | struct definition_t * | root, |
struct definition_t * | coupled, | ||
const char * | type, | ||
char * | inst | ||
) | [static, read] |
Definition at line 1754 of file check_spice.cpp.
static struct definition_t* spice_find_coupled | ( | struct definition_t * | root, |
const char * | type, | ||
char * | inst1, | ||
char * | inst2 | ||
) | [static, read] |
Definition at line 1772 of file check_spice.cpp.
static struct definition_t* spice_find_coupled | ( | struct definition_t * | root, |
qucs::hash< struct definition_t > * | coupled, | ||
const char * | type, | ||
char * | inst | ||
) | [static, read] |
Definition at line 1977 of file check_spice.cpp.
static struct definition_t* spice_find_coupled_inductor | ( | struct definition_t * | root, |
struct definition_t * | def, | ||
const char * | type, | ||
char * | inst | ||
) | [static, read] |
Definition at line 1791 of file check_spice.cpp.
static struct define_t* spice_find_definition | ( | const char * | n | ) | [static, read] |
Definition at line 251 of file check_spice.cpp.
static struct definition_t* spice_find_definition | ( | struct definition_t * | root, |
const char * | type, | ||
char * | inst | ||
) | [static, read] |
Definition at line 1648 of file check_spice.cpp.
static struct definition_t* spice_find_definition | ( | struct definition_t * | root, |
const char * | type | ||
) | [static, read] |
Definition at line 1661 of file check_spice.cpp.
static struct definition_t* spice_find_device | ( | struct definition_t * | root, |
char * | type | ||
) | [static, read] |
Definition at line 425 of file check_spice.cpp.
static struct value_t* spice_find_device_instance | ( | struct definition_t * | def | ) | [static, read] |
Definition at line 439 of file check_spice.cpp.
static struct definition_t* spice_find_Model | ( | char * | instance | ) | [static, read] |
Definition at line 1714 of file check_spice.cpp.
static struct pair_t* spice_find_property | ( | struct definition_t * | def, |
const char * | prop | ||
) | [static, read] |
Definition at line 493 of file check_spice.cpp.
static struct value_t* spice_find_property | ( | struct value_t * | values, |
const char * | prop | ||
) | [static, read] |
Definition at line 528 of file check_spice.cpp.
static struct pair_t* spice_find_property_nocase | ( | struct definition_t * | def, |
const char * | prop | ||
) | [static, read] |
Definition at line 504 of file check_spice.cpp.
static struct pair_t* spice_find_property_nocase | ( | struct pair_t * | pair, |
const char * | prop | ||
) | [static, read] |
Definition at line 516 of file check_spice.cpp.
static void spice_fixup_definition | ( | struct definition_t * | def | ) | [static] |
Definition at line 1149 of file check_spice.cpp.
static void spice_free_values | ( | struct definition_t * | def | ) | [static] |
Definition at line 1681 of file check_spice.cpp.
static struct pair_t* spice_generate_Model_pairs | ( | struct value_t * | values | ) | [static, read] |
Definition at line 472 of file check_spice.cpp.
static struct node_t* spice_get_node | ( | struct definition_t * | def, |
int | pos | ||
) | [static, read] |
Definition at line 878 of file check_spice.cpp.
static struct node_t* spice_get_nodes | ( | struct definition_t * | def | ) | [static, read] |
Definition at line 292 of file check_spice.cpp.
static struct pair_t* spice_get_pairs | ( | struct definition_t * | def | ) | [static, read] |
Definition at line 378 of file check_spice.cpp.
static double spice_get_property_value | ( | struct definition_t * | def, |
const char * | key | ||
) | [static] |
Definition at line 1279 of file check_spice.cpp.
static struct define_t* spice_get_qucs_definition | ( | struct definition_t * | def | ) | [static, read] |
Definition at line 735 of file check_spice.cpp.
static double spice_get_value | ( | struct value_t * | val | ) | [static] |
Definition at line 2224 of file check_spice.cpp.
static struct value_t* spice_get_value_coupled | ( | struct definition_t * | def | ) | [static, read] |
Definition at line 1806 of file check_spice.cpp.
static struct definition_t* spice_post_translator | ( | struct definition_t * | root | ) | [static, read] |
Definition at line 2516 of file check_spice.cpp.
static struct definition_t* spice_search_coupled | ( | struct definition_t * | root, |
qucs::hash< struct definition_t > * | K_hash, | ||
qucs::hash< struct definition_t > * | L_hash, | ||
const char * | type, | ||
char * | inst | ||
) | [static, read] |
Definition at line 1999 of file check_spice.cpp.
void spice_set_last_hint | ( | struct value_t * | val, |
int | hint | ||
) |
Definition at line 3054 of file check_spice.cpp.
static void spice_set_property_string | ( | struct definition_t * | def, |
const char * | key, | ||
const char * | val | ||
) | [static] |
Definition at line 539 of file check_spice.cpp.
static void spice_set_property_value | ( | struct definition_t * | def, |
const char * | key, | ||
double | val | ||
) | [static] |
Definition at line 1287 of file check_spice.cpp.
static char* spice_toupper | ( | char * | str | ) | [static] |
Definition at line 1133 of file check_spice.cpp.
static struct definition_t* spice_translate_action | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 2799 of file check_spice.cpp.
static struct definition_t* spice_translate_coupled | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 1829 of file check_spice.cpp.
static struct definition_t* spice_translate_coupled_x | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 2038 of file check_spice.cpp.
static void spice_translate_device | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static] |
Definition at line 705 of file check_spice.cpp.
static struct node_t* spice_translate_node | ( | char * | node | ) | [static, read] |
Definition at line 259 of file check_spice.cpp.
static void spice_translate_nodes | ( | struct definition_t * | def, |
int | pass | ||
) | [static] |
Definition at line 888 of file check_spice.cpp.
static struct definition_t* spice_translate_nodeset | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 2918 of file check_spice.cpp.
static struct definition_t* spice_translate_poly | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 2301 of file check_spice.cpp.
static struct definition_t* spice_translate_poly_lc | ( | struct definition_t * | root, |
struct definition_t * | def | ||
) | [static, read] |
Definition at line 2434 of file check_spice.cpp.
static struct definition_t* spice_translate_source | ( | struct definition_t * | root, |
struct definition_t * | def, | ||
char | type | ||
) | [static, read] |
Definition at line 1405 of file check_spice.cpp.
static void spice_translate_subcircuit | ( | struct definition_t * | sub | ) | [static] |
Definition at line 2894 of file check_spice.cpp.
static int spice_translate_type | ( | struct definition_t * | def | ) | [static] |
Definition at line 766 of file check_spice.cpp.
static void spice_translate_units | ( | struct definition_t * | def | ) | [static] |
Definition at line 953 of file check_spice.cpp.
static struct definition_t* spice_translator | ( | struct definition_t * | root | ) | [static, read] |
Definition at line 2946 of file check_spice.cpp.
static char* spice_untranslated_text | ( | struct definition_t * | def | ) | [static] |
Definition at line 1345 of file check_spice.cpp.
static void spice_value_done | ( | struct value_t * | val | ) | [static] |
Definition at line 284 of file check_spice.cpp.
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_t opt_spice_R[] [static] |
{ { "Temp", PROP_REAL, { 26.85, PROP_NO_STR }, PROP_MIN_VAL (K) }, PROP_NO_PROP }
Definition at line 58 of file check_spice.cpp.
struct property_t req_spice_C[] [static] |
{ { "C", PROP_REAL, { 1e-12, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 65 of file check_spice.cpp.
struct property_t req_spice_E[] [static] |
{ { "G", PROP_REAL, { 1, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 77 of file check_spice.cpp.
struct property_t req_spice_F[] [static] |
{ { "G", PROP_REAL, { 1, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 80 of file check_spice.cpp.
struct property_t req_spice_G[] [static] |
{ { "G", PROP_REAL, { 1, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 74 of file check_spice.cpp.
struct property_t req_spice_H[] [static] |
{ { "G", PROP_REAL, { 1, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 83 of file check_spice.cpp.
struct property_t req_spice_I[] [static] |
{ { "I", PROP_REAL, { 1e-3, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 71 of file check_spice.cpp.
struct property_t req_spice_IC[] [static] |
{ { "U", PROP_REAL, { 0, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 92 of file check_spice.cpp.
struct property_t req_spice_L[] [static] |
{ { "L", PROP_REAL, { 1e-9, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 62 of file check_spice.cpp.
struct property_t req_spice_NODESET[] [static] |
{ { "U", PROP_REAL, { 0, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 89 of file check_spice.cpp.
struct property_t req_spice_R[] [static] |
{ { "R", PROP_REAL, { 50, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 56 of file check_spice.cpp.
struct property_t req_spice_T[] [static] |
{ { "Z0", PROP_REAL, { 50, PROP_NO_STR }, PROP_POS_RANGE }, PROP_NO_PROP }
Definition at line 86 of file check_spice.cpp.
struct property_t req_spice_V[] [static] |
{ { "U", PROP_REAL, { 1, PROP_NO_STR }, PROP_NO_RANGE }, PROP_NO_PROP }
Definition at line 68 of file check_spice.cpp.
struct define_t spice_definition_available[] |
Definition at line 96 of file check_spice.cpp.
struct spice_device_table_t spice_device_table[] |
struct spice_device_t spice_devices[] |
int spice_errors = 0 |
Definition at line 50 of file check_spice.cpp.
struct node_t * spice_nodes = NULL |
Definition at line 1693 of file check_spice.cpp.
struct property_t spice_noprops[] = { PROP_NO_PROP } [static] |
Definition at line 54 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[] |