diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | src/synth/ghdlsynth_gates.h | 10 | ||||
-rw-r--r-- | src/synth/netlists.ads | 9 |
3 files changed, 22 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 3052aec2c..d692ce123 100644 --- a/Makefile.in +++ b/Makefile.in @@ -411,6 +411,10 @@ $(srcdir)/src/synth/ghdlsynth_gates.h: $(srcdir)/src/synth/netlists.ads $(srcdir echo "enum Module_Id {" >> $@ grep -h "constant Module_Id :=" $^ | sed -e '/constant Module_Id :=/s/:.*://' -e 's/;/,/' -e 's/ *--.*//' >> $@ echo "};" >> $@ + echo "" >> $@ + echo "enum Param_Type {" >> $@ + grep ' Param_' $(srcdir)/src/synth/netlists.ads >> $@ + echo "};" >> $@ all.libghdl.true: $(libghdl_name) all.libghdl.false: 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, |