or1200处理器的数据流图

本文详细介绍了OR1200软核处理器的数据流,包括取指、译码和执行阶段,涵盖数据处理、特殊寄存器访问、转移、异常处理、乘法除法、加载存储等指令的处理流程,解析了各阶段数据如何在处理器内部流转。
摘要由CSDN通过智能技术生成

以下内容摘自《步步惊芯——软核处理器内部设计分析》一书


      完整的OR1200处理器流水线数据通路图,如图9.12所示,图中显示了数据处理类、特殊寄存器访问类、转移类、异常处理类、乘法除法类、加载存储类指令处理过程中流水线各个阶段的数据流转。



      (1)取指阶段:GENPC模块计算指令地址,然后通过指令Wishbone总线从指令存储器中取得指令,取得的指令送入IF模块,该指令进入流水线。

      (2)译码阶段:取出指令需要的通用寄存器的值dataa、datab,同时对指令中可能有的立即数进行符号扩展或零扩展得到id_simm,OPERAND_MUX模块从中选择两个数据作为下一步的运算数据operand_a、operand_b,为了解决流水线数据相关的问题,将执行阶段计算的结果muxout也作为OPERAND_MUX模块的备选数据。

      (3)执行阶段:分七种情况:

      A、如果是数据处理类指令,那么ALU模块依据操作码alu_op、alu_op2、comp_op,对操作数a、b进

开源处理器源代码,学习优秀的代码编写 ////////////////////////////////////////////////////////////////////// //// //// //// OR1200's ALU //// //// //// //// This file is part of the OpenRISC 1200 project //// //// http://www.opencores.org/cores/or1k/ //// //// //// //// Description //// //// ALU //// //// //// //// To Do: //// //// - make it smaller and faster //// //// //// //// Author(s): //// //// - Damjan Lampret, lampret@opencores.org //// //// //// ////////////////////////////////////////////////////////////////////// //// //// //// Copyright (C) 2000 Authors and OPENCORES.ORG //// //// //// //// This source file may be used and distributed without //// //// restriction provided that this copyright statement is not //// //// removed from the file and that any derivative work contains //// //// the original copyright notice and the associated disclaimer. //// //// //// //// This source file is free software; you can redistribute it //// //// and/or modify it under the terms of the GNU Lesser General //// //// Public License as published by the Free Software Foundation; //// //// either version 2.1 of the License, or (at your option) any //// //// later version. //// //// //// //// This source is distributed in the hope that it will be //// //// useful, but WITHOUT ANY WARRANTY; without even the implied //// //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //// //// PURPOSE. See the GNU Lesser General Public License for more //// //// details. //// //// //// //// You should have received a copy of the GNU Lesser General //// //// Public License along with this source; if not, download it //// //// from http://www.opencores.org/lgpl.shtml //// //// //// //////////////////////////////////////////////////////////////////////
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值