原创 【博客大赛】简易cpu的设计2-汇编指令波形仿真

2015-5-23 17:05 1056 16 16 分类: FPGA/CPLD

Simulated waveforms &Machine instructions:

Just  AND

Machine instructions:

20150523170253325001.png

The ram.mif

20150523170300930002.png

The waveforms and results

20150523170309660003.png

Explanation: If s1=0036s2=0064 Then s1 and s2? From the waveform we can

find s1 and s2=0024.

Just  not

Machine instructions:

20150523170315730004.png

The ram.mif

20150523170323772005.png

The waveforms and results

20150523170329454006.png

Explanation: If s1=1234,then not s1=? From the waveform we find s1=EDCB

Just  shiftr

Machine instructions:

20150523170336972007.png

The ram.mif

20150523170343336008.png

The waveforms and results

20150523170356915009.png

Explanation: If s1=1234,then shiftr s1=? From the waveform we find s1=091A.

ADD,SUB,MPY

Machine instructions:

20150523170403865010.png

The ram.mif

20150523170412261011.png

 

The waveforms and results

20150523170420355012.png

Explanation: s1=3,s2=4,s3=2,s4=7, From the waveform we find 3*4+2-7=7.

ADD,LOOP,MPY,DIV(1+2+…+49+50)*3/8

Machine instructions:

20150523170428375013.png

The ram.mif

20150523170436311014.png

The waveforms and results

20150523170443160015.png

Explanation: From the waveform we find 1+2+…+49+50=1275, 1275*3=3825,

3285/8=478.

The contents of location 21 is 478

20150523170450920016.png

Conclusions:

1From the experiment we learn what is cpu, how the cpu works.

2Through using quartus2 ,I learn to program by myself, in the experiment I found two errors ,then I try to solve the problem. Errors 1: ACTION: Successfully run the Timing Analyzer or Fitter before running timing simulation. Solutionsstart classic timing analyzer first; Errors 2: Error: Cannot run Timing Analyzer (quartus_tan) -- Fitter (quartus_fit) failed or was not run  solutions: start fitter first.

3Of course, in the meantime I meet multiple difficulties, I ask my classmates, we help each other.

4Programming needs to be patient, we should remember it.

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
16
关闭 站长推荐上一条 /3 下一条