increase and check max level
This commit is contained in:
parent
df8790486b
commit
dccf03e157
|
|
@ -192,6 +192,9 @@ public:
|
||||||
void removeDelaySlewAnnotations();
|
void removeDelaySlewAnnotations();
|
||||||
VertexSet *regClkVertices() { return ®_clk_vertices_; }
|
VertexSet *regClkVertices() { return ®_clk_vertices_; }
|
||||||
|
|
||||||
|
static const int vertex_level_bits = 24;
|
||||||
|
static const int vertex_level_max = (1<<vertex_level_bits)-1;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void makeVerticesAndEdges();
|
void makeVerticesAndEdges();
|
||||||
Vertex *makeVertex(Pin *pin,
|
Vertex *makeVertex(Pin *pin,
|
||||||
|
|
@ -348,7 +351,7 @@ protected:
|
||||||
unsigned int slew_annotated_:slew_annotated_bits;
|
unsigned int slew_annotated_:slew_annotated_bits;
|
||||||
|
|
||||||
// 4 bytes (32 bits)
|
// 4 bytes (32 bits)
|
||||||
unsigned int level_:16;
|
unsigned int level_:Graph::vertex_level_bits;
|
||||||
// Levelization search state.
|
// Levelization search state.
|
||||||
// LevelColor gcc barfs if this is dcl'd.
|
// LevelColor gcc barfs if this is dcl'd.
|
||||||
unsigned color_:2;
|
unsigned color_:2;
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,8 @@ Levelize::visit(Vertex *vertex,
|
||||||
setLevel(vertex, level);
|
setLevel(vertex, level);
|
||||||
max_level_ = max(level, max_level_);
|
max_level_ = max(level, max_level_);
|
||||||
level += level_space;
|
level += level_space;
|
||||||
|
if (level >= Graph::vertex_level_max)
|
||||||
|
criticalError(616, "maximum logic level exceeded");
|
||||||
|
|
||||||
if (search_pred_->searchFrom(vertex)) {
|
if (search_pred_->searchFrom(vertex)) {
|
||||||
VertexOutEdgeIterator edge_iter(vertex, graph_);
|
VertexOutEdgeIterator edge_iter(vertex, graph_);
|
||||||
|
|
@ -226,7 +228,7 @@ Levelize::visit(Vertex *vertex,
|
||||||
LevelColor to_color = to_vertex->color();
|
LevelColor to_color = to_vertex->color();
|
||||||
if (to_color == LevelColor::gray)
|
if (to_color == LevelColor::gray)
|
||||||
// Back edges form feedback loops.
|
// Back edges form feedback loops.
|
||||||
recordLoop(edge, path);
|
recordLoop(edge, path);
|
||||||
else if (to_color == LevelColor::white
|
else if (to_color == LevelColor::white
|
||||||
|| to_vertex->level() < level) {
|
|| to_vertex->level() < level) {
|
||||||
path.push_back(edge);
|
path.push_back(edge);
|
||||||
|
|
@ -250,6 +252,20 @@ Levelize::visit(Vertex *vertex,
|
||||||
vertex->setColor(LevelColor::black);
|
vertex->setColor(LevelColor::black);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Levelize::reportPath(EdgeSeq &path) const
|
||||||
|
{
|
||||||
|
bool first_edge = true;
|
||||||
|
EdgeSeq::Iterator edge_iter(path);
|
||||||
|
while (edge_iter.hasNext()) {
|
||||||
|
Edge *edge = edge_iter.next();
|
||||||
|
if (first_edge)
|
||||||
|
report_->reportLine(" %s", edge->from(graph_)->name(network_));
|
||||||
|
report_->reportLine(" %s", edge->to(graph_)->name(network_));
|
||||||
|
first_edge = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Levelize::recordLoop(Edge *edge,
|
Levelize::recordLoop(Edge *edge,
|
||||||
EdgeSeq &path)
|
EdgeSeq &path)
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ protected:
|
||||||
void ensureLatchLevels();
|
void ensureLatchLevels();
|
||||||
void setLevel(Vertex *vertex,
|
void setLevel(Vertex *vertex,
|
||||||
Level level);
|
Level level);
|
||||||
|
void reportPath(EdgeSeq &path) const;
|
||||||
|
|
||||||
SearchPred *search_pred_;
|
SearchPred *search_pred_;
|
||||||
bool levelized_;
|
bool levelized_;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue