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

📄 idt71v65803.vhd

📁 vhdl cod for ram.For sp3e
💻 VHD
📖 第 1 页 / 共 4 页
字号:
        OBuf2 := OBuf1;        -- The State Machine        CASE state IS            WHEN desel =>                CASE command IS                    WHEN ds =>                        OBuf1 := (others => 'Z');                    WHEN read =>                        state <= begin_rd;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                    WHEN write =>                        state <= begin_wr;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        OBuf1 := (others => 'Z');                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                    WHEN burst =>                        OBuf1 := (others => 'Z');                 END CASE;            WHEN begin_rd =>                Burst_Cnt := 0;                CASE command IS                    WHEN ds =>                        state <= desel;                        OBuf1 := (others => 'Z');                    WHEN read =>                        state <= begin_rd;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                    WHEN write =>                        state <= begin_wr;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        OBuf1 := (others => 'Z');                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                                        WHEN burst =>                        state <= burst_rd;                        Burst_Cnt := Burst_Cnt + 1;                        IF (Burst_Cnt = 4) THEN                            Burst_Cnt := 0;                        END IF;                        offset := Burst_Seq(memstart)(Burst_Cnt);                        MemAddr := startaddr + offset;                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                 END CASE;            WHEN begin_wr =>                BWA2 := BWA1;                BWB2 := BWB1;                Burst_Cnt := 0;                CASE command IS                    WHEN ds =>                        state <= desel;                        OBuf1 := (others => 'Z');                    WHEN read =>                        state <= begin_rd;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                                        WHEN write =>                        state <= begin_wr;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        OBuf1 := (others => 'Z');                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                                        WHEN burst =>                        state <= burst_wr;                        Burst_Cnt := Burst_Cnt + 1;                        IF (Burst_Cnt = 4) THEN                            Burst_Cnt := 0;                        END IF;                        offset := Burst_Seq(memstart)(Burst_Cnt);                        MemAddr := startaddr + offset;                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                 END CASE;            WHEN burst_rd =>                CASE command IS                    WHEN ds =>                        state <= desel;                        OBuf1 := (others => 'Z');                                        WHEN read =>                        state <= begin_rd;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                    WHEN write =>                        state <= begin_wr;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        OBuf1 := (others => 'Z');                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                                        WHEN burst =>                        Burst_Cnt := Burst_Cnt + 1;                        IF (Burst_Cnt = 4) THEN                            Burst_Cnt := 0;                        END IF;                        offset := Burst_Seq(memstart)(Burst_Cnt);                        MemAddr := startaddr + offset;                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                 END CASE;            WHEN burst_wr =>                CASE command IS                    WHEN ds =>                        state <= desel;                        OBuf1 := (others => 'Z');                    WHEN read =>                        state <= begin_rd;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        IF MemDataA(MemAddr) = -2 THEN                            OBuf1(8 downto 0) := (others => 'U');                        ELSIF MemDataA(MemAddr) = -1 THEN                            OBuf1(8 downto 0) := (others => 'X');                        ELSE                            OBuf1(8 downto 0) := to_slv(MemDataA(MemAddr),9);                        END IF;                        IF MemDataB(MemAddr) = -2 THEN                            OBuf1(17 downto 9) := (others => 'U');                        ELSIF MemDataB(MemAddr) = -1 THEN                            OBuf1(17 downto 9) := (others => 'X');                        ELSE                            OBuf1(17 downto 9) := to_slv(MemDataB(MemAddr),9);                        END IF;                    WHEN write =>                        state <= begin_wr;                        MemAddr := to_nat(AddressIn);                        startaddr := MemAddr;                        memstart := to_nat(AddressIn(1 downto 0));                        OBuf1 := (others => 'Z');                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                                        WHEN burst =>                        Burst_Cnt := Burst_Cnt + 1;                        IF (Burst_Cnt = 4) THEN                            Burst_Cnt := 0;                        END IF;                        offset := Burst_Seq(memstart)(Burst_Cnt);                        MemAddr := startaddr + offset;                        BWA1 := BWANIn;                        BWB1 := BWBNIn;                        wr1  := true;                 END CASE;        END CASE;        IF (OENegIn = '0') THEN            D_zd <= (others => 'Z'), OBuf2 AFTER 1 ns;        END IF;    END IF;    IF (OENegIn = '1') THEN        D_zd <= (others => 'Z');    END IF;    END PROCESS;        ------------------------------------------------------------------------        -- Path Delay Process        ------------------------------------------------------------------------        DataOutBlk : FOR i IN 17 DOWNTO 0 GENERATE            DataOut_Delay : PROCESS (D_zd(i))                VARIABLE D_GlitchData:VitalGlitchDataArrayType(17 Downto 0);            BEGIN                VitalPathDelay01Z (                    OutSignal       => DataOut(i),                    OutSignalName   => "Data",                    OutTemp         => D_zd(i),                    Mode            => VitalTransport,                    GlitchData      => D_GlitchData(i),                    Paths           => (                        1 => (InputChangeTime => CLKIn'LAST_EVENT,                              PathDelay => tpd_CLK_DQA0,                              PathCondition   => OENegIn = '0'),                        2 => (InputChangeTime => OENegIn'LAST_EVENT,                              PathDelay => tpd_OENeg_DQA0,                              PathCondition   => true)                   )                );            END PROCESS;        END GENERATE;    END BLOCK;END vhdl_behavioral;

⌨️ 快捷键说明

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