diff options
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-insts.adb | 15 | ||||
-rw-r--r-- | src/synth/synth-stmts.adb | 21 | ||||
-rw-r--r-- | src/synth/synth-stmts.ads | 3 |
3 files changed, 37 insertions, 2 deletions
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb index a2268394e..eb40a023e 100644 --- a/src/synth/synth-insts.adb +++ b/src/synth/synth-insts.adb @@ -736,6 +736,18 @@ package body Synth.Insts is end loop; end Apply_Block_Configuration; + procedure Synth_Verification_Units + (Syn_Inst : Synth_Instance_Acc; Parent : Node) + is + Unit : Node; + begin + Unit := Get_Bound_Vunit_Chain (Parent); + while Unit /= Null_Node loop + Synth_Verification_Unit (Syn_Inst, Unit); + Unit := Get_Bound_Vunit_Chain (Unit); + end loop; + end Synth_Verification_Units; + procedure Synth_Instance (Inst : Inst_Object) is Entity : constant Node := Inst.Decl; @@ -784,6 +796,9 @@ package body Synth.Insts is Synth_Concurrent_Statements (Syn_Inst, Get_Concurrent_Statement_Chain (Arch)); + Synth_Verification_Units (Syn_Inst, Entity); + Synth_Verification_Units (Syn_Inst, Arch); + Finalize_Assignments (Build_Context); -- Remove unused gates. This is not only an optimization but also diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 2eb6b453c..3f31dddb1 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -1618,10 +1618,8 @@ package body Synth.Stmts is when Iir_Kind_Psl_Restrict_Directive => Synth_Psl_Restrict_Directive (Syn_Inst, Stmt); when Iir_Kind_Psl_Assume_Directive => - -- Passive statement. Synth_Psl_Assume_Directive (Syn_Inst, Stmt); when Iir_Kind_Psl_Assert_Directive => - -- Passive statement. Synth_Psl_Assert_Directive (Syn_Inst, Stmt); when Iir_Kind_Concurrent_Assertion_Statement => -- Passive statement. @@ -1632,4 +1630,23 @@ package body Synth.Stmts is Stmt := Get_Chain (Stmt); end loop; end Synth_Concurrent_Statements; + + procedure Synth_Verification_Unit + (Syn_Inst : Synth_Instance_Acc; Unit : Node) + is + Item : Node; + begin + Item := Get_Vunit_Item_Chain (Unit); + while Item /= Null_Node loop + case Get_Kind (Item) is + when Iir_Kind_Psl_Default_Clock => + null; + when Iir_Kind_Psl_Assert_Directive => + Synth_Psl_Assert_Directive (Syn_Inst, Item); + when others => + Error_Kind ("synth_verification_unit", Item); + end case; + Item := Get_Chain (Item); + end loop; + end Synth_Verification_Unit; end Synth.Stmts; diff --git a/src/synth/synth-stmts.ads b/src/synth/synth-stmts.ads index 85f3eaa9f..cdd26e8eb 100644 --- a/src/synth/synth-stmts.ads +++ b/src/synth/synth-stmts.ads @@ -41,6 +41,9 @@ package Synth.Stmts is procedure Synth_Concurrent_Statements (Syn_Inst : Synth_Instance_Acc; Stmts : Node); + procedure Synth_Verification_Unit + (Syn_Inst : Synth_Instance_Acc; Unit : Node); + -- For iterators. function In_Range (Rng : Discrete_Range_Type; V : Int64) return Boolean; procedure Update_Index (Rng : Discrete_Range_Type; Idx : in out Int64); |