diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-09-15 06:31:30 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-09-15 06:31:30 +0200 |
commit | 7376ea33d44f4ba2318582888f53bfb069f72bed (patch) | |
tree | 91d5de2a621f926ba024a5f783e4d888929c9a10 /src/synth/netlists-builders.ads | |
parent | 1ff70cdd479751f646b7da61287bc15859563fe0 (diff) | |
download | ghdl-7376ea33d44f4ba2318582888f53bfb069f72bed.tar.gz ghdl-7376ea33d44f4ba2318582888f53bfb069f72bed.tar.bz2 ghdl-7376ea33d44f4ba2318582888f53bfb069f72bed.zip |
synth: add build2_const_vec
Diffstat (limited to 'src/synth/netlists-builders.ads')
-rw-r--r-- | src/synth/netlists-builders.ads | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/synth/netlists-builders.ads b/src/synth/netlists-builders.ads index 1493ed194..7cf9a3058 100644 --- a/src/synth/netlists-builders.ads +++ b/src/synth/netlists-builders.ads @@ -18,12 +18,18 @@ -- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -- MA 02110-1301, USA. +with Ada.Unchecked_Deallocation; with Netlists.Gates; use Netlists.Gates; package Netlists.Builders is type Context is private; type Context_Acc is access Context; + type Uns32_Arr is array (Natural range <>) of Uns32; + type Uns32_Arr_Acc is access Uns32_Arr; + procedure Unchecked_Deallocate is new Ada.Unchecked_Deallocation + (Uns32_Arr, Uns32_Arr_Acc); + function New_Internal_Name (Ctxt : Context_Acc; Prefix : Sname := No_Sname) return Sname; @@ -78,6 +84,9 @@ package Netlists.Builders is function Build2_Const_Int (Ctxt : Context_Acc; Val : Int64; W : Width) return Net; + function Build2_Const_Vec (Ctxt : Context_Acc; W : Width; V : Uns32_Arr) + return Net; + -- Large constants. -- Bit means only 0 or 1. -- Log means 0/1/Z/X. Parameters 2N are aval, 2N+1 are bval. |