⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ps7.vhd

📁 利用VHDL语言实现在
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity ps7 is
port(clk:in std_logic;
load:in std_logic;
q:out std_logic;
count1:out std_logic_vector(8 downto 0) );
end ps7;
architecture behav of ps7 is
signal c0,c1,c2,c3:std_logic;
signal count:std_logic_vector(8 downto 0):="000000000";
begin
process(clk)
begin
if rising_edge(clk) then
  count<=count + 1;
end if;
end process;
process(count(8),load)
begin
if (load='1') then
c3<='1';
c2<='0';
c1<='0';
c0<='1';
q<=c3;
elsif  count(8) 'event and count(8)='0' then
c1<=c0;
c2<=c1;
c3<=c2;
c0<= c0 xor c3;
q<=c3;
end if;
end process;
count1<=count;
end behav;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -