Skip to content

Commit

Permalink
Fix abort condition in MmWaveAmc
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasozugno authored Jun 1, 2021
1 parent 6e43731 commit ceffbfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mmwave/model/mmwave-amc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,14 @@ MmWaveAmc::CalculateTbSize (uint8_t mcs, uint8_t nSym) const
uint8_t
MmWaveAmc::GetMinNumSymForTbSize (uint32_t tbSize, uint8_t mcs) const
{
uint8_t numSym {0}, effTbSize {0};
uint32_t effTbSize {0};
uint8_t numSym {0};
while (effTbSize < tbSize && numSym < m_phyMacConfig->GetSymbPerSlot ())
{
numSym++;
effTbSize = CalculateTbSize (mcs, numSym);
}
NS_ABORT_MSG_IF (effTbSize >= tbSize, "No way to create such TB size, something went wrong!");
NS_ABORT_MSG_IF (effTbSize < tbSize, "No way to create such TB size, something went wrong!");

return numSym;
}
Expand Down Expand Up @@ -362,4 +363,3 @@ MmWaveAmc::GetErrorModelType () const
} // end namespace mmwave

} // end namespace ns3

0 comments on commit ceffbfa

Please sign in to comment.