diff options
author | Tristan Gingold | 2014-07-19 12:28:29 +0200 |
---|---|---|
committer | Tristan Gingold | 2014-07-19 12:28:29 +0200 |
commit | be1cda652b00ebfe4a9b4ca4e3cda2106586e739 (patch) | |
tree | 27fc03ae0baf8ea868778735e5a578346b9077cf /translate | |
parent | 4168dec01d69b644c59858be3af8d56b055fbbc2 (diff) | |
download | ghdl-be1cda652b00ebfe4a9b4ca4e3cda2106586e739.tar.gz ghdl-be1cda652b00ebfe4a9b4ca4e3cda2106586e739.tar.bz2 ghdl-be1cda652b00ebfe4a9b4ca4e3cda2106586e739.zip |
Replace architecture_declaration by architecture_body to follow lrm.
Diffstat (limited to 'translate')
-rw-r--r-- | translate/ghdldrv/ghdllocal.adb | 8 | ||||
-rw-r--r-- | translate/ghdldrv/ghdlprint.adb | 6 | ||||
-rw-r--r-- | translate/trans_be.adb | 4 | ||||
-rw-r--r-- | translate/translation.adb | 54 |
4 files changed, 36 insertions, 36 deletions
diff --git a/translate/ghdldrv/ghdllocal.adb b/translate/ghdldrv/ghdllocal.adb index 0341142..7169fa3 100644 --- a/translate/ghdldrv/ghdllocal.adb +++ b/translate/ghdldrv/ghdllocal.adb @@ -90,7 +90,7 @@ package body Ghdllocal is if Flag_Create_Default_Config then Lib := Get_Library_Unit (Unit); - if Get_Kind (Lib) = Iir_Kind_Architecture_Declaration then + if Get_Kind (Lib) = Iir_Kind_Architecture_Body then Config := Canon.Create_Default_Configuration_Declaration (Lib); Set_Default_Configuration_Declaration (Lib, Config); end if; @@ -256,7 +256,7 @@ package body Ghdllocal is case Get_Kind (Unit) is when Iir_Kind_Entity_Declaration => Put ("entity "); - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Put ("architecture "); when Iir_Kind_Configuration_Declaration => Put ("configuration "); @@ -271,7 +271,7 @@ package body Ghdllocal is Image (Id); Put (Name_Buffer (1 .. Name_Length)); case Get_Kind (Unit) is - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Put (" of "); Image (Get_Identifier (Get_Entity (Unit))); Put (Name_Buffer (1 .. Name_Length)); @@ -721,7 +721,7 @@ package body Ghdllocal is when Iir_Kind_Entity_Declaration | Iir_Kind_Configuration_Declaration => Delete_Top_Unit (Image (Get_Identifier (Lib_Unit))); - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Ent_Unit := Get_Entity (Lib_Unit); Delete_Top_Unit (Image (Get_Identifier (Ent_Unit)) & '-' diff --git a/translate/ghdldrv/ghdlprint.adb b/translate/ghdldrv/ghdlprint.adb index 3850ce4..0b77576 100644 --- a/translate/ghdldrv/ghdlprint.adb +++ b/translate/ghdldrv/ghdlprint.adb @@ -565,7 +565,7 @@ package body Ghdlprint is null; when Iir_Kind_Package_Body => Len := Len + 1 + 4; -- add -body - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Id1 := Get_Identifier (Get_Entity (Lib)); Len := Len + 1 + Get_Name_Length (Id1); when others => @@ -598,7 +598,7 @@ package body Ghdlprint is Image (Id); Append (Name_Buffer (1 .. Name_Length)); Append ("-body"); - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Image (Get_Identifier (Get_Entity (Lib))); Append (Name_Buffer (1 .. Name_Length)); Append ("-"); @@ -1469,7 +1469,7 @@ package body Ghdlprint is C := 't'; when Iir_Kind_Entity_Declaration => C := 'E'; - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => C := 'A'; when Iir_Kind_Library_Declaration => C := 'L'; diff --git a/translate/trans_be.adb b/translate/trans_be.adb index af14402..dd1b6c3 100644 --- a/translate/trans_be.adb +++ b/translate/trans_be.adb @@ -93,7 +93,7 @@ package body Trans_Be is end if; if Flags.Flag_Elaborate then - if Get_Kind (Lib) = Iir_Kind_Architecture_Declaration then + if Get_Kind (Lib) = Iir_Kind_Architecture_Body then declare Config : Iir_Design_Unit; begin @@ -135,7 +135,7 @@ package body Trans_Be is pragma Unreferenced (Fi); begin case Get_Kind (Decl) is - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Error_Msg_Sem ("FOREIGN architectures are not yet handled", Decl); when Iir_Kind_Procedure_Declaration | Iir_Kind_Function_Declaration => diff --git a/translate/translation.adb b/translate/translation.adb index a949692..270c707 100644 --- a/translate/translation.adb +++ b/translate/translation.adb @@ -418,7 +418,7 @@ package body Translation is -- This is used when ENTITY is at the top of a design hierarchy. procedure Translate_Entity_Init (Entity : Iir); - procedure Translate_Architecture_Declaration (Arch : Iir); + procedure Translate_Architecture_Body (Arch : Iir); -- CONFIG may be one of: -- * configuration_declaration @@ -4145,7 +4145,7 @@ package body Translation is Pop_Scope (Arch_Info.Block_Decls_Type); end Pop_Architecture_Scope; - procedure Translate_Architecture_Declaration (Arch : Iir) + procedure Translate_Architecture_Body (Arch : Iir) is Info : Block_Info_Acc; Entity : Iir; @@ -4255,7 +4255,7 @@ package body Translation is Pop_Local_Factory; Finish_Subprogram_Body; - end Translate_Architecture_Declaration; + end Translate_Architecture_Body; procedure Translate_Component_Configuration_Decl (Cfg : Iir; Blk : Iir; Base_Block : Iir; Num : in out Iir_Int32) @@ -4336,7 +4336,7 @@ package body Translation is Start_Subprogram_Body (Info.Config_Subprg); Push_Local_Factory; - if Get_Kind (Base_Block) = Iir_Kind_Architecture_Declaration then + if Get_Kind (Base_Block) = Iir_Kind_Architecture_Body then Push_Architecture_Scope (Base_Block, Base_Instance); else Push_Scope (Base_Info.Block_Decls_Type, Base_Instance); @@ -4357,7 +4357,7 @@ package body Translation is Pop_Scope (Comp_Info.Comp_Type); - if Get_Kind (Base_Block) = Iir_Kind_Architecture_Declaration then + if Get_Kind (Base_Block) = Iir_Kind_Architecture_Body then Pop_Architecture_Scope (Base_Block); else Pop_Scope (Base_Info.Block_Decls_Type); @@ -4756,7 +4756,7 @@ package body Translation is is Interface_List : O_Inter_List; Block_Config : Iir_Block_Configuration; - Arch : Iir_Architecture_Declaration; + Arch : Iir_Architecture_Body; Arch_Info : Block_Info_Acc; Config_Info : Config_Info_Acc; Instance : O_Dnode; @@ -5694,7 +5694,7 @@ package body Translation is null; when Iir_Kind_Configuration_Declaration => null; - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => null; when others => Error_Kind ("elab_dependence", Library_Unit); @@ -23011,7 +23011,7 @@ package body Translation is if Arch /= Null_Iir then Arch_Info := Get_Info (Arch); if Config = Null_Iir - and then Get_Kind (Arch) = Iir_Kind_Architecture_Declaration + and then Get_Kind (Arch) = Iir_Kind_Architecture_Body then Config := Get_Default_Configuration_Declaration (Arch); if Config /= Null_Iir then @@ -23571,7 +23571,7 @@ package body Translation is case Get_Kind (Block) is when Iir_Kind_Entity_Declaration => Merge_Signals_Rti_Of_Port_Chain (Get_Port_Chain (Block)); - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => null; when Iir_Kind_Block_Statement => declare @@ -27587,7 +27587,7 @@ package body Translation is Kind := Ghdl_Rtik_Package_Body; -- Required at least for 'image Generate_Declaration_Chain (Get_Declaration_Chain (Blk)); - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Kind := Ghdl_Rtik_Architecture; Generate_Declaration_Chain (Get_Declaration_Chain (Blk)); Generate_Concurrent_Statement_Chain @@ -27708,7 +27708,7 @@ package body Translation is -- Store the RTI. case Get_Kind (Blk) is when Iir_Kind_Entity_Declaration - | Iir_Kind_Architecture_Declaration + | Iir_Kind_Architecture_Body | Iir_Kind_Block_Statement | Iir_Kind_Generate_Statement => Info.Block_Rti_Const := Rti; @@ -27782,7 +27782,7 @@ package body Translation is case Get_Kind (Lib_Unit) is when Iir_Kind_Configuration_Declaration => return; - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => if Info.Block_Rti_Const /= O_Dnode_Null then return; end if; @@ -27812,7 +27812,7 @@ package body Translation is end case; case Get_Kind (Lib_Unit) is when Iir_Kind_Entity_Declaration - | Iir_Kind_Architecture_Declaration => + | Iir_Kind_Architecture_Body => Info.Block_Rti_Const := Rti; when Iir_Kind_Package_Declaration => Info.Package_Rti_Const := Rti; @@ -27837,7 +27837,7 @@ package body Translation is end; when Iir_Kind_Package_Body => Rti := Get_Info (Get_Package (Lib_Unit)).Package_Rti_Const; - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Rti := Get_Info (Get_Entity (Lib_Unit)).Block_Rti_Const; when others => raise Internal_Error; @@ -27893,7 +27893,7 @@ package body Translation is when Iir_Kind_Component_Instantiation_Statement => Rti_Const := Node_Info.Block_Rti_Const; when Iir_Kind_Entity_Declaration - | Iir_Kind_Architecture_Declaration + | Iir_Kind_Architecture_Body | Iir_Kind_Block_Statement | Iir_Kind_Generate_Statement => Rti_Const := Node_Info.Block_Rti_Const; @@ -27924,7 +27924,7 @@ package body Translation is when Iir_Kind_Component_Declaration => Block_Type := Node_Info.Comp_Type; when Iir_Kind_Entity_Declaration - | Iir_Kind_Architecture_Declaration + | Iir_Kind_Architecture_Body | Iir_Kind_Block_Statement | Iir_Kind_Generate_Statement => Block_Type := Node_Info.Block_Decls_Type; @@ -28022,7 +28022,7 @@ package body Translation is end if; Push_Identifier_Prefix (Lib_Mark, Id); - if Get_Kind (El) = Iir_Kind_Architecture_Declaration then + if Get_Kind (El) = Iir_Kind_Architecture_Body then -- Put 'ARCH' between the entity name and the architecture name, to -- avoid a name clash with names from entity (eg an entity port with -- the same name as an architecture). @@ -28061,10 +28061,10 @@ package body Translation is New_Debug_Comment_Decl ("entity " & Image_Identifier (El)); --Set_Global_Storage (O_Storage_Private); Chap1.Translate_Entity_Declaration (El); - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => New_Debug_Comment_Decl ("architecture " & Image_Identifier (El)); --Set_Global_Storage (O_Storage_Private); - Chap1.Translate_Architecture_Declaration (El); + Chap1.Translate_Architecture_Body (El); when Iir_Kind_Configuration_Declaration => New_Debug_Comment_Decl ("configuration " & Image_Identifier (El)); if Id = Null_Identifier then @@ -28105,7 +28105,7 @@ package body Translation is if Id /= Null_Identifier then Pop_Identifier_Prefix (Unit_Mark); end if; - if Get_Kind (El) = Iir_Kind_Architecture_Declaration then + if Get_Kind (El) = Iir_Kind_Architecture_Body then Pop_Identifier_Prefix (Sep_Mark); Pop_Identifier_Prefix (Ent_Mark); end if; @@ -29651,7 +29651,7 @@ package body Translation is package body Chap12 is -- Create __ghdl_ELABORATE procedure Gen_Main (Entity : Iir_Entity_Declaration; - Arch : Iir_Architecture_Declaration; + Arch : Iir_Architecture_Body; Config_Subprg : O_Dnode; Nbr_Pkgs : Natural) is @@ -29785,7 +29785,7 @@ package body Translation is is Entity_Info : Block_Info_Acc; - Arch : Iir_Architecture_Declaration; + Arch : Iir_Architecture_Body; Arch_Info : Block_Info_Acc; Lib : Iir_Library_Declaration; @@ -29867,7 +29867,7 @@ package body Translation is Pop_Identifier_Prefix (Lib_Mark); end Gen_Last_Arch; - procedure Gen_Dummy_Default_Config (Arch : Iir_Architecture_Declaration) + procedure Gen_Dummy_Default_Config (Arch : Iir_Architecture_Body) is Entity : Iir_Entity_Declaration; Lib : Iir_Library_Declaration; @@ -30005,7 +30005,7 @@ package body Translation is Gen_Dummy_Package_Declaration (Unit); end if; end; - when Iir_Kind_Architecture_Declaration => + when Iir_Kind_Architecture_Body => Gen_Dummy_Default_Config (Lib_Unit); when others => null; @@ -30109,7 +30109,7 @@ package body Translation is Config : Iir_Design_Unit; Config_Lib : Iir_Configuration_Declaration; Entity : Iir_Entity_Declaration; - Arch : Iir_Architecture_Declaration; + Arch : Iir_Architecture_Body; Conf_Info : Config_Info_Acc; Last_Design_Unit : Natural; Nbr_Pkgs : Natural; @@ -30193,7 +30193,7 @@ package body Translation is -- and elaboration. Translate (Unit, True); when Iir_Kind_Entity_Declaration - | Iir_Kind_Architecture_Declaration + | Iir_Kind_Architecture_Body | Iir_Kind_Package_Declaration => Set_Elab_Flag (Unit, False); Translate (Unit, Whole); @@ -30222,7 +30222,7 @@ package body Translation is end if; when Iir_Kind_Entity_Declaration => Gen_Last_Arch (Lib_Unit); - when Iir_Kind_Architecture_Declaration + when Iir_Kind_Architecture_Body | Iir_Kind_Package_Body | Iir_Kind_Configuration_Declaration => null; |