aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-vhdl_stmts.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-12 18:20:22 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-12 18:20:22 +0200
commit430e459ef46bb9cbc22f00f5904895494f45021d (patch)
tree71e2bc83add287b7aa430234fe3f220a88daed45 /src/synth/synth-vhdl_stmts.ads
parentea2327b6840eb675801eda0c4ff0770a15d2b6e0 (diff)
downloadghdl-430e459ef46bb9cbc22f00f5904895494f45021d.tar.gz
ghdl-430e459ef46bb9cbc22f00f5904895494f45021d.tar.bz2
ghdl-430e459ef46bb9cbc22f00f5904895494f45021d.zip
synth-vhdl_stmts: export synth_target
Diffstat (limited to 'src/synth/synth-vhdl_stmts.ads')
-rw-r--r--src/synth/synth-vhdl_stmts.ads39
1 files changed, 39 insertions, 0 deletions
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