Fix issue with stack id
This commit is contained in:
@@ -233,6 +233,7 @@ void ControllerExtension::copy_from(const tlm_extension_base& ext)
|
||||
const auto& cpyFrom = dynamic_cast<const ControllerExtension&>(ext);
|
||||
channelPayloadID = cpyFrom.channelPayloadID;
|
||||
rank = cpyFrom.rank;
|
||||
stack = cpyFrom.stack;
|
||||
bankGroup = cpyFrom.bankGroup;
|
||||
bank = cpyFrom.bank;
|
||||
row = cpyFrom.row;
|
||||
|
||||
@@ -120,14 +120,16 @@ AddressDecoder::AddressDecoder(const Config::AddressMapping& addressMapping)
|
||||
|
||||
unsigned channels = std::lround(std::pow(2.0, vChannelBits.size()));
|
||||
unsigned ranks = std::lround(std::pow(2.0, vRankBits.size()));
|
||||
unsigned stacks = std::lround(std::pow(2.0, vStackBits.size()));
|
||||
unsigned bankGroups = std::lround(std::pow(2.0, vBankGroupBits.size()));
|
||||
unsigned banks = std::lround(std::pow(2.0, vBankBits.size()));
|
||||
unsigned rows = std::lround(std::pow(2.0, vRowBits.size()));
|
||||
unsigned columns = std::lround(std::pow(2.0, vColumnBits.size()));
|
||||
unsigned bytes = std::lround(std::pow(2.0, vByteBits.size()));
|
||||
|
||||
maximumAddress =
|
||||
static_cast<uint64_t>(bytes) * columns * rows * banks * bankGroups * ranks * channels - 1;
|
||||
maximumAddress = static_cast<uint64_t>(bytes) * columns * rows * banks * bankGroups * stacks *
|
||||
ranks * channels -
|
||||
1;
|
||||
|
||||
bankgroupsPerRank = bankGroups;
|
||||
banksPerGroup = banks;
|
||||
@@ -144,8 +146,9 @@ void AddressDecoder::plausibilityCheck(const MemSpec& memSpec)
|
||||
unsigned columns = std::lround(std::pow(2.0, vColumnBits.size()));
|
||||
unsigned bytes = std::lround(std::pow(2.0, vByteBits.size()));
|
||||
|
||||
maximumAddress =
|
||||
static_cast<uint64_t>(bytes) * columns * rows * banks * bankGroups * stacks * ranks * channels - 1;
|
||||
maximumAddress = static_cast<uint64_t>(bytes) * columns * rows * banks * bankGroups * stacks *
|
||||
ranks * channels -
|
||||
1;
|
||||
|
||||
auto totalAddressBits = static_cast<unsigned>(std::log2(maximumAddress));
|
||||
for (unsigned bitPosition = 0; bitPosition < totalAddressBits; bitPosition++)
|
||||
|
||||
Reference in New Issue
Block a user