diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 4 | ||||
-rw-r--r-- | src/ghdldrv/ghdlcomp.ads | 4 | ||||
-rw-r--r-- | src/ghdldrv/ghdlrun.adb | 2 | ||||
-rw-r--r-- | src/ghdldrv/ghdlsimul.adb | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index d06da3510..4f9644e9b 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -324,6 +324,7 @@ package body Ghdlcomp is procedure Common_Compile_Elab (Cmd_Name : String; Args : Argument_List; + Allow_Undef_Generic : Boolean; Opt_Arg : out Natural; Config : out Iir) is @@ -354,7 +355,8 @@ package body Ghdlcomp is (Get_Block_Specification (Get_Block_Configuration (Conf_Unit))); Entity : constant Iir := Vhdl.Utils.Get_Entity (Arch); begin - Vhdl.Configuration.Check_Entity_Declaration_Top (Entity, True); + Vhdl.Configuration.Check_Entity_Declaration_Top + (Entity, Allow_Undef_Generic); if Nbr_Errors > 0 then raise Compilation_Error; end if; diff --git a/src/ghdldrv/ghdlcomp.ads b/src/ghdldrv/ghdlcomp.ads index 75d1e9f1d..5af54eaad 100644 --- a/src/ghdldrv/ghdlcomp.ads +++ b/src/ghdldrv/ghdlcomp.ads @@ -85,9 +85,11 @@ package Ghdlcomp is -- Common action to perform before elaboration: -- * extract PRIM_NAME and SEC_NAME from ARGS. -- * configure - -- * Check top entity. + -- * Check top entity + -- If ALLOW_UNDEF_GENERIC is False, the generics must have a default value. procedure Common_Compile_Elab (Cmd_Name : String; Args : Argument_List; + Allow_Undef_Generic : Boolean; Opt_Arg : out Natural; Config : out Iir); diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb index 8cc1a6df0..2adc63130 100644 --- a/src/ghdldrv/ghdlrun.adb +++ b/src/ghdldrv/ghdlrun.adb @@ -144,7 +144,7 @@ package body Ghdlrun is is Config : Iir; begin - Common_Compile_Elab (Cmd_Name, Args, Opt_Arg, Config); + Common_Compile_Elab (Cmd_Name, Args, True, Opt_Arg, Config); if Time_Resolution = 'a' then Time_Resolution := Vhdl.Std_Package.Get_Minimal_Time_Resolution; diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb index 62242be3c..259a3dc57 100644 --- a/src/ghdldrv/ghdlsimul.adb +++ b/src/ghdldrv/ghdlsimul.adb @@ -80,7 +80,7 @@ package body Ghdlsimul is Lib_Unit : Node; Inst : Synth_Instance_Acc; begin - Common_Compile_Elab (Cmd_Name, Args, Opt_Arg, Config); + Common_Compile_Elab (Cmd_Name, Args, False, Opt_Arg, Config); Lib_Unit := Get_Library_Unit (Config); pragma Assert (Get_Kind (Lib_Unit) /= Iir_Kind_Foreign_Module); |