diff options
Diffstat (limited to 'src/synth/netlists-memories.adb')
-rw-r--r-- | src/synth/netlists-memories.adb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb index e4e4115ed..8129c7968 100644 --- a/src/synth/netlists-memories.adb +++ b/src/synth/netlists-memories.adb @@ -1326,12 +1326,25 @@ package body Netlists.Memories is N := Build_Const_UB32 (Ctxt, 0, Mem_Wd); -- Optimize: no need to copy if the value is 0. if Get_Param_Uns32 (Cst, 0) /= 0 then - Copy_Const_Content - (Cst, Off, Cst_Wd, Get_Net_Parent (N), Wd, Depth, - Copy_Mode_Bit); + Res := Get_Net_Parent (N); + Copy_Const_Content (Cst, Off, Cst_Wd, Res, Wd, Depth, + Copy_Mode_Bit); end if; return N; end; + when Id_Const_UL32 => + declare + N : Net; + begin + N := Build_Const_UL32 (Ctxt, 0, 0, Mem_Wd); + -- Optimize: no need to copy if the value is 0. + Res := Get_Net_Parent (N); + Copy_Const_Content (Cst, Off, Cst_Wd, Res, Wd, Depth, + Copy_Mode_Val); + Copy_Const_Content (Cst, Off, Cst_Wd, Res, Wd, Depth, + Copy_Mode_Zx); + return N; + end; when Id_Const_X => return Build_Const_X (Ctxt, Mem_Wd); when others => |