diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-07-16 08:31:03 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-07-16 08:31:03 +0200 |
commit | ae7667c05858b9d7f6c1637a06497dfa138f635e (patch) | |
tree | f44915b0e2147190f5123056febe0ff429fbe347 /src/synth/elab-vhdl_values.ads | |
parent | 37d38f613b065b59b6d13aabaad3295861504296 (diff) | |
download | ghdl-ae7667c05858b9d7f6c1637a06497dfa138f635e.tar.gz ghdl-ae7667c05858b9d7f6c1637a06497dfa138f635e.tar.bz2 ghdl-ae7667c05858b9d7f6c1637a06497dfa138f635e.zip |
elab-vhdl_values: add Create_Value_Quantity
Diffstat (limited to 'src/synth/elab-vhdl_values.ads')
-rw-r--r-- | src/synth/elab-vhdl_values.ads | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/synth/elab-vhdl_values.ads b/src/synth/elab-vhdl_values.ads index b1aad9ce1..0ffdf2381 100644 --- a/src/synth/elab-vhdl_values.ads +++ b/src/synth/elab-vhdl_values.ads @@ -48,6 +48,7 @@ package Elab.Vhdl_Values is Value_Memory, Value_File, + Value_Quantity, -- A constant. This is a named value. One purpose is to avoid to -- create many times the same net for the same value. @@ -73,6 +74,9 @@ package Elab.Vhdl_Values is type Signal_Index_Type is new Uns32; No_Signal_Index : constant Signal_Index_Type := 0; + type Quantity_Index_Type is new Uns32; + No_Quantity_Index : constant Quantity_Index_Type := 0; + type Value_Type (Kind : Value_Kind) is record case Kind is when Value_Net @@ -85,6 +89,8 @@ package Elab.Vhdl_Values is Mem : Memory_Ptr; when Value_File => File : File_Index; + when Value_Quantity => + Q : Quantity_Index_Type; when Value_Const => C_Val : Value_Acc; C_Loc : Node; @@ -148,6 +154,9 @@ package Elab.Vhdl_Values is function Create_Value_File (Vtype : Type_Acc; File : File_Index) return Valtyp; + function Create_Value_Quantity (Vtype : Type_Acc; Q : Quantity_Index_Type) + return Valtyp; + function Create_Value_Alias (Obj : Valtyp; Off : Value_Offsets; Typ : Type_Acc) return Valtyp; |