2 #include "etiss/jit/CPU.h"
11 for (
uint32_t i = 0; i < num_stages; i++)
14 for (
uint32_t j = 0; j < num_resources[i]; j++)
16 cpu->
resourceUsages[resources[i][j]] += resource_time[resources[i][j]];
18 for (
uint32_t j = 0; j < num_resources[i]; j++)
28 for (
uint32_t j = 0; j < num_resources[i - 1]; j++)
30 if (cpu->
cycles[resources[i - 1][j]] >
max)
37 for (
uint32_t j = 0; j < num_resources[i]; j++)
39 if (resource_time[resources[i][j] > max_stagetime])
41 max_stagetime = resource_time[resources[i][j]];
45 for (
uint32_t j = 0; j < num_resources[i]; j++)
47 cpu->
cycles[resources[i][j]] =
max + max_stagetime;
__DEVICE__ int max(int __a, int __b)
static __inline__ uint32_t
#define ETISS_MAX_RESOURCES
uint32_t handleResources(uint32_t *resource_time, uint32_t(*resources)[ETISS_MAX_RESOURCES], uint32_t num_stages, uint32_t *num_resources, ETISS_CPU *cpu)
basic cpu state structure needed for execution of any cpu architecture.
etiss_uint64 resourceUsages[ETISS_MAX_RESOURCES]
how many cycles each resource is used
etiss_uint64 cycles[ETISS_MAX_RESOURCES]
how many cycles in each resource (including waiting)