<?xml version="1.0" encoding="gbk"?> <rss version="2.0"><channel> <title>论坛精华帖</title> <link>http://www.broadkey.com.cn/XML.ASP</link><description>TEAM Board - 科伟奇电子</description> <copyright>TEAM 2.0.5 Release</copyright><generator>TEAM Board by TEAM5.Cn Studio</generator> <ttl>30</ttl><item><link>http://www.broadkey.com.cn/Thread.asp?tid=187 </link><title>Nios&amp;nbsp;II处理器的嵌入式自动指纹识别</title><author>kavin</author><pubDate>2009/12/1 10:31:28</pubDate><description><![CDATA[<p>摘要：介绍基于<a style="color: blue; font-weight: normal; text-decoration: none" href="/news/listbylabel/label/Nios">Nios</a> <a style="color: blue; font-weight: normal; text-decoration: none" href="/news/listbylabel/label/II">II</a>处理器的<a style="color: blue; font-weight: normal; text-decoration: none" href="/news/listbylabel/label/嵌入式">嵌入式</a>自动<a style="color: blue; font-weight: normal; text-decoration: none" href="/news/listbylabel/label/指纹识别">指纹识别</a>系统的实现方法；具体说明自动指纹识别系统的基本原理、系统总体结构、硬件结构设计、用户自定义指令的设计，以及指纹识别算法的处理流程和实现方法。</p>
<p><br />
关键词：嵌入式 指纹识别 Nios II 定制指令</p>
<p>引 言</p>
<p>　　指纹识别作为生物特征识别的一种，在身份识别上有着其他手段不可比拟的优越性：人的指纹具有唯一性和稳定性的特点；随着指纹传感器性能的提高和价格的降低，指纹的采集相对容易；指纹的识别算法已经较为成熟。由于指纹识别的诸多优点，指纹识别技术已经逐渐走入民用市场，并应用到许多嵌入式设备中。</p>
<p>　　目前的嵌入式处理器种类繁多。<a style="color: blue; font-weight: normal; text-decoration: none" href="/news/listbylabel/label/Altera">Altera</a>公司的Nios II处理器是用于可编程逻辑器件的可配置的软核处理器，与Altera的低成本的<a style="color: blue; font-weight: normal; text-decoration: none" href="/news/listbylabel/label/Cyclone">Cyclone</a> FPGA组合，具有很高的性能价格比。本系统采用Nios II和Cyclone EP1C20嵌入式系统开发板，以及Veridicom公司的FPS200指纹传感器芯片，实现了一个嵌入式自动指纹识别系统。</p>
<p>1 总体设计及系统架构</p>
<p>　　本系统有两大功能：指纹登记和指纹比对。指纹登记主要包括指纹采集、指纹图像预处理、特征点提取、特征模板存储和输出显示；指纹比对的前三步与指纹登记相同，但在特征点提取后，是将生成的特征模板与存储在指纹特征模板库中的特征模板进行特征匹配，最后输出显示匹配结果。自动指纹识别系统的基本原理框图如图1所示。</p>
<p>　　本系统在结构上分为三层：系统硬件平台、操作系统和指纹识别算法。系统层次结构如图2所示。</p>
<p><strong><img alt="" src="http://editerupload.eaw.com.cn/200812/69f36647b0d96d854502c97fea0d8f6f.jpg" /><br />
</strong>最底层&mdash;&mdash;系统硬件平台，是系统的物理基础，提供软件的运行平台和通信接口。系统的硬件平台在Altera的Nios II Cyclone嵌入式系统开发板上实现，指纹传感器采用美国Veridicom公司的FPS200。FPS200可输出大小为256&times;300像素、分辨率为500 dpi的灰度图像。</p>
<p>　　第二层是操作系统，采用&mu;C/OSII。&mu;C/OSII是一个基于抢占式的实时多任务内核，可固化、可剪裁、具有高稳定性和可靠性。这一层提供任务调度以及接口驱动，同时，通过硬件中断来实现系统对外界的通信请求的实时响应，如对指纹采集的控制、对串口通信的控制等。这种方式可以提高系统的运行效率。</p>
<p>　　最上层是指纹识别核心算法的实现。该算法高效地对采集到的指纹进行处理和匹配。采用C语言在Nios II的集成开发环境（IDE）中实现。</p>
<p>2 系统硬件的设计与实现</p>
<p>2.1 Nios II嵌入式软核处理器简介<br />
　　Nios II嵌入式处理器是Altera公司于2004年6月推出的第二代用于可编程逻辑器件的可配置的软核处理器，性能超过200 DMIPS。Nios II是基于哈佛结构的RISC通用嵌入式处理器软核，能与用户逻辑相结合，编程至Altera的FPGA中。处理器具有32位指令集，32位数据通道和可配置的指令以及数据缓冲。它特别为可编程逻辑进行了优化设计，也为可编程单芯片系统（SoPC）设计了一套综合解决方案。Nios II处理器系列包括三种内核：一种是高性能的内核（Nios II/f）；一种是低成本内核（Nios II/e）；一种是性能/成本折中的标准内核（Nios II/s），是前两种的平衡。本系统采用标准内核。</p>
<p>　　Nios II 处理器支持256 个具有固定或可变时钟周期操作的定制指令；允许Nios II设计人员利用扩展CPU指令集，通过提升那些对时间敏感的应用软件的运行速度，来提高系统性能。</p>
<p>2.2 硬件平台结构</p>
<p>　　系统的硬件平台结构如图3所示。<br />
<img alt="" src="http://editerupload.eaw.com.cn/200812/8df0fc86956d07aec39972dbaf609044.jpg" width="444" height="364" /><br />
　本系统使用FPS200指纹传感器获取指纹图像。FPS200是电容式固态指纹传感器，采用CMOS技术，获取的图像为256&times;300像素，分辨率为500 dpi。该传感器提供三种接口方式：8位微机总线接口、集成USB全速接口和集成SPI接口。本系统采用集成SPI接口。指纹采集的程序流程是：首先初始化FPS200的各个寄存器，主要是放电电流寄存器（DCR）、放电时间寄存器（DTR）和增益控制寄存器(PGC)的设置；然后查询等待，指纹被FPS200采集进入数据寄存器后，通过DMA存入内存。</p>
<p>　　由于从指纹传感器采集到的指纹图像数据在80 KB左右，以DMA方式存入片内RAM。Nios II对指纹图像数据进行处理后，生成指纹特征模板，在指纹登记模式下，存入片外Flash中；在指纹比对模式下，与存储在Flash中的特征模板进行匹配，处理结果通过LCD和七段LED显示器输出显示。</p>
<p>　　本系统的硬件平台主要是在Altera的Nios II Cyclone嵌入式开发板上实现，选用Altera的Cyclone版本的Nios II开发套件，包括Nios II处理器、标准外围设备库、集成了SoPC Builder系统设计工具的QuartusII开发软件等。系统的主要组件Nios II的标准内核、片内存储器、SPI、UART、DMA控制器、并行I/O接口、Avalon总线、定时器等都集成在一块Altera的Cyclone FPGA芯片上，使用SoPC Builder来配置生成片上系统。</p>
<p>　　SoPC Builder是功能强大的基于图形界面的片上系统定义和定制工具。SoPC Builder库中包括处理器和大量的IP核及外设。根据应用的需要，本系统选用Nios II Processor、OnChipMemory、Flash Memory(Common Flash Interface)、SPI、JTAG UART、DMA、Interval timer、LCD PIO、Seven Segment PIO、Avalon TriState Bridge等模块。对这些模块配置完成后，使用SoPC Builder进行系统生成。SOPC Builder自动产生每个模块的HDL文件，同时自动产生一些必要的仲裁逻辑来协调系统中各部件的工作。</p>
<p>2.3 使用Nios II的定制指令提高系统性能</p>
<p>　　使用Nios II的定制指令，可以将一个复杂的标准指令序列简化为一个用硬件实现的单一指令，从而简化系统软件设计并加快系统运行速度。Nios II的定制指令是与CPU的数据通路中的ALU相连的用户逻辑块。其基本操作是，接收从dataa和/或datab端口输入的数据，经过定制指令逻辑的处理，将结果输出到result端口。</p>
<p>　　在指纹识别算法中，对指纹图像的处理数据运算量大，循环数目多；而Nios II的定制指令个数已增加到256个，可以使用定制指令完成许多循环内的数据处理，从而加速数据处理的速度。</p>
<p>　　在对指纹图像的处理中，频繁地用到坐标转换，将图像的二维坐标转换为一维的存储地址；通过定制指令来完成坐标的转换，用一组易于用硬件实现的位移和加法运算替代乘加运算，可将转换时间缩短1/3。在方向图计算中，要进行离散反正切变换，使用优化过的用硬件实现的定制指令来替代C语言中的atan函数，更可以将变换时间缩短到原来的1/1000。</p>
<p>　　定制指令逻辑和Nios II的连接在SoPC Builder中完成。Nios II CPU配置向导提供了一个可添加256条定制指令的图形用户界面，在该界面中导入设计文件，设置定制指令名，并分配定制指令所需的CPU时钟周期数目。系统生成时，Nios II IDE为每条用户指令产生一个在系统头文件中定义的宏，可以在C或C++应用程序代码中直接调用这个宏。</p>
<p>3 系统软件的设计与实现</p>
<p>　　本系统的指纹图像处理及识别算法采用C语言在Nios II IDE中实现。指纹识别算法的流程如图4所示。<br />
<img alt="" src="http://editerupload.eaw.com.cn/200812/f1334168eb1f559e587147cc194f8bbb.jpg" width="376" height="179" /><br />
　　背景分离是将指纹区与背景分离，从而避免在没有有效信息的区域进行特征提取，加速后续处理的速度，提高指纹特征提取和匹配的精度。采用标准差阈值跟踪法，图像指纹部分由黑白相间的纹理组成，灰度变化大，因而标准差较大；而背景部分灰度分布较为平坦，标准差较小。将指纹图像分块，计算每个小块的标准差。若大于某一阈值（本文取20），则该小块中的所有像素点为前景；否则，为背景。</p>
<p>　　方向图是用纹线的方向来表示原来的纹线。本文采用块方向图，将源指纹图像分成小块，使用基于梯度值的方向场计算方法，计算出每个小块的脊线方向。</p>
<p>　　图像增强的目的是改善图像质量，恢复脊线原来的结构；采用方向滤波，设计一个水平模板，根据计算出的方向图，在每个小块中将水平模板旋转到所需要的方向进行滤波。</p>
<p>　　图像的二值化是将脊线与背景分离，将指纹图像从灰度图像转换为二值图像。</p>
<p>　　二值化后的图像经过细化，得到纹线的骨架图像。细化采用迭代的方法，使用ZhangSuen并行细化算法，可对二值图像并行处理。</p>
<p>　　特征提取阶段，选择脊线端点和分叉点作为特征点，记录每一个特征点的类型、位置和方向信息，从而得到指纹的特征点集。但由于在指纹扫描和预处理阶段会引入噪声，产生大量伪特征点，因此需要进行伪特征点的去除。去除伪特征点后的特征点集作为特征模板保存。</p>
<p>　　特征匹配阶段采用基于特征点的匹配算法，通过平移和旋转变换实现特征点的大致对齐重合，计算坐标变换后两个模板中的特征点的距离和角度。如果小于某一阈值（本文的距离和角度阈值分别取5个像素和10&deg;）,则认为是一对匹配的特征点。计算得出所有匹配的特征点对后，计算匹配的特征点占模板中所有特征点的百分比S。根据系统的拒识率（FRR）和误识率（FAR）要求设置阈值TS。如果S大于或等于阈值TS，则认为是同一指纹；否则，匹配失败。</p>
<p>结语</p>
<p>　　本文提出了一种基于Nios II嵌入式处理器软核的自动指纹识别系统实现方法。使用Altera的Cyclone FPGA实现，且具有开发周期短、成本低等特点；同时，采用Nios II的定制指令来提高系统性能，利用硬件实现算法速度快的优点，使以Nios II处理器为核心的系统能够快速地完成大量数据处理。</p>
<p>　　　　　　　　　　　　　　　　　参考文献<br />
1 Frank Vahid，等. 嵌入式系统设计.骆丽等译. 北京:北京航空航天大学出版社, 2004<br />
2 任爱锋，等.基于FPGA的嵌入式系统设计.西安：西安电子工业大学出版社, 2004<br />
3 Nios II Custom Instruction User Guide. <a href="http://www.altera.com"><font color="#000000">www.altera.com</font></a><br />
4 Vizcaya P， Gerhardt L. A nonlinear orientation model for global description of fingerprints. Pattern Recognition, v. 29, no. 7<br />
5 柴晓光，等.民用指纹识别技术.北京：人民邮电出版社，2004</p>]]></description></item><item><link>http://www.broadkey.com.cn/Thread.asp?tid=82 </link><title>PowerPC简介及编程</title><author>frodo</author><pubDate>2009/11/26 21:51:13</pubDate><description><![CDATA[<p style="line-height: 150%"><big><big><strong><font size="5">一,PowerPC芯片</font></strong></big></big></p>
<p style="line-height: 150%"><strong><big><font size="4">&nbsp;&nbsp; </font></big>PowerPC是早期Motorola和IBM联合为Apple的MAC机开发的CPU芯片,商标权同时属于IBM和Motorola,并成为他们的主导成品.IBM主要的PowerPC产品有PowerPC604s(深蓝内部的CPU), PowerPC750,PowerPCG3(1.1GHz).Motorola主要有MC和MPC系列.尽管他们产品不一样,但都采用PowerPC的内核.这些产品大都用在嵌入式系统中.</strong></p>
<blockquote>
<p style="line-height: 150%"><a href="http://www.motorola.com/" target="_blank">Motorola公司网址</a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.ibm.com/" target="_blank">IBM公司网址</a></p>
</blockquote>
<p style="line-height: 150%">&nbsp;&nbsp;&nbsp;&nbsp; <strong>相关文章参见</strong> <a href="http://www.dash.nl/Applesites/applemuseum/sections/ppc.html" target="_blank">The PowerPC Triumph</a>&nbsp;&nbsp;&nbsp; <a href="http://http//www.lowendmac.com/musings/02/0501.html" target="_blank">PowerPC Today and Tomorrow</a>&nbsp;&nbsp;&nbsp; <a href="http://http//zdnet.com.com/2100-1106-802556.html?legacy=zdnn" target="_blank">IBM Pushes to 2GHz</a></p>
<p style="line-height: 150%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.eng.uci.edu/comp.arch/processors/powerpc/PCPower.html" target="_blank">The PowerPC Initiative</a>&nbsp;&nbsp;&nbsp; <a href="http://www.rcc.ryerson.ca/schools/rta/brd038/papers/1996/powerpc1.htm" target="_blank">The PowerPC Chip-Is It Future Of Electrinics ?</a></p>
<p style="line-height: 150%">　</p>
<p style="line-height: 150%"><strong><big><font size="4">Motorola的MPC860简介</font></big><font lang="ZH-CN" size="5" face="System"><a name="begin"></a>(摘录)</font></strong></p>
<font lang="ZH-CN" face="System">
<p style="line-height: 150%"><strong>&nbsp; MPC860</strong> PowerQUICC (Quad Integrated Communications Controller) 内部集成了微处理器和一些控制领域的常用外围组件, 特别适用于通信产品. 包括器件的适应性, 扩展能力和集成度等. MPC860 PowerQUICC集成了两个处理块. 一个处理块是嵌入的PowerPC核, 另一个是通信处理模块( CPM, Communications Processor Module), 通信处理模块支持四个串行通信控制器(SCC, Serial Communication Controller), 实际上它有八个串行通道: 四个SCC，两个串行管理控制器 (SMC, Serial Management Channels), 一个串行外围接口电路 ( SPI, Serial Peripheral Interface ) 和一个I2C( Inter-Integrated Circuit ) 接口. 由于CPM分担了嵌入式PowerPC核的外围工作任务, 这种双处理器体系结构功耗要低于传统的体系结构的处理器.</p>
<ul>
    <li>
    <p style="line-height: 150%">单出口, 嵌入式PowerPC核32比特版本(与PowerPC结构定义完全兼容)32x32位通用寄存器(GPRs, General Purpose Registers)</p>
    <ul>
        <li>
        <p style="line-height: 150%">4K数据Cache和4K指令Cache, 分别带有一个MMU.</p>
        </li>
        <li>
        <p style="line-height: 150%">存储管理单元(MMU)32-输入翻译后备缓冲器 ( TLBs )</p>
        </li>
        <li>
        <p style="line-height: 150%">32位数据,地址线</p>
        </li>
    </ul>
    </li>
    <li>
    <p style="line-height: 150%">存储控制器(八个存储体) </p>
    <ul><font lang="ZH-CN" face="System">
        <li>
        <p style="line-height: 150%">单线存储模块无逢接口，静态随即存取存储器(RAM), EPROM, FLASH MEMORY或DRAM等。</p>
        </li>
        <li>
        <p style="line-height: 150%">DRAM 控制器可编程支持绝大多数不同大小和速度的存储器</p>
        </li>
        <li>
        <p style="line-height: 150%">不同码组长度32K至256M </p>
        </li>
        </font><font face="宋体"> </font><font face="宋体"> </font></ul>
        <font face="宋体"> </font><font face="宋体"> </font></li>
        <li>
        <p style="line-height: 150%">四个16位定时器或两个32位定时器.</p>
        </li>
        <li>
        <p style="line-height: 150%">系统集成单元 ( SIU, Sytstem Intergration Unit ) 主要包括:</p>
        <ul><font lang="ZH-CN" face="System">
            <li>
            <p style="line-height: 150%">软件看门狗</p>
            </li>
            <li>
            <p style="line-height: 150%">中断定时器</p>
            </li>
            <li>
            <p style="line-height: 150%">PowerPC 时基和实时时钟 (RTC, Real Time Clock )</p>
            </li>
            <li>
            <p style="line-height: 150%"><font lang="ZH-CN" face="System">复位控制器</font> <font face="宋体"> </font></p>
            </li>
            <li>
            <p style="line-height: 150%">JTAG 1149.1 测试口</p>
            </li>
            </font><font face="宋体"> </font><font face="宋体"> </font><font face="宋体"> </font></ul>
            <font face="宋体"> </font><font face="宋体"> </font></li>
            <li>
            <p style="line-height: 150%">中断系统包括7根外部中断请求线, 12个具有中断能力的管脚, 16个内部中断源. 中断优先级可编程</p>
            </li>
            <li>
            <p style="line-height: 150%">通信处理器模块(CPM)主要包括:</p>
            <ul><font lang="ZH-CN" face="System">
                <li>
                <p style="line-height: 150%">RISC 控制器</p>
                </li>
                <li>
                <p style="line-height: 150%">5 K字节双口RAM</p>
                </li>
                <li>
                <p style="line-height: 150%">16个串行DMA (SDMA) 通道</p>
                </li>
                <li>
                <p style="line-height: 150%">三个平行</p>
                </li>
                </font><font face="宋体"> </font><font face="宋体"> </font><font face="宋体"> </font><font lang="ZH-CN" face="System">I/O 寄存器</font><font face="宋体"> </font></ul>
                <font face="宋体"> </font><font face="宋体"> </font><font lang="ZH-CN" face="System">7号信令系统, UART、BISYNC, 比特流透明传输, 基于帧的透明传输 (CRC可选), 支持PPP (Point to Point Protocol)的异步HDLC等标准协议</font><font face="宋体"> </font></li>
                <li>
                <p style="line-height: 150%">四个波特率独立的发生器, 可以连接到任意一个SCC和SMC, 并允许运行中改变. 支持自动波特率</p>
                </li>
                <li>
                <p style="line-height: 150%">四个串行通信控制器 (SCC) ,支持以太网, HDLC/SDLC, HDLC 总线(用以实现基于HDLC的局域网)、AppleTalk,</p>
                </li>
                <li>
                <p style="line-height: 150%">两个串行管理控制器 (SMC), UART方式或透明传输, 含GCI(General Circuit Interface)控制器, 可以连到时分复用通道</p>
                </li>
                <li>
                <p style="line-height: 150%">一个串行外围接口电路( SPI ), 是MC68302 SCP的扩展, 支持主从模式, 支持同一总线上多主操作</p>
                </li>
                <li>
                <p style="line-height: 150%">一个I2C ( Inter-Integrated Circuit ) 接口,支持主从模式, 支持多主环境</p>
                </li>
                <li>
                <p style="line-height: 150%">单插座PCMCIA-异步终端适陪器(ATA)接口</p>
                <ul>
                    <li>
                    <p style="line-height: 150%">单PCMCIA插座</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">八储存或有效输入/输出(I/O)窗口</p>
                    </li>
                </ul>
                </li>
            </ul>
            <p style="line-height: 150%">　</p>
            <table border="1" cellspacing="1" width="687">
                <tbody>
                    <tr>
                        <td height="31" valign="top" width="10%"><font lang="ZH-CN" face="System"><strong>Performance</strong></font></td>
                        <td height="31" valign="top" width="9%"><font lang="ZH-CN" face="System"><strong>Frenquency (MHz)</strong></font></td>
                        <td height="31" valign="top" width="21%"><font lang="ZH-CN" face="System"><strong>TIMER</strong></font></td>
                        <td height="31" valign="top" width="9%"><font lang="ZH-CN" face="System"><strong>Data Bus</strong></font></td>
                        <td height="31" valign="top" width="8%"><font lang="ZH-CN" face="System"><strong>Address Bus</strong></font></td>
                        <td height="31" valign="top" width="9%"><font lang="ZH-CN" face="System"><strong>Ext Intterrupts</strong></font></td>
                        <td height="31" valign="top" width="9%"><font lang="ZH-CN" face="System"><strong>Int Interruputs</strong></font></td>
                        <td height="31" valign="top" width="11%"><font lang="ZH-CN" face="System"><strong>Watchdog</strong></font></td>
                        <td height="31" valign="top" width="13%"><font lang="ZH-CN" face="System"><strong>PACKING</strong></font></td>
                    </tr>
                    <tr>
                        <td height="40" valign="top" width="10%"><font lang="ZH-CN" face="System">52MIPS @40MHz</font></td>
                        <td height="40" valign="top" width="9%"><font lang="ZH-CN" face="System">40</font></td>
                        <td height="40" valign="top" width="21%"><font lang="ZH-CN" face="System">Four 16-Bit Timers or Two 32-Bit Timers</font></td>
                        <td height="40" valign="top" width="9%"><font lang="ZH-CN" face="System">8/16/32</font></td>
                        <td height="40" valign="top" width="8%"><font lang="ZH-CN" face="System">32</font></td>
                        <td height="40" valign="top" width="9%"><font lang="ZH-CN" face="System">12</font></td>
                        <td height="40" valign="top" width="9%"><font lang="ZH-CN" face="System">16</font></td>
                        <td height="40" valign="top" width="11%"><font lang="ZH-CN" face="System">Software Watchdog</font></td>
                        <td height="40" valign="top" width="13%"><font lang="ZH-CN" face="System">BGA357</font></td>
                    </tr>
                </tbody>
            </table>
            <p>　</p>
            <p><strong><big><font size="4">IBM的PowerPC405GP芯片简介&nbsp; </font></big></strong></p>
            <p><big><font size="4">编程示例可参见<strong> </strong></font></big><a href="http://www.embhelp.com/drew/mypage/sourcecode.htm#INIT">系统初始化</a>&nbsp; <a href="http://www.embhelp.com/drew/mypage/example/pci.htm">PCI设备初始化和网络分析</a></p>
            <blockquote>
            <p><font face="System">32位RISC嵌入式CPU,内核主频达到200MHz PC-100,动态随即存储接口(Synchronous DRAM Interface). </font></p>
            <p><font face="System">100MHz外围设备总线(External Peripheral Bus)</font></p>
            <ul>
                <li><font face="System">Flash ROM/Boot ROM 接口</font></li>
                <li><font face="System">支持8-16-32位SRAM和外设</font></li>
                <li><font face="System">8个Devices</font></li>
                <li><font face="System">支持外部控制</font></li>
            </ul>
            <p><font face="System">DMA---,支持外设,内部UART和内存,4个通道</font></p>
            <p><font face="System">PCI总线接口---可设置同步,异步内置时钟</font></p>
            <p><font face="System">以太网(Ethernet)----支持10/100Mbps全双工(Full-duplex)</font></p>
            <p><font face="System">媒介独立接口(Medium Independent Interface(MII)</font></p>
            <p><font face="System">可编程中断控制器(Programmable Interrupt Controller)----支持来自不同资源的中断</font></p>
            <ul>
                <li><font face="System">支持24个中断,7个外部中断,17个内部中断</font></li>
                <li><font face="System">边沿触发或上下沿触发</font></li>
                <li><font face="System">......................</font></li>
            </ul>
            <p><font face="System">CPU一次只能处理一个中断,共有18个中断优先级(priority order)</font></p>
            <p><font face="System">32位地址线可达4GB的寻址空间</font></p>
            <p><font face="System">主要控制器包括: SDRAM存储控制器,外部设备总线控制器(EBC),DMA控制器,UART,IIC总线接口,通用寄存器控制器(General Purpose I/O Controller),通用中断控制器(Universal Interrupt Controller, UIC), &nbsp; JTAG.</font></p>
            <p><font face="System">两个总线分别支持不同的外设</font></p>
            <ul>
                <li><font face="System">64位,100M Processor Local Bus(PLB),支持 high performance 外设</font></li>
                <li><font face="System">32位,50M On-chip Perpheral Bus(OPB),支持 less performance-critical 外设</font></li>
            </ul>
            <p><strong><font face="System">先进的功能</font></strong></p>
            <ul>
                <li><font face="System">PCI接口</font></li>
                <li><font face="System">内部集成以太网口(Ethernet port on-chip)</font></li>
                <li><font face="System">Code pack decompression to improve code density</font></li>
            </ul>
            <p><strong><font face="System">驱动PowerPC405GP的PowerPC405B3内核包括</font></strong></p>
            <ul>
                <li><font face="System">200MHz CPU 内核</font></li>
                <li><font face="System">内存管理单元(Memory Mannanagement Unit,MMU)</font></li>
                <li><font face="System">16K指令缓村(instruction caches)和8K数据缓存(data caches)</font></li>
                <li><font face="System">Multiply-Accumulate (MAC)功能</font></li>
                <li><font face="System">计时器(Timers)</font></li>
                <li><font face="System">调试,JTAG和Trace debug logic</font></li>
                <li><font face="System">内核带有4K的SRAM</font></li>
            </ul>
            <blockquote>
            <p><font face="System">一个64位累加计时器,由CPU时钟驱动</font></p>
            <p><font face="System">三个计时器:可编程内部计时器(Programmable Internal Timer,PIT),固定内部计时器(Fix Internal Timer,FIT),看门狗计时器(Watch Dog Timer,WDT)</font></p>
            </blockquote></blockquote>
            <p>　</p>
            <p><strong><big><big><font size="5">二,VxWorks装入PowerPC的过程</font></big></big></strong></p>
            <font lang="ZH-CN" face="System"><blockquote>
            <p>&nbsp;&nbsp;&nbsp;RISCWatch 是一套软件和硬件开发工具, 主要为IBM PowerPC 600/700系列微处理器和IBM PowerPC 400系列嵌入式处理器提供软硬件, 开发, 调试. </p>
            <p><font lang="ZH-CN" face="System">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 开发板JTAG口 (一般开发版都会甩出一个JTAG接口供开发调试用 ) 连出一个2*8针的接头与RISCWatch的仿真器端相连, 仿真器另一端通过网络连到装有RISCWatch软件的PC机. 不同种类的处理器JTAG管脚的定义不同, 所以和2*8针的接头连接也不同, 具体连结方法参见RISCWatch用户手册. </font></p>
            <p><font lang="ZH-CN" face="System">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 通过软件和一个配套的硬件仿真器将VxWorks image写入512K的Flash Socket. RISCWatch一端接板子上的JTAG接口,另一端接网络Network. </font></p>
            <p><font lang="ZH-CN" face="System">RISCwatch的执行过程顺序: 初始化RAM--------&gt;清理ROM--------&gt;写VxWorks image .bin到FlashRom</font></p>
            <p><font lang="ZH-CN"><strong>用RISCwatch装入VxWorks的操作过程</strong></font></p>
            <blockquote>
            <p><font lang="ZH-CN">1.运行RISCwatch: 打开file-----&gt;command file------&gt;flashwri.cmd&nbsp;&nbsp; </font></p>
            <p><font lang="ZH-CN">2.开启Normal 初始化RAM, 在编辑框中键入run, 开始向FlashRom中写入Bootrom.bin,写入完成,键入stop,至此写入完成</font></p>
            <p><font lang="ZH-CN">系统复位后, VxWorks运行,讲程序写入RAM中的各个地址</font></p>
            </blockquote>
            <p><strong><font lang="ZH-CN">RISCwatch中的文件定义</font></strong></p>
            <blockquote>
            <p><font lang="ZH-CN">文件rwppc.env: 可更改,如chip type, PC405GP等</font></p>
            <p><font lang="ZH-CN">文件flashwri.com: 可以察看,改变,如IP地址,load...., &nbsp; .out,&nbsp; .bin</font></p>
            <p><font lang="ZH-CN">文件flashprog.c: 输出生成 .out, 是写flash Rom 的文件, 写入 .bin</font></p>
            <p>　</p>
            </blockquote></blockquote>
            <p><strong><big><big><font size="5">三,调试工具及调试方法</font></big></big></strong></p>
            <blockquote>
            <p><font lang="ZH-CN"><strong>底层驱动调试&nbsp;</strong></font></p>
            <blockquote>
            <p style="line-height: 150%"><font lang="ZH-CN">RISCWATCH 是一种很好的调试工具,观察内存情况及程序运行.</font></p>
            <p style="line-height: 150%"><font lang="ZH-CN">&nbsp;&nbsp; 通过计算机串口与处理器UART相连,设置计算机的超级终端(Hyper Terminal), 通过超级终端察看硬件情况(寄存器设置,数据等)和程序运行情况,当然程序重要加入向UART送出数据的指令,用Beep报警也是经常用的.这种调试方法是用于底层调试硬件,找出硬件存在的问题.</font></p>
            </blockquote><blockquote>
            <p style="line-height: 150%"><font lang="ZH-CN">&nbsp;&nbsp; VxWorks 在Tornado Shell 不能正常运行前,也是采取这种方法来调试程序,不过一般不是硬件问题,而是BSP中存在的问题,需要根据硬件,修改BSP.</font></p>
            <p style="line-height: 150%"><font lang="ZH-CN">以上是Shell不能正常运行是所采取的方法,Shell正常运行后,Shell是最好的调试工具.</font></p>
            <p>　</p>
            </blockquote>
            <p><strong>上层应用程序调试跟踪</strong></p>
            <blockquote>
            <p style="line-height: 150%">Tornade2.0中Debuger和Shell是最好的调试工具,可以单步执行跟踪程序运行,观察内存情况和系统资源情况.其中Shell的功能要好于Debuger,不过Debuger操作较为容易,直观.</p>
            </blockquote><blockquote>
            <p>　</p>
            </blockquote></blockquote>
            <p><strong><big><big><font size="5">四,内存映射</font></big></big></strong></p>
            <font lang="ZH-CN" face="System"><blockquote>
            <p>MPC860的内存资源(如寄存器等)映射在一个连续的16K Block存储区内,可通过SPR中的Internal Map Memory Register(IMMR)进行解析</p>
            </blockquote></font><blockquote>
            <p><font lang="ZH-CN" face="System">对 Memory Registers 操作的几种方式</font></p>
            </blockquote><blockquote><blockquote>
            <p><font lang="ZH-CN" face="System">Indirectly Access Registers Via Memory-----------------------通过指定的I/O寄存器(I/O port)对一个寄存器操作,</font></p>
            <p><font lang="ZH-CN" face="System">如PCI部分I/O操作示例如下:</font></p>
            <blockquote>
            <p><strong>PCI地址I/O寄存器: PCICFGADR&nbsp; 0xEEC00000<br />
            PCI数据I/O寄存器: PCICFGDATA 0xEEC00004</strong></p>
            <p><strong>具体操作方法:将所要读写的寄存器地址写入PCI地址I/O寄存器PCICFGADR,从PCI数据I/O寄存器PCICFGDATA读出数据,这个数据就是写入地址的寄存器的数据.</strong></p>
            <p>RegAddr = 0x80000000 | ((offset|BusDevFunc) &amp; 0xFFFFFFFC);</p>
            <p>RegAddr寄存器地址, 0x80000000 PCI core Address, offset寄存器偏移量</p>
            <p>/*<br />
            <strong>* 写RegAddr到PCI I/O地址寄存器PCICFGADR<br />
            </strong>*/<br />
            sysPciOutLong(PCICFGADR, RegAddr);<br />
            <br />
            /*<br />
            <strong>* 从PCI I/O数据寄存器读RegAddr数据data<br />
            </strong>*/<br />
            data = (unsigned int)sysPciInByte(PCICFGDATA | (offset &amp; 0x3));</p>
            </blockquote>
            <p><font lang="ZH-CN" face="System">Directly Access Registers Via Memory-------------------------直接对寄存器操作</font></p>
            <p><font lang="ZH-CN" face="System">Indirectly Access Registers Via DCR-----------------------------同上,</font></p>
            <p><font lang="ZH-CN" face="System">Directly Access Regesters Via DCR-------------------------------同上,</font></p>
            </blockquote></blockquote><font lang="ZH-CN" face="System"><blockquote>
            <p>　</p>
            </blockquote></font>
            <p><strong><big><big><font size="5">五,PowerPC内核定义</font></big></big></strong></p>
            <font lang="ZH-CN" face="System"><blockquote>
            <p style="line-height: 150%">双处理器结构既提供了程序运行的通用处理器,又提供了用于通信用处的特殊通信处理器(CPM).</p>
            </blockquote><blockquote>
            <p style="line-height: 150%">32位PowerPC结构特点</p>
            </blockquote>
            <ul>
                <ul>
                    <li>
                    <p style="line-height: 150%">32个32位通用寄存器 ( GPRs )</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">寄存器支持用户级指令集 (不包括浮点指令),包括integer exception register (XER ),condition register(CR),link register(LR),counter register ( CTR )</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">时间加减及寄存器</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">管理级寄存器,与PowerPC定义兼容</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">Configuration-----Machine Status Register ( MSR ) </p>
                    </li>
                    <li>
                    <p style="line-height: 150%">Exception model-----Save/restore registers 0 and 1 (SRR0 and SRR1), DSI status register ( DSISR ), data address register ( DAR )</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">PowerPC 减量器</p>
                    </li>
                    <li>
                    <p style="line-height: 150%">PowerPC 时基和 实时时钟（RTC）</p>
                    </li>
                </ul>
            </ul>
            <p style="line-height: 150%"><font lang="ZH-CN" size="2" face="System"><strong>　</strong></font></p>
            <ul>
                <li><font lang="ZH-CN" size="4"><strong>地址映射</strong></font></li>
            </ul>
            <p>　</p>
            <div align="center"><center>
            <table border="1" width="637" height="365">
                <tbody>
                    <tr>
                        <td height="16" width="197" align="left">
                        <p align="center"><big><strong><font size="4">名称</font></strong></big></p>
                        </td>
                        <td height="16" width="257" align="center">
                        <p align="center"><big><strong><font size="4">内存物理地址</font></strong></big></p>
                        </td>
                        <td height="16" width="165" align="left">
                        <p align="center"><big><strong><font size="4">备注</font></strong></big></p>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" width="197" align="left">SDRAM</td>
                        <td height="25" width="257" align="center">0x00000000~0x7FFFFFFF</td>
                        <td height="25" width="165" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="16" width="197" align="left">PCI</td>
                        <td height="16" width="257" align="center">0x80000000~0xEF5FFFFF</td>
                        <td height="16" width="165" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="18" width="197" align="left">
                        <p align="left"><strong>Internal Peripherals</strong></p>
                        </td>
                        <td height="18" width="257" align="center">0xEF600000~0xEFFFFFFF</td>
                        <td height="18" width="165" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="24" width="197" align="left">UART</td>
                        <td height="24" width="257" align="center">.....</td>
                        <td height="24" width="165" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="26" width="197" align="left">.....</td>
                        <td height="26" width="257" align="center">.....</td>
                        <td height="26" width="165" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="11" width="197" align="left">
                        <p align="left"><strong>External Peripherals</strong></p>
                        </td>
                        <td height="11" width="257" align="center">0xF0000000~0xFF7FFFFF</td>
                        <td height="11" width="165" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="30" width="197" align="left">NVRAM/RTC</td>
                        <td height="30" width="257" align="center">
                        <p align="center">&nbsp; 0xF0<u>00</u>0000~0xF0001FFF &nbsp;</p>
                        </td>
                        <td height="30" width="165" align="left">(8K)下画线为片选</td>
                    </tr>
                    <tr>
                        <td height="20" width="197" align="left">Keybord/Mouse</td>
                        <td height="20" width="257" align="center">0xF0<u>10</u>0000~0xF0100001</td>
                        <td height="20" width="165" align="left">下画线为片选</td>
                    </tr>
                    <tr>
                        <td height="23" width="197" align="left">FPGA_INT_ST..</td>
                        <td height="23" width="257" align="center">0xF0<u>30</u>0000~0xF0300000</td>
                        <td height="23" width="165" align="left">下画线为片选</td>
                    </tr>
                    <tr>
                        <td height="28" width="197" align="left">FPGA_INT_EN..</td>
                        <td height="28" width="257" align="center">0xF0<u>30</u>0001~0xF0300001</td>
                        <td height="28" width="165" align="left">下画线为片选</td>
                    </tr>
                    <tr>
                        <td height="27" width="197" align="left">
                        <p align="left"><strong>Socket Flash</strong></p>
                        </td>
                        <td height="27" width="257" align="center">0xFFF80000~0xFFFFFFFF</td>
                        <td height="27" width="165" align="left">512K</td>
                    </tr>
                    <tr>
                        <td height="35" width="197" align="left">
                        <p align="left"><strong>SRAM</strong></p>
                        </td>
                        <td height="35" width="257" align="center">0xFFF00000~0xFFF7FFFF</td>
                        <td height="35" width="165" align="left">512K(可通过Swich与Socket Flash 切换)</td>
                    </tr>
                </tbody>
            </table>
            </center></div>
            <font lang="ZH-CN" size="1" face="System">
            <p><strong>　</strong></p>
            <ul>
                <li><strong><font size="4" face="Helvetica-Bold+2,Times New Roman">中断优先级(Exception Priority)</font></strong></li>
            </ul>
            <p>　</p>
            <div align="center"><center>
            <table border="1" cellspacing="1" cellpadding="7" width="666">
                <tbody>
                    <tr>
                        <td height="33" valign="top" width="11%" align="center"><font size="4"><strong>Priority</strong></font></td>
                        <td height="33" valign="top" width="42%"><font size="4"><strong>Exception Type</strong></font></td>
                        <td height="33" valign="top" width="47%"><font size="4"><strong>Cause</strong></font></td>
                    </tr>
                    <tr>
                        <td height="29" valign="top" width="11%" align="center"><font size="3">1</font></td>
                        <td height="29" valign="top" width="42%"><font size="3">Development port</font></td>
                        <td height="29" valign="top" width="47%"><font size="3">nonmaskable interrupt Signal from the development port</font></td>
                    </tr>
                    <tr>
                        <td height="31" valign="top" width="11%" align="center"><font size="3">2</font></td>
                        <td height="31" valign="top" width="42%"><font size="3">System reset</font></td>
                        <td height="31" valign="top" width="47%"><font size="3">interrupt IRQ0 assertion</font></td>
                    </tr>
                    <tr>
                        <td height="31" valign="top" width="11%" align="center"><font size="3">3</font></td>
                        <td height="31" valign="top" width="42%"><font size="3">Instruction-related exceptions</font></td>
                        <td height="31" valign="top" width="47%"><font size="3">Instruction processing</font></td>
                    </tr>
                    <tr>
                        <td height="27" valign="top" width="11%" align="center"><font size="3">4</font></td>
                        <td height="27" valign="top" width="42%"><font size="3">Peripheral breakpoint request or development port maskable interrupt</font></td>
                        <td height="27" valign="top" width="47%"><font size="3">Breakpoint signal from any peripheral</font></td>
                    </tr>
                    <tr>
                        <td height="31" valign="top" width="11%" align="center"><font size="3">5</font></td>
                        <td height="31" valign="top" width="42%"><font size="3">External interrupt (masked if MSR[EE] = 0) </font></td>
                        <td height="31" valign="top" width="47%"><font size="3">Signal from the interrupt controller</font></td>
                    </tr>
                    <tr>
                        <td height="56" valign="top" width="11%" align="center"><font size="3">6</font></td>
                        <td height="56" valign="top" width="42%"><font size="3">Decrementer interrupt(masked if MSR[EE] = 0)</font></td>
                        <td height="56" valign="top" width="47%"><font size="3">Decrementer request</font></td>
                    </tr>
                </tbody>
            </table>
            </center></div>
            <font lang="ZH-CN" face="System">
            <p>　</p>
            <ul>
                <li><font size="4" face="Helvetica-Bold+2,Times New Roman"><strong>中断控制器 (UIC) 的中断分配</strong></font></li>
            </ul>
            <p>　</p>
            <div align="center"><center>
            <table border="1" width="534" height="176">
                <tbody>
                    <tr>
                        <td height="15" width="50" align="center">
                        <p align="center"><big><strong><font size="4">中断</font></strong></big></p>
                        </td>
                        <td height="15" width="155" align="center"><big><strong><font size="4">极性</font></strong></big></td>
                        <td height="15" width="163" align="center"><big><strong><font size="4">触发方式</font></strong></big></td>
                        <td height="15" width="142" align="left">
                        <p align="center"><big><strong><font size="4">中断源</font></strong></big></p>
                        </td>
                    </tr>
                    <tr>
                        <td height="19" width="50" align="center">0</td>
                        <td height="19" width="155" align="center">正(High)</td>
                        <td height="19" width="163" align="center">电平(Level)</td>
                        <td height="19" width="142" align="left">UART 0</td>
                    </tr>
                    <tr>
                        <td height="18" width="50" align="center">1</td>
                        <td height="18" width="155" align="center">正(High)</td>
                        <td height="18" width="163" align="center">电平(Level)</td>
                        <td height="18" width="142" align="left">UART 1</td>
                    </tr>
                    <tr>
                        <td height="15" width="50" align="center">2</td>
                        <td height="15" width="155" align="center">正(High)</td>
                        <td height="15" width="163" align="center">电平(Level)</td>
                        <td height="15" width="142" align="left">IIC</td>
                    </tr>
                    <tr>
                        <td height="12" width="50" align="center">3</td>
                        <td height="12" width="155" align="center">正(High)</td>
                        <td height="12" width="163" align="center">电平(Level)</td>
                        <td height="12" width="142" align="left">External Master</td>
                    </tr>
                    <tr>
                        <td height="14" width="50" align="center">4</td>
                        <td height="14" width="155" align="center">正(High)</td>
                        <td height="14" width="163" align="center">电平(Level)</td>
                        <td height="14" width="142" align="left">PCI</td>
                    </tr>
                    <tr>
                        <td height="7" width="50" align="center">5</td>
                        <td height="7" width="155" align="center">正(High)</td>
                        <td height="7" width="163" align="center">电平(Level)</td>
                        <td height="7" width="142" align="left">DMA Channel 0</td>
                    </tr>
                    <tr>
                        <td height="6" width="50" align="center">6</td>
                        <td height="6" width="155" align="center">正(High)</td>
                        <td height="6" width="163" align="center">电平(Level)</td>
                        <td height="6" width="142" align="left">DMA Channel 1</td>
                    </tr>
                    <tr>
                        <td height="7" width="50" align="center">7</td>
                        <td height="7" width="155" align="center">正(High)</td>
                        <td height="7" width="163" align="center">电平(Level)</td>
                        <td height="7" width="142" align="left">DMA Channel 2</td>
                    </tr>
                    <tr>
                        <td height="5" width="50" align="center">8</td>
                        <td height="5" width="155" align="center">正(High)</td>
                        <td height="5" width="163" align="center">电平(Level)</td>
                        <td height="5" width="142" align="left">DMA Channel 3</td>
                    </tr>
                    <tr>
                        <td height="6" width="50" align="center">9</td>
                        <td height="6" width="155" align="center">正(High)</td>
                        <td height="6" width="163" align="center">电平(Level)</td>
                        <td height="6" width="142" align="left">MAL Wake UP</td>
                    </tr>
                    <tr>
                        <td height="2" width="50" align="center">10</td>
                        <td height="2" width="155" align="center">正(High)</td>
                        <td height="2" width="163" align="center">电平(Level)</td>
                        <td height="2" width="142" align="left">MAL SERR</td>
                    </tr>
                    <tr>
                        <td height="2" width="50" align="center">11</td>
                        <td height="2" width="155" align="center">正(High)</td>
                        <td height="2" width="163" align="center">电平(Level)</td>
                        <td height="2" width="142" align="left">MAL TXEOB</td>
                    </tr>
                    <tr>
                        <td height="5" width="50" align="center">12</td>
                        <td height="5" width="155" align="center">正(High)</td>
                        <td height="5" width="163" align="center">电平(Level)</td>
                        <td height="5" width="142" align="left">MAL RXEOB</td>
                    </tr>
                    <tr>
                        <td height="5" width="50" align="center">13</td>
                        <td height="5" width="155" align="center">正(High)</td>
                        <td height="5" width="163" align="center">电平(Level)</td>
                        <td height="5" width="142" align="left">MAL TXDE</td>
                    </tr>
                    <tr>
                        <td height="3" width="50" align="center">14</td>
                        <td height="3" width="155" align="center">正(High)</td>
                        <td height="3" width="163" align="center">电平(Level)</td>
                        <td height="3" width="142" align="left">MAL TXDE</td>
                    </tr>
                    <tr>
                        <td height="7" width="50" align="center">15</td>
                        <td height="7" width="155" align="center">正(High)</td>
                        <td height="7" width="163" align="center">电平(Level)</td>
                        <td height="7" width="142" align="left">Ethernet</td>
                    </tr>
                    <tr>
                        <td height="7" width="50" align="center">16</td>
                        <td height="7" width="155" align="center">正(High)</td>
                        <td height="7" width="163" align="center">电平(Level)</td>
                        <td height="7" width="142" align="left">External PCI SERR</td>
                    </tr>
                    <tr>
                        <td width="50" align="center">17</td>
                        <td width="155" align="center">正(High)</td>
                        <td width="163" align="center">电平(Level)</td>
                        <td width="142" align="left">ECC Correctalbe Error</td>
                    </tr>
                    <tr>
                        <td height="10" width="50" align="center">18</td>
                        <td height="10" width="155" align="center">正(High)</td>
                        <td height="10" width="163" align="center">电平(Level)</td>
                        <td height="10" width="142" align="left">PCI Power Management</td>
                    </tr>
                    <tr>
                        <td height="6" width="50" align="center">....</td>
                        <td height="6" width="155" align="center">Reserved</td>
                        <td height="6" width="163" align="center">&nbsp;</td>
                        <td height="6" width="142" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="5" width="50" align="center">25</td>
                        <td height="5" width="155" align="center">Programmable</td>
                        <td height="5" width="163" align="center">Programmable</td>
                        <td height="5" width="142" align="left">External IRQ 0</td>
                    </tr>
                    <tr>
                        <td width="50" align="center">26</td>
                        <td width="155" align="center">Programmable</td>
                        <td width="163" align="center">Programmable</td>
                        <td height="16" width="142" align="left">External IRQ 1</td>
                    </tr>
                    <tr>
                        <td height="5" width="50" align="center">27</td>
                        <td height="5" width="155" align="center">Programmable</td>
                        <td height="5" width="163" align="center">Programmable</td>
                        <td height="5" width="142" align="left">External IRQ 2</td>
                    </tr>
                    <tr>
                        <td height="5" width="50" align="center">28</td>
                        <td height="5" width="155" align="center">Programmable</td>
                        <td height="5" width="163" align="center">Programmable</td>
                        <td height="5" width="142" align="left">External IRQ 3</td>
                    </tr>
                    <tr>
                        <td height="7" width="50" align="center">29</td>
                        <td height="7" width="155" align="center">Programmable</td>
                        <td height="7" width="163" align="center">Programmable</td>
                        <td height="7" width="142" align="left">External IRQ 4</td>
                    </tr>
                    <tr>
                        <td height="6" width="50" align="center">30</td>
                        <td height="6" width="155" align="center">Programmable</td>
                        <td height="6" width="163" align="center">Programmable</td>
                        <td height="6" width="142" align="left">External IRQ 5</td>
                    </tr>
                    <tr>
                        <td height="12" width="50" align="center">31</td>
                        <td height="12" width="155" align="center">Programmable</td>
                        <td height="12" width="163" align="center">Programmable</td>
                        <td height="12" width="142" align="left">External IRQ 6</td>
                    </tr>
                </tbody>
            </table>
            </center></div>
            <p><font size="4" face="Helvetica-Bold+2,Times New Roman"><strong>　</strong></font></p>
            <ul>
                <li><font lang="ZH-CN" size="4"><strong>中断向量表</strong> </font></li>
            </ul>
            <p>　</p>
            <font lang="ZH-CN" face="System">
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 中断向量表的其实地址取决于MSR[IP]的设置,IP位定义如下:</p>
            </font><blockquote><blockquote><font face="Helvetica+2,Times New Roman">
            <p>Exception preTx. The setting of IP speciTes whether an exception vector offset is prepended with Fs</p>
            <p>or 0s. In the following description, </p>
            <p>0 Exceptions are vectored to the physical address 0x00</p>
            </font><font face="Helvetica-Oblique+2,Times New Roman"><em>nnnnn </em></font><font face="Helvetica+2,Times New Roman">is the offset of the exception vector. See Table 7-1.</font><font face="Helvetica-Oblique+2,Times New Roman"><em>0n_nnnn</em></font><font face="Helvetica+2,Times New Roman">
            <p>1 Exceptions are vectored to the physical address 0xFF</p>
            </font><font face="Helvetica-Oblique+2,Times New Roman"><em>Fn_nnnn</em></font><font face="Helvetica+2,Times New Roman">
            <p>The reset value of IP is determined by the IIP bit (bit 2) in the hard reset confguration word. </p>
            <p>　</p>
            </font></blockquote></blockquote>
            <div align="center"><center>
            <table border="1" cellspacing="1" cellpadding="7" width="630">
                <tbody>
                    <tr>
                        <td height="29" valign="top" width="102"><font size="4"><strong>Offset</strong></font></td>
                        <td height="29" valign="top" width="161"><font size="4"><strong>Exception</strong></font></td>
                        <td height="29" valign="top" width="313"><font size="4"><strong>Description</strong></font></td>
                    </tr>
                    <tr>
                        <td height="29" valign="top" width="102"><font size="3">0x00000</font></td>
                        <td height="29" valign="top" width="161"><font size="3">Reserved</font></td>
                        <td height="29" valign="top" width="313"><font lang="ZH-CN" size="3">　</font></td>
                    </tr>
                    <tr>
                        <td height="28" valign="top" width="102"><font size="3">0x00100</font></td>
                        <td height="28" valign="top" width="161"><font size="3">System reset interrupt</font></td>
                        <td height="28" valign="top" width="313"><font lang="ZH-CN" size="3">　</font></td>
                    </tr>
                    <tr>
                        <td height="26" valign="top" width="102"><font size="3">0x00200</font></td>
                        <td height="26" valign="top" width="161"><font size="3">Machine check interrupt</font></td>
                        <td height="26" valign="top" width="313"><font lang="ZH-CN" size="3">　</font></td>
                    </tr>
                    <tr>
                        <td height="26" valign="top" width="102"><font size="3">0x00300</font></td>
                        <td height="26" valign="top" width="161"><font size="3">DSI</font></td>
                        <td height="26" valign="top" width="313"><font size="3">A DSI exception is never generated by hardware, but software may branch to this location because of an data TLB error or miss exception.</font></td>
                    </tr>
                    <tr>
                        <td height="18" valign="top" width="102"><font size="3">0x00400</font></td>
                        <td height="18" valign="top" width="161"><font size="3">ISI</font></td>
                        <td height="18" valign="top" width="313"><font size="3">An ISI exception is never generated by the hardware, but software may branch to this location because of an implementation-speciTc instruction TLB error exception.</font></td>
                    </tr>
                    <tr>
                        <td height="20" valign="top" width="102"><font size="3">0x00500</font></td>
                        <td height="20" valign="top" width="161"><font size="3">External Interrupt</font></td>
                        <td height="20" valign="top" width="313"><font lang="ZH-CN" size="3">　</font></td>
                    </tr>
                    <tr>
                        <td height="16" valign="top" width="102"><font lang="ZH-CN" size="3">&hellip;</font></td>
                        <td height="16" valign="top" width="161"><font lang="ZH-CN" size="3">&hellip;</font></td>
                        <td height="16" valign="top" width="313"><font lang="ZH-CN" size="3">&hellip;</font></td>
                    </tr>
                </tbody>
            </table>
            </center></div>
            <p>&nbsp;&nbsp;&nbsp;</p>
            <blockquote>
            <p>&nbsp;&nbsp;&nbsp; 这个表结合地址映射表可知系统复位的地址是 Socket Flash地址+系统复位偏移地址 = 0xFFF80000 + 0x0100 = 0xFFF80100,即系统通电后,跳到0xFFF80100的位置开始执行程序.</p>
            </blockquote><blockquote>
            <p><big><strong><font size="4">MPC860串口中断过程</font></strong></big></p>
            </blockquote><blockquote><blockquote>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;MPC860集成了两个处理块,一个处理块是嵌入的PowerPC核，另一个是通信处理模块（CPM）.通信处理模块有4个SCC和2个SMC,这六个通信口可以通过设置来支持多种协议和通信方式,也可设置为串口UART模式(是通过寄存器GSMR或SMCMR),功能和中断的定义和通常的串口定义基本是一致的在寄存器SCCM/SCCE的位14和位15定义了在何种情况下产生硬件中断. <br />
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;根据MPC860中SCC&nbsp;UART&nbsp;Event&nbsp;Register(SCCE)的位14和位15定义,位14是数据发送中断标志位,位15是数据接收中断标志位,首先设置SCC&nbsp;UART&nbsp;Mask&nbsp;Register(SCCM)的位14和位15为1,使能接受和发送中断.</p>
            <p>如果串口收到数据,则产生硬件RX中断,SCCE为15置1,通知系统有数据到达,有相应的中断例程ISR来取数据. <br />
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;发送的情况下,数据FIFO为空,产生TX中断,告诉系统发送准备就绪,可以发送,ISR把数据放入FIFO中,发送中断位清零.当发送完毕后,FIFO再为空,再次产生中断,告诉系统发送准备就绪,继续发送.</p>
            </blockquote>
            <p><strong><font size="4"><big>MPC860</big><big>片选信号的编程方法</big></font></strong></p>
            <blockquote>
            <p>在MPC860中，有片选信号CS0，CS1，...，CS7对他们的操作主要是要改变片选信号的电平&nbsp;<br />
            <br />
            一般来说片选信号的发生是对和这一片选线相关联的地址进行操作（读写）时片选信号改变。片选信号通常为低电平有效。比如MPC860的CS0是boot rom，硬件reset后，CPU会从boot rom的起始地址开始执行，CS0变为低<br />
            电平。<br />
            <br />
            CS0\ ____&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 片选型号<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |____________________<br />
            we\ _____&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 写有效<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |_____________________<br />
            <br />
            data _______&nbsp; __&nbsp; __&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 数据信号<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | | | | |&nbsp;<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |_| |_| |<br />
            <br />
            所以只要对一个相应的地址操作，和这个地址芯片（bank)相连的CSx就会改变。<br />
            MPC860对CSx分配地址空间的在BRx中定义，BR0,BR1...BR7分别对应8个片选线CS0--CS7。</p>
            </blockquote></blockquote>
            <p>　</p>
            <p><font size="4" face="Helvetica-Bold+2,Times New Roman"><strong>System Reset Interrupt (0x00100)</strong></font></p>
            <blockquote><font face="Times-Roman+2,Times New Roman">
            <p>A system reset interrupt occurs when IRQ0 is asserted. When the exception is taken, processing begins at offset 0x00100. A hard or soft reset also causes program execution to begin fetching at 0x00100 after the associated reset actions.</p>
            </font><font face="Helvetica-Bold+2,Times New Roman"><strong>
            <p>Register Setting</p>
            </strong></font><font face="Helvetica+2,Times New Roman">
            <p>SRR0: Set to the (Effective Address) EA of the next instruction of the interrupted process.</p>
            <p>SRR1: Saves the machine status prior to exceptions and to restore status when an </p>
            <dir>
            <p>1-4 ,-------0</p>
            <p>10-15,--- 0</p>
            </dir>
            <p>Others Loaded from MSR[16-31]. SRR1[30] is cleared only by loading a zero from MSR[RI].</p>
            <p>MSR : IP No change ME No change LE Value of MSR[ILE] of the interrupted process. Others -----0</p>
            </font><font face="Helvetica-Bold+2,Times New Roman"><strong>r f i </strong></font><font face="Helvetica+2,Times New Roman">instruction is executed.</font></blockquote><font lang="ZH-CN" size="1" face="System">
            <p>　</p>
            </font><font size="4" face="Helvetica-Bold+2,Times New Roman"><strong>
            <p>External Interrupt Exception (0x00500)</p>
            </strong></font><blockquote><font face="Times-Roman+2,Times New Roman">
            <p>In the MPC860 the external interrupt is generated by the on-chip interrupt controller. It is software acknowledged and maskable by MSR[EE], which hardware clears automatically to disable external interrupts when any exception is taken.</p>
            </font><font face="Helvetica-Bold+2,Times New Roman"><strong>
            <p>Register Settings after an External Interrupt</p>
            <p>Register Setting Description</p>
            </strong></font><font face="Helvetica+2,Times New Roman">
            <p>SRR0 Set to the effective address of the instruction that the processor would have attempted to execute next if no interrupt conditions were present.</p>
            <p>SRR1: 0, Loaded with equivalent bits from the MSR</p>
            <dir>
            <p>1-4, Cleared; 5-9, Loaded with equivalent bits from the MSR; 10-15, Cleared; 16-31, Loaded with equivalent bits from the MSR</p>
            <p>Note that depending on the implementation, reserved bits in the MSR may not be copied to SRR1.</p>
            </dir>
            <p>MSR POW 0; ILE --; EE 0; PR 0; FP 0; ME --; SE 0; BE 0; IP --; IR 0; DR 0; RI 0; LE Set to value of ILE</p>
            </font><font lang="ZH-CN" face="System">
            <p>　</p>
            </font><font face="Helvetica-Bold+2,Times New Roman"><strong>
            <p>Hard Reset ConTguration Word</p>
            </strong></font><font face="Times-Roman+2,Times New Roman">
            <p>The hard reset configuration word is sampled from the data bus. These bits determine the default values of the corresponding bits in the SIUMCR, IMMR, and MSR.</p>
            <strong>
            <p>IIP</p>
            <dir>
            <p>IIP is cleared (default), the MSR[IP] initial value is one; if it is set to one, the <strong>MSR</strong>[IP] initial value is zero.</p>
            </dir><strong>
            <p>ISB</p>
            <dir>
            <p>base address of the internal memory space.</p>
            <p>00 0x00000000.</p>
            <p>01 0x00F00000.</p>
            <p>10 0xFF000000.</p>
            <p>11 0xFFF00000</p>
            </dir></strong>:bit 7-8, Initial internal space base select. Defines the initial value of the IMMR bits 0-15 and determines the</strong>:bit1: </font><font face="Helvetica+2,Times New Roman">Initial interrupt prefix. Defines the initial value of the MSR[IP] which defines the interrupt table location. If</font><font size="1" face="Helvetica+2,Times New Roman">.</font></blockquote></font><font face="宋体"> </font></font><font size="3" face="宋体"> </font></font><font face="宋体"> </font><font face="宋体"> </font><font face="宋体"> </font></font></font><font face="宋体"> </font>]]></description></item><item><link>http://www.broadkey.com.cn/Thread.asp?tid=31 </link><title>ASSET的DFT分析工具可实现边界扫描验证</title><author>rachel</author><pubDate>2009/11/24 20:22:08</pubDate><description><![CDATA[<p><a href="/SEARCH/ART/ASSET+InterTech.HTM" target="_blank">ASSET InterTech</a>公司推出的<a href="/SEARCH/ART/DFT+Analyzer.HTM" target="_blank">DFT Analyzer</a>是一种<a href="/SEARCH/ART/IEEE%7E%40%7E1149.1.HTM" target="_blank">IEEE-1149.1</a>/<a href="/SEARCH/ART/JTAG%B1%DF%BD%E7%C9%A8%C3%E8%B2%E2%CA%D4.HTM" target="_blank">JTAG边界扫描测试</a>与<a title="COP8 Flash ISP手册：FLASHDOS编程者指南" href="http://www.eet-china.com/ART_8800291468_480601_AN_3efedf84.HTM" target="_blank">isp</a>(在系统编程)工具，该产品将于明年上市，能有效降低制造和测试成本。DFT Analyzer可在任何原型配装前对边界扫描的可测试性设计(DFT, design-for-test)进行验证。</p>
<p>&nbsp;</p>
<p>DFT Analyzer能够确定一个设计的边界扫描测试覆盖范围，并可以提出增加覆盖率的建议。通常一种新产品都会在开发和制造中有反复，典型的一个原因是没有对电路板进行充分测试而不得不返工，同时没有充分的测试覆盖就无法确保产品的质量。</p>
<p>&nbsp;</p>
<p>ASSET InterTech可降低产品开发的风险以及测试与原型的成本。该工具基于较为全面的研究并考虑了来自制造商的建议。对需要边界扫描DFT工具的用户而言，他们希望能将DFT工具集成到自己的设计过程当中并成为EDA系统的一个助手。</p>
<p>&nbsp;</p>
<p>DFT Analyzer将于2006年第一季度面市，限期授权的版本售价为10,000美元(仅供参考)，同时提供标准版和网络授权版本。</p>]]></description></item></channel></rss>