From 595f04c35ceacb40edfed4cf0c443be166cb8b91 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 16 Apr 2023 18:14:07 +0200 Subject: netlists-memories: add comments --- src/synth/netlists-memories.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/synth/netlists-memories.adb') 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. -- cgit v1.2.3