aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-04-16 18:14:07 +0200
committerTristan Gingold <tgingold@free.fr>2023-04-16 18:14:07 +0200
commit595f04c35ceacb40edfed4cf0c443be166cb8b91 (patch)
treeadf5bb52d4528980bf2b6fb0aae5b7c0401c2c55 /src
parent7b827ca4172f9b40f4a473a223bc8f3486626994 (diff)
downloadghdl-595f04c35ceacb40edfed4cf0c443be166cb8b91.tar.gz
ghdl-595f04c35ceacb40edfed4cf0c443be166cb8b91.tar.bz2
ghdl-595f04c35ceacb40edfed4cf0c443be166cb8b91.zip
netlists-memories: add comments
Diffstat (limited to 'src')
-rw-r--r--src/synth/netlists-memories.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb
index 84267ea44..1502b6f40 100644
--- a/src/synth/netlists-memories.adb
+++ b/src/synth/netlists-memories.adb
@@ -452,10 +452,13 @@ package body Netlists.Memories is
-- The output of the mux must be connected to one input.
return False;
end if;
+
+ -- Check if the mux is before a dff.
Dff_Inst := Get_Input_Parent (Inp);
if Get_Id (Dff_Inst) /= Id_Dff then
return False;
end if;
+
Dff_Out := Get_Output (Dff_Inst, 0);
if Mux_Inp = Get_Input (Mux_Inst, 1) then
@@ -480,8 +483,9 @@ package body Netlists.Memories is
begin
Inp := Get_First_Sink (Val);
if Get_Next_Sink (Inp) = No_Input then
- -- There is a single input.
+ -- The output of INST (a Dyn_Extract) goes to only one gate.
Iinst := Get_Input_Parent (Inp);
+
if Get_Id (Iinst) = Id_Dff then
-- The output of the dyn_extract is directly connected to a dff.
-- So this is a synchronous read without enable.