The invention discloses a method and a
system for scheduling a
delay slot in a very-long instruction
word structure. The method comprises the steps of locally
scheduling instructions in a current
basic block; after the local scheduling is finished, judging whether a residual instruction
delay slot exists, if not, ending the scheduling, otherwise, putting an instruction which can be filled into the instruction
delay slot and is high in spending into a local standby instruction cache; globally
scheduling instructions in a
basic block of a
branch target, selecting an instruction which can be filled into the instruction
delay slot and placing the instruction in a global standby instruction cache; and selecting an instruction from the local standby instruction cache and / or the global standby instruction cache and filling the instruction into the residual instruction
delay slot. The
system comprises a local scheduling unit, a
global scheduling unit and a balanced scheduling unit. According to the method and the
system for scheduling the
delay slot in the very-long instruction
word structure disclosed by the invention, through balance between scheduling of the delay slot and program parallelism, as well as balance between local scheduling and
global scheduling, high execution efficiency of programs can be implemented.