The invention provides a dual-core lock step processor instruction fetching
control system supporting an extension instruction. The dual-core lock step processor instruction fetching
control system comprises an instruction fetching module, an instruction cache, a
branch prediction module, a lock step comparison module and a dual-core lock step processor. According to the method, fine-grained control is carried out on lock step protection
modes of different user codes through a lock step extension instruction; the lock step extension instruction adopts a decoding path different from that of a conventional instruction, and directly enters lock step extension instruction decoding logic after the instruction is fetched, so that the lock step extension instruction does not depend on post-stage
resource scheduling of a lock step processor and does not depend on a specific
instruction set;
branch prediction faults are regarded as
branch prediction failure conditions and are processed in an instruction fetching module, and it is ensured that the branch prediction faults cannot pollute the rear stage of the dual-core
lockstep processor; for a post-stage fault of the dual-core
lockstep processor, the instruction fetching module can widen the pulse width of a post-stage fault
signal to a difference value of a dual-core instruction period, and aligns instruction streams in the
verification core and the execution core by inserting a null operation into an
assembly line.