哪位帮帮忙,用VHDL设计一个100分频的程序
答案:1 悬赏:80 手机版
解决时间 2021-11-26 15:34
- 提问者网友:别再叽里呱啦
- 2021-11-26 00:15
哪位帮帮忙,用VHDL设计一个100分频的程序
最佳答案
- 五星知识达人网友:夜余生
- 2021-11-26 01:47
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fp40 is
port( rst: in std_logic;
clk: in std_logic;
fpclk: out std_logic);
end fp40;
architecture arc of fp fp40 is
begin
process(clk)
variable count: integer range 0 to 50;
variable clk0: std_logic;
begin
if rst='0' then
clk0<='0' ;
elsif clk'event and clk='1' then
if count=49 then
clk0:=not clk0;
count:=0;
else
count:=count+1;
end if;
end if;
fpclk<=clk0;
end process;
end arc;
异步复位的分频程序。
rst为低时候复位信号有效,此时输出为0!
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fp40 is
port( rst: in std_logic;
clk: in std_logic;
fpclk: out std_logic);
end fp40;
architecture arc of fp fp40 is
begin
process(clk)
variable count: integer range 0 to 50;
variable clk0: std_logic;
begin
if rst='0' then
clk0<='0' ;
elsif clk'event and clk='1' then
if count=49 then
clk0:=not clk0;
count:=0;
else
count:=count+1;
end if;
end if;
fpclk<=clk0;
end process;
end arc;
异步复位的分频程序。
rst为低时候复位信号有效,此时输出为0!
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯