aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-types.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-types.adb')
-rw-r--r--src/synth/synth-types.adb37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/synth/synth-types.adb b/src/synth/synth-types.adb
index cbccbb628..df1712ac2 100644
--- a/src/synth/synth-types.adb
+++ b/src/synth/synth-types.adb
@@ -18,8 +18,6 @@
-- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-- MA 02110-1301, USA.
-with Types; use Types;
-with Mutils; use Mutils;
with Vhdl.Std_Package;
with Vhdl.Ieee.Std_Logic_1164;
with Vhdl.Utils; use Vhdl.Utils;
@@ -49,39 +47,4 @@ package body Synth.Types is
return Is_Bit_Type (Get_Element_Subtype (Atype))
and then Get_Nbr_Dimensions (Atype) = 1;
end Is_Vector_Type;
-
- function Get_Range_Width (Rng : Value_Range_Type) return Width
- is
- Low : Int64;
- High : Int64;
- begin
- case Rng.Dir is
- when Iir_To =>
- Low := Rng.Left;
- High := Rng.Right;
- when Iir_Downto =>
- Low := Rng.Right;
- High := Rng.Left;
- end case;
- if Low > High then
- return 0;
- end if;
-
- if Low >= 0 then
- -- Positive.
- return Width (Clog2 (Uns64 (High)));
- elsif High < 0 then
- -- Negative only.
- -- FIXME: overflow.
- return Width (Clog2 (Uns64 (-Low))) + 1;
- else
- declare
- -- FIXME: overflow.
- L : constant Width := Width (Clog2 (Uns64 (-Low)));
- H : constant Width := Width (Clog2 (Uns64 (-High)));
- begin
- return Width'Max (L, H) + 1;
- end;
- end if;
- end Get_Range_Width;
end Synth.Types;