libparanut
A Hardware Abstraction Layer for ParaNut Architectures.
Typedefs

Needed typedefs. More...

Collaboration diagram for Typedefs:

Typedefs

typedef struct __pn_spinlock _pn_spinlock
 Renaming of struct __pn_spinlock for your convenience. More...
 
typedef int32_t PN_CID
 Signed type that can be used to address any core in this architecture. More...
 
typedef int32_t PN_NUMC
 Signed type that can hold the maximum number of cores in this architecture. More...
 
typedef uint32_t PN_CMSK
 Unsigned type that can act as a core mask. More...
 
typedef int32_t PN_NUMG
 Signed type that can be used to address any group in this architecture. More...
 

Detailed Description

Needed typedefs.

Please note that there are several typedefs for differing register widths of the ParaNut. Which ones are used depend on how you set PN_RWIDTH while compiling (pn_config.h). Doxygen can only document one of them, so here you are, stuck with the 32-bit version. Check source code of paranut.h, section Typedefs, if you want to see the others.

Typedef Documentation

◆ _pn_spinlock

Renaming of struct __pn_spinlock for your convenience.

Check documentation of __pn_spinlock to get more information.

◆ PN_CID

Signed type that can be used to address any core in this architecture.

See documentation of PN_NUMC to understand why we use only the actual register width and not more.

◆ PN_CMSK

Unsigned type that can act as a core mask.

This is, of course, the same as the register width of the ParaNut. Unsigned because it direcetly represents a register.

◆ PN_NUMC

Signed type that can hold the maximum number of cores in this architecture.

Let's say your ParaNut has a group register width of 32 bits. This means that there are 4.294.967.296 potential groups. Every group has 32 bits to represent different cores. That means there are 137.438.953.472 cores that can be adressed.

This does, in theory, mean that we need 64 bit to represent the possible number of cores. However, it is deemed to be pretty unrealistic that there will be a ParaNut version with more than 4.294.967.296 cores anytime soon. So, for optimization purposes, we just use 32 bit here. Even half of that is probably not possible in my lifetime, which is why we are not even using unsigned (also because some compilers could throw errors when mixing signed and unsigned types, e.g. in a for loop). One more plus is that we can use these values to signal errors when they are returned by a function.

Same explaination goes in all other register widths. If you really need more, feel free to double the bits.

◆ PN_NUMG

Signed type that can be used to address any group in this architecture.

This is, of course, the same as the register width of the ParaNut.