aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-08-16 06:50:23 +0200
committerTristan Gingold <tgingold@free.fr>2022-08-16 06:50:23 +0200
commit0bd043bcbe87d2e5397e4ba3b4ce1cff4015bf5f (patch)
treee821c4b400689f6ce023ca17ba0df1b98d305afe /src
parent5836874d78c394d30476892f3eaf6f8da7049c10 (diff)
downloadghdl-0bd043bcbe87d2e5397e4ba3b4ce1cff4015bf5f.tar.gz
ghdl-0bd043bcbe87d2e5397e4ba3b4ce1cff4015bf5f.tar.bz2
ghdl-0bd043bcbe87d2e5397e4ba3b4ce1cff4015bf5f.zip
synth/netlists: add comments
Diffstat (limited to 'src')
-rw-r--r--src/synth/netlists-gates.ads20
-rw-r--r--src/synth/netlists-memories.adb1
2 files changed, 14 insertions, 7 deletions
diff --git a/src/synth/netlists-gates.ads b/src/synth/netlists-gates.ads
index 5f09ccafa..8fe555fd6 100644
--- a/src/synth/netlists-gates.ads
+++ b/src/synth/netlists-gates.ads
@@ -284,16 +284,22 @@ package Netlists.Gates is
-- Id_Addidx_Cst : constant Module_Id := XX;
-- Represent a memory with a fixed size.
- -- This is not a regular gate as it has only one output, PORTS.
- -- The width of the output is the size (in bits) of the memory.
- -- The PORTS links to the first read or write port. There must be only
- -- one connection. The order is important as it defines the order of
- -- actions.
- -- Outputs: PORTS
+ -- This is not really a regular gate, as it must be handled with the
+ -- read and write ports.
+ -- The width of IPORT and OPORT is the size (in bits) of the memory.
+ -- IPORT and OPORT describe how the memory is affect by the ports. It is
+ -- as if the memory is constantly being modified by the ports, under the
+ -- write enable condition.
+ -- The order of the ports is important as it defines the order of action.
+ -- The first port connected to OPORT is the first port to act.
+ -- Inputs: IPORT
+ -- Outputs: OPORT
Id_Memory : constant Module_Id := 92;
-- Same as Id_Memory but with an initial value.
- -- Input: INIT
+ -- Inputs: IPORT
+ -- INIT
+ -- Outputs: OPORT
Id_Memory_Init : constant Module_Id := 93;
-- Asynchronous memory read port.
diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb
index f7cb6a156..585328bb1 100644
--- a/src/synth/netlists-memories.adb
+++ b/src/synth/netlists-memories.adb
@@ -457,6 +457,7 @@ package body Netlists.Memories is
end if;
end Is_Enable_Dff;
+ -- INST is a Dyn_Extract.
-- If INST is followed by a dff or a dff+enable (with mux2), return the
-- dff in LAST_INST, the clock in CLK and the enable in EN.
procedure Extract_Extract_Dff (Ctxt : Context_Acc;