|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.krep.evalbench.program.KepAssembler
public class KepAssembler
Reads human readable KEP assembler files. This contrast to the KasmAssembler, which uses an externally defined compiler to transform KEP assembler files into object code, before reading them.
Constructor Summary | |
---|---|
KepAssembler()
empty assembler, useless until assemble is called. |
Method Summary | |
---|---|
int |
adr2row(int i)
compute at which line in the assembler code a absolute pc is displayed. |
void |
assemble(String progName,
InputStream program)
Assemble a given program string and generated object code in readable hex coded format and instruction array. |
void |
assemble(String progName,
String program)
Assemble a given program string and return object code information in readable hex coded format. |
String |
canExecute(IConfig c)
Check whether the Assembler can be executed on the current processor This should check, whether the correct processor (KEP/KReP) is used, and whether it has enough resources, like number of signals, etc. |
LinkedList<Signal> |
getInputs()
After a program has been assembled, a list of input signals can be extracted. |
String[][] |
getInstructions()
After a program has been assembled, an array with the contained instructions can be extracted. |
String |
getName()
|
String[] |
getObj(IConfig c)
After a program has been assembled, an array with the contained object-code can be extracted. |
LinkedList<Signal> |
getOutputs()
After a program has been assembled, a list of output signals can be extracted. |
HashMap<String,Integer> |
getSignalIndex()
|
int |
getTickLen()
|
int |
size()
The number of instructions in the program. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KepAssembler()
Method Detail |
---|
public int adr2row(int i)
adr2row
in interface IAssembler
i
- absolute address in memory
public void assemble(String progName, InputStream program) throws ParseException
assemble
in interface IAssembler
progName
- Name of the programprogram
- assembler program
ParseException
- when the input string has an invalid formatpublic void assemble(String progName, String program) throws ParseException
assemble
in interface IAssembler
progName
- Name of the programprogram
- assembler program
ParseException
- when the input string has an invalid formatpublic String canExecute(IConfig c)
canExecute
in interface IAssembler
c
- the configuration
public LinkedList<Signal> getInputs()
getInputs
in interface IAssembler
public String[][] getInstructions()
"loop0:"
, or an empty string if there is
no label for that instruction. The third string contains the readable
assembler instruction code.
getInstructions
in interface IAssembler
public String[] getObj(IConfig c)
getObj
in interface IAssembler
c
- configuration of the current processor
public LinkedList<Signal> getOutputs()
getOutputs
in interface IAssembler
public HashMap<String,Integer> getSignalIndex()
getSignalIndex
in interface IAssembler
public int size()
size
in interface IAssembler
public String getName()
getName
in interface IAssembler
public int getTickLen()
getTickLen
in interface IAssembler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |