diff options
Diffstat (limited to 'src/synth/synthesis.adb')
-rw-r--r-- | src/synth/synthesis.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/synth/synthesis.adb b/src/synth/synthesis.adb index a9ce60085..3a90aff40 100644 --- a/src/synth/synthesis.adb +++ b/src/synth/synthesis.adb @@ -33,6 +33,7 @@ with Synth.Context; use Synth.Context; with Synth.Types; use Synth.Types; with Synth.Decls; use Synth.Decls; with Synth.Stmts; use Synth.Stmts; +with Synth.Expr; use Synth.Expr; with Synth.Environment.Debug; pragma Unreferenced (Synth.Environment.Debug); @@ -149,6 +150,20 @@ package body Synthesis is Syn_Inst.Block_Scope := Get_Info (Entity); Syn_Inst.Name := New_Sname_User (Get_Identifier (Entity)); + -- Compute generics. + Inter := Get_Generic_Chain (Entity); + while Is_Valid (Inter) loop + Synth_Declaration_Type (Syn_Inst, Inter); + declare + Val : Value_Acc; + begin + Val := Synth_Expression_With_Type + (Syn_Inst, Get_Default_Value (Inter), Get_Type (Inter)); + Create_Object (Syn_Inst, Inter, Val); + end; + Inter := Get_Chain (Inter); + end loop; + -- Allocate values and count inputs and outputs Inter := Get_Port_Chain (Entity); Nbr_Inputs := 0; |