Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16612 Discussions

How to create a simple Cpu??

Altera_Forum
Honored Contributor II
1,329 Views

Hi guys, I have received another tough assignment which i don't know from which point to start from. I am hoping altera gurus can be of help. 

The assignment is to create a simple cpu that has a rom, bus and led output. The vhdl block diagram should be used to create different blocks for each meaning the cpu has a block, rom and led output and all this are interconnected to function properly. 

 

Can anyone help with this? 

 

Thanks
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
572 Views

WHat have you done so far? what problems do you have?

0 Kudos
Altera_Forum
Honored Contributor II
572 Views

I tried to build it by using Qsys i Quartus II but it does not look anything close to the video of the teacher. He has both Vhd file for this and a schematic diagram. This makes me confuse.

0 Kudos
Altera_Forum
Honored Contributor II
572 Views

Qsys is a system generator. So you need existing modules and Qsys connects them together. The NIOS is an existing processor. If your job is to create a processor in VHDL, you probably dont want to use Qsys. He possibly has a VHDL file and a .bdf (graphical schematic) file.

0 Kudos
Altera_Forum
Honored Contributor II
572 Views

 

--- Quote Start ---  

Qsys is a system generator. So you need existing modules and Qsys connects them together. The NIOS is an existing processor. If your job is to create a processor in VHDL, you probably dont want to use Qsys. He possibly has a VHDL file and a .bdf (graphical schematic) file. 

--- Quote End ---  

 

 

---------------------------------------------- 

You are right, does this mean i have to write the vhdl code for this processor from scratch. Oops this is not going to be easy
0 Kudos
Altera_Forum
Honored Contributor II
572 Views

Possibly - Your assignment is very broad. Were you at least given and instruction set to work with?

0 Kudos
Altera_Forum
Honored Contributor II
572 Views

You can find the project description below: 

A) Description of the bus, ROM and LED blocks 

This will address the block outside the CPU, through a bus. Every block that is connected to the bus has a unique(independent) address. In this case: 

 ROM: addresses 0-15 (16 addresses) 

 LED: addresses 10 (1 address) 

This is what is called an (Address map). 

 

B) Description of the ROM program 

In the memory (ROM) there exist a program with machine codes or easy to read assembler codes 

signal rom : memory_t := memory_t'( 

X"0000", -- 0 NOP ”do not do anything, No Operation” nop 

X"100A", -- 1 LOAD_R0# A ”Load CPU_REG_0 with A (hex)” R0 = 10; 

X"2010", -- 2 STORE_R0# 10 ”Store CPU_REG_0 to adress 10 (hex)” LEDS = R0 

X"1001", -- 3 LOAD_R0# 1 ”Load CPU_REG_0 with 1 (hex)” R0 = 01; 

X"2010", -- 4 STORE_R0# 10 ”Store CPU_REG_0 to adress 10 (hex)” LEDS = R0 

 

This is just the main description, hope it helps
0 Kudos
Altera_Forum
Honored Contributor II
572 Views

Well, you have a start. I suggest you get coding..

0 Kudos
Reply