diff options
| author | Christos Gentsos <christos.gentsos@cern.ch> | 2019-06-05 15:15:23 +0200 |
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2019-06-06 18:47:05 +0200 |
| commit | 2c72cffb32c5bfc081c4a182654f2c46bb288db6 (patch) | |
| tree | 65ef32780d6253aea67dde8cc425269645a0d9e8 /src/synth/synth-expr.adb | |
| parent | 5bafb1b3aaf6edebb5308a9c361844b4d4438b6a (diff) | |
| download | ghdl-2c72cffb32c5bfc081c4a182654f2c46bb288db6.tar.gz ghdl-2c72cffb32c5bfc081c4a182654f2c46bb288db6.tar.bz2 ghdl-2c72cffb32c5bfc081c4a182654f2c46bb288db6.zip | |
synth: handle numeric_std subtraction (addition was already there)
Diffstat (limited to 'src/synth/synth-expr.adb')
| -rw-r--r-- | src/synth/synth-expr.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index d13fc6cfc..d8645eeaf 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -479,6 +479,17 @@ package body Synth.Expr is Synth_Uresize (Right, Get_Width (Left))), Create_Res_Range (Left, L)); end; + when Iir_Predefined_Ieee_Numeric_Std_Sub_Uns_Nat => + -- "-" (Unsigned, Natural) + declare + L : constant Net := Get_Net (Left); + begin + return Create_Value_Net + (Build_Dyadic (Build_Context, Id_Sub, + L, + Synth_Uresize (Right, Get_Width (Left))), + Create_Res_Range (Left, L)); + end; when Iir_Predefined_Ieee_Numeric_Std_Eq_Uns_Nat => -- "=" (Unsigned, Natural) return Create_Value_Net |
