aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/netlists-builders.adb139
-rw-r--r--src/synth/netlists.adb7
-rw-r--r--src/synth/netlists.ads2
-rw-r--r--src/synth/synthesis.adb2
4 files changed, 72 insertions, 78 deletions
diff --git a/src/synth/netlists-builders.adb b/src/synth/netlists-builders.adb
index 85f4aa84b..b15a610cd 100644
--- a/src/synth/netlists-builders.adb
+++ b/src/synth/netlists-builders.adb
@@ -24,7 +24,7 @@ package body Netlists.Builders is
function Create_Port (Id : String; Dir : Port_Kind; W : Width := 0)
return Port_Desc is
begin
- return (Name => New_Sname_Artificial (Get_Identifier (Id), No_Sname),
+ return (Name => New_Sname_Artificial (Get_Identifier (Id)),
Dir => Dir,
W => W);
end Create_Port;
@@ -47,7 +47,7 @@ package body Netlists.Builders is
Inputs : Port_Desc_Array (0 .. 1);
Outputs : Port_Desc_Array (0 .. 0);
begin
- Res := New_User_Module (Design, New_Sname_Artificial (Name, No_Sname),
+ Res := New_User_Module (Design, New_Sname_Artificial (Name),
Id, 2, 1, 0);
Inputs := (0 => Create_Input ("a"),
1 => Create_Input ("b"));
@@ -63,7 +63,7 @@ package body Netlists.Builders is
Inputs : Port_Desc_Array (0 .. 0);
Outputs : Port_Desc_Array (0 .. 0);
begin
- Res := New_User_Module (Design, New_Sname_Artificial (Name, No_Sname),
+ Res := New_User_Module (Design, New_Sname_Artificial (Name),
Id, 1, 1, 0);
Inputs := (0 => Create_Input ("i"));
Outputs := (0 => Create_Output ("o"));
@@ -78,7 +78,7 @@ package body Netlists.Builders is
Inputs : Port_Desc_Array (0 .. 1);
Outputs : Port_Desc_Array (0 .. 0);
begin
- Res := New_User_Module (Design, New_Sname_Artificial (Name, No_Sname),
+ Res := New_User_Module (Design, New_Sname_Artificial (Name),
Id, 2, 1, 0);
Inputs := (0 => Create_Input ("a"),
1 => Create_Input ("b"));
@@ -100,33 +100,33 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("concat2"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("concat2")),
Id_Concat2, 2, 1, 0);
Ctxt.M_Concat (Id_Concat2) := Res;
Set_Ports_Desc (Res, Inputs (0 .. 1), Outputs);
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("concat3"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("concat3")),
Id_Concat3, 3, 1, 0);
Ctxt.M_Concat (Id_Concat3) := Res;
Set_Ports_Desc (Res, Inputs (0 .. 2), Outputs);
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("concat4"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("concat4")),
Id_Concat4, 4, 1, 0);
Ctxt.M_Concat (Id_Concat4) := Res;
Set_Ports_Desc (Res, Inputs (0 .. 3), Outputs);
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("concatn"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("concatn")),
Id_Concatn, 0, 1, 1);
Ctxt.M_Concatn := Res;
Set_Ports_Desc (Res, Inputs (1 .. 0), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("n"), No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("n")),
Typ => Param_Uns32)));
end Create_Concat_Modules;
@@ -137,41 +137,41 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_UB32"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_UB32")),
Id_Const_UB32, 0, 1, 1);
Ctxt.M_Const_UB32 := Res;
Outputs := (0 => Create_Output ("o"));
Set_Ports_Desc (Res, Port_Desc_Array'(1 .. 0 => <>), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("val"), No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("val")),
Typ => Param_Uns32)));
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_SB32"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_SB32")),
Id_Const_SB32, 0, 1, 1);
Ctxt.M_Const_SB32 := Res;
Outputs := (0 => Create_Output ("o"));
Set_Ports_Desc (Res, Port_Desc_Array'(1 .. 0 => <>), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("val"), No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("val")),
Typ => Param_Uns32)));
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_UL32"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_UL32")),
Id_Const_UL32, 0, 1, 2);
Ctxt.M_Const_UL32 := Res;
Set_Ports_Desc (Res, Port_Desc_Array'(1 .. 0 => <>), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("val"), No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("val")),
Typ => Param_Uns32),
- 1 => (New_Sname_Artificial (Get_Identifier ("xz"), No_Sname),
+ 1 => (New_Sname_Artificial (Get_Identifier ("xz")),
Typ => Param_Uns32)));
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_Z"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_Z")),
Id_Const_Z, 0, 1, 0);
Ctxt.M_Const_Z := Res;
Outputs := (0 => Create_Output ("o"));
@@ -179,7 +179,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_X"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_X")),
Id_Const_X, 0, 1, 0);
Ctxt.M_Const_X := Res;
Outputs := (0 => Create_Output ("o"));
@@ -187,7 +187,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_bit"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_bit")),
Id_Const_Bit, 0, 1, 0);
Ctxt.M_Const_Bit := Res;
Outputs := (0 => Create_Output ("o"));
@@ -195,7 +195,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("const_log"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("const_log")),
Id_Const_Log, 0, 1, 0);
Ctxt.M_Const_Log := Res;
Outputs := (0 => Create_Output ("o"));
@@ -210,15 +210,14 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("extract"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("extract")),
Id_Extract, 1, 1, 1);
Ctxt.M_Extract := Res;
Outputs := (0 => Create_Output ("o"));
Inputs := (0 => Create_Input ("i"));
Set_Ports_Desc (Res, Inputs, Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset"),
- No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset")),
Typ => Param_Uns32)));
end Create_Extract_Module;
@@ -230,7 +229,7 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("dyn_extract"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("dyn_extract")),
Id_Dyn_Extract, 2, 1, 1);
Ctxt.M_Dyn_Extract := Res;
Outputs := (0 => Create_Output ("o"));
@@ -238,8 +237,7 @@ package body Netlists.Builders is
1 => Create_Input ("i"));
Set_Ports_Desc (Res, Inputs, Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset"),
- No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset")),
Typ => Param_Uns32)));
end Create_Dyn_Extract_Module;
@@ -251,7 +249,7 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("dyn_insert"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("dyn_insert")),
Id_Dyn_Insert, 3, 1, 1);
Ctxt.M_Dyn_Insert := Res;
Outputs := (0 => Create_Output ("o"));
@@ -261,19 +259,17 @@ package body Netlists.Builders is
3 => Create_Input ("en"));
Set_Ports_Desc (Res, Inputs (0 .. 2), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset"),
- No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset")),
Typ => Param_Uns32)));
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("dyn_insert_en"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("dyn_insert_en")),
Id_Dyn_Insert_En, 4, 1, 1);
Ctxt.M_Dyn_Insert_En := Res;
Set_Ports_Desc (Res, Inputs (0 .. 3), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset"),
- No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset")),
Typ => Param_Uns32)));
end Create_Dyn_Insert_Modules;
@@ -285,16 +281,16 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("memidx"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("memidx")),
Id_Memidx, 1, 1, 2);
Ctxt.M_Memidx := Res;
Outputs := (0 => Create_Output ("o"));
Inputs (0) := Create_Input ("i");
Set_Ports_Desc (Res, Inputs (0 .. 0), Outputs);
Set_Params_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("step"), No_Sname),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("step")),
Typ => Param_Uns32),
- 1 => (New_Sname_Artificial (Get_Identifier ("max"), No_Sname),
+ 1 => (New_Sname_Artificial (Get_Identifier ("max")),
Typ => Param_Uns32)));
end Create_Memidx_Module;
@@ -306,7 +302,7 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("addidx"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("addidx")),
Id_Addidx, 2, 1, 0);
Ctxt.M_Addidx := Res;
Outputs := (0 => Create_Output ("o"));
@@ -323,7 +319,7 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("memory"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("memory")),
Id_Memory, 1, 1, 0);
Ctxt.M_Memory := Res;
Outputs (0 .. 0) := (0 => Create_Output ("oport"));
@@ -332,7 +328,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("memory_init"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("memory_init")),
Id_Memory_Init, 2, 1, 0);
Ctxt.M_Memory_Init := Res;
Outputs (0 .. 0) := (0 => Create_Output ("oport"));
@@ -342,7 +338,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("mem_rd"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("mem_rd")),
Id_Mem_Rd, 2, 2, 0);
Ctxt.M_Mem_Rd := Res;
Inputs (0 .. 1) := (0 => Create_Input ("iport"),
@@ -353,7 +349,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("mem_rd_sync"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("mem_rd_sync")),
Id_Mem_Rd_Sync, 4, 2, 0);
Ctxt.M_Mem_Rd_Sync := Res;
Inputs (0 .. 3) := (0 => Create_Input ("iport"),
@@ -366,7 +362,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("mem_wr_sync"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("mem_wr_sync")),
Id_Mem_Wr_Sync, 5, 1, 0);
Ctxt.M_Mem_Wr_Sync := Res;
Inputs := (0 => Create_Input ("iport"),
@@ -379,7 +375,7 @@ package body Netlists.Builders is
Res := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("mem_multiport"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("mem_multiport")),
Id_Mem_Multiport, 2, 1, 0);
Ctxt.M_Mem_Multiport := Res;
Inputs (0 .. 1) := (0 => Create_Input ("i0"),
@@ -393,14 +389,14 @@ package body Netlists.Builders is
Inputs : Port_Desc_Array (0 .. 0);
begin
Ctxt.M_Posedge := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Posedge, No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Name_Posedge),
Id_Posedge, 1, 1, 0);
Inputs := (0 => Create_Input ("i", 1));
Outputs := (0 => Create_Output ("o", 1));
Set_Ports_Desc (Ctxt.M_Posedge, Inputs, Outputs);
Ctxt.M_Negedge := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Negedge, No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Name_Negedge),
Id_Negedge, 1, 1, 0);
Set_Ports_Desc (Ctxt.M_Negedge, Inputs, Outputs);
end Create_Edge_Module;
@@ -419,25 +415,25 @@ package body Netlists.Builders is
Ctxt.M_Mux2 := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("mux2"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("mux2")),
Id_Mux2, 3, 1, 0);
Set_Ports_Desc (Ctxt.M_Mux2, Inputs (0 .. 2), Outputs);
Inputs (0).W := 2;
Ctxt.M_Mux4 := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("mux4"), No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("mux4")),
Id_Mux4, 5, 1, 0);
Set_Ports_Desc (Ctxt.M_Mux4, Inputs (0 .. 4), Outputs);
Inputs (0).W := 0;
Inputs (1) := Create_Input ("def");
Ctxt.M_Pmux := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("pmux"), No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("pmux")),
Id_Pmux, 2, 1, 1);
Set_Ports_Desc (Ctxt.M_Pmux, Inputs (0 .. 1), Outputs);
Set_Params_Desc
(Ctxt.M_Pmux,
- (0 => (New_Sname_Artificial (Get_Identifier ("n"), No_Sname),
+ (0 => (New_Sname_Artificial (Get_Identifier ("n")),
Typ => Param_Uns32)));
end Create_Mux_Modules;
@@ -452,45 +448,45 @@ package body Netlists.Builders is
Outputs := (0 => Create_Output ("o"));
Ctxt.M_Output := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Output, No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Name_Output),
Id_Output, 1, 1, 0);
Set_Ports_Desc (Ctxt.M_Output, Inputs2 (0 .. 0), Outputs);
Ctxt.M_Ioutput := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("ioutput"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("ioutput")),
Id_Ioutput, 2, 1, 0);
Set_Ports_Desc (Ctxt.M_Ioutput, Inputs2, Outputs);
Ctxt.M_Signal := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Signal, No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Name_Signal),
Id_Signal, 1, 1, 0);
Set_Ports_Desc (Ctxt.M_Signal, Inputs2 (0 .. 0), Outputs);
Ctxt.M_Isignal := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("isignal"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("isignal")),
Id_Isignal, 2, 1, 0);
Set_Ports_Desc (Ctxt.M_Isignal, Inputs2, Outputs);
Ctxt.M_Port := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Port, No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Name_Port),
Id_Port, 1, 1, 0);
Set_Ports_Desc (Ctxt.M_Port, Inputs2 (0 .. 0), Outputs);
Ctxt.M_Nop := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("nop"), No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("nop")),
Id_Nop, 1, 1, 0);
Set_Ports_Desc (Ctxt.M_Nop, Inputs2 (0 .. 0), Outputs);
Ctxt.M_Enable := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("enable"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("enable")),
Id_Enable, 1, 1, 0);
Set_Ports_Desc (Ctxt.M_Enable, Inputs2 (0 .. 0), Outputs);
Ctxt.M_Inout := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Inout, No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Name_Inout),
Id_Inout, 1, 2, 0);
Outputs2 := (0 => Outputs (0),
1 => Create_Output ("oport"));
@@ -498,7 +494,7 @@ package body Netlists.Builders is
Ctxt.M_Iinout := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier("iinout"), No_Sname),
+ New_Sname_Artificial (Get_Identifier("iinout")),
Id_Iinout, 2, 2, 0);
Set_Ports_Desc (Ctxt.M_Iinout, Inputs2 (0 .. 1), Outputs2);
end Create_Objects_Module;
@@ -508,7 +504,7 @@ package body Netlists.Builders is
Outputs : Port_Desc_Array (0 .. 0);
begin
Ctxt.M_Dff := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("dff"), No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("dff")),
Id_Dff, 2, 1, 0);
Outputs := (0 => Create_Output ("q"));
Set_Ports_Desc (Ctxt.M_Dff, (0 => Create_Input ("clk", 1),
@@ -516,7 +512,7 @@ package body Netlists.Builders is
Outputs);
Ctxt.M_Idff := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("idff"), No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("idff")),
Id_Idff, 3, 1, 0);
Set_Ports_Desc (Ctxt.M_Idff, (0 => Create_Input ("clk", 1),
1 => Create_Input ("d"),
@@ -526,7 +522,7 @@ package body Netlists.Builders is
Ctxt.M_Adff := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("adff"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("adff")),
Id_Adff, 4, 1, 0);
Outputs := (0 => Create_Output ("q"));
Set_Ports_Desc (Ctxt.M_Adff, (0 => Create_Input ("clk", 1),
@@ -537,7 +533,7 @@ package body Netlists.Builders is
Ctxt.M_Iadff := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("iadff"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("iadff")),
Id_Iadff, 5, 1, 0);
Outputs := (0 => Create_Output ("q"));
Set_Ports_Desc (Ctxt.M_Iadff, (0 => Create_Input ("clk", 1),
@@ -548,7 +544,7 @@ package body Netlists.Builders is
Outputs);
Ctxt.M_Mdff := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("mdff"), No_Sname),
+ (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("mdff")),
Id_Mdff, 3, 1, 0);
Set_Ports_Desc (Ctxt.M_Mdff, (0 => Create_Input ("clk", 1),
1 => Create_Input ("d"),
@@ -557,7 +553,7 @@ package body Netlists.Builders is
Ctxt.M_Midff := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("midff"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("midff")),
Id_Midff, 4, 1, 0);
Set_Ports_Desc (Ctxt.M_Midff, (0 => Create_Input ("clk", 1),
1 => Create_Input ("d"),
@@ -572,7 +568,7 @@ package body Netlists.Builders is
begin
Ctxt.M_Dlatch := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("dlatch"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("dlatch")),
Id_Dlatch, 2, 1, 0);
Outputs := (0 => Create_Output ("q"));
Set_Ports_Desc (Ctxt.M_Dlatch, (0 => Create_Input ("d"),
@@ -585,26 +581,26 @@ package body Netlists.Builders is
Outputs : Port_Desc_Array (1 .. 0);
begin
Ctxt.M_Assert := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Assert, No_Sname), Id_Assert,
+ (Ctxt.Design, New_Sname_Artificial (Name_Assert), Id_Assert,
1, 0, 0);
Set_Ports_Desc (Ctxt.M_Assert, (0 => Create_Input ("cond", 1)),
Outputs);
Ctxt.M_Assume := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Assume, No_Sname), Id_Assume,
+ (Ctxt.Design, New_Sname_Artificial (Name_Assume), Id_Assume,
1, 0, 0);
Set_Ports_Desc (Ctxt.M_Assume, (0 => Create_Input ("cond", 1)),
Outputs);
Ctxt.M_Cover := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name_Cover, No_Sname), Id_Cover,
+ (Ctxt.Design, New_Sname_Artificial (Name_Cover), Id_Cover,
1, 0, 0);
Set_Ports_Desc (Ctxt.M_Cover, (0 => Create_Input ("cond", 1)),
Outputs);
Ctxt.M_Assert_Cover := New_User_Module
(Ctxt.Design,
- New_Sname_Artificial (Get_Identifier ("assert_cover"), No_Sname),
+ New_Sname_Artificial (Get_Identifier ("assert_cover")),
Id_Assert_Cover, 1, 0, 0);
Set_Ports_Desc (Ctxt.M_Assert_Cover, (0 => Create_Input ("cond", 1)),
Outputs);
@@ -617,7 +613,7 @@ package body Netlists.Builders is
Res : Module;
begin
Res := New_User_Module
- (Ctxt.Design, New_Sname_Artificial (Name, No_Sname), Id, 0, 1, 0);
+ (Ctxt.Design, New_Sname_Artificial (Name), Id, 0, 1, 0);
Ctxt.M_Formal_Input (Id) := Res;
Outputs := (0 => Create_Output ("o"));
Set_Ports_Desc (Res, Port_Desc_Array'(1 .. 0 => <>), Outputs);
@@ -629,9 +625,8 @@ package body Netlists.Builders is
Inputs : Port_Desc_Array (0 .. 1);
Res : Module;
begin
- Res := New_User_Module (Ctxt.Design,
- New_Sname_Artificial (Name_Tri, No_Sname),
- Id_Tri, 2, 1, 0);
+ Res := New_User_Module
+ (Ctxt.Design, New_Sname_Artificial (Name_Tri), Id_Tri, 2, 1, 0);
Ctxt.M_Tri := Res;
Outputs := (0 => Create_Output ("o"));
Inputs := (0 => Create_Input ("en"),
diff --git a/src/synth/netlists.adb b/src/synth/netlists.adb
index 3a5b0b3dd..a6df63d92 100644
--- a/src/synth/netlists.adb
+++ b/src/synth/netlists.adb
@@ -43,10 +43,10 @@ package body Netlists is
return Snames_Table.Last;
end New_Sname_User;
- function New_Sname_Artificial (Id : Name_Id; Prefix : Sname) return Sname is
+ function New_Sname_Artificial (Id : Name_Id) return Sname is
begin
Snames_Table.Append ((Kind => Sname_Artificial,
- Prefix => Prefix,
+ Prefix => No_Sname,
Suffix => Uns32 (Id)));
return Snames_Table.Last;
end New_Sname_Artificial;
@@ -1541,8 +1541,7 @@ begin
pragma Assert (Modules_Table.Last = No_Module);
Modules_Table.Append ((Parent => No_Module,
- Name => New_Sname_Artificial (Std_Names.Name_None,
- No_Sname),
+ Name => New_Sname_Artificial (Std_Names.Name_None),
Id => Id_Free,
First_Port_Desc => No_Port_Desc_Idx,
Nbr_Inputs => 0,
diff --git a/src/synth/netlists.ads b/src/synth/netlists.ads
index 5d2106608..02d895f06 100644
--- a/src/synth/netlists.ads
+++ b/src/synth/netlists.ads
@@ -55,7 +55,7 @@ package Netlists is
-- is no check that the name already exists, so these routines may create
-- a duplicate name. Callers must ensure they create uniq names.
function New_Sname_User (Id : Name_Id; Prefix : Sname) return Sname;
- function New_Sname_Artificial (Id : Name_Id; Prefix : Sname) return Sname;
+ function New_Sname_Artificial (Id : Name_Id) return Sname;
function New_Sname_Version (Ver : Uns32; Prefix : Sname) return Sname;
-- Read the content of an Sname.
diff --git a/src/synth/synthesis.adb b/src/synth/synthesis.adb
index 40c9e5d30..c29b44215 100644
--- a/src/synth/synthesis.adb
+++ b/src/synth/synthesis.adb
@@ -37,7 +37,7 @@ package body Synthesis is
Ctxt : Context_Acc;
begin
Top_Module :=
- New_Design (New_Sname_Artificial (Get_Identifier ("top"), No_Sname));
+ New_Design (New_Sname_Artificial (Get_Identifier ("top")));
Ctxt := Build_Builders (Top_Module);
Base := new Base_Instance_Type'(Builder => Ctxt,