library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity countdown is
port( clk50m,rst,key:in std_logic;

dig:out std_logic_vector(4 downto 1);

seg:out std_logic_vector(6 downto 0);
led:out std_logic

);
end countdown;
architecture ach of countdown is
component countN is
generic(

n:integer:=100
);
port(

clk,rst,en:in std_logic;

qdata:out integer ;

cout:out std_logic


);
end component;
component freqN is
generic (
n:integer:=100
);
port(
clk,rst:in std_logic;
clkout:out std_logic
);
end component;
component mypll IS
PORT
(
areset : IN STD_LOGIC := '0';
inclk0 : IN STD_LOGIC := '0';
c0 : OUT std_logic;
locked : OUT STD_LOGIC
);
END component;
component cd is
port(clk,rst:in std_logic;

qh,ql:buffer integer range 0 to 9

);
end component;
component ledShow is

port(

q:in integer;

seg:out std_logic_vector(6 downto 0)
);
end component;
signal clk1m,clk1k,clk1s,locked:std_logic;
signal qh,ql:integer;
signal qcnt,qshow:integer;
begin
u0:mypll port map(not rst,clk50m,clk1m,locked);
u1:freqn generic map(1000000)

port map(clk1m,locked,clk1s);
u2:freqn generic map(1000)

port map(clk1m,locked,clk1k);
u3:cd port map(clk1s,key,qh,ql);
u4:countn generic map(4)

port map(clk1k,locked,'1',qcnt);
qshow<=qh when qcnt=1 else

ql when qcnt=0 else

10;
dig<="1110"when qcnt=0 else

"1101" when qcnt=1 else

"1111";
u5:ledshow port map(qshow,seg);

led<='0' when qh=0 and ql=0 else

'1';

end ach;
library ieee;
use ieee.std_logic_1164.all;
entity cd is
port(clk,rst:in std_logic;

qh,ql:buffer integer range 0 to 9

);
end cd;
architecture ach of cd is
begin
process(clk,rst)

begin

if rst='0' then
qh<=6;
ql<=0;
elsif rising_edge(clk) then

if ql=0 then

ql<=9;

if qh=0 then

qh<=0;

ql<=0;

else

qh<=qh-1;

end if;

else

ql<=ql-1;

end if;
end if;
end process;

end ach;
--input number 0~9, and output abcdefg for digital tube
library ieee;
use ieee.std_logic_1164.all;

entity ledShow is

port(

q:in integer;

seg:out std_logic_vector(6 downto 0)
);
end ledShow;

architecture ach of ledShow is
begin
with q select

seg<="1000000" when 0 ,

"1111001" when 1 ,

"0100100"when 2 ,

"0110000"when 3 ,

"0011001"when 4 ,

"0010010"when 5 ,

"0000010"when 6 ,

"1111000"when 7 ,

"0000000"when 8 ,

"0010000" when 9 ,

"1111111" when others;

end ach;
--任意整数分频

library ieee;
use ieee.std_logic_1164.all;
--实体
entity freqN is
generic (
n:integer:=100
);
port(
clk,rst:in std_logic;
clkout:out std_logic
);
end freqN;
--结构体
architecture ach of freqN is

--任意进制计数器元件例化声明
component countN
generic(

n:integer:=100
);
port(

clk,rst,en:in std_logic;

cout:out std_logic;

qdata:out integer
);
end component;

signal qdata:integer:=0;
signal cout:std_logic;
begin

--n进制计数器例化

u0:countN generic map(n)

port map(clk,rst,'1',open,qdata);


--

clkout<='1' when qdata--

'0';

process(rst,clk)
begin

if rst='0' then

clkout<='0';

elsif rising_edge(clk) then

if qdata=0 then

clkout<='0';

else

clkout<='1';

end if;

end if;
end process;
end ach;
library ieee;
use ieee.std_logic_1164.all;
--实体任意进制计数器
entity countN is
generic(

n:integer:=100
);
port(

clk,rst,en:in std_logic;

qdata:out integer;

cout:out std_logic
);
end countN;
--结构体
architecture ach of countN is

--任意进制计数器元件例化声明
signal qtmp:integer:=0;

begin

process(rst,clk) --敏感信号
begin
if rst='0' then

qtmp<=0;

cout<='0';
elsif rising_edge(clk) then

if en='1' then

if qtmp=n-1 then

qtmp<=0;

else

qtmp<=qtmp+1;

end if;


if qtmp=n-2 then


cout<='1';

else

cout<='0';

end if;

end if;
end if;
-- if qtmp=n-1 then
--

cout<='1';
-- else
--

cout<='0';
-- end;
end process;
qdata<=qtmp;

end ach;

#朴志效[超话]# #朴志效笑眼甜酒#
230514▷TWICE 5TH WORLD TOUR"READY TO BE"大阪场day2 后记(也有一点昨天的后记)
收到很多好评的solo舞台还有feel special无伴奏生唱❤️

翻译by.南瓜
cr.18dk__2/En05Taku/jm_tw__01/scarlett_crj/777ron22/o3mina24/m_mina_324/eiko_once/yamatai0219/ohayoyy/yookim_JY/J_snjhsh446/tswo_31/972Oll/michaeng_1020/hoku_sano3860/cai_girls/rchan_im/pou_eee

— —— —— —— —— —— ——ʲⁱʰʸᵒ
【个人ins:_zyozyo】
【招新】https://t.cn/A6XJzwLc

#朱一龙戛纳电影节##朱一龙河边的错误入围戛纳# Four years ago, he said he would come back to Cannes with his film work when he attended Cannes International Film Festival at the invitation of brands for the first time. Now regarded as one of the best performers in his generation, this talented and good-looking film actor has not only received quite a few accolades including Golden Rooster Award, the highest film award in China but also honored his promise to return to Cannes with Only the River Flows, his new film work selected by Un Certain Regard. Wish him to come back to China with honor. [打call][打call][打call][打call]

Il y a quatre ans, il avait déclaré qu'il reviendrait à Cannes avec son travail cinématographique lorsqu'il avait assisté pour la première fois au Festival International du Festival De Cannes à l'invitation de marques. Maintenant considéré comme l'un des meilleurs interprètes de sa génération, cet acteur de film talentueux et séduisant a non seulement reçu plusieurs distinctions, dont le Golden Rooster Award, la plus haute distinction cinématographique en Chine, mais aussi honoré sa promesse de revenir à Cannes avec "Only the River Flows", son nouveau travail cinématographique sélectionné par Un Certain Regard. Souhaitez-lui de revenir en Chine avec honneur. [打call][打call][打call]


发布     👍 0 举报 写留言 🖊   
✋热门推荐
  • 【施壓企業投資應對國內油價飆升,英高官警告:可考慮徵“暴利稅”】據英國《每日郵報》報道,英國財政大臣里希·蘇納克警告石油和天然氣企業,在國內油價飆升的背景下,如
  • 若诸善能明修心之要,则能一层层,揭其伪道,所谓言从心起,相从心生,欲知其是否有道,即可于日常之中,观其四时之行是否守道,一句一言是否秉德,斯真修道人,道德发乎于
  • 自己见不得麦洛洛低落,而且还是为了一个不相干的人,麦洛洛深深埋下的头上下晃了几下,算是点头认可了,她知道范思琪做了很大的让步,为了让自己可以和柳叶单独解决这个问
  • 점심에 직접 두 가지 요리를 만들었다.햄 김치 계란 볶음밥.편육은 사천 요리의 맛이다..맞아.내가 좋아하는 매운맛~~히히..두 요리 모두 엄마에
  • 所谓的『居一切时不起妄念,于诸妄心亦不息灭;住妄想境不加了知,于无了知不辨真实。所谓的『居一切时不起妄念,于诸妄心亦不息灭;住妄想境不加了知,于无了知不辨真实。
  • 能忍住三个月不联系你,不找你,对你冷冰冰的女人,她90%心里因爱生恨,根本放不下你!所以,如果你们分手以后,对方可以连续很久不搭理你,不回复你消息,不主动找你,
  • #WayV[超话]##威神V快乐大本营# 【20190304】#肖俊[超话]#饭绘1p你看我的眼神,我醉了一辈子cr:byeongra资源:miu禁二改商用 转
  • 987546a安徽黄山:冬季旅游启动 门票降至150元)黄山冬雪云海。据了解,从今年12月1日至明年的2月28日,黄山景区门票、索道票、酒店等价格有大幅下调,门
  • 于是在我这里,她是一个爱读书,会写字,积极生活,有梦想的乐观女孩子。本科长近视最近颇严重老眼昏花其实是看不清照片但是看得出那就是个人照,马上知道了这应该就是P图
  • 23歳はたくさんの人と出会うことができました。23歳はたくさんの人と出会うことができました。
  • 能看到哥的消息,真的很知足!不过,没关系!
  • 17、我和各种人度过浪费时间的夜晚,我努力听他们说话,但就算再怎么努力,我也不在现场也不在其他地方,搞不好我这两个小时不是活着吧。4、只是散步而已,便让我疲惫到
  • 乃书逍遥散原方加香附、郁金与服,药后神情转佳,饮食有进、唯苦不成寐,心悸不安,乃改用归脾汤加白芍,蒺藜于土中伐木,服至十数剂,心悸不发,夜已能睡,逐渐康复。值春
  • 今日,决定写日记。牵丝攀藤,千言万语,屏不牢。我住浦西,苏州河畔,据“鸳鸯锅”原则:4月1日凌晨起封控。因浦东未解封,全上海封控自此时算起。 3月31日,深夜
  • 19年之前的留意应该去做2010sAmerican teen love song的mv男女主,那种好像整个高中只有拉拉队长四分卫prom queen篮球队长才配
  • 太享受我们五六个在清吧敞开笑回忆高中各种琐事那份时刻啦 一言不合来一掌哈哈哈哈哈我也爱呢笑再大声我也不顾旁人 是我再也回不去的青春也只能用这三四年不能拥有的短暂
  • 选择计划时一定要结合自己的必须跟原建筑状态1.槽钢或工字钢搭建。有一些地段较高城市平房内二层装修效果图新房装修,或者复式房带中空客厅的同事别墅装修公司,也许她们
  • 《神奇女侠》身为漫威的死忠,不得不说DC这次干得漂亮,倒是真的希望DC能强劲起来,刺激着漫威在危机感中创造更多的佳作,遇强则更强的市场良性循环需要亦敌亦友的陪伴
  • #读书周之月度小结[超话]# 故夫知效一官,行比一乡,德合一君,而征一国者,其自视也,亦若此矣。会有四方之事,诸侯以惠爱为德,家叔以余贫苦,遂见用于小邑。
  • via.惠州日报#蚊子会资讯[超话]# 【淘宝“银河路计划”启动百日:日均成交超4300万】蚊子会获悉,淘宝“银河路计划”已启动百日,每天孵化6个新品牌,日均成