摘要 |
A system is disclosed which includes a microprocessor design having a plurality of representations of machine resources of varying scope. The microprocessor design may, for example, have multiple cores and/or be capable of executing multiple threads in hardware. Machine resource representations in the microprocessor design may be limited in scope to a particular thread in a particular core, be shared by multiple threads within a core, or be shared by all threads in all cores. A software routine is provided which allows machine resource representations of varying scopes to be referenced with a fixed number of parameters. When the routine is called with a particular set of parameters, the resource scope referenced by the parameters is determined, and any machine resource representations that are referenced by the parameters are identified. A value may be read from or written to the machine resource representation.
|