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

📄 encode3.vhd

📁 使用VHDL语言进行的数字锁相环的设计
💻 VHD
字号:
  -------------------------------------------------------------
  --Copyright (C), 2004- , Huangwei.                         --
  --File name:decode3(归零码生成器)                          --
  --Author:huangwei       Version:1.0        Date:2004/11/24 --
  --Description:                                             --
  --该程序主要完成的功能是将已经编好的HDB3码由NRZ码          --
  --转换成归零码                                             --
  -------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity encode3 is

port(
     clk:in std_logic;           --输入时钟,2M
     datain: in std_logic;       --NRZ码数据输入
     
     dataout: out std_logic      --归零码数据输出
     );
     
end encode3;

architecture encode3_arc of encode3 is

signal count: std_logic;        --计数器寄存器

begin

process(clk,count,datain)

begin

if rising_edge(clk) then

    count <= not count;

end if;

case count is

    when '0' => dataout <= datain;
    when '1' => dataout <= '0';
    when others => null;
    
end case;

end process;

end encode3_arc;




⌨️ 快捷键说明

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