From cbc4ec8178ddc67e397ccd0800048a26d1f41451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Tue, 12 Sep 2023 14:54:03 +0200 Subject: [PATCH] mem: Fix index confusion in write port merging Fix mistaking the read-port and write-port indices for each other when we are adding the partial transparency emulation to be able to merge two write ports. --- kernel/mem.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/mem.cc b/kernel/mem.cc index 628f6210499..269a476a125 100644 --- a/kernel/mem.cc +++ b/kernel/mem.cc @@ -1252,12 +1252,12 @@ void Mem::prepare_wr_merge(int idx1, int idx2, FfInitVals *initvals) { // If transparent with only one, emulate it, and remove the collision-X // flag that emulate_transparency will set (to align with the other port). if (rport.transparency_mask[idx1]) { - emulate_transparency(i, idx1, initvals); + emulate_transparency(idx1, i, initvals); rport.collision_x_mask[idx1] = false; continue; } if (rport.transparency_mask[idx2]) { - emulate_transparency(i, idx2, initvals); + emulate_transparency(idx2, i, initvals); rport.collision_x_mask[idx2] = false; continue; }