------------------------------------------------------------
-- Copyright Mentor Graphic Corporation 1991. 
-- All rights reserved.  
------------------------------------------------------------
--
--  Model Title:  I/O unit
--  Date Created: 94/ 9/16 (Fri)
--  Author:      T. Ohtsuka 
--
------------------------------------------------------------
-- Model Description: 
--
-----------------------------------------------------------
--
LIBRARY IEEE,ARITHMETIC ;
USE IEEE.STD_LOGIC_1164.ALL ;
USE ARITHMETIC.STD_LOGIC_ARITH.ALL ;

LIBRARY work ;
USE work.cpu_package.ALL ;

ENTITY iou IS
   PORT (
         clk1           :  IN    STD_LOGIC ;
         clk2           :  IN    STD_LOGIC ;
         io_write       :  IN    STD_LOGIC ;
         start          :  OUT   STD_LOGIC ;
         halt           :  OUT   STD_LOGIC ;
         init           :  OUT   STD_LOGIC ;
         wp             :  OUT   STD_LOGIC
        ) ;
END iou ;

-- ---------------------------------------------------------
--Copyright Mentor Graphic Corporation 1991.
--All rights reserved.
-- ---------------------------------------------------------
--Arch. Body for entity declared in 
------------------------------------------------------------
--

LIBRARY IEEE ;
LIBRARY work ;

USE IEEE.STD_LOGIC_1164.ALL ;
USE IEEE.STD_LOGIC_1164_EXTENSIONS.ALL ;
USE work.cpu_package.ALL ;

ARCHITECTURE behav1 OF iou IS

BEGIN
 iou_process : PROCESS

   BEGIN
       wp <= '0' ;
       halt <= '0' ;
--     init <= '1' AFTER 10000 ns,
--             '0' AFTER 15000 ns ;
--     start <= '1' AFTER 29000 ns,
--              '0' AFTER 34000 ns,
--              '1' AFTER 76000 ns,
--              '0' AFTER 81000 ns ;
--     halt <= '1' AFTER 38000 ns,
--              '0' AFTER 68000 ns ;
     init <= '1' AFTER 4000 ns,
             '0' AFTER 8000 ns ;
     start <= '1' AFTER 12000 ns,
              '0' AFTER 16000 ns ;
     WAIT ;
   END PROCESS ;

END behav1 ;