OpenCores
URL https://opencores.org/ocsvn/t80/t80/trunk

Subversion Repositories t80

[/] [t80/] [trunk/] [rtl/] [vhdl/] [T80s.vhd] - Diff between revs 15 and 18

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 15 Rev 18
Line 1... Line 1...
--
--
-- Z80 compatible microprocessor core, synchronous top level
-- Z80 compatible microprocessor core, synchronous top level
-- Different timing than the original z80
-- Different timing than the original z80
-- Inputs needs to be synchronous and outputs may glitch
-- Inputs needs to be synchronous and outputs may glitch
--
--
-- Version : 0235
-- Version : 0236
--
--
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
--
--
-- All rights reserved
-- All rights reserved
--
--
Line 52... Line 52...
--
--
--      0211 : Fixed interrupt cycle
--      0211 : Fixed interrupt cycle
--
--
--      0235 : Updated for T80 interface change
--      0235 : Updated for T80 interface change
--
--
 
--      0236 : Added T2Write generic
 
--
 
 
library IEEE;
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use IEEE.numeric_std.all;
use work.T80_Pack.all;
use work.T80_Pack.all;
 
 
entity T80s is
entity T80s is
        generic(
        generic(
                Mode : integer := 0      -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB
                Mode : integer := 0;     -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB
 
                T2Write : integer := 0   -- 0 => WR_n active in T3, /=0 => WR_n active in T2
        );
        );
        port(
        port(
                RESET_n         : in std_logic;
                RESET_n         : in std_logic;
                CLK_n           : in std_logic;
                CLK_n           : in std_logic;
                WAIT_n          : in std_logic;
                WAIT_n          : in std_logic;
Line 152... Line 155...
                                if (TState = "001" or (TState = "010" and Wait_n = '0')) and Write = '0' then
                                if (TState = "001" or (TState = "010" and Wait_n = '0')) and Write = '0' then
                                        RD_n <= '0';
                                        RD_n <= '0';
                                        IORQ_n <= not IORQ;
                                        IORQ_n <= not IORQ;
                                        MREQ_n <= IORQ;
                                        MREQ_n <= IORQ;
                                end if;
                                end if;
 
                                if T2Write = 0 then
                                if TState = "010" and Write = '1' then
                                if TState = "010" and Write = '1' then
                                        WR_n <= '0';
                                        WR_n <= '0';
                                        IORQ_n <= not IORQ;
                                        IORQ_n <= not IORQ;
                                        MREQ_n <= IORQ;
                                        MREQ_n <= IORQ;
                                end if;
                                end if;
 
                                else
 
                                        if TState = "001" and Write = '1' then
 
                                                WR_n <= '0';
 
                                                IORQ_n <= not IORQ;
 
                                                MREQ_n <= IORQ;
 
                                        end if;
 
                                end if;
                        end if;
                        end if;
                        if TState = "010" and Wait_n = '1' then
                        if TState = "010" and Wait_n = '1' then
                                DI_Reg <= DI;
                                DI_Reg <= DI;
                        end if;
                        end if;
                end if;
                end if;

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.