mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: Detab and fix spacing style issues. No functional change.
When diff, recommend using "git diff --ignore-all-space" When merging, recommend using "git merge -Xignore-all-space"
This commit is contained in:
+132
-127
@@ -19,25 +19,25 @@
|
||||
//*************************************************************************
|
||||
// OrderGraph Class Hierarchy:
|
||||
//
|
||||
// V3GraphVertex
|
||||
// OrderMoveVertex
|
||||
// V3GraphVertex
|
||||
// OrderMoveVertex
|
||||
// MTaskMoveVertex
|
||||
// OrderEitherVertex
|
||||
// OrderInputsVertex
|
||||
// OrderSettleVertex
|
||||
// OrderLogicVertex
|
||||
// OrderVarVertex
|
||||
// OrderVarStdVertex
|
||||
// OrderVarPreVertex
|
||||
// OrderVarPostVertex
|
||||
// OrderVarPordVertex
|
||||
// OrderVarSettleVertex
|
||||
// OrderEitherVertex
|
||||
// OrderInputsVertex
|
||||
// OrderSettleVertex
|
||||
// OrderLogicVertex
|
||||
// OrderVarVertex
|
||||
// OrderVarStdVertex
|
||||
// OrderVarPreVertex
|
||||
// OrderVarPostVertex
|
||||
// OrderVarPordVertex
|
||||
// OrderVarSettleVertex
|
||||
//
|
||||
// V3GraphEdge
|
||||
// OrderEdge
|
||||
// OrderComboCutEdge
|
||||
// OrderPostCutEdge
|
||||
// OrderPreCutEdge
|
||||
// V3GraphEdge
|
||||
// OrderEdge
|
||||
// OrderComboCutEdge
|
||||
// OrderPostCutEdge
|
||||
// OrderPreCutEdge
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
@@ -60,42 +60,42 @@ class OrderMoveDomScope;
|
||||
//######################################################################
|
||||
|
||||
enum OrderWeights {
|
||||
WEIGHT_INPUT = 1, // Low weight just so dot graph looks nice
|
||||
WEIGHT_COMBO = 1, // Breakable combo logic
|
||||
WEIGHT_LOOPBE = 1, // Connection to loop begin/end
|
||||
WEIGHT_POST = 2, // Post-delayed used var
|
||||
WEIGHT_PRE = 3, // Breakable pre-delayed used var
|
||||
WEIGHT_MEDIUM = 8, // Medium weight just so dot graph looks nice
|
||||
WEIGHT_NORMAL = 32 }; // High weight just so dot graph looks nice
|
||||
WEIGHT_INPUT = 1, // Low weight just so dot graph looks nice
|
||||
WEIGHT_COMBO = 1, // Breakable combo logic
|
||||
WEIGHT_LOOPBE = 1, // Connection to loop begin/end
|
||||
WEIGHT_POST = 2, // Post-delayed used var
|
||||
WEIGHT_PRE = 3, // Breakable pre-delayed used var
|
||||
WEIGHT_MEDIUM = 8, // Medium weight just so dot graph looks nice
|
||||
WEIGHT_NORMAL = 32 }; // High weight just so dot graph looks nice
|
||||
|
||||
struct OrderVEdgeType {
|
||||
enum en {
|
||||
VERTEX_UNKNOWN = 0,
|
||||
VERTEX_INPUTS,
|
||||
VERTEX_SETTLE,
|
||||
VERTEX_LOGIC,
|
||||
VERTEX_VARSTD,
|
||||
VERTEX_VARPRE,
|
||||
VERTEX_VARPOST,
|
||||
VERTEX_VARPORD,
|
||||
VERTEX_VARSETTLE,
|
||||
VERTEX_MOVE,
|
||||
EDGE_STD,
|
||||
EDGE_CHANGEDET,
|
||||
EDGE_COMBOCUT,
|
||||
EDGE_PRECUT,
|
||||
EDGE_POSTCUT,
|
||||
_ENUM_END
|
||||
VERTEX_UNKNOWN = 0,
|
||||
VERTEX_INPUTS,
|
||||
VERTEX_SETTLE,
|
||||
VERTEX_LOGIC,
|
||||
VERTEX_VARSTD,
|
||||
VERTEX_VARPRE,
|
||||
VERTEX_VARPOST,
|
||||
VERTEX_VARPORD,
|
||||
VERTEX_VARSETTLE,
|
||||
VERTEX_MOVE,
|
||||
EDGE_STD,
|
||||
EDGE_CHANGEDET,
|
||||
EDGE_COMBOCUT,
|
||||
EDGE_PRECUT,
|
||||
EDGE_POSTCUT,
|
||||
_ENUM_END
|
||||
};
|
||||
const char* ascii() const {
|
||||
static const char* const names[] = {
|
||||
"%E-vedge", "VERTEX_INPUTS", "VERTEX_SETTLE", "VERTEX_LOGIC",
|
||||
"VERTEX_VARSTD", "VERTEX_VARPRE", "VERTEX_VARPOST",
|
||||
"VERTEX_VARPORD", "VERTEX_VARSETTLE", "VERTEX_MOVE",
|
||||
"EDGE_STD", "EDGE_CHANGEDET", "EDGE_COMBOCUT",
|
||||
"EDGE_PRECUT", "EDGE_POSTCUT", "_ENUM_END"
|
||||
};
|
||||
return names[m_e];
|
||||
static const char* const names[] = {
|
||||
"%E-vedge", "VERTEX_INPUTS", "VERTEX_SETTLE", "VERTEX_LOGIC",
|
||||
"VERTEX_VARSTD", "VERTEX_VARPRE", "VERTEX_VARPOST",
|
||||
"VERTEX_VARPORD", "VERTEX_VARSETTLE", "VERTEX_MOVE",
|
||||
"EDGE_STD", "EDGE_CHANGEDET", "EDGE_COMBOCUT",
|
||||
"EDGE_PRECUT", "EDGE_POSTCUT", "_ENUM_END"
|
||||
};
|
||||
return names[m_e];
|
||||
}
|
||||
enum en m_e;
|
||||
inline OrderVEdgeType() : m_e(VERTEX_UNKNOWN) {}
|
||||
@@ -104,9 +104,9 @@ struct OrderVEdgeType {
|
||||
explicit inline OrderVEdgeType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator== (OrderVEdgeType lhs, OrderVEdgeType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator== (OrderVEdgeType::en lhs, OrderVEdgeType rhs) { return (lhs == rhs.m_e); }
|
||||
inline bool operator==(OrderVEdgeType lhs, OrderVEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(OrderVEdgeType lhs, OrderVEdgeType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(OrderVEdgeType::en lhs, OrderVEdgeType rhs) { return (lhs == rhs.m_e); }
|
||||
|
||||
//######################################################################
|
||||
// Graph types
|
||||
@@ -132,42 +132,42 @@ public:
|
||||
// Vertex types
|
||||
|
||||
class OrderEitherVertex : public V3GraphVertex {
|
||||
AstScope* m_scopep; // Scope the vertex is in
|
||||
AstSenTree* m_domainp; // Clock domain (NULL = to be computed as we iterate)
|
||||
bool m_isFromInput; // From input, or derived therefrom (conservatively false)
|
||||
AstScope* m_scopep; // Scope the vertex is in
|
||||
AstSenTree* m_domainp; // Clock domain (NULL = to be computed as we iterate)
|
||||
bool m_isFromInput; // From input, or derived therefrom (conservatively false)
|
||||
protected:
|
||||
OrderEitherVertex(V3Graph* graphp, const OrderEitherVertex& old)
|
||||
: V3GraphVertex(graphp, old), m_scopep(old.m_scopep), m_domainp(old.m_domainp)
|
||||
, m_isFromInput(old.m_isFromInput) {}
|
||||
: V3GraphVertex(graphp, old), m_scopep(old.m_scopep), m_domainp(old.m_domainp)
|
||||
, m_isFromInput(old.m_isFromInput) {}
|
||||
public:
|
||||
OrderEitherVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp)
|
||||
: V3GraphVertex(graphp), m_scopep(scopep), m_domainp(domainp)
|
||||
, m_isFromInput(false) {}
|
||||
: V3GraphVertex(graphp), m_scopep(scopep), m_domainp(domainp)
|
||||
, m_isFromInput(false) {}
|
||||
virtual ~OrderEitherVertex() {}
|
||||
virtual OrderEitherVertex* clone(V3Graph* graphp) const = 0;
|
||||
// Methods
|
||||
virtual OrderVEdgeType type() const = 0;
|
||||
virtual bool domainMatters() = 0; // Must be in same domain when cross edge to this vertex
|
||||
virtual bool domainMatters() = 0; // Must be in same domain when cross edge to this vertex
|
||||
virtual string dotName() const { return cvtToHex(m_scopep)+"_"; }
|
||||
// ACCESSORS
|
||||
void domainp(AstSenTree* domainp) { m_domainp = domainp; }
|
||||
AstScope* scopep() const { return m_scopep; }
|
||||
AstSenTree* domainp() const { return m_domainp; }
|
||||
void isFromInput(bool flag) { m_isFromInput=flag; }
|
||||
void isFromInput(bool flag) { m_isFromInput = flag; }
|
||||
bool isFromInput() const { return m_isFromInput; }
|
||||
};
|
||||
|
||||
class OrderInputsVertex : public OrderEitherVertex {
|
||||
OrderInputsVertex(V3Graph* graphp, const OrderInputsVertex& old)
|
||||
: OrderEitherVertex(graphp, old) {}
|
||||
: OrderEitherVertex(graphp, old) {}
|
||||
public:
|
||||
OrderInputsVertex(V3Graph* graphp, AstSenTree* domainp)
|
||||
: OrderEitherVertex(graphp, NULL, domainp) {
|
||||
isFromInput(true); // By definition
|
||||
: OrderEitherVertex(graphp, NULL, domainp) {
|
||||
isFromInput(true); // By definition
|
||||
}
|
||||
virtual ~OrderInputsVertex() {}
|
||||
virtual OrderInputsVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderInputsVertex(graphp, *this); }
|
||||
return new OrderInputsVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_INPUTS; }
|
||||
virtual string name() const { return "*INPUTS*"; }
|
||||
virtual string dotColor() const { return "green"; }
|
||||
@@ -177,13 +177,13 @@ public:
|
||||
|
||||
class OrderSettleVertex : public OrderEitherVertex {
|
||||
OrderSettleVertex(V3Graph* graphp, const OrderSettleVertex& old)
|
||||
: OrderEitherVertex(graphp, old) {}
|
||||
: OrderEitherVertex(graphp, old) {}
|
||||
public:
|
||||
OrderSettleVertex(V3Graph* graphp, AstSenTree* domainp)
|
||||
: OrderEitherVertex(graphp, NULL, domainp) {}
|
||||
: OrderEitherVertex(graphp, NULL, domainp) {}
|
||||
virtual ~OrderSettleVertex() {}
|
||||
virtual OrderSettleVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderSettleVertex(graphp, *this); }
|
||||
return new OrderSettleVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_SETTLE; }
|
||||
virtual string name() const { return "*SETTLE*"; }
|
||||
virtual string dotColor() const { return "green"; }
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
};
|
||||
|
||||
class OrderLogicVertex : public OrderEitherVertex {
|
||||
AstNode* m_nodep;
|
||||
AstNode* m_nodep;
|
||||
protected:
|
||||
OrderLogicVertex(V3Graph* graphp, const OrderLogicVertex& old)
|
||||
: OrderEitherVertex(graphp, old), m_nodep(old.m_nodep) {}
|
||||
@@ -201,27 +201,28 @@ public:
|
||||
: OrderEitherVertex(graphp, scopep, domainp), m_nodep(nodep) {}
|
||||
virtual ~OrderLogicVertex() {}
|
||||
virtual OrderLogicVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderLogicVertex(graphp, *this); }
|
||||
return new OrderLogicVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_LOGIC; }
|
||||
virtual bool domainMatters() { return true; }
|
||||
// ACCESSORS
|
||||
virtual string name() const { return (cvtToHex(m_nodep)+"\\n "+cvtToStr(nodep()->typeName())); }
|
||||
virtual string name() const {
|
||||
return (cvtToHex(m_nodep)+"\\n "+cvtToStr(nodep()->typeName())); }
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
virtual string dotColor() const { return "yellow"; }
|
||||
};
|
||||
|
||||
class OrderVarVertex : public OrderEitherVertex {
|
||||
AstVarScope* m_varScp;
|
||||
bool m_isClock; // Used as clock
|
||||
bool m_isDelayed; // Set in a delayed assignment
|
||||
bool m_isClock; // Used as clock
|
||||
bool m_isDelayed; // Set in a delayed assignment
|
||||
protected:
|
||||
OrderVarVertex(V3Graph* graphp, const OrderVarVertex& old)
|
||||
: OrderEitherVertex(graphp, old)
|
||||
: OrderEitherVertex(graphp, old)
|
||||
, m_varScp(old.m_varScp), m_isClock(old.m_isClock)
|
||||
, m_isDelayed(old.m_isDelayed) {}
|
||||
, m_isDelayed(old.m_isDelayed) {}
|
||||
public:
|
||||
OrderVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderEitherVertex(graphp, scopep, NULL), m_varScp(varScp)
|
||||
: OrderEitherVertex(graphp, scopep, NULL), m_varScp(varScp)
|
||||
, m_isClock(false), m_isDelayed(false) {}
|
||||
virtual ~OrderVarVertex() {}
|
||||
virtual OrderVarVertex* clone(V3Graph* graphp) const = 0;
|
||||
@@ -229,21 +230,21 @@ public:
|
||||
virtual FileLine* fileline() const { return varScp()->fileline(); }
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
void isClock(bool flag) { m_isClock=flag; }
|
||||
void isClock(bool flag) { m_isClock = flag; }
|
||||
bool isClock() const { return m_isClock; }
|
||||
void isDelayed(bool flag) { m_isDelayed=flag; }
|
||||
void isDelayed(bool flag) { m_isDelayed = flag; }
|
||||
bool isDelayed() const { return m_isDelayed; }
|
||||
};
|
||||
|
||||
class OrderVarStdVertex : public OrderVarVertex {
|
||||
OrderVarStdVertex(V3Graph* graphp, const OrderVarStdVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
public:
|
||||
OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarStdVertex() {}
|
||||
virtual OrderVarStdVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarStdVertex(graphp, *this); }
|
||||
return new OrderVarStdVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSTD; }
|
||||
virtual string name() const { return (cvtToHex(varScp())+"\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "skyblue"; }
|
||||
@@ -251,13 +252,13 @@ public:
|
||||
};
|
||||
class OrderVarPreVertex : public OrderVarVertex {
|
||||
OrderVarPreVertex(V3Graph* graphp, const OrderVarPreVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
public:
|
||||
OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep,varScp) {}
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarPreVertex() {}
|
||||
virtual OrderVarPreVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarPreVertex(graphp, *this); }
|
||||
return new OrderVarPreVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPRE; }
|
||||
virtual string name() const { return (cvtToHex(varScp())+" PRE\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "lightblue"; }
|
||||
@@ -265,12 +266,12 @@ public:
|
||||
};
|
||||
class OrderVarPostVertex : public OrderVarVertex {
|
||||
OrderVarPostVertex(V3Graph* graphp, const OrderVarPostVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
public:
|
||||
OrderVarPostVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep,varScp) {}
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual OrderVarPostVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarPostVertex(graphp, *this); }
|
||||
return new OrderVarPostVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPOST; }
|
||||
virtual ~OrderVarPostVertex() {}
|
||||
virtual string name() const { return (cvtToHex(varScp())+" POST\\n "+varScp()->name());}
|
||||
@@ -279,13 +280,13 @@ public:
|
||||
};
|
||||
class OrderVarPordVertex : public OrderVarVertex {
|
||||
OrderVarPordVertex(V3Graph* graphp, const OrderVarPordVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
public:
|
||||
OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep,varScp) {}
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarPordVertex() {}
|
||||
virtual OrderVarPordVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarPordVertex(graphp, *this); }
|
||||
return new OrderVarPordVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPORD; }
|
||||
virtual string name() const { return (cvtToHex(varScp())+" PORD\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "NavyBlue"; }
|
||||
@@ -293,13 +294,13 @@ public:
|
||||
};
|
||||
class OrderVarSettleVertex : public OrderVarVertex {
|
||||
OrderVarSettleVertex(V3Graph* graphp, const OrderVarSettleVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
public:
|
||||
OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep,varScp) {}
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarSettleVertex() {}
|
||||
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const {
|
||||
return new OrderVarSettleVertex(graphp, *this); }
|
||||
return new OrderVarSettleVertex(graphp, *this); }
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSETTLE; }
|
||||
virtual string name() const { return (cvtToHex(varScp())+" STL\\n "+varScp()->name());}
|
||||
virtual string dotColor() const { return "PowderBlue"; }
|
||||
@@ -312,17 +313,17 @@ public:
|
||||
class OrderMoveVertex : public V3GraphVertex {
|
||||
typedef enum {POM_WAIT, POM_READY, POM_MOVED} OrderMState;
|
||||
|
||||
OrderLogicVertex* m_logicp;
|
||||
OrderMState m_state; // Movement state
|
||||
OrderMoveDomScope* m_domScopep; // Domain/scope list information
|
||||
OrderLogicVertex* m_logicp;
|
||||
OrderMState m_state; // Movement state
|
||||
OrderMoveDomScope* m_domScopep; // Domain/scope list information
|
||||
|
||||
protected:
|
||||
friend class OrderVisitor;
|
||||
friend class OrderMoveVertexMaker;
|
||||
// These only contain the "next" item,
|
||||
// for the head of the list, see the same var name under OrderVisitor
|
||||
V3ListEnt<OrderMoveVertex*> m_pomWaitingE; // List of nodes needing inputs to become ready
|
||||
V3ListEnt<OrderMoveVertex*> m_readyVerticesE;// List of ready under domain/scope
|
||||
V3ListEnt<OrderMoveVertex*> m_pomWaitingE; // List of nodes needing inputs to become ready
|
||||
V3ListEnt<OrderMoveVertex*> m_readyVerticesE; // List of ready under domain/scope
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
OrderMoveVertex(V3Graph* graphp, OrderLogicVertex* logicp)
|
||||
@@ -356,15 +357,15 @@ public:
|
||||
bool isWait() const { return m_state==POM_WAIT; }
|
||||
void setReady() {
|
||||
UASSERT(m_state==POM_WAIT, "Wait->Ready on node not in proper state");
|
||||
m_state = POM_READY;
|
||||
m_state = POM_READY;
|
||||
}
|
||||
void setMoved() {
|
||||
UASSERT(m_state==POM_READY, "Ready->Moved on node not in proper state");
|
||||
m_state = POM_MOVED;
|
||||
m_state = POM_MOVED;
|
||||
}
|
||||
OrderMoveDomScope* domScopep() const { return m_domScopep; }
|
||||
OrderMoveVertex* pomWaitingNextp() const { return m_pomWaitingE.nextp(); }
|
||||
void domScopep(OrderMoveDomScope* ds) { m_domScopep=ds; }
|
||||
void domScopep(OrderMoveDomScope* ds) { m_domScopep = ds; }
|
||||
};
|
||||
|
||||
// Similar to OrderMoveVertex, but modified for threaded code generation.
|
||||
@@ -424,29 +425,30 @@ public:
|
||||
class OrderEdge : public V3GraphEdge {
|
||||
protected:
|
||||
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderEdge& old)
|
||||
: V3GraphEdge(graphp, fromp, top, old) {}
|
||||
const OrderEdge& old)
|
||||
: V3GraphEdge(graphp, fromp, top, old) {}
|
||||
public:
|
||||
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
int weight, bool cutable=false)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
int weight, bool cutable=false)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
virtual ~OrderEdge() {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_STD; }
|
||||
virtual OrderEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderEdge(graphp, fromp, top, *this);
|
||||
return new OrderEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
// When ordering combo blocks with stronglyConnected, follow edges not involving pre/pos variables
|
||||
// When ordering combo blocks with stronglyConnected, follow edges not
|
||||
// involving pre/pos variables
|
||||
virtual bool followComboConnected() const { return true; }
|
||||
virtual bool followSequentConnected() const { return true; }
|
||||
static bool followComboConnected(const V3GraphEdge* edgep) {
|
||||
const OrderEdge* oedgep = dynamic_cast<const OrderEdge*>(edgep);
|
||||
if (!oedgep) v3fatalSrc("Following edge of non-OrderEdge type");
|
||||
return (oedgep->followComboConnected());
|
||||
const OrderEdge* oedgep = dynamic_cast<const OrderEdge*>(edgep);
|
||||
if (!oedgep) v3fatalSrc("Following edge of non-OrderEdge type");
|
||||
return (oedgep->followComboConnected());
|
||||
}
|
||||
static bool followSequentConnected(const V3GraphEdge* edgep) {
|
||||
const OrderEdge* oedgep = dynamic_cast<const OrderEdge*>(edgep);
|
||||
if (!oedgep) v3fatalSrc("Following edge of non-OrderEdge type");
|
||||
return (oedgep->followSequentConnected());
|
||||
const OrderEdge* oedgep = dynamic_cast<const OrderEdge*>(edgep);
|
||||
if (!oedgep) v3fatalSrc("Following edge of non-OrderEdge type");
|
||||
return (oedgep->followSequentConnected());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -455,15 +457,16 @@ class OrderComboCutEdge : public OrderEdge {
|
||||
// Breakable if the output var is also a input,
|
||||
// in which case we'll need a change detect loop around this var.
|
||||
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderComboCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
const OrderComboCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
public:
|
||||
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_COMBOCUT; }
|
||||
virtual ~OrderComboCutEdge() {}
|
||||
virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderComboCutEdge(graphp, fromp, top, *this);
|
||||
virtual OrderComboCutEdge* clone(V3Graph* graphp,
|
||||
V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderComboCutEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
virtual string dotColor() const { return "yellowGreen"; }
|
||||
virtual bool followComboConnected() const { return true; }
|
||||
@@ -475,15 +478,16 @@ class OrderPostCutEdge : public OrderEdge {
|
||||
// Breakable if the output var feeds back to input combo logic or another clock pin
|
||||
// in which case we'll need a change detect loop around this var.
|
||||
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderPostCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
const OrderPostCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
public:
|
||||
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_POSTCUT; }
|
||||
virtual ~OrderPostCutEdge() {}
|
||||
virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderPostCutEdge(graphp, fromp, top, *this);
|
||||
virtual OrderPostCutEdge* clone(V3Graph* graphp,
|
||||
V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderPostCutEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
virtual string dotColor() const { return "PaleGreen"; }
|
||||
virtual bool followComboConnected() const { return false; }
|
||||
@@ -495,14 +499,15 @@ class OrderPreCutEdge : public OrderEdge {
|
||||
// Always breakable, just results in performance loss
|
||||
// in which case we can't optimize away the pre/post delayed assignments
|
||||
OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderPreCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
const OrderPreCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
public:
|
||||
OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_PRE, CUTABLE) {}
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_PRE, CUTABLE) {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_PRECUT; }
|
||||
virtual OrderPreCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderPreCutEdge(graphp, fromp, top, *this);
|
||||
virtual OrderPreCutEdge* clone(V3Graph* graphp,
|
||||
V3GraphVertex* fromp, V3GraphVertex* top) const {
|
||||
return new OrderPreCutEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
virtual ~OrderPreCutEdge() {}
|
||||
virtual string dotColor() const { return "khaki"; }
|
||||
|
||||
Reference in New Issue
Block a user