diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-05-12 18:20:22 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-05-12 18:20:22 +0200 |
commit | 430e459ef46bb9cbc22f00f5904895494f45021d (patch) | |
tree | 71e2bc83add287b7aa430234fe3f220a88daed45 /src | |
parent | ea2327b6840eb675801eda0c4ff0770a15d2b6e0 (diff) | |
download | ghdl-430e459ef46bb9cbc22f00f5904895494f45021d.tar.gz ghdl-430e459ef46bb9cbc22f00f5904895494f45021d.tar.bz2 ghdl-430e459ef46bb9cbc22f00f5904895494f45021d.zip |
synth-vhdl_stmts: export synth_target
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 35 | ||||
-rw-r--r-- | src/synth/synth-vhdl_stmts.ads | 39 |
2 files changed, 39 insertions, 35 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 906668027..3e09c3318 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -261,41 +261,6 @@ package body Synth.Vhdl_Stmts is end case; end Synth_Assignment_Prefix; - type Target_Kind is - ( - -- The target is an object or a static part of it. - Target_Simple, - - -- The target is an aggregate. - Target_Aggregate, - - -- The assignment is dynamically indexed. - Target_Memory - ); - - type Target_Info (Kind : Target_Kind := Target_Simple) is record - -- In all cases, the type of the target is known or computed. - Targ_Type : Type_Acc; - - case Kind is - when Target_Simple => - -- For a simple target, the destination is known. - Obj : Valtyp; - Off : Value_Offsets; - when Target_Aggregate => - -- For an aggregate: the type is computed and the details will - -- be handled at the assignment. - Aggr : Node; - when Target_Memory => - -- For a memory: the destination is known. - Mem_Obj : Valtyp; - -- The dynamic offset. - Mem_Dyn : Dyn_Name; - -- Offset of the data to be accessed from the memory. - Mem_Doff : Uns32; - end case; - end record; - type Target_Info_Array is array (Natural range <>) of Target_Info; function Synth_Aggregate_Target_Type (Syn_Inst : Synth_Instance_Acc; diff --git a/src/synth/synth-vhdl_stmts.ads b/src/synth/synth-vhdl_stmts.ads index b590b8ead..96c7d8c6c 100644 --- a/src/synth/synth-vhdl_stmts.ads +++ b/src/synth/synth-vhdl_stmts.ads @@ -110,6 +110,45 @@ package Synth.Vhdl_Stmts is -- Return the statements chain to be executed. function Execute_Static_Case_Statement (Inst : Synth_Instance_Acc; Stmt : Node; Sel : Valtyp) return Node; + + type Target_Kind is + ( + -- The target is an object or a static part of it. + Target_Simple, + + -- The target is an aggregate. + Target_Aggregate, + + -- The assignment is dynamically indexed. + Target_Memory + ); + + type Target_Info (Kind : Target_Kind := Target_Simple) is record + -- In all cases, the type of the target is known or computed. + Targ_Type : Type_Acc; + + case Kind is + when Target_Simple => + -- For a simple target, the destination is known. + Obj : Valtyp; + Off : Value_Offsets; + when Target_Aggregate => + -- For an aggregate: the type is computed and the details will + -- be handled at the assignment. + Aggr : Node; + when Target_Memory => + -- For a memory: the destination is known. + Mem_Obj : Valtyp; + -- The dynamic offset. + Mem_Dyn : Dyn_Name; + -- Offset of the data to be accessed from the memory. + Mem_Doff : Uns32; + end case; + end record; + + function Synth_Target (Syn_Inst : Synth_Instance_Acc; + Target : Node) return Target_Info; + private -- There are 2 execution mode: -- * static: it is like simulation, all the inputs are known, neither |