aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-12-22 11:58:05 +0100
committerTristan Gingold <tgingold@free.fr>2014-12-22 11:58:05 +0100
commit6aa5c00499ff83aa5926017c87339b5493cea4db (patch)
tree1289ede59c454637e12a9f1a5e19413600ad02d8 /src/vhdl
parent846f7e02d664702bedc5ed086c7753bd93e3ba97 (diff)
downloadghdl-6aa5c00499ff83aa5926017c87339b5493cea4db.tar.gz
ghdl-6aa5c00499ff83aa5926017c87339b5493cea4db.tar.bz2
ghdl-6aa5c00499ff83aa5926017c87339b5493cea4db.zip
Add comments.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/configuration.adb7
-rw-r--r--src/vhdl/configuration.ads1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/vhdl/configuration.adb b/src/vhdl/configuration.adb
index f570b692e..93d4b0072 100644
--- a/src/vhdl/configuration.adb
+++ b/src/vhdl/configuration.adb
@@ -43,8 +43,10 @@ package body Configuration is
Prev_File_Dependence : Iir_List;
begin
if Flag_Build_File_Dependence then
+ -- The current file depends on unit.
File := Get_Design_File (Unit);
if Current_File_Dependence /= Null_Iir_List then
+ -- (There is no dependency for default configuration).
Add_Element (Current_File_Dependence, File);
end if;
end if;
@@ -69,6 +71,7 @@ package body Configuration is
Lib_Unit := Get_Library_Unit (Unit);
if Flag_Build_File_Dependence then
+ -- Switch current_file_dependence to the design file of Unit.
Prev_File_Dependence := Current_File_Dependence;
if Get_Kind (Lib_Unit) = Iir_Kind_Configuration_Declaration
@@ -505,7 +508,9 @@ package body Configuration is
-- For each element of the list:
-- add direct dependences (packages, entity, arch) if not in the list
-- for architectures and configuration: find instantiations and add
- -- corresponding configurations
+ -- corresponding configurations.
+ --
+ -- Return the configuration declaration for the design.
function Configure (Primary_Id : Name_Id; Secondary_Id : Name_Id)
return Iir
is
diff --git a/src/vhdl/configuration.ads b/src/vhdl/configuration.ads
index 0a19a23c2..e02a2cdfb 100644
--- a/src/vhdl/configuration.ads
+++ b/src/vhdl/configuration.ads
@@ -45,6 +45,7 @@ package Configuration is
-- If set, all design units (even package bodies) are loaded.
Flag_Load_All_Design_Units : Boolean := True;
+ -- If set, compute the File_Dependence_List of design files.
Flag_Build_File_Dependence : Boolean := False;
-- Check if ENTITY can be at the top of a hierarchy, ie: