aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-05 06:57:01 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-05 06:57:01 +0200
commitd1f0fedf7882cf1b15ea6450da5bbd878d007a98 (patch)
tree39c7312a2f1bbe3e5f357a22dd1df4fa228b3535 /src/vhdl
parent19a9154fb3fadd0a33a6826e525091a9a75687e4 (diff)
downloadghdl-d1f0fedf7882cf1b15ea6450da5bbd878d007a98.tar.gz
ghdl-d1f0fedf7882cf1b15ea6450da5bbd878d007a98.tar.bz2
ghdl-d1f0fedf7882cf1b15ea6450da5bbd878d007a98.zip
vhdl: move canon to a vhdl child package.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/configuration.adb9
-rw-r--r--src/vhdl/sem_lib.adb4
-rw-r--r--src/vhdl/simulate/simul-debugger.adb4
-rw-r--r--src/vhdl/translate/trans-chap4.adb4
-rw-r--r--src/vhdl/translate/trans-chap7.adb4
-rw-r--r--src/vhdl/translate/trans-chap8.adb12
-rw-r--r--src/vhdl/translate/trans-chap9.adb4
-rw-r--r--src/vhdl/translate/translation.adb4
-rw-r--r--src/vhdl/vhdl-canon.adb (renamed from src/vhdl/canon.adb)6
-rw-r--r--src/vhdl/vhdl-canon.ads (renamed from src/vhdl/canon.ads)4
-rw-r--r--src/vhdl/vhdl-canon_psl.adb (renamed from src/vhdl/canon_psl.adb)6
-rw-r--r--src/vhdl/vhdl-canon_psl.ads (renamed from src/vhdl/canon_psl.ads)4
12 files changed, 34 insertions, 31 deletions
diff --git a/src/vhdl/configuration.adb b/src/vhdl/configuration.adb
index 54cbfef22..fd8a72605 100644
--- a/src/vhdl/configuration.adb
+++ b/src/vhdl/configuration.adb
@@ -25,7 +25,7 @@ with Iirs_Utils; use Iirs_Utils;
with Iirs_Walk;
with Sem_Scopes;
with Sem_Lib; use Sem_Lib;
-with Canon;
+with Vhdl.Canon;
package body Configuration is
procedure Add_Design_Concurrent_Stmts (Parent : Iir);
@@ -348,8 +348,8 @@ package body Configuration is
-- previous instantiation. Create it if it doesn't exist.
Config := Get_Default_Configuration_Declaration (Arch_Lib);
if Is_Null (Config) then
- Config :=
- Canon.Create_Default_Configuration_Declaration (Arch_Lib);
+ Config := Vhdl.Canon.Create_Default_Configuration_Declaration
+ (Arch_Lib);
Set_Default_Configuration_Declaration (Arch_Lib, Config);
end if;
@@ -656,7 +656,8 @@ package body Configuration is
pragma Assert
(Is_Null (Get_Default_Configuration_Declaration (Lib_Unit)));
- Top := Canon.Create_Default_Configuration_Declaration (Lib_Unit);
+ Top := Vhdl.Canon.Create_Default_Configuration_Declaration
+ (Lib_Unit);
Set_Default_Configuration_Declaration (Lib_Unit, Top);
pragma Assert (Is_Valid (Top));
when Iir_Kind_Configuration_Declaration =>
diff --git a/src/vhdl/sem_lib.adb b/src/vhdl/sem_lib.adb
index 8e4ec6e21..7affaaadc 100644
--- a/src/vhdl/sem_lib.adb
+++ b/src/vhdl/sem_lib.adb
@@ -27,7 +27,7 @@ with Vhdl.Disp_Tree;
with Vhdl.Disp_Vhdl;
with Sem;
with Post_Sems;
-with Canon;
+with Vhdl.Canon;
with Nodes_GC;
package body Sem_Lib is
@@ -127,7 +127,7 @@ package body Sem_Lib is
"canonicalize %n", (1 => +Lib_Unit));
end if;
- Canon.Canonicalize (Unit);
+ Vhdl.Canon.Canonicalize (Unit);
if (Main or Flags.Dump_All) and then Flags.Dump_Canon then
Vhdl.Disp_Tree.Disp_Tree (Unit);
diff --git a/src/vhdl/simulate/simul-debugger.adb b/src/vhdl/simulate/simul-debugger.adb
index c43c96df9..10789cb25 100644
--- a/src/vhdl/simulate/simul-debugger.adb
+++ b/src/vhdl/simulate/simul-debugger.adb
@@ -28,7 +28,7 @@ with Vhdl.Scanner;
with Vhdl.Tokens;
with Sem_Expr;
with Sem_Scopes;
-with Canon;
+with Vhdl.Canon;
with Std_Names;
with Libraries;
with Std_Package;
@@ -1929,7 +1929,7 @@ package body Simul.Debugger is
New_Line;
Annotate_Expand_Table;
- Canon.Canon_Expression (Expr);
+ Vhdl.Canon.Canon_Expression (Expr);
Mark (Marker, Expr_Pool);
diff --git a/src/vhdl/translate/trans-chap4.adb b/src/vhdl/translate/trans-chap4.adb
index cdd424cc9..0c44b8af6 100644
--- a/src/vhdl/translate/trans-chap4.adb
+++ b/src/vhdl/translate/trans-chap4.adb
@@ -20,7 +20,7 @@ with Errorout; use Errorout;
with Files_Map;
with Iirs_Utils; use Iirs_Utils;
with Std_Package; use Std_Package;
-with Canon;
+with Vhdl.Canon;
with Translation; use Translation;
with Trans.Chap2;
with Trans.Chap3;
@@ -2403,7 +2403,7 @@ package body Trans.Chap4 is
Call : constant Iir := Get_Procedure_Call (Stmt);
Imp : constant Iir := Get_Implementation (Call);
begin
- Canon.Canon_Subprogram_Call (Call);
+ Vhdl.Canon.Canon_Subprogram_Call (Call);
Update_Node_Infos;
if Get_Suspend_Flag (Imp) then
diff --git a/src/vhdl/translate/trans-chap7.adb b/src/vhdl/translate/trans-chap7.adb
index e34c6f378..29707e256 100644
--- a/src/vhdl/translate/trans-chap7.adb
+++ b/src/vhdl/translate/trans-chap7.adb
@@ -24,7 +24,7 @@ with Iir_Chains; use Iir_Chains;
with Std_Package; use Std_Package;
with Errorout; use Errorout;
with Flags; use Flags;
-with Canon;
+with Vhdl.Canon;
with Evaluation; use Evaluation;
with Trans.Chap3;
with Trans.Chap4;
@@ -4397,7 +4397,7 @@ package body Trans.Chap7 is
(Expr, Left, Right, Res_Type);
end;
else
- Canon.Canon_Subprogram_Call (Expr);
+ Vhdl.Canon.Canon_Subprogram_Call (Expr);
Trans.Update_Node_Infos;
Assoc_Chain := Get_Parameter_Association_Chain (Expr);
Res := Chap8.Translate_Subprogram_Call
diff --git a/src/vhdl/translate/trans-chap8.adb b/src/vhdl/translate/trans-chap8.adb
index 31c6803b5..815748f35 100644
--- a/src/vhdl/translate/trans-chap8.adb
+++ b/src/vhdl/translate/trans-chap8.adb
@@ -20,7 +20,7 @@ with Ada.Text_IO;
with Std_Names;
with Errorout; use Errorout;
with Iir_Chains;
-with Canon;
+with Vhdl.Canon;
with Evaluation; use Evaluation;
with Std_Package; use Std_Package;
with Iirs_Utils; use Iirs_Utils;
@@ -3556,7 +3556,7 @@ package body Trans.Chap8 is
if Sensitivity = Null_Iir_List and Cond /= Null_Iir then
-- Extract sensitivity from condition.
Sensitivity := Create_Iir_List;
- Canon.Canon_Extract_Sensitivity (Cond, Sensitivity);
+ Vhdl.Canon.Canon_Extract_Sensitivity (Cond, Sensitivity);
Set_Sensitivity_List (Stmt, Sensitivity);
end if;
@@ -4683,7 +4683,8 @@ package body Trans.Chap8 is
C_Stmt : Iir;
begin
C_Stmt :=
- Canon.Canon_Conditional_Variable_Assignment_Statement (Stmt);
+ Vhdl.Canon.Canon_Conditional_Variable_Assignment_Statement
+ (Stmt);
Trans.Update_Node_Infos;
Translate_If_Statement (C_Stmt);
end;
@@ -4692,7 +4693,8 @@ package body Trans.Chap8 is
C_Stmt : Iir;
begin
C_Stmt :=
- Canon.Canon_Conditional_Signal_Assignment_Statement (Stmt);
+ Vhdl.Canon.Canon_Conditional_Signal_Assignment_Statement
+ (Stmt);
Trans.Update_Node_Infos;
Translate_If_Statement (C_Stmt);
end;
@@ -4711,7 +4713,7 @@ package body Trans.Chap8 is
begin
if not Get_Suspend_Flag (Stmt) then
-- Suspendable calls were already canonicalized.
- Canon.Canon_Subprogram_Call (Call);
+ Vhdl.Canon.Canon_Subprogram_Call (Call);
Trans.Update_Node_Infos;
end if;
diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb
index 1029275ce..c0b935fa3 100644
--- a/src/vhdl/translate/trans-chap9.adb
+++ b/src/vhdl/translate/trans-chap9.adb
@@ -21,7 +21,7 @@ with Errorout; use Errorout;
with Std_Package; use Std_Package;
with Flags;
with Libraries;
-with Canon;
+with Vhdl.Canon;
with Trans_Analyzes;
with Nodes_Meta;
with PSL.Nodes;
@@ -1758,7 +1758,7 @@ package body Trans.Chap9 is
if Is_Sensitized then
List_Orig := Get_Sensitivity_List (Proc);
if List_Orig = Iir_List_All then
- List := Canon.Canon_Extract_Process_Sensitivity (Proc);
+ List := Vhdl.Canon.Canon_Extract_Process_Sensitivity (Proc);
else
List := List_Orig;
end if;
diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb
index 9dab1243b..4f66723cf 100644
--- a/src/vhdl/translate/translation.adb
+++ b/src/vhdl/translate/translation.adb
@@ -29,7 +29,7 @@ with Std_Package; use Std_Package;
with Sem_Specs;
with Libraries;
with Std_Names;
-with Canon;
+with Vhdl.Canon;
with Trans;
with Trans_Decls; use Trans_Decls;
with Trans.Chap1;
@@ -375,7 +375,7 @@ package body Translation is
Init_Node_Infos;
-- Set flags for canon.
- Canon.Canon_Flag_Add_Labels := True;
+ Vhdl.Canon.Canon_Flag_Add_Labels := True;
-- Force to unnest subprograms is the code generator doesn't support
-- nested subprograms.
diff --git a/src/vhdl/canon.adb b/src/vhdl/vhdl-canon.adb
index 128c9ef24..2675e7cba 100644
--- a/src/vhdl/canon.adb
+++ b/src/vhdl/vhdl-canon.adb
@@ -29,9 +29,9 @@ with PSL.Rewrites;
with PSL.Build;
with PSL.NFAs;
with PSL.NFAs.Utils;
-with Canon_PSL;
+with Vhdl.Canon_PSL;
-package body Canon is
+package body Vhdl.Canon is
Canon_Flag_Set_Assoc_Formals : constant Boolean := False;
-- Canonicalize the chain of declarations in Declaration_Chain of
@@ -3287,4 +3287,4 @@ package body Canon is
return Res;
end Create_Default_Configuration_Declaration;
-end Canon;
+end Vhdl.Canon;
diff --git a/src/vhdl/canon.ads b/src/vhdl/vhdl-canon.ads
index a130580e7..ca32f5744 100644
--- a/src/vhdl/canon.ads
+++ b/src/vhdl/vhdl-canon.ads
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Iirs; use Iirs;
-package Canon is
+package Vhdl.Canon is
-- If true, a label will be added to unlabelled concurrent statements.
Canon_Flag_Add_Labels : Boolean := False;
@@ -93,4 +93,4 @@ package Canon is
function Canon_Extract_Process_Sensitivity
(Proc : Iir_Sensitized_Process_Statement)
return Iir_List;
-end Canon;
+end Vhdl.Canon;
diff --git a/src/vhdl/canon_psl.adb b/src/vhdl/vhdl-canon_psl.adb
index 1e1d8de18..08cb84d05 100644
--- a/src/vhdl/canon_psl.adb
+++ b/src/vhdl/vhdl-canon_psl.adb
@@ -18,10 +18,10 @@
with PSL.Nodes; use PSL.Nodes;
with PSL.Errors; use PSL.Errors;
-with Canon; use Canon;
+with Vhdl.Canon; use Vhdl.Canon;
with Iirs_Utils; use Iirs_Utils;
-package body Canon_PSL is
+package body Vhdl.Canon_PSL is
-- Version of Canon.Canon_Extract_Sensitivity for PSL nodes.
procedure Canon_Extract_Sensitivity
(Expr: PSL_Node; Sensitivity_List: Iir_List)
@@ -40,4 +40,4 @@ package body Canon_PSL is
Error_Kind ("PSL.Canon_extract_Sensitivity", Expr);
end case;
end Canon_Extract_Sensitivity;
-end Canon_PSL;
+end Vhdl.Canon_PSL;
diff --git a/src/vhdl/canon_psl.ads b/src/vhdl/vhdl-canon_psl.ads
index 3a8c501ac..03e740acc 100644
--- a/src/vhdl/canon_psl.ads
+++ b/src/vhdl/vhdl-canon_psl.ads
@@ -19,8 +19,8 @@
with Types; use Types;
with Iirs; use Iirs;
-package Canon_PSL is
+package Vhdl.Canon_PSL is
-- Version of Canon.Canon_Extract_Sensitivity for PSL nodes.
procedure Canon_Extract_Sensitivity
(Expr: PSL_Node; Sensitivity_List: Iir_List);
-end Canon_PSL;
+end Vhdl.Canon_PSL;