aboutsummaryrefslogtreecommitdiffstats
path: root/src/simul/simul-vhdl_simul.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-30 06:53:59 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-30 06:53:59 +0200
commitfe092cdc810cc559ed484f480d2072c43513a04a (patch)
tree7e5b9067e46e6d6f40fb64601b44527cb640de17 /src/simul/simul-vhdl_simul.adb
parent3e23191c0ec808b588b11989b75985dc4ba1cfb1 (diff)
downloadghdl-fe092cdc810cc559ed484f480d2072c43513a04a.tar.gz
ghdl-fe092cdc810cc559ed484f480d2072c43513a04a.tar.bz2
ghdl-fe092cdc810cc559ed484f480d2072c43513a04a.zip
synth: factorize code
Diffstat (limited to 'src/simul/simul-vhdl_simul.adb')
-rw-r--r--src/simul/simul-vhdl_simul.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/simul/simul-vhdl_simul.adb b/src/simul/simul-vhdl_simul.adb
index 3eb3d2eed..0a07fc08b 100644
--- a/src/simul/simul-vhdl_simul.adb
+++ b/src/simul/simul-vhdl_simul.adb
@@ -1034,6 +1034,14 @@ package body Simul.Vhdl_Simul is
Ch := Synth_Expression (Inst, Get_Choice_Expression (Sw));
Eq := Is_Equal (Sel, Get_Memtyp (Ch));
end;
+ when Iir_Kind_Choice_By_Range =>
+ declare
+ Bnd : Discrete_Range_Type;
+ begin
+ Elab.Vhdl_Types.Synth_Discrete_Range
+ (Inst, Get_Choice_Range (Sw), Bnd);
+ Eq := In_Range (Bnd, Read_Discrete (Sel));
+ end;
when Iir_Kind_Choice_By_Others =>
Eq := True;
when others =>