Please refer to
thank you!
EC2 is a simple 32bits CPU that I wrote in 2006, when I read the book "Digital Logic And Micro processor Design With VHDL" which talks about digital design from transistor, logic gates to functional blocks and microprocessor.
The EC2 is the simple processor example in the book; it contains ALU, one cycle on chip memory (cache) and a simple state machine to control the operations. This is a quite a simple CPU as it only contains necessary parts such as data path and control logic. Hopefully one day I will write a real one...
The IR register fetch instruction from a on chip RAM. Decode stage is distributed as there are limited instruction types. PC contains the current instruction address, it is modified by adding 4 or from instructions. The IR logic sends out different logic according to the different instruction types. The computation logic is not complete ALU logic, it is just simple add/sub logic, but they are representative. Load bit register contains the value loaded from the RAM, it is used in further computations.
The finite state machine mainly focuses on intruction decode, it takes in insturction and output corresponding control signals for other part of EC2.
Below are the source code
|
文件: |
EC2.pdf |
大小: |
21KB |
下载: |
下载 | |
|
文件: |
fsm.pdf |
大小: |
62KB |
下载: |
下载 | |
|
文件: |
datapath.pdf |
大小: |
53KB |
下载: |
下载 | |
|
文件: |
component.pdf |
大小: |
40KB |
下载: |
下载 | |
阅读(278) | 评论(0) | 转发(0) |