diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-09 21:24:04 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-09 21:24:36 +0200 |
commit | 32a60efc00452a5eb037f5d1f5dabb687c170c99 (patch) | |
tree | f38b3337d35da9479255e5a7e97934eb1ff2731a /src/synth/synth-values-debug.adb | |
parent | db918fedf1af6da741bb6dd280719cb0f139b583 (diff) | |
download | ghdl-32a60efc00452a5eb037f5d1f5dabb687c170c99.tar.gz ghdl-32a60efc00452a5eb037f5d1f5dabb687c170c99.tar.bz2 ghdl-32a60efc00452a5eb037f5d1f5dabb687c170c99.zip |
synth: refactoring to store static values in wires.
Diffstat (limited to 'src/synth/synth-values-debug.adb')
-rw-r--r-- | src/synth/synth-values-debug.adb | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/synth/synth-values-debug.adb b/src/synth/synth-values-debug.adb index dfea20a98..282082cda 100644 --- a/src/synth/synth-values-debug.adb +++ b/src/synth/synth-values-debug.adb @@ -40,44 +40,45 @@ package body Synth.Values.Debug is Put (']'); end Debug_Bound; - procedure Debug_Memtyp (M : Memory_Ptr; Typ : Type_Acc) is + procedure Debug_Memtyp (M : Memtyp) is begin - case Typ.Kind is + case M.Typ.Kind is when Type_Vector => Put ("vector ("); - Debug_Bound (Typ.Vbound); + Debug_Bound (M.Typ.Vbound); Put ("): "); - for I in 1 .. Typ.Vbound.Len loop - Put_Uns32 (Uns32 (Read_U8 (M + Size_Type (I - 1)))); + for I in 1 .. M.Typ.Vbound.Len loop + Put_Uns32 (Uns32 (Read_U8 (M.Mem + Size_Type (I - 1)))); end loop; when Type_Array => Put ("arr ("); - for I in 1 .. Typ.Abounds.Ndim loop + for I in 1 .. M.Typ.Abounds.Ndim loop if I > 1 then Put (", "); end if; - Debug_Bound (Typ.Abounds.D (I)); + Debug_Bound (M.Typ.Abounds.D (I)); end loop; Put ("): "); - for I in 1 .. Get_Array_Flat_Length (Typ) loop + for I in 1 .. Get_Array_Flat_Length (M.Typ) loop if I > 1 then Put (", "); end if; Debug_Memtyp - (M + Size_Type (I - 1) * Typ.Arr_El.Sz, Typ.Arr_El); + ((M.Typ.Arr_El, M.Mem + Size_Type (I - 1) * M.Typ.Arr_El.Sz)); end loop; when Type_Record => Put ("rec: ("); - for I in Typ.Rec.E'Range loop + for I in M.Typ.Rec.E'Range loop if I > 1 then Put (", "); end if; - Debug_Memtyp (M + Typ.Rec.E (I).Moff, Typ.Rec.E (I).Typ); + Debug_Memtyp + ((M.Typ.Rec.E (I).Typ, M.Mem + M.Typ.Rec.E (I).Moff)); end loop; Put (")"); when Type_Discrete => Put ("discrete: "); - Put_Int64 (Read_Discrete (M, Typ)); + Put_Int64 (Read_Discrete (M)); when others => Put ("others"); end case; @@ -86,7 +87,7 @@ package body Synth.Values.Debug is procedure Debug_Valtyp (V : Valtyp) is begin - Debug_Memtyp (V.Val.Mem, V.Typ); + Debug_Memtyp (Get_Memtyp (V)); end Debug_Valtyp; end Synth.Values.Debug; |