From a5e9ffa36f196e2bb5fb6fb11636e559beab850f Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 19 Jul 2024 16:42:34 -0700 Subject: [PATCH] bug fix for index=-1 case --- src/rogue/interfaces/memory/Block.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index ea1de57cd..b01646ee5 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -194,7 +194,10 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri } } else { if (type == rim::Read || type == rim::Verify) { - if (index < 0 || index >= var->numValues_) { + if (index < 0) { + lowByte = 0; + highByte = size_ - 1; + } else if (index >= var->numValues_) { lowByte = var->lowTranByte_[0]; highByte = var->highTranByte_[0]; } else {