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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_0_1_beta/] [bench/] [vhdl/] [tb.vhd] - Diff between revs 30 and 33

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

Rev 30 Rev 33
Line 1... Line 1...
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
--
-- The testbench for t48_core.
-- The testbench for t48_core.
--
--
-- $Id: tb.vhd,v 1.4 2004-03-28 21:30:25 arniml Exp $
-- $Id: tb.vhd,v 1.5 2004-03-29 19:45:15 arniml Exp $
--
--
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
--
--
-- All rights reserved
-- All rights reserved
--
--
Line 73... Line 73...
  signal ram_addr_s      : std_logic_vector( 7 downto 0);
  signal ram_addr_s      : std_logic_vector( 7 downto 0);
  signal ram_we_s        : std_logic;
  signal ram_we_s        : std_logic;
 
 
  signal p1_s            : std_logic_vector( 7 downto 0);
  signal p1_s            : std_logic_vector( 7 downto 0);
  signal t48_p1_s        : std_logic_vector( 7 downto 0);
  signal t48_p1_s        : std_logic_vector( 7 downto 0);
  signal p1_limp_s       : std_logic;
  signal p1_low_imp_s    : std_logic;
  signal p2_s            : std_logic_vector( 7 downto 0);
  signal p2_s            : std_logic_vector( 7 downto 0);
  signal t48_p2_s        : std_logic_vector( 7 downto 0);
  signal t48_p2_s        : std_logic_vector( 7 downto 0);
  signal p2_limp_s       : std_logic;
  signal p2_low_imp_s    : std_logic;
  signal prog_n_s        : std_logic;
  signal prog_n_s        : std_logic;
 
 
  signal bus_s           : std_logic_vector( 7 downto 0);
  signal bus_s           : std_logic_vector( 7 downto 0);
  signal t48_bus_s       : std_logic_vector( 7 downto 0);
  signal t48_bus_s       : std_logic_vector( 7 downto 0);
  signal bus_dir_s       : std_logic;
  signal bus_dir_s       : std_logic;
Line 163... Line 163...
      db_o        => t48_bus_s,
      db_o        => t48_bus_s,
      db_dir_o    => bus_dir_s,
      db_dir_o    => bus_dir_s,
      t1_i        => p1_s(1),
      t1_i        => p1_s(1),
      p2_i        => p2_s,
      p2_i        => p2_s,
      p2_o        => t48_p2_s,
      p2_o        => t48_p2_s,
      p2_limp_o   => p2_limp_s,
      p2_low_imp_o => p2_low_imp_s,
      p1_i        => p1_s,
      p1_i        => p1_s,
      p1_o        => t48_p1_s,
      p1_o        => t48_p1_s,
      p1_limp_o   => p1_limp_s,
      p1_low_imp_o => p1_low_imp_s,
      prog_n_o    => prog_n_s,
      prog_n_o    => prog_n_s,
      clk_i       => xtal_s,
      clk_i       => xtal_s,
      en_clk_i    => xtal3_s,
      en_clk_i    => xtal3_s,
      xtal3_o     => xtal3_s,
      xtal3_o     => xtal3_s,
      dmem_addr_o => ram_addr_s,
      dmem_addr_o => ram_addr_s,
Line 184... Line 184...
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Port logic
  -- Port logic
  --
  --
  ports: process (t48_p1_s,
  ports: process (t48_p1_s,
                  p1_limp_s,
                  p1_low_imp_s,
                  t48_p2_s,
                  t48_p2_s,
                  p2_limp_s)
                  p2_low_imp_s)
    function t48_port_f(t48_p : std_logic_vector(7 downto 0);
    function t48_port_f(t48_p : std_logic_vector(7 downto 0);
                        limp  : std_logic) return std_logic_vector is
                        low_imp : std_logic) return std_logic_vector is
      variable p_v : std_logic_vector(7 downto 0);
      variable p_v : std_logic_vector(7 downto 0);
    begin
    begin
      if limp = '1' then
      if low_imp = '1' then
        p_v := t48_p;
        p_v := t48_p;
 
 
      else
      else
        for i in p_v'range loop
        for i in p_v'range loop
          if t48_p(i) = '1' then
          if t48_p(i) = '1' then
Line 211... Line 211...
    end;
    end;
 
 
  begin
  begin
 
 
    p1_s <= t48_port_f(t48_p => t48_p1_s,
    p1_s <= t48_port_f(t48_p => t48_p1_s,
                       limp  => p1_limp_s);
                       low_imp => p1_low_imp_s);
 
 
    p2_s <= t48_port_f(t48_p => t48_p2_s,
    p2_s <= t48_port_f(t48_p => t48_p2_s,
                       limp  => p2_limp_s);
                       low_imp => p2_low_imp_s);
 
 
  end process ports;
  end process ports;
  --
  --
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
Line 343... Line 343...
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- File History:
-- File History:
--
--
-- $Log: not supported by cvs2svn $
-- $Log: not supported by cvs2svn $
 
-- Revision 1.4  2004/03/28 21:30:25  arniml
 
-- connect prog_n_o
 
--
-- Revision 1.3  2004/03/26 22:39:28  arniml
-- Revision 1.3  2004/03/26 22:39:28  arniml
-- enhance simulation result string
-- enhance simulation result string
--
--
-- Revision 1.2  2004/03/24 23:22:35  arniml
-- Revision 1.2  2004/03/24 23:22:35  arniml
-- put ext_ram on falling clock edge to sample the write enable properly
-- put ext_ram on falling clock edge to sample the write enable properly

powered by: WebSVN 2.1.0

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