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

📄 pc.vhd

📁 用vhdl写的
💻 VHD
字号:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
--
ENTITY PC IS
PORT(
  LOAD,LDPC,CLR: in std_logic;
  D: in std_logic_vector(7 downto 0);
  O: OUT std_logic_vector(7 downto 0)
 );
END PC;

ARCHITECTURE A OF PC IS
signal qout: std_logic_vector(7 downto 0);
 BEGIN
   process(ldpc,clr,load)
    BEGIN
     if (clr='0') then 
       qout<="00000000";
     elsif (ldpc'event and ldpc='1') then
       if (load='0') then
         qout<=D;             --BUS->PC
       else
         qout<=qout+1;        --PC+1
       end if;
    end if;
   END process;
   o<=qout;
 END A;

⌨️ 快捷键说明

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