计算机组成原理第6章.ppt

  1. 1、本文档共68页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
现代计算机组成原理 潘 明 潘 松 编著 第 6 章 16位CISC CPU设计 addrregWr=1; next_state=incPc5; when incPc5 = vma = 1; rw = 0; next_state = incPc6; when incPc6 = vma = 1; rw = 0; if ready = 1 then instrWr = 1; next_state = execute; else next_state = incPc6; end if; when others = next_state = incPc; end case; end process; controlffProc:process(clock, reset) begin if reset = 1 then current_state = reset1 after 1 ns; elsif clockevent and clock = 1 then current_state = next_state after 1 ns; end if; end process; end rtl; 6.2 CPU基本部件设计 6.2.4 寄存器与寄存器阵列 图6-10 寄存器REG的实体结构和RTL图 1.寄存器REG 6.2 CPU基本部件设计 6.2.4 寄存器与寄存器阵列 1.寄存器REG 【例6-6】reg.vhd library IEEE; use IEEE.std_logic_1164.all; use work.cpu_lib.all; entity reg is port( a : in bit16; clk : in std_logic; q : out bit16); end reg; architecture rtl of reg is begin regproc: process begin wait until clk event and clk = 1; q = a after 1 ns; end process; end rtl; 6.2 CPU基本部件设计 2.寄存器阵列RegArray 【例6-7】regarray.vhd library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; use work.cpu_lib.all; entity regarray is port( data : in bit16; sel : in t_reg; en,clk : in std_logic; q : out bit16); end regarray; architecture rtl of regarray is type t_ram is array (0 to 7) of bit16; signal temp_data : bit16; begin process(clk,sel) variable ramdata : t_ram; begin if clkevent and clk = 1 then ramdata(conv_integer(sel)) := data; end if; temp_data = ramdata(conv_integer(sel)) after 1 ns; end process; process(en, temp_data) begin if en = 1 then q = temp_data after 1 ns; else q =ZZZZZZZZZZZZZZZZ after 1 ns; end if; end process; end rtl; 6.2 CPU基本部件设计 6.2.4 寄存器与寄存器阵列 图6-11 寄存器阵列RegAarray的结构图和RTL图 2.寄存器阵列RegArray 6.2 CPU基本部件设计 6.2.4 寄存器与寄存器阵列 图6-12 寄存器阵列regarray.VHD的仿真波形 2.寄存器阵列RegArray 6.2.5 移位寄存器SHIFT 【例6-8】sheft.VHD library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use work.cpu_lib.all; entity shift is port ( a : in bit16; sel : in t_shift ; y : out bit16); end shift; architecture rtl of sh

文档评论(0)

wuyoujun92 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档