首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

请大虾们帮我看一下这个程序

请大虾们帮我看一下这个程序

library ieee;fficeffice" />


use ieee.std_logic_1164.all;


use ieee.std_logic_unsigned.all;


entity se is


   port(clk:in std_logic;


        about std_logic_vector(2 downto 0));


end se;


architecture rt1 of se is


begin


process(clk)


variable b:std_logic_vector(2 downto 0);


begin


  if(clk'event and clk='1')then


    if(b="111")then


    b:="000";


 else


  b:=b+1;


end if;


end if;


a<=b;


end process;


end rt1;


 


 


我在书上看到这么一个程序,是一个出租车计费系统中的一个模块,有谁能给解释解释?在线等……

不就是当时钟的上升延来时

自动+1,一直加到111,就自动清零

所得结果让a来输出


about std_logic_vector(2 downto 0));
这行错了
应该是
aut std_logic_vector(2 downto 0));






╔☆→────────────────←☆╗
┊寻觅在电子中, , , 寻求适合自己的一席┊┊┊┊
┊也许生活本忙碌,  想享受安逸只能是心态了吧┊
╚☆→────────────────←☆╝      &
返回列表