Elaborate system elab tasks in gen blocks
This commit is contained in:
parent
7fb1cabdbb
commit
cc829031ff
25
elaborate.cc
25
elaborate.cc
|
|
@ -6821,26 +6821,29 @@ bool PGenerate::elaborate_direct_(Design*des, NetScope*container) const
|
||||||
|
|
||||||
bool PGenerate::elaborate_(Design*des, NetScope*scope) const
|
bool PGenerate::elaborate_(Design*des, NetScope*scope) const
|
||||||
{
|
{
|
||||||
|
// Elaborate the elaboration tasks.
|
||||||
|
bool result_flag = true;
|
||||||
|
for (const auto et : elab_tasks) {
|
||||||
|
result_flag &= et->elaborate_elab(des, scope);
|
||||||
|
// Only elaborate until a fatal elab task.
|
||||||
|
if (!result_flag) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there are no fatal elab tasks then elaborate the rest.
|
||||||
|
if (result_flag) {
|
||||||
elaborate_functions(des, scope, funcs);
|
elaborate_functions(des, scope, funcs);
|
||||||
elaborate_tasks(des, scope, tasks);
|
elaborate_tasks(des, scope, tasks);
|
||||||
|
|
||||||
typedef list<PGate*>::const_iterator gates_it_t;
|
for (const auto gt : gates) gt->elaborate(des, scope);
|
||||||
for (gates_it_t cur = gates.begin() ; cur != gates.end() ; ++ cur )
|
|
||||||
(*cur)->elaborate(des, scope);
|
|
||||||
|
|
||||||
elaborate_var_inits_(des, scope);
|
elaborate_var_inits_(des, scope);
|
||||||
|
|
||||||
typedef list<PProcess*>::const_iterator proc_it_t;
|
for (const auto bh : behaviors) bh->elaborate(des, scope);
|
||||||
for (proc_it_t cur = behaviors.begin(); cur != behaviors.end(); ++ cur )
|
|
||||||
(*cur)->elaborate(des, scope);
|
|
||||||
|
|
||||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
for (const auto gs : generate_schemes) gs->elaborate(des, scope);
|
||||||
for (generate_it_t cur = generate_schemes.begin()
|
|
||||||
; cur != generate_schemes.end() ; ++ cur ) {
|
|
||||||
(*cur)->elaborate(des, scope);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return result_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PScope::elaborate_behaviors_(Design*des, NetScope*scope) const
|
bool PScope::elaborate_behaviors_(Design*des, NetScope*scope) const
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
module test;
|
||||||
|
if (1) begin
|
||||||
|
$error("This is before the fatal so it should display.");
|
||||||
|
$fatal(0, "This should be a fatal elaboration error.");
|
||||||
|
$error("This should not display since is after the fatal.");
|
||||||
|
end
|
||||||
|
initial $fatal(0, "FAILED elaboration assertion.");
|
||||||
|
endmodule
|
||||||
|
|
@ -24,6 +24,7 @@ br_gh383d vvp_tests/br_gh383d.json
|
||||||
br_gh440 vvp_tests/br_gh440.json
|
br_gh440 vvp_tests/br_gh440.json
|
||||||
br_gh939 vvp_tests/br_gh939.json
|
br_gh939 vvp_tests/br_gh939.json
|
||||||
br_gh1018 vvp_tests/br_gh1018.json
|
br_gh1018 vvp_tests/br_gh1018.json
|
||||||
|
br_gh1029 vvp_tests/br_gh1029.json
|
||||||
ca_time_real` vvp_tests/ca_time_real.json
|
ca_time_real` vvp_tests/ca_time_real.json
|
||||||
case1 vvp_tests/case1.json
|
case1 vvp_tests/case1.json
|
||||||
case2 vvp_tests/case2.json
|
case2 vvp_tests/case2.json
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"type" : "CE",
|
||||||
|
"source" : "br_gh1029.v",
|
||||||
|
"iverilog-args" : [ "-g2009" ]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue