Closed jorendumoulin closed 2 months ago
Dear @jorendumoulin,
Definitely the DM core and compute core 0 should not be assigned the same stack pointer. However, I fail to see the issue in the code, as SNRT_CLUSTER_CORE_NUM
does count all cores in the cluster, including the DM core.
oh, so maybe in my cfg this value is wrong, I'll double check thank you for the swift reply!
No problem :)
I am running into some interesting bugs when simulating stuff on a multi-core snitch cluster setup, and I'm thinking it is related to the stack pointers of every core in the cluster. From the traces, it seems the data mover core gets assigned the same stack pointer as core 0.
If my understanding is correct, in the code below in
start.S
, every core gets assigned a unique stack pointer, at line 143. The offset is determined by the cluster local core id, calculated on line 105. The cluster local core id is the result of(hart_id - hart_offset) % num_cores
. Asnum_cores
does not include the dm core, the local core id for the dm core and core 0 is equal.https://github.com/pulp-platform/snitch_cluster/blob/5928ffadc18c63cc0cc4eb5025a1c1da88d5d07d/sw/snRuntime/src/start.S#L93-L143
Is this by design somehow? I can't seem to otherwise understand the reasoning behind line 105. Or is this a bug?