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

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [Testbench/] [ACIA_tb.vhd] - Diff between revs 66 and 122

Show entire file | Details | Blame | View Log

Rev 66 Rev 122
Line 1... Line 1...
--===========================================================================--
--===========================================================================--
 
--                                                                           --
 
--                        VHDL 6850 ACIA TestBench                           --
 
--                                                                           --
 
--===========================================================================--
 
--
 
--
 
-- File name      : ACIA_tb.vhd
 
--
 
-- Entity name    : ACIA6850_testbench
 
--
 
-- Purpose        : VHDL testbench for acia6850
 
--
 
-- Dependencies   : ieee.std_logic_1164
 
--                  ieee.std_logic_unsigned
 
--                  ieee.std_logic_arith
 
--                  ieee.numeric_std
 
--
 
-- Author         : John E. Kent
--
--
-- ACIA 6850 Test Bench
-- Email          : dilbert57@opencores.org      
--
--
 
-- Web            : http://opencores.org/project,system09
--
--
-- John Kent 6th February 2007
--  Copyright (C) 2007 - 2011 John Kent
 
--
 
--  This program is free software: you can redistribute it and/or modify
 
--  it under the terms of the GNU General Public License as published by
 
--  the Free Software Foundation, either version 3 of the License, or
 
--  (at your option) any later version.
 
--
 
--  This program is distributed in the hope that it will be useful,
 
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
--  GNU General Public License for more details.
 
--
 
--  You should have received a copy of the GNU General Public License
 
--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
--
 
--===========================================================================--
 
--                                                                           --
 
--                                Revision History                           --
 
--                                                                           --
 
--===========================================================================--
--
--
 
-- Rev  Date        Author     Notes 
 
-- 0.1  2007-02-06  John Kent  Initial Version
 
-- 0.2  2011-10-09  John Kent  Renamed acia_6850 to acia6850
--
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
library ieee;
library ieee;
   use ieee.std_logic_1164.all;
   use ieee.std_logic_1164.all;
   use IEEE.STD_LOGIC_ARITH.ALL;
   use IEEE.STD_LOGIC_ARITH.ALL;
   use IEEE.STD_LOGIC_UNSIGNED.ALL;
   use IEEE.STD_LOGIC_UNSIGNED.ALL;
   use ieee.numeric_std.all;
   use ieee.numeric_std.all;
 
 
entity ACIA_6850_testbench is
entity ACIA6850_testbench is
end ACIA_6850_testbench;
end ACIA6850_testbench;
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Architecture for ACIA 6850 Unit
-- Architecture for ACIA 6850 Unit
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
architecture behavior of ACIA_6850_testbench is
architecture behavior of ACIA6850_testbench is
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Signals
  -- Signals
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- CPU Interface signals
  -- CPU Interface signals
  signal SysClk       : Std_Logic;
  signal SysClk       : Std_Logic;
Line 43... Line 84...
-----------------------------------------------------------------
-----------------------------------------------------------------
--
--
-- ACIA 6850 UART
-- ACIA 6850 UART
--
--
-----------------------------------------------------------------
-----------------------------------------------------------------
component ACIA_6850
component ACIA6850
  port (
  port (
     --
     --
          -- CPU signals
          -- CPU signals
          --
          --
     clk      : in  Std_Logic;  -- System Clock
     clk      : in  std_logic;  -- System Clock
     rst      : in  Std_Logic;  -- Reset input (active high)
     rst      : in  std_logic;  -- Reset input (active high)
     cs       : in  Std_Logic;  -- miniUART Chip Select
     cs       : in  std_logic;  -- miniUART Chip Select
     rw       : in  Std_Logic;  -- Read / Not Write
     rw       : in  std_logic;  -- Read / Not Write
     irq      : out Std_Logic;  -- Interrupt
     addr     : in  std_logic;  -- Register Select
     Addr     : in  Std_Logic;  -- Register Select
     data_in  : in  std_logic_vector(7 downto 0); -- Data Bus In 
     DataIn   : in  Std_Logic_Vector(7 downto 0); -- Data Bus In 
     data_out : out std_logic_vector(7 downto 0); -- Data Bus Out
     DataOut  : out Std_Logic_Vector(7 downto 0); -- Data Bus Out
     irq      : out std_logic;  -- Interrupt
     --
     --
          -- Uart Signals
          -- Uart Signals
          --
          --
     RxC      : in  Std_Logic;  -- Receive Baud Clock
     RxC      : in  std_logic;  -- Receive Baud Clock
     TxC      : in  Std_Logic;  -- Transmit Baud Clock
     TxC      : in  std_logic;  -- Transmit Baud Clock
     RxD      : in  Std_Logic;  -- Receive Data
     RxD      : in  std_logic;  -- Receive Data
     TxD      : out Std_Logic;  -- Transmit Data
     TxD      : out std_logic;  -- Transmit Data
          DCD_n    : in  Std_Logic;  -- Data Carrier Detect
          DCD_n    : in  std_logic;  -- Data Carrier Detect
     CTS_n    : in  Std_Logic;  -- Clear To Send
     CTS_n    : in  std_logic;  -- Clear To Send
     RTS_n    : out Std_Logic );  -- Request To send
     RTS_n    : out std_logic );  -- Request To send
end component; --================== End of entity ==============================--
end component; --================== End of entity ==============================--
 
 
begin
begin
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Instantiation of internal components
  -- Instantiation of internal components
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
my_acia  : ACIA_6850 port map (
my_acia  : ACIA6850 port map (
    clk       => SysClk,
    clk       => SysClk,
         rst       => uart_reset,
         rst       => uart_reset,
    cs        => uart_cs,
    cs        => uart_cs,
         rw        => uart_rw,
         rw        => uart_rw,
    Irq       => uart_irq,
    addr      => uart_addr,
    Addr      => uart_addr,
         data_in   => uart_data_in,
         Datain    => uart_data_in,
         data_out  => uart_data_out,
         DataOut   => uart_data_out,
    irq       => uart_irq,
         RxC       => rxclk,
         RxC       => rxclk,
         TxC       => txclk,
         TxC       => txclk,
         RxD       => rxbit,
         RxD       => rxbit,
         TxD       => txbit,
         TxD       => txbit,
         DCD_n     => dcd_n,
         DCD_n     => dcd_n,

powered by: WebSVN 2.1.0

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