If this is the case, the first assert should be:
ASSERT( (cpuNumber >= 0) && (cpuNumber < system_t::inst->m_numSMTProcs) );
instead of:
ASSERT( (cpuNumber >= 0) && (cpuNumber < system_t::inst->m_numProcs) );
Is it?
You can change it if you want, but in any case the error condition you
care about will be caught by the assertion on seq_index, since the
assignment makes seq_index get the value of cpuNumber.
(2) in system.C
first, the numProcs is defined as:
// establish how many processors there are in the system
int numProcs = SIM_number_processors(); //for SMT, this is the total
number of LOGICAL processors in the system
then,
m_numSMTProcs = numProcs / CONFIG_LOGICAL_PER_PHY_PROC;
I am confused here because numProcs is first defined as the total number
of LOGICAL processors in the system. Is this the number of SMT processors?
If so, m_numSMTProcs = numProcs / CONFIG_LOGICAL_PER_PHY_PROC doesn't make
sense. It looks to me that numProcs should be set to the number
of PHYSICAL processors initiated by simics, is it? Maybe I misunderstand
the definition of LOGICAL processor?
My definitions:
Logical = total number of HW thread contexts
(e.g. physical procs*(SMT contexts per proc), available to Simics for
scheduling)
Physical = total number of physical procs (as seen by Ruby)
Luke
|