Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

scv_constraint.cpp File Reference

#include "scv/scv_util.h"
#include "scv/scv_constraint.h"
#include "cuddObj.hh"
#include "cudd.h"
#include "cuddInt.h"
#include "util.h"
#include <float.h>

Include dependency graph for scv_constraint.cpp:

Include dependency graph

Go to the source code of this file.

Compounds

struct  registry_record

Defines

#define _SCV_OBTAIN_VALUE(_cdata, data, gen)
#define _SCV_OBTAIN_VALUE_SC_BV_BASE(_cdata, data, gen)
#define _SCV_REMOVE_GEN(gen)

Functions

void _scv_remove (_scv_expr *e)
void _scv_insert_smart_ptr (scv_smart_ptr_if *new_ptr)
void _scv_pop_constraint ()
void _scv_print_registry ()
void _scv_set_value (scv_extensions_if *e, _scv_constraint_data *cdata_)
void _scv_set_value (scv_extensions_if *e, scv_constraint_base *c, scv_shared_ptr< scv_random > g)
bddNodeT_scv_bdd_and (bddNodeT &bh, bddNodeT &bs, const scv_constraint_base *c)
scv_extensions_if_scv_find_extension (scv_constraint_base *c, scv_extensions_if *e)
void _scv_copy_values (scv_constraint_base *to, scv_constraint_base *from)
void scv_constraint_startup ()
void _scv_constraint_wrapup (scv_extensions_if *e)
scv_constraint_base_scv_new_constraint (scv_constraint_base *from)
void _scv_delete_constraint (scv_constraint_base *c)
void _scv_assign_enum_value (scv_extensions_if *e, _scv_constraint_data *cdata_, int e1_val, int e2_val)
const string & _scv_get_name (scv_constraint_base *c)
bool _scv_has_complex_constraing (scv_extensions_if *e)
void generate_value_range_constraint (scv_extensions_if *data, _scv_constraint_data *cdata_)
void generate_value_no_constraint (scv_extensions_if *data, _scv_constraint_data *cdata_)
void generate_value_extension (scv_extensions_if *data, _scv_constraint_data *cdata_)
void _scv_use_constraint (scv_extensions_if *to, scv_extensions_if *e)
void _scv_set_constraint (scv_extensions_if *s, bool mode)
scv_extensions_if_scv_get_extension (scv_smart_ptr_if &s)


Define Documentation

#define _SCV_OBTAIN_VALUE _cdata,
data,
gen   
 

Value:

switch(cdata_->get_ext_mode()) {                    \
  case scv_extensions_if::RANDOM:                      \
    data->assign(gen->randomNext());                  \
    break;                                            \
  case scv_extensions_if::SCAN:                        \
    data->assign(gen->scanNext());                    \
    break;                                            \
  case scv_extensions_if::RANDOM_AVOID_DUPLICATE:      \
    data->assign(gen->randomAvoidDuplicateNext());    \
    break;                                            \
  default:                                            \
    break;                                            \
  }

Definition at line 3224 of file scv_constraint.cpp.

Referenced by generate_value_range_constraint().

#define _SCV_OBTAIN_VALUE_SC_BV_BASE _cdata,
data,
gen   
 

Value:

sc_bv_base value(data->get_bitwidth());             \
  switch(cdata_->get_ext_mode()) {                    \
  case scv_extensions_if::RANDOM:                      \
    value = gen->randomNext();                        \
    break;                                            \
  case scv_extensions_if::SCAN:                        \
    value = gen->scanNext();                          \
    break;                                            \
  case scv_extensions_if::RANDOM_AVOID_DUPLICATE:      \
    value = gen->randomAvoidDuplicateNext();          \
    break;                                            \
  default:                                            \
    break;                                            \
  }                                                   \
  data->assign(value);

Definition at line 3239 of file scv_constraint.cpp.

Referenced by generate_value_range_constraint().

#define _SCV_REMOVE_GEN gen   
 

Value:

if (gen) {                \
    delete (gen);           \
    gen = NULL;             \
  }                         \
  set_gen_type(EMPTY);

Definition at line 3439 of file scv_constraint.cpp.

Referenced by _scv_constraint_data::reset_distribution(), and _scv_constraint_data::set_generator_from().


Function Documentation

void _scv_assign_enum_value scv_extensions_if   e,
_scv_constraint_data   cdata_,
int    e1_val,
int    e2_val
 

Definition at line 3162 of file scv_constraint.cpp.

References _scv_constraint_data::get_random(), and _scv_message::message().

Referenced by generate_value_distribution_range().

bddNodeT& _scv_bdd_and bddNodeT   bh,
bddNodeT   bs,
const scv_constraint_base   c
 

Definition at line 3093 of file scv_constraint.cpp.

References bddManagerT, bddNodeT, _scv_constraint_manager::generateWeight(), scv_constraint_base::get_name(), scv_constraint_manager::getConstraintManagerP(), _scv_constraint_manager::getManagerP(), and _scv_constraint_error::ignoredLevel().

void _scv_constraint_wrapup scv_extensions_if   e
 

Definition at line 3146 of file scv_constraint.cpp.

References scv_constraint_manager::wrapup().

Referenced by _scv_extension_rand_enum::~_scv_extension_rand_enum(), and _scv_extension_rand_N< T >::~_scv_extension_rand_N().

void _scv_copy_values scv_constraint_base   to,
scv_constraint_base   from
 

Definition at line 3127 of file scv_constraint.cpp.

References scv_constraint_base::get_members().

void _scv_delete_constraint scv_constraint_base   c
 

Definition at line 3157 of file scv_constraint.cpp.

scv_extensions_if* _scv_find_extension scv_constraint_base   c,
scv_extensions_if   e
 

Definition at line 3108 of file scv_constraint.cpp.

References assert, and scv_constraint_base::get_members().

Referenced by _scv_use_constraint().

scv_extensions_if* _scv_get_extension scv_smart_ptr_if   s
 

Definition at line 3770 of file scv_constraint.cpp.

References scv_smart_ptr_if::get_extensions_ptr().

Referenced by _scv_extension_rand_N< T >::use_constraint(), and scv_extension_rand< T >::use_constraint().

const string& _scv_get_name scv_constraint_base   c
 

Definition at line 3213 of file scv_constraint.cpp.

References scv_constraint_base::get_name_string().

Referenced by _scv_use_constraint().

bool _scv_has_complex_constraing scv_extensions_if   e
 

Definition at line 3218 of file scv_constraint.cpp.

References scv_constraint_manager::getConstraintManagerP(), and _scv_constraint_manager::has_complex_constraint().

void _scv_insert_smart_ptr scv_smart_ptr_if   new_ptr
 

Definition at line 2908 of file scv_constraint.cpp.

scv_constraint_base* _scv_new_constraint scv_constraint_base   from
 

Definition at line 3151 of file scv_constraint.cpp.

References scv_constraint_base::get_copy().

Referenced by _scv_use_constraint().

void _scv_pop_constraint  
 

Definition at line 2918 of file scv_constraint.cpp.

References assert.

void _scv_print_registry  
 

Definition at line 2926 of file scv_constraint.cpp.

References scv_out.

void _scv_remove _scv_expr   e
 

Definition at line 3005 of file scv_constraint.cpp.

References _scv_expr::getBddNodeP(), _scv_expr::getBddVectorP(), _scv_expr::isBdd(), and _scv_expr::isBddVector().

void _scv_set_constraint scv_extensions_if   s,
bool    mode
 

Definition at line 3751 of file scv_constraint.cpp.

References _scv_constraint_data::CONSTRAINT, _scv_constraint_data::is_distribution_constraint(), _scv_constraint_data::is_range_constraint(), and _scv_constraint_data::set_mode().

Referenced by scv_extension_rand< T >::set_constraint(), scv_extension_rand< T[N]>::set_constraint(), _scv_extension_rand_N< T >::set_constraint(), and _scv_extension_rand_enum::set_constraint().

void _scv_set_value scv_extensions_if   e,
scv_constraint_base   c,
scv_shared_ptr< scv_random   g
 

Definition at line 3076 of file scv_constraint.cpp.

References assert, _scv_constraint_manager::assignRandomValue(), bddNodeT, scv_constraint_manager::getConstraintManagerP(), _scv_constraint_manager::setDoubleValue(), and _scv_constraint_manager::simplifyConstraint().

Referenced by _scv_distribution< T >::generate_value_(), generate_value_extension(), and generate_value_no_constraint().

void _scv_set_value scv_extensions_if   e,
_scv_constraint_data   cdata_
 

Definition at line 3047 of file scv_constraint.cpp.

References _scv_constraint_manager::assignRandomValue(), _scv_constraint_manager::avoidDuplicateHash, bddNodeT, generate_value_range_constraint(), scv_constraint_base::get_constraint(), scv_constraint_manager::getConstraintManagerP(), _scv_associative_array< scv_constraint_base *, bddNodeT * >::getValue(), _scv_constraint_manager::setDoubleValue(), and _scv_constraint_manager::simplifyConstraint().

void _scv_use_constraint scv_extensions_if   to,
scv_extensions_if   e
 

Definition at line 3670 of file scv_constraint.cpp.

References _scv_find_extension(), _scv_get_name(), _scv_new_constraint(), assert, _scv_constraint_data::get_constraint(), _scv_constraint_data::get_extension(), _scv_constraint_data::get_mode(), _scv_constraint_data::is_complex_constraint(), _scv_constraint_data::is_distribution_constraint(), _scv_constraint_data::is_no_constraint(), _scv_constraint_data::is_range_constraint(), _scv_message::message(), _scv_constraint_data::RANGE_CONSTRAINT, scv_out, _scv_constraint_data::set_generator_from(), _scv_constraint_data::set_mode(), and strcmp().

Referenced by _scv_extension_rand_enum::use_constraint(), _scv_extension_rand_N< T >::use_constraint(), and scv_extension_rand< T >::use_constraint().

void generate_value_extension scv_extensions_if   data,
_scv_constraint_data   cdata_
 

Definition at line 3349 of file scv_constraint.cpp.

References _scv_set_value(), _scv_constraint_data::get_extension(), _scv_constraint_data::get_random(), and _scv_message::message().

Referenced by _scv_distribution< T >::generate_value_().

void generate_value_no_constraint scv_extensions_if   data,
_scv_constraint_data   cdata_
 

Definition at line 3339 of file scv_constraint.cpp.

References _scv_set_value(), and generate_value_range_constraint().

Referenced by _scv_distribution< T >::generate_value_().

void generate_value_range_constraint scv_extensions_if   data,
_scv_constraint_data   cdata_
 

Definition at line 3256 of file scv_constraint.cpp.

References _scv_constraint_range_generator_double, _scv_constraint_range_generator_int, _scv_constraint_range_generator_int_ll, _scv_constraint_range_generator_signed_big, _scv_constraint_range_generator_unsigned, _scv_constraint_range_generator_unsigned_big, _scv_constraint_range_generator_unsigned_ll, _SCV_OBTAIN_VALUE, _SCV_OBTAIN_VALUE_SC_BV_BASE, _scv_constraint_data::DGEN, _scv_constraint_data::EMPTY, _scv_constraint_data::get_double_generator(), _scv_constraint_data::get_ext_mode(), _scv_constraint_data::get_gen_type(), _scv_constraint_data::get_int_generator(), _scv_constraint_data::get_int_ll_generator(), _scv_constraint_data::get_signed_big_generator(), _scv_constraint_data::get_unsigned_big_generator(), _scv_constraint_data::get_unsigned_generator(), _scv_constraint_data::get_unsigned_ll_generator(), _scv_constraint_data::IBGEN, _scv_constraint_data::IGEN, _scv_constraint_data::ILGEN, _scv_constraint_data::UBGEN, _scv_constraint_data::UGEN, and _scv_constraint_data::ULGEN.

Referenced by _scv_set_value(), _scv_constraint_manager::assignRandomValue(), _scv_distribution< T >::generate_value_(), and generate_value_no_constraint().

void scv_constraint_startup  
 

Definition at line 3141 of file scv_constraint.cpp.

Referenced by scv_startup().


Generated on Fri Jan 14 08:30:36 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18