An improved method and apparatus for controlling and implementing
instructions in a pipelined central processing unit (CPU) or
user-customizable microprocessor. In a first aspect of the invention, an
improved method of permitting programmer control of jump instruction
interlocks is disclosed. In one embodiment, a minimum of one cycle is
required between an instruction that sets flags and a branch taken as a
result of those flags; an interlock is used to detect a branch preceded
by an instruction setting the flags to ensure that the instruction
immediately preceding the branch can not affect the branch outcome. In a
second embodiment, a jump instruction following a flag setting
instruction whose flags may affect the outcome of the jump is stalled
until all flags are set. In a second aspect of the invention, a method of
synthesizing a processor design incorporating the aforementioned
interlocks is disclosed. Exemplary gate logic synthesized using the
aforementioned methods, and a computer system capable of implementing
these methods, are also described.