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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_1_0/] [rtl/] [vhdl/] [system/] [t8039.vhd] - Diff between revs 211 and 213

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

Rev 211 Rev 213
Line 1... Line 1...
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
--
-- T8039 Microcontroller System
-- T8039 Microcontroller System
--
--
-- $Id: t8039.vhd,v 1.4 2005-11-01 21:37:45 arniml Exp $
-- $Id: t8039.vhd,v 1.5 2005-11-02 23:41:43 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 126... Line 126...
  bidirs: process (t0_b, t0_s, t0_dir_s,
  bidirs: process (t0_b, t0_s, t0_dir_s,
                   db_b, db_s, db_dir_s,
                   db_b, db_s, db_dir_s,
                   p1_b, p1_s, p1_low_imp_s,
                   p1_b, p1_s, p1_low_imp_s,
                   p2_b, p2_s, p2l_low_imp_s, p2h_low_imp_s)
                   p2_b, p2_s, p2l_low_imp_s, p2h_low_imp_s)
 
 
    function open_collector_f(sig : std_logic) return std_logic is
    function port_bidir_f(port_value : in std_logic_vector;
      variable sig_v : std_logic;
                          low_imp    : in std_logic) return std_logic_vector is
 
      variable result_v : std_logic_vector(port_value'range);
    begin
    begin
      sig_v   := 'Z';
      for idx in port_value'high downto port_value'low loop
 
        if low_imp = '1' then
      if sig = '0' then
          result_v(idx) := port_value(idx);
        sig_v := '0';
        elsif port_value(idx) = '0' then
 
          result_v(idx) := '0';
 
        else
 
          result_v(idx) := 'Z';
      end if;
      end if;
 
      end loop;
 
 
      return sig_v;
      return result_v;
    end;
    end;
 
 
  begin
  begin
    -- Test 0 -----------------------------------------------------------------
    -- Test 0 -----------------------------------------------------------------
    if t0_dir_s = '1' then
    if t0_dir_s = '1' then
Line 154... Line 159...
    else
    else
      db_b <= (others => 'Z');
      db_b <= (others => 'Z');
    end if;
    end if;
 
 
    -- Port 1 -----------------------------------------------------------------
    -- Port 1 -----------------------------------------------------------------
    for i in p1_b'range loop
    p1_b <= port_bidir_f(port_value => p1_s,
      p1_b(i) <= open_collector_f(p1_s(i));
                         low_imp => p1_low_imp_s);
    end loop;
 
--     if p1_low_imp_s = '1' then
 
--       p1_b <= p1_s;
 
--     else
 
--       p1_b <= (others => 'Z');
 
--     end if;
 
 
 
    -- Port 2 -----------------------------------------------------------------
    -- Port 2 -----------------------------------------------------------------
    for i in p2_b'range loop
    p2_b(3 downto 0) <= port_bidir_f(port_value => p2_s(3 downto 0),
      p2_b(i) <= open_collector_f(p2_s(i));
                                     low_imp    => p2l_low_imp_s);
    end loop;
    p2_b(7 downto 4) <= port_bidir_f(port_value => p2_s(7 downto 4),
--     if p2_low_imp_s = '1' then
                                     low_imp    => p2h_low_imp_s);
--       p2_b <= p2_b_s;
 
--     else
 
--       p2_b <= (others => 'Z');
 
--     end if;
 
 
 
  end process bidirs;
  end process bidirs;
  --
  --
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
Line 184... Line 179...
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- File History:
-- File History:
--
--
-- $Log: not supported by cvs2svn $
-- $Log: not supported by cvs2svn $
 
-- Revision 1.4  2005/11/01 21:37:45  arniml
 
-- wire signals for P2 low impedance marker issue
 
--
-- Revision 1.3  2004/12/03 19:43:12  arniml
-- Revision 1.3  2004/12/03 19:43:12  arniml
-- added hierarchy t8039_notri
-- added hierarchy t8039_notri
--
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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