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

📄 bcd8.vhd

📁 张义和《protel DXP 电路设计大全》中国铁道出版社 随书光盘
💻 VHD
字号:
------------------------------------------------------------
-- VHDL BCD8
-- 2003 7 9 10 42 13
-- Created By "nVisage DXP"
-- "Copyright (c) 2002 Altium Limited"
------------------------------------------------------------

------------------------------------------------------------
-- VHDL BCD8
------------------------------------------------------------

Library IEEE;
Use     IEEE.std_logic_1164.all;

  -- rtl_synthesis off
  Library BCD_LIB;
  Use BCD_LIB.all ;
  -- rtl_synthesis on

entity BCD8 is
  port
  (
    CLEAR  : in  STD_LOGIC;    -- ObjectKind=Port|PrimaryId=CLEAR
    CLOCK  : in  STD_LOGIC;    -- ObjectKind=Port|PrimaryId=CLOCK
    ENABLE : in  STD_LOGIC;    -- ObjectKind=Port|PrimaryId=ENABLE
    LOWER  : out STD_LOGIC_VECTOR(3 downto 0);    -- ObjectKind=Port|PrimaryId=LOWER
    PARITY : out STD_LOGIC;    -- ObjectKind=Port|PrimaryId=PARITY
    UPPER  : out STD_LOGIC_VECTOR(3 downto 0);    -- ObjectKind=Port|PrimaryId=UPPER
    URCO   : out STD_LOGIC    -- ObjectKind=Port|PrimaryId=URCO
  );

begin

end BCD8;
------------------------------------------------------------

------------------------------------------------------------
architecture structure of BCD8 is
   component BUFGS    -- ObjectKind=Component|PrimaryId=U1
      port
      (
        I : in  STD_LOGIC;    -- ObjectKind=Pin|PrimaryId=U1-I
        O : out STD_LOGIC    -- ObjectKind=Pin|PrimaryId=U1-O
      );
   end component;

   component PARITYC    -- ObjectKind=Component|PrimaryId=U2
      port
      (
        L : in  STD_LOGIC_VECTOR(3 downto 0);    -- ObjectKind=Pin|PrimaryId=U2-L
        P : out STD_LOGIC;    -- ObjectKind=Pin|PrimaryId=U2-P
        U : in  STD_LOGIC_VECTOR(3 downto 0)    -- ObjectKind=Pin|PrimaryId=U2-U
      );
   end component;

   component BCD    -- ObjectKind=SheetSymbol|PrimaryId=H1
      port
      (
        CLEAR  : in  STD_LOGIC;    -- ObjectKind=Sheet Entry|PrimaryId=H1-CLEAR
        CLOCK  : in  STD_LOGIC;    -- ObjectKind=Sheet Entry|PrimaryId=H1-CLOCK
        ENABLE : in  STD_LOGIC;    -- ObjectKind=Sheet Entry|PrimaryId=H1-ENABLE
        OCD    : out STD_LOGIC_VECTOR(3 downto 0);    -- ObjectKind=Sheet Entry|PrimaryId=H1-OCD
        RCO    : out STD_LOGIC    -- ObjectKind=Sheet Entry|PrimaryId=H1-RCO
      );
   end component;

   signal N00001 : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=N00001
   signal N00012 : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=N00012
   signal N00002 : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=N00002
   signal S2     : STD_LOGIC_VECTOR(3 downto 0);    -- ObjectKind=Netlabel|PrimaryId=S2
   signal N00014 : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=N00014
   signal S1     : STD_LOGIC_VECTOR(3 downto 0);    -- ObjectKind=Netlabel|PrimaryId=S1
   signal N00015 : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=N00015
   signal N00013 : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=N00013
   signal LRCO   : STD_LOGIC;    -- ObjectKind=Netlabel|PrimaryId=LRCO


   attribute Component_Kind : string;
   attribute Component_Kind of U1 : label is "Standard";
   attribute Component_Kind of U2 : label is "Standard";

   attribute Library_Name : string;
   attribute Library_Name of U1 : label is "BCD.SCHLIB";
   attribute Library_Name of U2 : label is "BCD.SCHLIB";

   attribute Library_Reference : string;
   attribute Library_Reference of U1 : label is "BUFGS";
   attribute Library_Reference of U2 : label is "PARITYC";

   attribute VHDL : string;
   attribute VHDL of U1 : label is "BUFGS";


begin

   U1 : BUFGS    -- ObjectKind=Component|PrimaryId=U1
     port map
     (
       I                 => N00012,    -- ObjectKind=Pin|PrimaryId=U1-I
       O                 => N00013    -- ObjectKind=Pin|PrimaryId=U1-O
     );

   U2 : PARITYC    -- ObjectKind=Component|PrimaryId=U2
     port map
     (
       L(3 downto 0)     => S2(3 downto 0),    -- ObjectKind=Pin|PrimaryId=U2-L[3..0]
       P                 => N00014,    -- ObjectKind=Pin|PrimaryId=U2-P
       U(3 downto 0)     => S1(3 downto 0)    -- ObjectKind=Pin|PrimaryId=U2-U[3..0]
     );

   H1 : BCD    -- ObjectKind=SheetSymbol|PrimaryId=H1
     port map
     (
       CLEAR             => N00001,    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-CLEAR
       CLOCK             => N00013,    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-CLOCK
       ENABLE            => N00002,    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-ENABLE
       OCD(3 downto 0)   => S2(3 downto 0),    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-OCD[3..0]
       RCO               => LRCO    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-RCO
     );

   H2 : BCD    -- ObjectKind=SheetSymbol|PrimaryId=H2
     port map
     (
       CLEAR             => N00001,    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-CLEAR
       CLOCK             => N00013,    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-CLOCK
       ENABLE            => LRCO,    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-ENABLE
       OCD(3 downto 0)   => S1(3 downto 0),    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-OCD[3..0]
       RCO               => N00015    -- ObjectKind=Sheet Entry|PrimaryId=BCD.Vhd-RCO
     );

   N00001            <= CLEAR;    -- ObjectKind=Port|PrimaryId=CLEAR
   N00012            <= CLOCK;    -- ObjectKind=Port|PrimaryId=CLOCK
   N00002            <= ENABLE;    -- ObjectKind=Port|PrimaryId=ENABLE
   LOWER(3 downto 0) <= S2(3 downto 0);    -- ObjectKind=Port|PrimaryId=LOWER
   PARITY            <= N00014;    -- ObjectKind=Port|PrimaryId=PARITY
   UPPER(3 downto 0) <= S1(3 downto 0);    -- ObjectKind=Port|PrimaryId=UPPER
   URCO              <= N00015;    -- ObjectKind=Port|PrimaryId=URCO


end structure;
------------------------------------------------------------

⌨️ 快捷键说明

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