Dataflow Software Stack
032db78
Master Thesis of Mathijs Saey at the VUB
|
DVM Context matcher. More...
Inherits object.
Public Member Functions | |
def | __init__ |
Initialize a context matcher. More... | |
def | setKey |
Dynamically set the amount of tokens a certain instruction should receive. More... | |
def | checkKey |
See if a given key is already a part of the tokens we are matching. More... | |
def | updateKeyArr |
Update the token array for a key This method assumes that there is an array for the given key. More... | |
def | isKeyReady |
See if all the input tokens are present for a given key. More... | |
def | executeKey |
Add the tokens for key to the scheduler. More... | |
def | add |
Add a token to the matcher. More... | |
Public Attributes | |
tokens | |
Dictionary that contains the tokens for all the keys. More... | |
core | |
Reference to the DVM::Core. More... | |
DVM Context matcher.
The matcher is responsible for gathering inputs to the same instruction based on their contexts. The matcher should forward these tokens to the scheduler once that all of the inputs for a given context are available.
The matcher utilizes (instruction, context) pairs as keys
def core.contextMatcher.ContextMatcher.__init__ | ( | self, | |
core | |||
) |
Initialize a context matcher.
core | The runtime core that this matcher is a part of. |
def core.contextMatcher.ContextMatcher.setKey | ( | self, | |
inst, | |||
cont, | |||
amount | |||
) |
Dynamically set the amount of tokens a certain instruction should receive.
inst | The address of the instruction to set the token amount for. |
cont | The context for which this amount is valid. |
amount | The amount of tokens this matcher requires for this key. |
def core.contextMatcher.ContextMatcher.checkKey | ( | self, | |
key | |||
) |
See if a given key is already a part of the tokens we are matching.
Create an array to match these tokens if it's not.
key | The key to check |
def core.contextMatcher.ContextMatcher.updateKeyArr | ( | self, | |
key, | |||
port, | |||
token | |||
) |
Update the token array for a key This method assumes that there is an array for the given key.
key | The key to find the array we want to update. |
port | The destination port of the token we want to add. |
token | The token we want to add. |
def core.contextMatcher.ContextMatcher.isKeyReady | ( | self, | |
key | |||
) |
See if all the input tokens are present for a given key.
key | The key to check |
def core.contextMatcher.ContextMatcher.executeKey | ( | self, | |
key | |||
) |
Add the tokens for key to the scheduler.
def core.contextMatcher.ContextMatcher.add | ( | self, | |
token | |||
) |
Add a token to the matcher.
This method can be seen as the main method of the matcher as it utilizes all the other methods to define the behaviour that the matcher will use when a token is added.
token | the token to add. |
core.contextMatcher.ContextMatcher.tokens |
Dictionary that contains the tokens for all the keys.
core.contextMatcher.ContextMatcher.core |
Reference to the DVM::Core.