diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-18 18:05:14 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-18 18:05:14 +0200 |
commit | e1ef6a6dee1c5b140022f191306931a40ff57cd6 (patch) | |
tree | d996a001a2780a9d0ec3278415b310e7ff3f42d2 /src/synth/netlists.ads | |
parent | 0f5343eaf219d8901375c1b92e9bdd35bb12947e (diff) | |
download | ghdl-e1ef6a6dee1c5b140022f191306931a40ff57cd6.tar.gz ghdl-e1ef6a6dee1c5b140022f191306931a40ff57cd6.tar.bz2 ghdl-e1ef6a6dee1c5b140022f191306931a40ff57cd6.zip |
netlists: add more flags in Module_Record.
Diffstat (limited to 'src/synth/netlists.ads')
-rw-r--r-- | src/synth/netlists.ads | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/src/synth/netlists.ads b/src/synth/netlists.ads index c478cd961..2801b8fb0 100644 --- a/src/synth/netlists.ads +++ b/src/synth/netlists.ads @@ -342,7 +342,7 @@ private for Sname_Record'Size use 2*32; pragma Warnings (On, "*convention*"); - type Module is new Uns32; + type Module is mod 2**30; No_Module : constant Module := 0; Free_Module : constant Module := 1; @@ -361,18 +361,18 @@ private No_Net : constant Net := 0; type Module_Record is record - Parent : Module; - Name : Sname; - Id : Module_Id; - First_Port_Desc : Port_Desc_Idx; - Nbr_Inputs : Port_Nbr; - Nbr_Outputs : Port_Nbr; + Parent : Module; + Name : Sname; + Id : Module_Id; + First_Port_Desc : Port_Desc_Idx; + Nbr_Inputs : Port_Nbr; + Nbr_Outputs : Port_Nbr; First_Param_Desc : Param_Desc_Idx; - Nbr_Params : Param_Nbr; + Nbr_Params : Param_Nbr; -- First sub-module child. First_Sub_Module : Module; - Last_Sub_Module : Module; + Last_Sub_Module : Module; -- Sub-module brother. Next_Sub_Module : Module; @@ -381,7 +381,7 @@ private -- The self instance is the first instance. -- FIXME: use an array instead ? First_Instance : Instance; - Last_Instance : Instance; + Last_Instance : Instance; end record; function Get_First_Port_Desc (M : Module) return Port_Desc_Idx; @@ -396,19 +396,24 @@ private type Instance_Record is record -- The instance is instantiated in Parent. Parent : Module; + Flag3 : Boolean; + Flag4 : Boolean; -- Instances are in a doubly-linked list. Prev_Instance : Instance; Next_Instance : Instance; -- For a self-instance, Klass is equal to Parent, and Name is No_Sname. - Klass : Module; - Name : Sname; + Klass : Module; + Flag5 : Boolean; + Flag6 : Boolean; + + Name : Sname; Flag_Mark : Boolean; - Flag2 : Boolean; + Flag2 : Boolean; - First_Param : Param_Idx; - First_Input : Input; + First_Param : Param_Idx; + First_Input : Input; First_Output : Net; end record; pragma Pack (Instance_Record); @@ -428,6 +433,9 @@ private -- Extract INST from the list of instance of its module. -- Will still be connected, but won't appear anymore in the list of -- instances. + -- Once extracted, the instance is not in a consistent state anymore. So + -- it should be either fully disconnected and freed or re-inserted in the + -- parent module. procedure Extract_Instance (Inst : Instance); -- Remove and free the unconnected instance INST. |