破事水,本人菜鸡,轻喷。
测试环境:
https://wws.lanzous.com/iXlFOfoo5ib
freearmwithuclinux.rar
./arm6.v.............................................FreeArm7核心
./boot0.bin.........................................ROM镜像
./FreeARM7_intro.pdf.......................简单的介绍
./tb_sp.v ...........................................TestBench
./uclinux0.bin....................................uclinux镜像,跑综合的时候加载到RAM
可以跑Cadence Xcelium 19.09 完整可用环境(环境变量,合法license等)
Linux version 2.4.17-uc0 (root@hpclab.cs.tsinghua.edu.cn) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(-msep-data patches)) #1 Sun Feb 16 21:36:15 HKT 2003
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
On node 0 totalpages: 1024
zone(0): 0 pages.
zone(1): 1024 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 13.00 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2992KB available (827K code, 163K data, 36K init)
Dentry-cache hash table entries: 512 (order: 0, 4096 bytes)
Inode-cache hash table entries: 512 (order: 0, 4096 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 1400000-145DBFF [VIRTUAL 1400000-145DBFF] (RO)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram0 /var
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
GDB/ARMulator support by <davidm@snapgear.com>
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
此时已经进入uclinux内核,仿真结束。工作目录下会生成‘log.txt’
tb_sp.v:521
$fdisplay(log,"N %h :p %7h, i %8h, R %h,%h,%h,%h,%h,%h,%h,%h,%h,%h,%h,%h,%h,%h,%h,%h,C %h,-->%.d",log_cnt,u_arm6.rf-8,u_arm6.cmd,register[0],register[1],register[2],register[3],register[4],register[5],register[6],register[7],register[8],register[9],register[10],register[11],register[12],register[13],register[14],register[15],{u_arm6.cpsr[10:7],20'b0,u_arm6.cpsr[6:5],1'b0,u_arm6.cpsr[4:0]},$time);
eg:
N 00124f80 :p 10bb060, i e2500001, R 0000a7e0,00000001,00000006,00000007,00000007,00002000,010daa74,010e7ef4,00000005,010e0928,010daa74,010d9fe4,010d9f6c,010d9fc0,01000460,010bb068,C 20000053,--> 24809345
格式:
N 日志编号 :p PC寄存,i 指令 寄存器0 寄存器1 寄存器2 寄存器3 寄存器4 寄存器5 寄存器6 寄存器7 寄存器8 寄存器9 寄存器10 寄存器11 寄存器12 寄存器13 寄存器14 寄存器15 模式标志寄存器 -->仿真执行时间
总结:
FreeARM7代码比较规范,可读性较高,变量命名也比较标准;非常适合初学者学习ARM内核。可以用Xcelium,ModelSim跑综合;目前也可以用Cadence Genus+TSMC28跑通逻辑综合。
声明:不提供EDA及PDK,侵立删。