From 157761d65a3ce403cc82b5332b1cbe66a858dbe5 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 22 May 2020 08:10:35 +0200 Subject: netlists: add param_pval_boolean. --- src/synth/ghdlsynth_gates.h | 3 ++- src/synth/netlists-dump.adb | 11 +++++++---- src/synth/netlists.ads | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/synth/ghdlsynth_gates.h b/src/synth/ghdlsynth_gates.h index 5b6fdad49..951b9dc2b 100644 --- a/src/synth/ghdlsynth_gates.h +++ b/src/synth/ghdlsynth_gates.h @@ -118,5 +118,6 @@ enum Param_Type { Param_Pval_String, Param_Pval_Integer, Param_Pval_Real, - Param_Pval_Time_Ps + Param_Pval_Time_Ps, + Param_Pval_Boolean }; diff --git a/src/synth/netlists-dump.adb b/src/synth/netlists-dump.adb index c36b4a171..7bde0be81 100644 --- a/src/synth/netlists-dump.adb +++ b/src/synth/netlists-dump.adb @@ -125,10 +125,11 @@ package body Netlists.Dump is when Param_Uns32 => Put_Uns32 (Get_Param_Uns32 (Inst, Idx)); when Param_Pval_Vector - | Param_Pval_String - | Param_Pval_Integer - | Param_Pval_Real - | Param_Pval_Time_Ps => + | Param_Pval_String + | Param_Pval_Integer + | Param_Pval_Real + | Param_Pval_Time_Ps + | Param_Pval_Boolean => Put ("generic"); end case; end Dump_Parameter; @@ -272,6 +273,8 @@ package body Netlists.Dump is Put ("pval.real"); when Param_Pval_Time_Ps => Put ("pval.time.ps"); + when Param_Pval_Boolean => + Put ("pval.boolean"); end case; New_Line; end loop; diff --git a/src/synth/netlists.ads b/src/synth/netlists.ads index 8ac063a3f..703275eef 100644 --- a/src/synth/netlists.ads +++ b/src/synth/netlists.ads @@ -184,17 +184,17 @@ package Netlists is -- 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, Param_Pval_Real, - Param_Pval_Time_Ps + Param_Pval_Time_Ps, + Param_Pval_Boolean ); pragma Convention (C, Param_Type); subtype Param_Types_Pval is - Param_Type range Param_Pval_Vector .. Param_Pval_Time_Ps; + Param_Type range Param_Pval_Vector .. Param_Pval_Boolean; type Param_Desc is record -- Name of the parameter -- cgit v1.2.3