第一范文网 - 专业文章范例文档资料分享平台

简单CPU系统设计与实现

来源:用户分享 时间:2025/5/29 2:06:02 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

北京邮电大学数字电路与逻辑设计实验报告

elsif(w_r='1')then

ram(conv_integer(mar_in)):=mbr_in; elsif(w_r='0')then

ram_out<=ram(conv_integer(mar_in)); else null; end if; code_e1:=code_e; end if; end process; end behave;

4.7 SMG (数码管显示

)

library ieee;

use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all;

北京邮电大学数字电路与逻辑设计实验报告

entity SMG is port (

clk:in std_logic; smg_en:in std_logic;

n:in std_logic_vector(11 downto 0); count:out std_logic_vector(6 downto 0); count_en:out std_logic_vector(5 downto 0) ); end SMG;

architecture behave of SMG is

signal a_temp:std_logic_vector(3 downto 0); signal n1,n2,n3:std_logic_vector(3 downto 0); begin p1:process(n)

variable a:integer range 0 to 127; variable b,c,d:integer range 0 to 9; begin

a:=conv_integer(n); d:=a mod 10;

北京邮电大学数字电路与逻辑设计实验报告

c:=(a/10) mod 10; b:=a/100;

n1<=conv_std_logic_vector(b,4); n2<=conv_std_logic_vector(c,4); n3<=conv_std_logic_vector(d,4); end process;

p2:process(clk)

variable temp:integer:=4;

variable tmp:std_logic_vector(1 downto 0); variable rgs:std_logic; begin

if clk'event and clk='1' then tmp:=tmp+1; if(smg_en='1')then temp:=0; else null; end if;

if(tmp(1)='1'and rgs='0')then if temp=2 then temp:=0; else temp:=temp+1; end if;

北京邮电大学数字电路与逻辑设计实验报告

case temp is

when 0 =>count_en<=\ when 1 =>count_en<=\ when 2 =>count_en<=\ when others=>count_en<=\ end case; end if; rgs:=tmp(1); end if; end process; p3:process(a_temp) begin

case a_temp is

when \ when \ when \ when \ when \ when \ when \ when \ when \

搜索更多关于: 简单CPU系统设计与实现 的文档
简单CPU系统设计与实现.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c5q4h39vbq775cln2zb7r_7.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top