...
 
Commits (1)
......@@ -40,14 +40,25 @@
namespace TRC
{
const char TRUE = 'P';
const char MAYBE = 'O';
const char FALSE = 'N';
const char NC = 'Z';
const char PULLUP = '1';
const char PULLDOWN = '0';
const char INVALID = '?';
// Wire states:
const char TRUE = 'P'; /* connected to positive voltage */
const char MAYBE = 'O'; /* connected to intermedeate voltage */
const char FALSE = 'N'; /* connected to the ground */
const char ANYBIT = 'X'; /* for comparisons only */
const char ANYTRIT = 'Y'; /* for comparisons only */
const char NC = 'Z'; /* not connected (high impendance) */
const char PULLUP = '1'; /* weak pull-up to positive voltage */
const char PULLDOWN = '0'; /* weak pull-down to the ground */
const char PULLMID = '-'; /* weak pull-middle to intermediate voltage */
const char INVALID = '?'; /* conflict on the wire (simulation halts) */
// Aliases:
const char HIGHIMP = NC;
const char POSITIVE = TRUE;
const char NEUTRAL = MAYBE;
const char NEGATIVE = FALSE;
// Types:
const int UNSPECIFIED = 0x00000000;
const int UINT = 0x00010000;
const int SINT = 0x00110000;
......@@ -56,8 +67,11 @@ namespace TRC
const int TFIXED = 0x01120000; // FUTURE
const int TFLOAT = 0x01140000; // FUTURE
const int TYPEMASK = 0xFFFF0000;
// Masks:
const int SIZEMASK = 0x0000FFFF;
const int TYPEMASK = 0x0FFF0000;
const int RESERVED = 0x30000000;
const int OVERFLOW = 0xC0000000;
// class Wire<N>
......