Nios CPU Dual Core example deisgn for Altera FPGA/CPLD , you can refer for CPU design.