diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-10 07:53:14 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-11 20:29:00 +0100 |
commit | 45032759fc845dddd2a150c13cb714927cdf98f4 (patch) | |
tree | e27f12afa485bd7d2a9fbb6bcbfa0ec69329118c /src/synth/netlists-folds.ads | |
parent | 0984b848d16a9445b019363cfe4be82d123e4e20 (diff) | |
download | ghdl-45032759fc845dddd2a150c13cb714927cdf98f4.tar.gz ghdl-45032759fc845dddd2a150c13cb714927cdf98f4.tar.bz2 ghdl-45032759fc845dddd2a150c13cb714927cdf98f4.zip |
netlists: optimize trunc.
Diffstat (limited to 'src/synth/netlists-folds.ads')
-rw-r--r-- | src/synth/netlists-folds.ads | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/synth/netlists-folds.ads b/src/synth/netlists-folds.ads index 22ab60949..c789037b8 100644 --- a/src/synth/netlists-folds.ads +++ b/src/synth/netlists-folds.ads @@ -36,6 +36,14 @@ package Netlists.Folds is -- ELS(L) will be at offset 0. function Build2_Concat (Ctxt : Context_Acc; Els : Net_Array) return Net; + -- Truncate I to width W. Merge if the input is an extend. + function Build2_Trunc (Ctxt : Context_Acc; + Id : Module_Id; + I : Net; + W : Width; + Loc : Location_Type) + return Net; + -- Zero extend, noop or truncate I so that its width is W. function Build2_Uresize (Ctxt : Context_Acc; I : Net; |