aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-vcd.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-06-16 21:13:28 +0200
committerTristan Gingold <tgingold@free.fr>2016-06-17 20:21:32 +0200
commit9f5bd757977aeb0f90466decc3b27f159ca612a4 (patch)
tree3bed462ba1d4e84d693026b06dd6a25712266ee1 /src/grt/grt-vcd.ads
parent1e75c3ba423254a85eb990f235d429b30978424a (diff)
downloadghdl-9f5bd757977aeb0f90466decc3b27f159ca612a4.tar.gz
ghdl-9f5bd757977aeb0f90466decc3b27f159ca612a4.tar.bz2
ghdl-9f5bd757977aeb0f90466decc3b27f159ca612a4.zip
fst: dump enumerations.
Diffstat (limited to 'src/grt/grt-vcd.ads')
-rw-r--r--src/grt/grt-vcd.ads51
1 files changed, 41 insertions, 10 deletions
diff --git a/src/grt/grt-vcd.ads b/src/grt/grt-vcd.ads
index bc7917cba..c2755d253 100644
--- a/src/grt/grt-vcd.ads
+++ b/src/grt/grt-vcd.ads
@@ -25,6 +25,7 @@
with Grt.Types; use Grt.Types;
with Grt.Avhpi; use Grt.Avhpi;
+with Grt.Rtis;
with Grt.Signals;
package Grt.Vcd is
@@ -37,23 +38,53 @@ package Grt.Vcd is
Vcd_Putc : Vcd_Putc_Acc;
Vcd_Close : Vcd_Close_Acc;
- type Vcd_Var_Kind is (Vcd_Bad,
- Vcd_Bool,
- Vcd_Integer32,
- Vcd_Float64,
- Vcd_Bit, Vcd_Stdlogic,
- Vcd_Bitvector, Vcd_Stdlogic_Vector);
+ -- VCD type of an object
+ type Vcd_Var_Kind is
+ (
+ -- Incompatible vcd type
+ Vcd_Bad,
+
+ -- A user-defined enumerated type (other than bit or boolean)
+ Vcd_Enum8,
+
+ -- Boolean
+ Vcd_Bool,
+
+ -- 32bit integer
+ Vcd_Integer32,
+
+ -- 64bit float
+ Vcd_Float64,
+
+ -- A bit type
+ Vcd_Bit, Vcd_Stdlogic,
+
+ -- A bit vector type
+ Vcd_Bitvector, Vcd_Stdlogic_Vector
+ );
+
+ subtype Vcd_Var_Vectors is Vcd_Var_Kind
+ range Vcd_Bitvector .. Vcd_Stdlogic_Vector;
-- Which value to be displayed: effective or driving (for out signals).
type Vcd_Value_Kind is (Vcd_Effective, Vcd_Driving);
- type Verilog_Wire_Info is record
+ type Verilog_Wire_Info (Kind : Vcd_Var_Kind := Vcd_Bad) is record
+ Val : Vcd_Value_Kind;
+
-- Access to an array of signals.
Sigs : Grt.Signals.Signal_Arr_Ptr;
- Irange : Ghdl_Range_Ptr;
- Kind : Vcd_Var_Kind;
- Val : Vcd_Value_Kind;
+ case Kind is
+ when Vcd_Var_Vectors =>
+ -- Vector bounds.
+ Irange : Ghdl_Range_Ptr;
+ when Vcd_Enum8 =>
+ -- Base type.
+ Rti : Rtis.Ghdl_Rti_Access;
+ when others =>
+ null;
+ end case;
end record;
procedure Get_Verilog_Wire (Sig : VhpiHandleT;