From 86eb7790e833d2c93834901dcdf01aa89141c44c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 31 Mar 2020 18:23:32 +0200 Subject: Makefile: Generate Param_Pval_* in ghdlsynth_gates.h --- src/synth/ghdlsynth_gates.h | 10 ++++++++++ src/synth/netlists.ads | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/synth/ghdlsynth_gates.h b/src/synth/ghdlsynth_gates.h index e22aa4713..fd45445a2 100644 --- a/src/synth/ghdlsynth_gates.h +++ b/src/synth/ghdlsynth_gates.h @@ -101,3 +101,13 @@ enum Module_Id { Id_Const_Bit = 120, Id_Const_Log = 121, }; + +enum Param_Type { + Param_Invalid, + Param_Uns32, + Param_Pval_Vector, + Param_Pval_String, + Param_Pval_Integer, + Param_Pval_Real, + Param_Pval_Time_Ps +}; diff --git a/src/synth/netlists.ads b/src/synth/netlists.ads index 23f369596..c478cd961 100644 --- a/src/synth/netlists.ads +++ b/src/synth/netlists.ads @@ -169,14 +169,21 @@ package Netlists is subtype Param_Nbr is Param_Idx range 0 .. Param_Idx'Last - 1; + -- Type of a parameter. As this is defined in a module, this is valid for + -- all instances. + -- NOTE: the corresponding C enum is built from this type using the + -- 'Param_' prefix and indentation. type Param_Type is - (Param_Invalid, + ( + Param_Invalid, -- An unsigned 32 bit value. Param_Uns32, -- A Generic value (with a hint of the type). This is a bit/logic -- vector. + -- TODO: Replace Integer with Signed/Unsigned. + -- TODO: Add boolean. Param_Pval_Vector, Param_Pval_String, Param_Pval_Integer, -- cgit v1.2.3