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

📄 pwm_ctrl.vhd

📁 EDA原理及VHDL实现(何宾教授)
💻 VHD
📖 第 1 页 / 共 2 页
字号:
--
-- Definition of a dual port ROM for KCPSM2 or KCPSM3 program defined by pwm_ctrl.psm
-- and assmbled using KCPSM2 or KCPSM3 assembler.
--
-- Standard IEEE libraries
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
--
-- The Unisim Library is used to define Xilinx primitives. It is also used during
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
--  
library unisim;
use unisim.vcomponents.all;
--
--
entity pwm_ctrl is
    Port (      address : in std_logic_vector(9 downto 0);
            instruction : out std_logic_vector(17 downto 0);
             proc_reset : out std_logic;
                    clk : in std_logic);
    end pwm_ctrl;
--
architecture low_level_definition of pwm_ctrl is
--
-- Declare signals internal to this module
--
signal jaddr     : std_logic_vector(10 downto 0);
signal jparity   : std_logic_vector(0 downto 0);
signal jdata     : std_logic_vector(7 downto 0);
signal doa       : std_logic_vector(7 downto 0);
signal dopa      : std_logic_vector(0 downto 0);
signal tdo1      : std_logic;
signal tdo2      : std_logic;
signal update    : std_logic;
signal shift     : std_logic;
signal reset     : std_logic;
signal tdi       : std_logic;
signal sel1      : std_logic;
signal drck1     : std_logic;
signal drck1_buf : std_logic;
signal sel2      : std_logic;
signal drck2     : std_logic;
signal capture   : std_logic;
signal tap5      : std_logic;
signal tap11     : std_logic;
signal tap17     : std_logic;
--
-- Attributes to define ROM contents during implementation synthesis. 
-- The information is repeated in the generic map for functional simulation
--
attribute INIT_00 : string; 
attribute INIT_01 : string; 
attribute INIT_02 : string; 
attribute INIT_03 : string; 
attribute INIT_04 : string; 
attribute INIT_05 : string; 
attribute INIT_06 : string; 
attribute INIT_07 : string; 
attribute INIT_08 : string; 
attribute INIT_09 : string; 
attribute INIT_0A : string; 
attribute INIT_0B : string; 
attribute INIT_0C : string; 
attribute INIT_0D : string; 
attribute INIT_0E : string; 
attribute INIT_0F : string; 
attribute INIT_10 : string; 
attribute INIT_11 : string; 
attribute INIT_12 : string; 
attribute INIT_13 : string; 
attribute INIT_14 : string; 
attribute INIT_15 : string; 
attribute INIT_16 : string; 
attribute INIT_17 : string; 
attribute INIT_18 : string; 
attribute INIT_19 : string; 
attribute INIT_1A : string; 
attribute INIT_1B : string; 
attribute INIT_1C : string; 
attribute INIT_1D : string; 
attribute INIT_1E : string; 
attribute INIT_1F : string; 
attribute INIT_20 : string; 
attribute INIT_21 : string; 
attribute INIT_22 : string; 
attribute INIT_23 : string; 
attribute INIT_24 : string; 
attribute INIT_25 : string; 
attribute INIT_26 : string; 
attribute INIT_27 : string; 
attribute INIT_28 : string; 
attribute INIT_29 : string; 
attribute INIT_2A : string; 
attribute INIT_2B : string; 
attribute INIT_2C : string; 
attribute INIT_2D : string; 
attribute INIT_2E : string; 
attribute INIT_2F : string; 
attribute INIT_30 : string; 
attribute INIT_31 : string; 
attribute INIT_32 : string; 
attribute INIT_33 : string; 
attribute INIT_34 : string; 
attribute INIT_35 : string; 
attribute INIT_36 : string; 
attribute INIT_37 : string; 
attribute INIT_38 : string; 
attribute INIT_39 : string; 
attribute INIT_3A : string; 
attribute INIT_3B : string; 
attribute INIT_3C : string; 
attribute INIT_3D : string; 
attribute INIT_3E : string; 
attribute INIT_3F : string; 
attribute INITP_00 : string;
attribute INITP_01 : string;
attribute INITP_02 : string;
attribute INITP_03 : string;
attribute INITP_04 : string;
attribute INITP_05 : string;
attribute INITP_06 : string;
attribute INITP_07 : string;
--
-- Attributes to define ROM contents during implementation synthesis.
--
attribute INIT_00 of ram_1024_x_18 : label is  "E00800FFE0070080E0060058E0050040E0040026E0030014E002000DE0010005";
attribute INIT_01 of ram_1024_x_18 : label is  "400D70E00E30008B006300E600B9C001E00C0022E00B00EFE00A00BCE0090011";
attribute INIT_02 of ram_1024_x_18 : label is  "5C254008582500930054542540440054401A010700B0504240495028404C501A";
attribute INIT_03 of ram_1024_x_18 : label is  "FCD05425400D00541C005825009712000054130000545425402000548D011D00";
attribute INIT_04 of ram_1024_x_18 : label is  "400358250093005440320D0954254039504C403100545425404F0054401A0111";
attribute INIT_05 of ram_1024_x_18 : label is  "506120024000A0004F014057545B20044000A00070E08E0140328D0A1D005C25";
attribute INIT_06 of ram_1024_x_18 : label is  "50744F08B0004F0DFF10005D0057547C20104000821012100130A000CF20405D";
attribute INIT_07 of ram_1024_x_18 : label is  "00B000F6EF3000B0406300F3406600B600B3587A4130C10100B6546651208101";
attribute INIT_08 of ram_1024_x_18 : label is  "0085B000400D70100130A000A0DFBC00407BB800406140804F01B00020044000";
attribute INIT_09 of ram_1024_x_18 : label is  "102003060306030603061300B80000A41030A000C0F6B80080C6408C8101F010";
attribute INIT_0A of ram_1024_x_18 : label is  "A000800AA000C0F6B80080075CAEC011B800C0E9B80080B9A000D030B80000A4";
attribute INIT_0B of ram_1024_x_18 : label is  "0F63005D0F69005D0F5000B000B0A000005D0F08A000005D0F20A000005D0F0D";
attribute INIT_0C of ram_1024_x_18 : label is  "005D0F5000B3005D0F65005D0F7A005D0F61005D0F6C005D0F42005D0F6F005D";
attribute INIT_0D of ram_1024_x_18 : label is  "0F6F005D0F72005D0F74005D0F6E005D0F6F005D0F4300B3005D0F4D005D0F57";
attribute INIT_0E of ram_1024_x_18 : label is  "0F4D005D0F53005D0F50005D0F43005D0F4B00B0A00000B000B0005D0F6C005D";
attribute INIT_0F of ram_1024_x_18 : label is  "005D0F66005D0F72005D0F65005D0F76005D0F4FA000005D0F3E005D0F33005D";
attribute INIT_10 of ram_1024_x_18 : label is  "005D0F72005D0F6F005D005D0F72005D0F4500B3005D0F77005D0F6F005D0F6C";
attribute INIT_11 of ram_1024_x_18 : label is  "02005100600CE10081016100E20FE10EE00D40B0005D0F4B005D0F4F00B040B0";
attribute INIT_12 of ram_1024_x_18 : label is  "020051006007020051006008C24002005100600902005100600A02005100600B";
attribute INIT_13 of ram_1024_x_18 : label is  "6001020051006002020051006003020051006004020051006005020051006006";
attribute INIT_14 of ram_1024_x_18 : label is  "0000000000000000000000000000000000008001620F610E600DC28002005100";
attribute INIT_15 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_16 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_17 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_18 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_19 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_1A of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_1B of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_1C of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_1D of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_1E of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_1F of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_20 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_21 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_22 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_23 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_24 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_25 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_26 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_27 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_28 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_29 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_2A of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_2B of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_2C of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_2D of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_2E of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_2F of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_30 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_31 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_32 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_33 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_34 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_35 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_36 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_37 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_38 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_39 of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_3A of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_3B of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_3C of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_3D of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_3E of ram_1024_x_18 : label is  "0000000000000000000000000000000000000000000000000000000000000000";
attribute INIT_3F of ram_1024_x_18 : label is  "4117000000000000000000000000000000000000000000000000000000000000";
attribute INITP_00 of ram_1024_x_18 : label is "FBFFF5F5D9BF442BD23D21D37FCDDF7FB73CCF74DFF7FF7743FF888888888888";
attribute INITP_01 of ram_1024_x_18 : label is "CCCCCB3333333BF3333333CCCF333333333ECB2C999D998B2A8B2676E4226724";
attribute INITP_02 of ram_1024_x_18 : label is "0000000000000000000000000000302924924924924A4924924ABCCFCCF33CCC";
attribute INITP_03 of ram_1024_x_18 : label is "0000000000000000000000000000000000000000000000000000000000000000";
attribute INITP_04 of ram_1024_x_18 : label is "0000000000000000000000000000000000000000000000000000000000000000";
attribute INITP_05 of ram_1024_x_18 : label is "0000000000000000000000000000000000000000000000000000000000000000";
attribute INITP_06 of ram_1024_x_18 : label is "0000000000000000000000000000000000000000000000000000000000000000";
attribute INITP_07 of ram_1024_x_18 : label is "C000000000000000000000000000000000000000000000000000000000000000";
--
begin
--
  --Instantiate the Xilinx primitive for a block RAM
  ram_1024_x_18: RAMB16_S9_S18
  --synthesis translate_off
  --INIT values repeated to define contents for functional simulation
  generic map (INIT_00 => X"E00800FFE0070080E0060058E0050040E0040026E0030014E002000DE0010005",
               INIT_01 => X"400D70E00E30008B006300E600B9C001E00C0022E00B00EFE00A00BCE0090011",
               INIT_02 => X"5C254008582500930054542540440054401A010700B0504240495028404C501A",
               INIT_03 => X"FCD05425400D00541C005825009712000054130000545425402000548D011D00",
               INIT_04 => X"400358250093005440320D0954254039504C403100545425404F0054401A0111",
               INIT_05 => X"506120024000A0004F014057545B20044000A00070E08E0140328D0A1D005C25",
               INIT_06 => X"50744F08B0004F0DFF10005D0057547C20104000821012100130A000CF20405D",
               INIT_07 => X"00B000F6EF3000B0406300F3406600B600B3587A4130C10100B6546651208101",
               INIT_08 => X"0085B000400D70100130A000A0DFBC00407BB800406140804F01B00020044000",
               INIT_09 => X"102003060306030603061300B80000A41030A000C0F6B80080C6408C8101F010",
               INIT_0A => X"A000800AA000C0F6B80080075CAEC011B800C0E9B80080B9A000D030B80000A4",
               INIT_0B => X"0F63005D0F69005D0F5000B000B0A000005D0F08A000005D0F20A000005D0F0D",
               INIT_0C => X"005D0F5000B3005D0F65005D0F7A005D0F61005D0F6C005D0F42005D0F6F005D",
               INIT_0D => X"0F6F005D0F72005D0F74005D0F6E005D0F6F005D0F4300B3005D0F4D005D0F57",
               INIT_0E => X"0F4D005D0F53005D0F50005D0F43005D0F4B00B0A00000B000B0005D0F6C005D",
               INIT_0F => X"005D0F66005D0F72005D0F65005D0F76005D0F4FA000005D0F3E005D0F33005D",
               INIT_10 => X"005D0F72005D0F6F005D005D0F72005D0F4500B3005D0F77005D0F6F005D0F6C",
               INIT_11 => X"02005100600CE10081016100E20FE10EE00D40B0005D0F4B005D0F4F00B040B0",
               INIT_12 => X"020051006007020051006008C24002005100600902005100600A02005100600B",
               INIT_13 => X"6001020051006002020051006003020051006004020051006005020051006006",
               INIT_14 => X"0000000000000000000000000000000000008001620F610E600DC28002005100",
               INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000",
               INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000",

⌨️ 快捷键说明

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