diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-13 06:27:28 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-13 06:27:28 +0100 |
commit | c7df5333ecaff440b4368e11f8de854567287342 (patch) | |
tree | eb7a9a4ad3cf46dee933e56f51386a0f9dde7052 /src/synth/netlists-disp_vhdl.adb | |
parent | 060f60ec7c5ce23cea3ec985c8921fcf104ad872 (diff) | |
download | ghdl-c7df5333ecaff440b4368e11f8de854567287342.tar.gz ghdl-c7df5333ecaff440b4368e11f8de854567287342.tar.bz2 ghdl-c7df5333ecaff440b4368e11f8de854567287342.zip |
netlists-disp_vhdl: do not display the chain port for mem_rd_sync. For #1087
Diffstat (limited to 'src/synth/netlists-disp_vhdl.adb')
-rw-r--r-- | src/synth/netlists-disp_vhdl.adb | 98 |
1 files changed, 53 insertions, 45 deletions
diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb index 6fd40a773..f761c9254 100644 --- a/src/synth/netlists-disp_vhdl.adb +++ b/src/synth/netlists-disp_vhdl.adb @@ -1137,53 +1137,61 @@ package body Netlists.Disp_Vhdl is -- There are as many signals as gate outputs. for Inst of Instances (M) loop Id := Get_Id (Inst); - if Id = Id_Memory or Id = Id_Memory_Init then - null; - elsif Id = Id_Mem_Wr_Sync then - null; - elsif Id = Id_Mem_Rd then - declare - N : constant Net := Get_Output (Inst, 1); - begin - Put (" signal "); - Disp_Net_Name (N); - Put (" : "); - Put_Type (Get_Width (N)); - Put_Line (";"); - end; - elsif not Is_Self_Instance (Inst) - and then not (Flag_Merge_Lit - and then Id in Constant_Module_Id - and then not Need_Signal (Inst)) - and then Id < Id_User_None - then - for N of Outputs (Inst) loop - if Id in Constant_Module_Id then - Put (" constant "); - else + case Id is + when Id_Memory + | Id_Memory_Init => + -- For memories: skip the chain. + null; + when Id_Mem_Wr_Sync => + -- For memories: skip the chain. + null; + when Id_Mem_Rd + | Id_Mem_Rd_Sync => + -- For memories: skip the chain. + declare + N : constant Net := Get_Output (Inst, 1); + begin Put (" signal "); + Disp_Net_Name (N); + Put (" : "); + Put_Type (Get_Width (N)); + Put_Line (";"); + end; + when others => + if not Is_Self_Instance (Inst) + and then not (Flag_Merge_Lit + and then Id in Constant_Module_Id + and then not Need_Signal (Inst)) + and then Id < Id_User_None + then + for N of Outputs (Inst) loop + if Id in Constant_Module_Id then + Put (" constant "); + else + Put (" signal "); + end if; + Disp_Net_Name (N); + Put (" : "); + Put_Type (Get_Width (N)); + case Id is + when Id_Idff => + Put (" := "); + Disp_Constant_Inline + (Get_Net_Parent (Get_Input_Net (Inst, 2))); + when Id_Iadff => + Put (" := "); + Disp_Constant_Inline + (Get_Net_Parent (Get_Input_Net (Inst, 4))); + when Constant_Module_Id => + Put (" := "); + Disp_Constant_Inline (Inst); + when others => + null; + end case; + Put_Line (";"); + end loop; end if; - Disp_Net_Name (N); - Put (" : "); - Put_Type (Get_Width (N)); - case Id is - when Id_Idff => - Put (" := "); - Disp_Constant_Inline - (Get_Net_Parent (Get_Input_Net (Inst, 2))); - when Id_Iadff => - Put (" := "); - Disp_Constant_Inline - (Get_Net_Parent (Get_Input_Net (Inst, 4))); - when Constant_Module_Id => - Put (" := "); - Disp_Constant_Inline (Inst); - when others => - null; - end case; - Put_Line (";"); - end loop; - end if; + end case; end loop; end Disp_Architecture_Declarations; |