aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-builders.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-02 20:50:54 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-02 20:50:54 +0200
commit5326b13651c2588c76e87a0b3086d2ab0d6fb0d0 (patch)
treeaf18035e12ded0aca7f855b94902f7d68c5c049a /src/synth/netlists-builders.adb
parent5610cd1aae1c88d4beec14b2beaf10040d678696 (diff)
downloadghdl-5326b13651c2588c76e87a0b3086d2ab0d6fb0d0.tar.gz
ghdl-5326b13651c2588c76e87a0b3086d2ab0d6fb0d0.tar.bz2
ghdl-5326b13651c2588c76e87a0b3086d2ab0d6fb0d0.zip
synth: simplify id_dyn_extract.
Diffstat (limited to 'src/synth/netlists-builders.adb')
-rw-r--r--src/synth/netlists-builders.adb12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/synth/netlists-builders.adb b/src/synth/netlists-builders.adb
index f27d82723..86d940379 100644
--- a/src/synth/netlists-builders.adb
+++ b/src/synth/netlists-builders.adb
@@ -215,16 +215,14 @@ package body Netlists.Builders is
begin
Res := New_User_Module
(Ctxt.Design, New_Sname_Artificial (Get_Identifier ("dyn_extract")),
- Id_Dyn_Extract, 2, 1, 2);
+ Id_Dyn_Extract, 2, 1, 1);
Ctxt.M_Dyn_Extract := Res;
Outputs := (0 => Create_Output ("o"));
Inputs := (0 => Create_Input ("i"),
1 => Create_Input ("v"));
Set_Port_Desc (Res, Inputs, Outputs);
Set_Param_Desc
- (Res, (0 => (New_Sname_Artificial (Get_Identifier ("step")),
- Typ => Param_Uns32),
- 1 => (New_Sname_Artificial (Get_Identifier ("offset")),
+ (Res, (0 => (New_Sname_Artificial (Get_Identifier ("offset")),
Typ => Param_Uns32)));
end Create_Dyn_Extract_Module;
@@ -1191,8 +1189,7 @@ package body Netlists.Builders is
end Build2_Extract;
function Build_Dyn_Extract
- (Ctxt : Context_Acc;
- I : Net; P : Net; Step : Uns32; Off : Uns32; W : Width) return Net
+ (Ctxt : Context_Acc; I : Net; P : Net; Off : Uns32; W : Width) return Net
is
Wd : constant Width := Get_Width (I);
pragma Assert (Wd /= No_Width);
@@ -1205,8 +1202,7 @@ package body Netlists.Builders is
Set_Width (O, W);
Connect (Get_Input (Inst, 0), I);
Connect (Get_Input (Inst, 1), P);
- Set_Param_Uns32 (Inst, 0, Step);
- Set_Param_Uns32 (Inst, 1, Off);
+ Set_Param_Uns32 (Inst, 0, Off);
return O;
end Build_Dyn_Extract;