diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-25 08:16:24 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-25 20:57:31 +0100 |
commit | c92813bb456ffc4d7cadee441397d22742f89fc6 (patch) | |
tree | 5725b1aefbae5dbafbf83180fb0049fa3b85b736 /src/vhdl/vhdl-evaluation.ads | |
parent | f89f72892acd07f4e161cf87370159f67836e212 (diff) | |
download | ghdl-c92813bb456ffc4d7cadee441397d22742f89fc6.tar.gz ghdl-c92813bb456ffc4d7cadee441397d22742f89fc6.tar.bz2 ghdl-c92813bb456ffc4d7cadee441397d22742f89fc6.zip |
vhdl: improve range checks, fix #2323
Diffstat (limited to 'src/vhdl/vhdl-evaluation.ads')
-rw-r--r-- | src/vhdl/vhdl-evaluation.ads | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-evaluation.ads b/src/vhdl/vhdl-evaluation.ads index ffeaa04c5..aa4fcc4c7 100644 --- a/src/vhdl/vhdl-evaluation.ads +++ b/src/vhdl/vhdl-evaluation.ads @@ -102,6 +102,15 @@ package Vhdl.Evaluation is -- Return a locally static range expression with the origin set for ARANGE. function Eval_Range (Arange : Iir) return Iir; + -- Check that static range INNER is compatible (ie inside) with static + -- range OUTER. + -- Both INNER and OUTER must be ranges (ie range expression or attribute). + procedure Check_Range_Compatibility (Inner : Iir; Outer : Iir); + + -- Check that static discrete range INNER is compatible with static + -- discrete range OUTER. + procedure Check_Discrete_Range_Compatibility (Inner : Iir; Outer : Iir); + -- If ARANGE is a locally static range, return locally static range -- expression (with the origin set), else return ARANGE. function Eval_Range_If_Static (Arange : Iir) return Iir; |