aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-expr.adb11
-rw-r--r--src/synth/synth-expr.ads2
-rw-r--r--src/synth/synth-oper.adb4
3 files changed, 2 insertions, 15 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 03bb1e3e0..9ec249193 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -44,17 +44,6 @@ package body Synth.Expr is
function Synth_Name (Syn_Inst : Synth_Instance_Acc; Name : Node)
return Value_Acc;
- function Get_Width (Val : Value_Acc) return Uns32 is
- begin
- case Val.Kind is
- when Value_Wire
- | Value_Net =>
- return Get_Width (Get_Net (Val));
- when others =>
- raise Internal_Error; -- TODO
- end case;
- end Get_Width;
-
procedure Set_Location2 (N : Net; Loc : Node) is
begin
Set_Location (Get_Net_Parent (N), Get_Location (Loc));
diff --git a/src/synth/synth-expr.ads b/src/synth/synth-expr.ads
index adcf96885..835da87ab 100644
--- a/src/synth/synth-expr.ads
+++ b/src/synth/synth-expr.ads
@@ -29,8 +29,6 @@ with Synth.Context; use Synth.Context;
with Vhdl.Nodes; use Vhdl.Nodes;
package Synth.Expr is
- function Get_Width (Val : Value_Acc) return Uns32;
-
procedure Set_Location (N : Net; Loc : Node);
pragma Inline (Set_Location);
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb
index 7bd75e2b6..59f20ea5a 100644
--- a/src/synth/synth-oper.adb
+++ b/src/synth/synth-oper.adb
@@ -230,7 +230,7 @@ package body Synth.Oper is
is
N : Net;
begin
- N := Synth_Uresize (Right, Get_Width (Left), Expr);
+ N := Synth_Uresize (Right, Left.Typ.W, Expr);
N := Build_Compare (Build_Context, Id, Get_Net (Left), N);
Set_Location (N, Expr);
return Create_Value_Net (N, Boolean_Type);
@@ -323,7 +323,7 @@ package body Synth.Oper is
R1 : Net;
N : Net;
begin
- R1 := Synth_Uresize (Right, Get_Width (Left), Expr);
+ R1 := Synth_Uresize (Right, Left.Typ.W, Expr);
N := Build_Dyadic (Build_Context, Id, L, R1);
Set_Location (N, Expr);
return Create_Value_Net (N, Create_Res_Bound (Left, L));