-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscheduler.h
More file actions
41 lines (32 loc) · 740 Bytes
/
Copy pathscheduler.h
File metadata and controls
41 lines (32 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __SCHEDULER_H_
#define __SCHEDULER_H_
#include <systemc.h>
#include <ap_int.h>
#include <iostream>
using namespace std;
#define nodeid_t unsigned
#define ready_t ap_uint<1>
#define halted_t ap_uint<1>
#define NUM_CORES 4
#define HISTORY_SIZE 4096
#define QUEUE_SIZE (NUM_CORES*10)
typedef struct
{
nodeid_t current_node;
nodeid_t next_node;
unsigned state;
} context_t;
typedef struct
{
context_t context;
ready_t schedule;
ready_t ack;
} CoreScheduleInterface_t;
typedef struct
{
context_t context;
ready_t restart;
halted_t core_halted;
} CoreControlInterface_t;
void scheduler(CoreScheduleInterface_t sched_interfaces[NUM_CORES], CoreControlInterface_t setup_interfaces[NUM_CORES], unsigned * finished);
#endif