📄 cy7c1380d.vhd
字号:
--***************************************************************************************---- File Name: CY7C1380_PL_SCD.vhd-- Version: 1.0-- Date: December 22nd, 2004-- Model: BUS Functional-- Simulator: Modelsim ------ Queries: MPD Applications-- Website: www.cypress.com/support-- Company: Cypress Semiconductor-- Part #: CY7C1380D (512K x 36)---- Description: Cypress 18Mb Synburst SRAM (Pipelined SCD)------ Disclaimer: THESE DESIGNS ARE PROVIDED "AS IS" WITH NO WARRANTY -- WHATSOEVER AND CYPRESS SPECIFICALLY DISCLAIMS ANY -- IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR-- A PARTICULAR PURPOSE, OR AGAINST INFRINGEMENT.---- Copyright(c) Cypress Semiconductor, 2004-- All rights reserved---- Rev Date Changes-- --- ---------- ----------------------------------------- 1.0 12/22/2004 - New Model-- - New Test Bench-- - New Test Vectors----***************************************************************************************-- Timings for Different Speed Bins (sb): 250MHz, 225MHz, 200MHz, 167MHz, 133MHzLIBRARY ieee, grlib, gaisler, work; USE ieee.std_logic_1164.all;-- USE ieee.std_logic_unsigned.all;-- Use IEEE.Std_Logic_Arith.all; USE work.package_utility.all; use grlib.stdlib.all; use ieee.std_logic_1164.all; use std.textio.all; use gaisler.sim.all;entity CY7C1380D is GENERIC ( fname : string := "prom.srec"; -- File to read from -- Constant Parameters addr_bits : INTEGER := 19; -- This is external address data_bits : INTEGER := 36; --Clock timings for 250Mhz Cyp_tCO : TIME := 2.6 ns; -- Data Output Valid After CLK Rise Cyp_tCYC : TIME := 4.0 ns; -- Clock cycle time Cyp_tCH : TIME := 1.7 ns; -- Clock HIGH time Cyp_tCL : TIME := 1.7 ns; -- Clock LOW time Cyp_tCHZ : TIME := 2.6 ns; -- Clock to High-Z Cyp_tCLZ : TIME := 1.0 ns; -- Clock to Low-Z Cyp_tOEHZ : TIME := 2.6 ns; -- OE# HIGH to Output High-Z Cyp_tOELZ : TIME := 0.0 ns; -- OE# LOW to Output Low-Z Cyp_tOEV : TIME := 2.6 ns; -- OE# LOW to Output Valid Cyp_tAS : TIME := 1.2 ns; -- Address Set-up Before CLK Rise Cyp_tADS : TIME := 1.2 ns; -- ADSC#, ADSP# Set-up Before CLK Rise Cyp_tADVS : TIME := 1.2 ns; -- ADV# Set-up Before CLK Rise Cyp_tWES : TIME := 1.2 ns; -- BWx#, GW#, BWE# Set-up Before CLK Rise Cyp_tDS : TIME := 1.2 ns; -- Data Input Set-up Before CLK Rise Cyp_tCES : TIME := 1.2 ns; -- Chip Enable Set-up Cyp_tAH : TIME := 0.3 ns; -- Address Hold After CLK Rise Cyp_tADH : TIME := 0.3 ns; -- ADSC#, ADSP# Hold After CLK Rise Cyp_tADVH : TIME := 0.3 ns; -- ADV# Hold After CLK Rise Cyp_tWEH : TIME := 0.3 ns; -- BWx#, GW#, BWE# Hold After CLK Rise Cyp_tDH : TIME := 0.3 ns; -- Data Input Hold After CLK Rise Cyp_tCEH : TIME := 0.3 ns -- Chip Enable Hold After CLK Rise--Clock timings for 225Mhz-- Cyp_tCO : TIME := 2.8 ns; -- Data Output Valid After CLK Rise -- Cyp_tCYC : TIME := 4.4 ns; -- Clock cycle time-- Cyp_tCH : TIME := 2.0 ns; -- Clock HIGH time-- Cyp_tCL : TIME := 2.0 ns; -- Clock LOW time -- Cyp_tCHZ : TIME := 2.8 ns; -- Clock to High-Z-- Cyp_tCLZ : TIME := 1.0 ns; -- Clock to Low-Z-- Cyp_tOEHZ: TIME := 2.8 ns; -- OE# HIGH to Output High-Z-- Cyp_tOELZ: TIME := 0.0 ns; -- OE# LOW to Output Low-Z -- Cyp_tOEV : TIME := 2.8 ns; -- OE# LOW to Output Valid -- Cyp_tAS : TIME := 1.4 ns; -- Address Set-up Before CLK Rise-- Cyp_tADS : TIME := 1.4 ns; -- ADSC#, ADSP# Set-up Before CLK Rise-- Cyp_tADVS: TIME := 1.4 ns; -- ADV# Set-up Before CLK Rise-- Cyp_tWES : TIME := 1.4 ns; -- BWx#, GW#, BWE# Set-up Before CLK Rise-- Cyp_tDS : TIME := 1.4 ns; -- Data Input Set-up Before CLK Rise-- Cyp_tCES : TIME := 1.4 ns; -- Chip Enable Set-up -- Cyp_tAH : TIME := 0.4 ns; -- Address Hold After CLK Rise-- Cyp_tADH : TIME := 0.4 ns; -- ADSC#, ADSP# Hold After CLK Rise-- Cyp_tADVH: TIME := 0.4 ns; -- ADV# Hold After CLK Rise-- Cyp_tWEH : TIME := 0.4 ns; -- BWx#, GW#, BWE# Hold After CLK Rise-- Cyp_tDH : TIME := 0.4 ns; -- Data Input Hold After CLK Rise-- Cyp_tCEH : TIME := 0.4 ns -- Chip Enable Hold After CLK Rise--Clock timings for 200Mhz-- Cyp_tCO : TIME := 3.0 ns; -- Data Output Valid After CLK Rise -- Cyp_tCYC : TIME := 5.0 ns; -- Clock cycle time-- Cyp_tCH : TIME := 2.0 ns; -- Clock HIGH time-- Cyp_tCL : TIME := 2.0 ns; -- Clock LOW time -- Cyp_tCHZ : TIME := 3.0 ns; -- Clock to High-Z-- Cyp_tCLZ : TIME := 1.3 ns; -- Clock to Low-Z-- Cyp_tOEHZ: TIME := 3.0 ns; -- OE# HIGH to Output High-Z-- Cyp_tOELZ: TIME := 0.0 ns; -- OE# LOW to Output Low-Z -- Cyp_tOEV : TIME := 3.0 ns; -- OE# LOW to Output Valid -- Cyp_tAS : TIME := 1.4 ns; -- Address Set-up Before CLK Rise-- Cyp_tADS : TIME := 1.4 ns; -- ADSC#, ADSP# Set-up Before CLK Rise-- Cyp_tADVS: TIME := 1.4 ns; -- ADV# Set-up Before CLK Rise-- Cyp_tWES : TIME := 1.4 ns; -- BWx#, GW#, BWE# Set-up Before CLK Rise-- Cyp_tDS : TIME := 1.4 ns; -- Data Input Set-up Before CLK Rise-- Cyp_tCES : TIME := 1.4 ns; -- Chip Enable Set-up -- Cyp_tAH : TIME := 0.4 ns; -- Address Hold After CLK Rise-- Cyp_tADH : TIME := 0.4 ns; -- ADSC#, ADSP# Hold After CLK Rise-- Cyp_tADVH: TIME := 0.4 ns; -- ADV# Hold After CLK Rise-- Cyp_tWEH : TIME := 0.4 ns; -- BWx#, GW#, BWE# Hold After CLK Rise-- Cyp_tDH : TIME := 0.4 ns; -- Data Input Hold After CLK Rise-- Cyp_tCEH : TIME := 0.4 ns -- Chip Enable Hold After CLK Rise--Clock timings for 167Mhz-- Cyp_tCO : TIME := 3.4 ns; -- Data Output Valid After CLK Rise -- Cyp_tCYC : TIME := 6.0 ns; -- Clock cycle time-- Cyp_tCH : TIME := 2.2 ns; -- Clock HIGH time-- Cyp_tCL : TIME := 2.2 ns; -- Clock LOW time -- Cyp_tCHZ : TIME := 3.4 ns; -- Clock to High-Z-- Cyp_tCLZ : TIME := 1.3 ns; -- Clock to Low-Z-- Cyp_tOEHZ: TIME := 3.4 ns; -- OE# HIGH to Output High-Z-- Cyp_tOELZ: TIME := 0.0 ns; -- OE# LOW to Output Low-Z -- Cyp_tOEV : TIME := 3.4 ns; -- OE# LOW to Output Valid -- Cyp_tAS : TIME := 1.5 ns; -- Address Set-up Before CLK Rise-- Cyp_tADS : TIME := 1.5 ns; -- ADSC#, ADSP# Set-up Before CLK Rise-- Cyp_tADVS: TIME := 1.5 ns; -- ADV# Set-up Before CLK Rise-- Cyp_tWES : TIME := 1.5 ns; -- BWx#, GW#, BWE# Set-up Before CLK Rise-- Cyp_tDS : TIME := 1.5 ns; -- Data Input Set-up Before CLK Rise-- Cyp_tCES : TIME := 1.5 ns; -- Chip Enable Set-up -- Cyp_tAH : TIME := 0.5 ns; -- Address Hold After CLK Rise-- Cyp_tADH : TIME := 0.5 ns; -- ADSC#, ADSP# Hold After CLK Rise-- Cyp_tADVH: TIME := 0.5 ns; -- ADV# Hold After CLK Rise-- Cyp_tWEH : TIME := 0.5 ns; -- BWx#, GW#, BWE# Hold After CLK Rise-- Cyp_tDH : TIME := 0.5 ns; -- Data Input Hold After CLK Rise-- Cyp_tCEH : TIME := 0.5 ns -- Chip Enable Hold After CLK Rise--Clock timings for 133Mhz-- Cyp_tCO : TIME := 4.2 ns; -- Data Output Valid After CLK Rise -- Cyp_tCYC : TIME := 7.5 ns; -- Clock cycle time-- Cyp_tCH : TIME := 2.5 ns; -- Clock HIGH time-- Cyp_tCL : TIME := 2.5 ns; -- Clock LOW time -- Cyp_tCHZ : TIME := 3.4 ns; -- Clock to High-Z-- Cyp_tCLZ : TIME := 1.3 ns; -- Clock to Low-Z-- Cyp_tOEHZ: TIME := 4.0 ns; -- OE# HIGH to Output High-Z-- Cyp_tOELZ: TIME := 0.0 ns; -- OE# LOW to Output Low-Z -- Cyp_tOEV : TIME := 4.2 ns; -- OE# LOW to Output Valid -- Cyp_tAS : TIME := 1.5 ns; -- Address Set-up Before CLK Rise-- Cyp_tADS : TIME := 1.5 ns; -- ADSC#, ADSP# Set-up Before CLK Rise-- Cyp_tADVS: TIME := 1.5 ns; -- ADV# Set-up Before CLK Rise-- Cyp_tWES : TIME := 1.5 ns; -- BWx#, GW#, BWE# Set-up Before CLK Rise-- Cyp_tDS : TIME := 1.5 ns; -- Data Input Set-up Before CLK Rise-- Cyp_tCES : TIME := 1.5 ns; -- Chip Enable Set-up -- Cyp_tAH : TIME := 0.5 ns; -- Address Hold After CLK Rise-- Cyp_tADH : TIME := 0.5 ns; -- ADSC#, ADSP# Hold After CLK Rise-- Cyp_tADVH: TIME := 0.5 ns; -- ADV# Hold After CLK Rise-- Cyp_tWEH : TIME := 0.5 ns; -- BWx#, GW#, BWE# Hold After CLK Rise-- Cyp_tDH : TIME := 0.5 ns; -- Data Input Hold After CLK Rise-- Cyp_tCEH : TIME := 0.5 ns -- Chip Enable Hold After CLK Rise ); PORT (iZZ : IN STD_LOGIC; iMode : IN STD_LOGIC; iADDR : IN STD_LOGIC_VECTOR ((addr_bits -1) downto 0); inGW : IN STD_LOGIC; inBWE : IN STD_LOGIC; inBWd : IN STD_LOGIC; inBWc : IN STD_LOGIC; inBWb : IN STD_LOGIC; inBWa : IN STD_LOGIC; inCE1 : IN STD_LOGIC; iCE2 : IN STD_LOGIC; inCE3 : IN STD_LOGIC; inADSP : IN STD_LOGIC; inADSC : IN STD_LOGIC; inADV : IN STD_LOGIC; inOE : IN STD_LOGIC; ioDQ : INOUT STD_LOGIC_VECTOR ((data_bits-1) downto 0); iCLK : IN STD_LOGIC);end CY7C1380D;ARCHITECTURE CY7C1380D_arch OF CY7C1380D IS signal Read_reg_o1, Read_reg1 : STD_LOGIC; signal WrN_reg1 : STD_LOGIC; signal ADSP_N_o : STD_LOGIC; signal pipe_reg1, ce_reg1,pcsr_write1, ctlr_write1 : STD_LOGIC; signal Sys_clk : STD_LOGIC := '0'; signal test : STD_LOGIC; signal dout, din1 : STD_LOGIC_VECTOR (data_bits-1 downto 0); signal ce : STD_LOGIC; signal Write_n : STD_LOGIC; signal Read : STD_LOGIC; signal bwa_n1 : STD_LOGIC; signal bwb_n1 : STD_LOGIC; signal bwc_n1 : STD_LOGIC; signal bwd_n1 : STD_LOGIC; signal latch_addr : STD_LOGIC; signal addr_reg_read1,addr_reg_write1,addr_reg_in1 : STD_LOGIC_VECTOR (addr_bits-1 downto 0); signal OeN_HZ : STD_LOGIC; signal OeN_DataValid : STD_LOGIC; signal OeN_efct : STD_LOGIC; signal WR_HZ : STD_LOGIC; signal WR_LZ : STD_LOGIC; signal WR_efct : STD_LOGIC; signal CE_HZ : STD_LOGIC; signal CE_LZ : STD_LOGIC; signal Pipe_efct : STD_LOGIC; signal RD_HZ : STD_LOGIC; signal RD_LZ : STD_LOGIC; signal RD_efct : STD_LOGIC;begin ce <= ((not inCE1) and (iCE2) and (not inCE3)); Write_n <= not((((not inBWa) OR (not inBWb) OR (not inBWc) OR (not inBWd)) AND (not inBWE)) OR (not inGW)); Read <= (((inBWa AND inBWb AND inBWc AND inBWd) AND (not inBWE)) OR (inGW AND inBWE) OR (( not inADSP) AND ce)); bwa_n1 <= not((not Write_n) AND ((not inGW) OR ((not inBWE) AND (not inBWa)))); bwb_n1 <= not((not Write_n) AND ((not inGW) OR ((not inBWE) AND (not inBWb)))); bwc_n1 <= not((not Write_n) AND ((not inGW) OR ((not inBWE) AND (not inBWc)))); bwd_n1 <= not((not Write_n) AND ((not inGW) OR ((not inBWE) AND (not inBWd)))); latch_addr <= ((not inADSC) OR ((not inADSP) AND (not inCE1))); OeN_efct <= OeN_DataValid when (inOE = '0') else OeN_HZ; WR_efct <= WR_LZ when (WrN_reg1 = '0') else WR_HZ; Pipe_efct <= CE_LZ when ((ce_reg1 = '1') and (pipe_reg1 = '1')) else CE_HZ; RD_efct <= CE_LZ when (Read_reg_o1 = '1') else CE_HZ ; Process (Read_reg_o1) begin if (Read_reg_o1 = '0') then RD_HZ <= '0' after Cyp_tCHZ; RD_LZ <= '0' after Cyp_tCLZ; elsif (Read_reg_o1 = '1') then RD_HZ <= '1' after Cyp_tCHZ; RD_LZ <= '1' after Cyp_tCLZ; else RD_HZ <= 'X' after Cyp_tCHZ; RD_LZ <= 'X' after Cyp_tCLZ; end if; end process; Process (pipe_reg1) begin if (pipe_reg1 = '1') then CE_LZ <= '1' after Cyp_tCLZ; elsif (pipe_reg1 = '0') then CE_LZ <= '0' after Cyp_tCLZ; else CE_LZ <= 'X' after Cyp_tCLZ; end if; end process; -- System Clock Decode Process (iclk) variable Sys_clk1 : std_logic := '0'; begin if (rising_edge (iclk)) then Sys_clk1 := not iZZ; end if; if (falling_edge (iCLK)) then Sys_clk1 := '0'; end if; Sys_clk <= Sys_clk1; end process; Process (WrN_reg1) begin if (WrN_reg1 = '1') then WR_HZ <= '1' after Cyp_tCHZ; WR_LZ <= '1' after Cyp_tCLZ; elsif (WrN_reg1 = '0') then WR_HZ <= '0' after Cyp_tCHZ; WR_LZ <= '0' after Cyp_tCLZ; else WR_HZ <= 'X' after Cyp_tCHZ; WR_LZ <= 'X' after Cyp_tCLZ; end if; end process; Process (inOE) begin if (inOE = '1') then OeN_HZ <= '1' after Cyp_tOEHZ; OeN_DataValid <= '1' after Cyp_tOEV; elsif (inOE = '0') then OeN_HZ <= '0' after Cyp_tOEHZ; OeN_DataValid <= '0' after Cyp_tOEV; else OeN_HZ <= 'X' after Cyp_tOEHZ; OeN_DataValid <= 'X' after Cyp_tOEV; end if; end process; process (ce_reg1, pipe_reg1) begin if ((ce_reg1 = '0') or (pipe_reg1 = '0')) then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -