A data processing device is provided using pipeline architecture to reduce
a time loss due to a branch without causing an increase in circuit scale.
The data processing device uses pipeline control. The data processing
device includes an instruction queue in which a plurality of instruction
codes can be fetched, a fetch address operation circuit which calculates
a fetch address, a fetch circuit which fetches an instruction code based
on the fetch address, and a branch information setting circuit which
decodes a branch setting instruction, stores a branch address in a branch
address storage register, and stores a branch target address in a branch
target address storage register. The fetch address operation circuit
compares either a previous fetch address or an expected next fetch
address with a value stored in the branch address storage register, and
determines a next fetch address to be output, based on the comparison
result.