Vous êtes sur la page 1sur 2

Assignment 2: Scheduling

09/10/2013

Type of Functional Units


ALU add sub br cmp

MUL/DIV mul div LDST load store Logical and or xor (and all other logical operations) MISC getelementptr sext For the instructions that did not specied here, use your discretion to put that instruction under which functional unit(Please let me know in that case). Consider alloca as a special instruction which takes 0 clock cycles for completion and do not need any functional unit to execute.

llvm and scheduler

You can write the llvm part to get the instructions, its opcode, operands and destination. It is preferable to separate the llvm and scheduler part because this method will be easy for you. In this case, take an *.ll le as input to your llvm code and write the parsed output to a text le. From that le you can read the data and you can implement your scheduler in any language you prefer. 1

Parameters passed to scheduler

To run the scheduler, you have to use the following argument format, ./scheduler 2 3 4 5 5 1 3 4 2 4 inle outle Here, the rst ve integers show the number of FUs(in the order ALU,MULDIV, LDST, Logical and MISC) and the next ve integers show the number of clock cycles taken by each FUs(in the order ALU,MULDIV, LDST, Logical and MISC).inle is the input intermediate le name(parsed data) and outle is the output le name. If you are planning to implement the llvm and scheduler part together, pass these arguments in the same order without the inle.

Output le format

Output le should contain a set of lines. Each lines will be having only an integer number. For example, if line 10 is 27, this means the instruction number 10 is scheduled in(start of execution) 27th cycle. The format and parameters to scheduler should be as specied above, as the evaluation will be done using scripts. Any change in this format may evaluate your result as failed.

Points to be noted
The store instruction in the generated ll le has a dierent destination operand format. Resolve this issue. Parameters to executable Format of the output le

Vous aimerez peut-être aussi