OpenRisc(OR1K,OR1200)仿真调试系统

本文介绍了针对OpenRisc OR1200处理器的仿真调试系统,包括基于Logger的文本信息调试和计划中的图形界面仿真调试工具。Logger系统在编译阶段集成,方便程序员获取执行流、寄存器、内存访问、专用寄存器修改和异常/中断等信息。图形界面工具将进一步提升用户体验,提供更直观的调试环境。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、OpenRisc调试系统(Logger文本信息)

    OR1200是一款开源的处理器,广泛应用于学校和实验室的小型项目中。普遍认为,其性能可以达到A7的水平。

    在应用了OR1200项目中,一般采用仿真的方法调试其软硬件的程序,这对于新手或者没有处理器调试经验或者对OR1200内部结构和接口不熟悉的工程人员来说,调试软件程序在处理器上的运行是相当的棘手,问题可能出在处理器的配置不当,也可能出在软件程序书写不规范。当然,如果在OR1200上运行已经在模拟器上调试好的程序,bug会少,但是,由于软硬件环境和模拟器的不同,有时候依然需要亲身对硬件进行调试。

    本文在程序员的角度出发,设计了一款类Trace系统,只需要在编译OR内核源代码的阶段,将该部分的RTL同时进行编译,那么在仿真的时候,就能打印输出程序执行过程中的信息,这些信息完全是程序员调试的必备信息。它不需要调试者了解处理器的内部结构,不用关注仿真过程,只需要分析输出的信息,即可确定所有的软件问题。

    这些打印的信息包括五个方面:

    1、程序执行流(二级制指令及其对应的汇编)~~不好意思,不能对应到C语言。

    2、寄存器修改(记录指令对寄存器的修改)

    3、内存访问(记录指令对内存的访问)

    4、专用寄存器修改(记录对OR专用寄存器如SR等)

    5、异常/中断(记录异常或者中断发生点)

    通过指定关键字,可以打印其中的任意部分信息(1是必须打印的,其他信息可选择性打印

Purpose of this tutorial is to help you compose and implement a custom, OpenRISC based, embedded system in the eastiest way possible. Unexperienced users should be warned that the OpenRISC processor is quite difficult processor : the lack of a self-configuring embedded system- package and the more ‘open’ nature of the OpenRISC compared to other opensource processors like the Leon SPARC is one of the reasons for this. Before proceeding, check if you have the following software and hardware: Hardware: - Linux-PC or Windows-PC - Development board with Altera FPGA (minimum 8000LEs), UART and 6 available pins. Software: - Correctly built OpenRISC-GNU Toolchain - Altera Quartus II 3.0 (or Quartus II Web edition) with service pack 2 - For Windows : WinCVS 1.2 (http://prdownloads.sourceforge.net/cvsgui/WinCvs120.zip) If you experience problems building the OpenRISC-GNU Toolchain, there is also an OpenRISC Software tutorial available from our website (http://emsys.denayer.wenk.be). The flow of implementing a custom, OpenRISC based, embedded system is: A. retreive OpenRISC Platform HDL source-code B. remove unnecessary components from source-code C. adjust RAM module D. synthesize and place & route OpenRISC based system E. download F. test the OpenRISC system The OpenRISC Platform source code is available through a CVS server. To make sure that this tutorial doesn’t get obsolete, the source code that will be downloaded is the same version that was used writing this tutorial. IN WINDOWS: Windows doesn’t come with a cvs-client, so if you haven’t installed wincvs yet, you need to download the CVS client WinCVS 1.2 (http://prdownloads.sourceforge.net/cvsgui/WinCvs120.zip). After downloading, install and open it. First, configure WinCVS: ??goto menu item ‘Admin’ and click on ‘Preferences’ ??‘CVSROOT’ should be cvs@cvs.opencores.org:/home/oc/cvs ??‘Authentication” needs to be “passwd file on the cvs server” ??disable “Checkout read-only” at the ‘Globals’ tab. I
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值