forked from xcore/tool_axe
-
Notifications
You must be signed in to change notification settings - Fork 1
/
InstructionHelpers.h
41 lines (28 loc) · 1.08 KB
/
InstructionHelpers.h
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
// Copyright (c) 2011-12, Richard Osborne, All rights reserved
// This software is freely distributable under a derivative of the
// University of Illinois/NCSA Open Source License posted in
// LICENSE.txt and at <http://github.xcore.com/>
#ifndef _InstructionHelpers_h_
#define _InstructionHelpers_h_
#include <stdint.h>
#include "Config.h"
class Thread;
class Core;
class ResourceID;
class Resource;
class Synchroniser;
class Thread;
class Chanend;
class Port;
class EventableResource;
uint32_t exception(Thread &t, uint32_t pc, int et, uint32_t ed);
Resource *checkResource(Core &state, ResourceID id);
Synchroniser *checkSync(Core &state, ResourceID id);
Thread *checkThread(Core &state, ResourceID id);
Chanend *checkChanend(Core &state, ResourceID id);
Port *checkPort(Core &state, ResourceID id);
EventableResource *checkEventableResource(Core &state, ResourceID id);
bool setClock(Thread &t, ResourceID resID, uint32_t val, ticks_t time);
bool setReadyInstruction(Thread &t, ResourceID resID, uint32_t val,
ticks_t time);
#endif // _InstructionHelpers_h_