|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本文参考:http://dv333.com/index.php/archives/161,自己简单试了一下,很有学习价值,无论对于验证人员,还是FPGA人员都可以作为理解一个经典的ARM CPU的好教材。
这个RISC CPU (Amber) 开发于opencores网站(www.opencores.org),大家可以自己注册下载它。它兼容比较旧的ARM指令集,所以没有专利问题。这个项目经过Xilinx Spartan6验证过。cpu可以跑40M,有3级和5级流水。系统带ethernet,uart,和DDR3. 可以用arm-linux cross compile tool来实现汇编和C程序的编译。它本身已经实现了vmlinux (linux2.4内核)的boot。所以是一个比较好的学习对象。
简化的代码可以从下面网站下载,而且可以在线仿真,看到仿真结果。
http://dv333.com/index.php/archives/161
ARM-compatible 32-bit RISC CPU Amber Study (1)
Amber isARM-compatible 32-bit RISC processor. The Amber core is fully compatible with the ARM® v2a instruction set architecture (ISA) and is therefore supported by the GNU toolset. This older version of the ARM instruction set is supported because it is not covered by patents so can be implemented without a license from ARM.
Arch as below:
.
The hello world simulation result:
Amber Boot Loader v20150406182528
j 0x00008000
Hello,DV World!
—————————————————————————-
Amber Core
> User FIRQ IRQ SVC
r0 0x00000010
r1 0x16000000
r2 0x00000000
r3 0x00000000
r4 0x0c008003
r5 0xdeadbeef
r6 0xdeadbeef
r7 0xdeadbeef
r8 0xdeadbeef 0xdeadbeef
r9 0xdeadbeef 0xdeadbeef
r10 0x00000011 0xdeadbeef
r11 0xf0000000 0xdeadbeef
r12 0x00001ed8 0xdeadbeef
r13 0x08000000 0xdeadbeef 0xdeadbeef 0x01ffffb0
r14 (lr) 0x00008020 0xdeadbeef 0xdeadbeef 0x600003fb
r15 (pc) 0x000084ac
Status Bits: N=0, Z=1, C=1, V=0, IRQ Mask 0, FIRQ Mask 0, Mode = User
—————————————————————————-
++++++++++++++++++++
Passed hello-dv-world 48324 ticks
++++++++++++++++++++
$finish called from file “vlog/tb/tb.v”, line 509.
$finish at simulation time 1208077500
Waveform:
http://dv333.com/index.php/archives/161 |
|