共1条
1/1 1 跳转至页
VHDL一问

我编了一个VHDL程序,由生成的时钟驱动计数器,但不知
: 伪钟事件无法实现,望哪位大虾给予帮助!
: 程序如下:
: library ieee;
: use ieee.std_logic_1164.all;
: use work.my_package.all;
: use work.my_clk.all;
: entity traffic is port(
: reset,clk,en:in std_logic;
: light_r,light_y,light_g:out std_logic);
: end traffic;
: architecture traffic of traffic is
: signal time:std_logic;
: begin
: u1:clock port map(clk,time);
: process(time,reset,en)
: variable count:integer:=0;
: variable choice:integer:=0;
: begin
: if(reset='1')then
: light_r<='1';
: light_y<='0';
: light_g<='0';
: choice:=1;
: if((en='1' and choice=1)or choice=0)then
: choice:=0;
: if(time'event and time='1')then
: ~~~~~~~~~~~~~~~~~~~~~~~
: if(count=129)then
: count:=0;
: else
: count:=count+1;
: end if;
: end if;
: case count is
: when 0 to 59 =>light_r<='1';
: light_y<='0';
: light_g<='0';
: when 60 to 69 =>light_r<='0';
: light_y<='1';
: light_g<='0';
: when 70 to 129=>light_r<='0';
: light_y<='0';
: light_g<='1';
: when others =>light_r<='1';
: light_y<='0';
: light_g<='0';
: end case;
: end if;
: end if;
: end process;
: end traffic;
关键词: 一问
共1条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 | |
【我踩过的那些坑】电感选型错误导致的处理器连接不上被打赏50分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏10分 | |
【我踩过的那些坑】DRC使用位置错误导致的问题被打赏100分 | |
我踩过的那些坑之混合OTL功放与落地音箱被打赏50分 |