#include <vlib.h>
Public Member Functions | |
Signal | asgn (Signal) |
void | clock (const char *rname) |
void | create () |
int | getalwaysn () |
bool | getbool () |
int | getchange () |
int | geth () |
int | getint () |
int | getl () |
rval | getmask () |
int | getnegedge () |
int | getposedge () |
rval | getr () |
rval | getval () |
void | init (int, int, const char *) |
void | init (const char *rname) |
void | init (Signal *shost, int h, int l, const char *rname) |
void | initreg (int, int, const char *) |
void | inout (int, int, const char *) |
void | inout (const char *rname) |
void | input (int, int, const char *) |
void | input (const char *rname) |
void | makemask () |
Signal | operator! () |
Signal | operator!= (Signal) |
Signal | operator% (Signal) |
Signal | operator& (Signal) |
Signal * | operator& () |
Signal | operator&& (Signal) |
Signal | operator() (Signal, Signal) |
Signal | operator() (Signal) |
Signal | operator* (Signal) |
Signal | operator+ (Signal) |
Signal | operator++ () |
Signal | operator++ (int) |
Signal | operator, (Signal) |
Signal | operator- (Signal) |
Signal | operator-- () |
Signal | operator-- (int) |
Signal | operator/ (Signal) |
Signal | operator< (Signal) |
Signal | operator<< (Signal) |
Signal | operator<= (Signal) |
Signal | operator= (Signal) |
Signal | operator== (Signal) |
Signal | operator> (Signal) |
Signal | operator>= (Signal) |
Signal | operator>> (Signal) |
Signal | operator^ (Signal) |
Signal | operator| (Signal) |
Signal | operator|| (Signal) |
Signal | operator~ () |
void | output (int, int, const char *) |
void | output (const char *rname, module *parent) |
void | output (int high, int low, const char *rname, module *parent) |
void | output (const char *rname) |
void | reg (int, int, const char *) |
void | reg (const char *rname) |
Signal | set (Signal) |
void | setalwaysn (int n) |
void | setchange (int ch) |
void | sethlmask (int high, int low, rval imask) |
void | setnegedge (int ch) |
void | setposedge (int ch) |
void | setprintable (int p) |
void | setr (rval rv) |
void | setrc (rval rv) |
Signal () | |
Signal (int bits, rval value) | |
Signal (unsigned int) | |
Signal (const char *) | |
Signal (int) | |
Signal (rval) | |
void | wire (int, int, const char *, int) |
void | wire (int, int, const char *) |
void | wire (const char *rname) |
Protected Attributes | |
int | alwaysn |
Signal * | ca1 |
Signal * | ca2 |
int | change |
int | h |
Signal * | host |
int | hostl |
int | inited |
int | l |
rval | mask |
int | mode |
int | nedge |
Signal * | outhost |
Signal * | outreg |
int | pedge |
int | printable |
rval | r |
rval | rc |
Signal * | source |
Friends | |
std::ostream & | operator<< (std::ostream &stream, Signal s) |
Signal | rand (Signal) |
Signal | ror (Signal) |
Signal | rxor (Signal) |
Signal::Signal | ( | rval | n | ) |
Signal::Signal | ( | int | n | ) |
Signal::Signal | ( | unsigned int | n | ) |
Signal::Signal | ( | const char * | sval | ) |
Definition at line 61 of file vlib.cc.
References bits, create(), i, init(), mask, mnum, mode, r, rc, and relativeConstraints::value.
{ create(); mode = mnum; std::string val = sval; int bits; unsigned int i; char radix; rval value = 0; int dig; sscanf(val.c_str(), "%d'%c", &bits, &radix); switch (radix) { case 'h': case 'H': // sscanf (val.c_str(), "%d'%c%x", &bits, &radix, &value); for (i = 0; val[i] != 'h' && val[i] != 'H'; ++i); for (; i < val.length(); ++i) { switch (val[i]) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': dig = val[i] - '0'; break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': dig = val[i] - 'a' + 10; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': dig = val[i] - 'A' + 10; break; default: dig = -1; break; } if (dig >= 0) { value = value << 4; value = value | dig; } } break; case 'd': case 'D': sscanf (val.c_str(), "%d'%c%d", &bits, &radix, reinterpret_cast<int *>(&value)); break; case 'o': case 'O': // sscanf (val.c_str(), "%d'%c%o", &bits, &radix, &value); for (i = 0; val[i] != 'o' && val[i] != 'O'; ++i); for (; i < val.length(); ++i) { switch (val[i]) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': dig = val[i] - '0'; break; default: dig = -1; break; } if (dig >= 0) { value = value << 3; value = value | dig; } } break; case 'b': case 'B': for (i = 0; val[i] != 'b' && val[i] != 'B'; ++i); for (; i < val.length(); ++i) { switch (val[i]) { case '0': value = value << 1; break; case '1': value = value << 1; value = value | 1; break; } } break; } Signal::init(bits - 1, 0, val.c_str()); rc = value & mask; r = rc; }
Signal::Signal | ( | int | bits, |
rval | value | ||
) |
Definition at line 48 of file vlib.cc.
References create(), init(), mask, r, rc, and relativeConstraints::value.
{ create(); #ifdef VGEN ostringstream sval; sval << dec << bits << "'d" << value; Signal::init(bits - 1, 0, sval.str().c_str()); #else Signal::init(bits - 1, 0, ""); #endif r = rc = value & mask; }
void Signal::clock | ( | const char * | rname | ) |
void Signal::create | ( | void | ) |
int Signal::getalwaysn | ( | ) | [inline] |
bool Signal::getbool | ( | ) | [inline] |
int Signal::getchange | ( | ) | [inline] |
int Signal::getint | ( | ) | [inline] |
int Signal::getl | ( | ) | [inline] |
rval Signal::getmask | ( | ) | [inline] |
int Signal::getnegedge | ( | ) | [inline] |
int Signal::getposedge | ( | ) | [inline] |
rval Signal::getr | ( | ) | [inline] |
rval Signal::getval | ( | ) |
Referenced by getbool(), and operator,().
void Signal::init | ( | Signal * | shost, |
int | h, | ||
int | l, | ||
const char * | rname | ||
) |
void Signal::init | ( | int | high, |
int | low, | ||
const char * | rname | ||
) |
Reimplemented in parameter.
Definition at line 239 of file vlib.cc.
References h, inited, l, makemask(), mergeVDriftHistosByStation::name, and source.
Referenced by binop(), operator,(), and Signal().
void Signal::init | ( | const char * | rname | ) | [inline] |
void Signal::initreg | ( | int | , |
int | , | ||
const char * | |||
) |
void Signal::inout | ( | const char * | rname | ) | [inline] |
void Signal::inout | ( | int | , |
int | , | ||
const char * | |||
) |
void Signal::input | ( | int | , |
int | , | ||
const char * | |||
) |
void Signal::input | ( | const char * | rname | ) | [inline] |
void Signal::makemask | ( | ) |
Signal Signal::operator! | ( | ) |
Signal * Signal::operator& | ( | ) |
Signal Signal::operator++ | ( | void | ) | [inline] |
Signal Signal::operator++ | ( | int | ) | [inline] |
Signal Signal::operator-- | ( | int | ) | [inline] |
Signal Signal::operator-- | ( | ) | [inline] |
Signal Signal::operator~ | ( | ) |
void Signal::output | ( | const char * | rname, |
module * | parent | ||
) |
void Signal::output | ( | int | high, |
int | low, | ||
const char * | rname, | ||
module * | parent | ||
) |
void Signal::output | ( | int | , |
int | , | ||
const char * | |||
) |
void Signal::output | ( | const char * | rname | ) | [inline] |
void Signal::reg | ( | const char * | rname | ) | [inline] |
void Signal::reg | ( | int | , |
int | , | ||
const char * | |||
) |
void Signal::setalwaysn | ( | int | n | ) | [inline] |
void Signal::setchange | ( | int | ch | ) | [inline] |
void Signal::sethlmask | ( | int | high, |
int | low, | ||
rval | imask | ||
) | [inline] |
void Signal::setnegedge | ( | int | ch | ) | [inline] |
void Signal::setposedge | ( | int | ch | ) | [inline] |
void Signal::setprintable | ( | int | p | ) | [inline] |
void Signal::setr | ( | rval | rv | ) | [inline] |
void Signal::setrc | ( | rval | rv | ) | [inline] |
void Signal::wire | ( | int | , |
int | , | ||
const char * | , | ||
int | |||
) |
void Signal::wire | ( | const char * | rname | ) | [inline] |
void Signal::wire | ( | int | , |
int | , | ||
const char * | |||
) |
std::ostream& operator<< | ( | std::ostream & | stream, |
Signal | s | ||
) | [friend] |
int Signal::alwaysn [protected] |
Definition at line 168 of file vlib.h.
Referenced by create(), getalwaysn(), and setalwaysn().
Signal* Signal::ca1 [protected] |
Definition at line 162 of file vlib.h.
Referenced by create(), and operator,().
Signal* Signal::ca2 [protected] |
Definition at line 163 of file vlib.h.
Referenced by create(), and operator,().
int Signal::change [protected] |
Definition at line 164 of file vlib.h.
Referenced by binop(), create(), getchange(), init(), and setchange().
int Signal::h [protected] |
Definition at line 151 of file vlib.h.
Referenced by create(), geth(), init(), makemask(), operator,(), and sethlmask().
Signal* Signal::host [protected] |
int Signal::hostl [protected] |
int Signal::inited [protected] |
int Signal::l [protected] |
Definition at line 151 of file vlib.h.
Referenced by create(), getl(), init(), makemask(), operator,(), and sethlmask().
rval Signal::mask [protected] |
Definition at line 153 of file vlib.h.
Referenced by binop(), create(), getmask(), init(), makemask(), operator,(), sethlmask(), setr(), setrc(), and Signal().
int Signal::mode [protected] |
int Signal::nedge [protected] |
Definition at line 164 of file vlib.h.
Referenced by create(), getnegedge(), init(), and setnegedge().
Signal* Signal::outhost [protected] |
Signal* Signal::outreg [protected] |
int Signal::pedge [protected] |
Definition at line 164 of file vlib.h.
Referenced by create(), getposedge(), init(), and setposedge().
int Signal::printable [protected] |
Definition at line 170 of file vlib.h.
Referenced by binop(), create(), operator,(), and setprintable().
rval Signal::rc [protected] |
Signal* Signal::source [protected] |
Definition at line 165 of file vlib.h.
Referenced by init(), and operator,().