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

Subversion Repositories i2c

[/] [i2c/] [trunk/] [rtl/] [vhdl/] [i2c_master_bit_ctrl.vhd] - Diff between revs 48 and 52

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

Rev 48 Rev 52
Line 35... Line 35...
----                                                             ----
----                                                             ----
---------------------------------------------------------------------
---------------------------------------------------------------------
 
 
--  CVS Log
--  CVS Log
--
--
--  $Id: i2c_master_bit_ctrl.vhd,v 1.10 2004-02-27 07:49:43 rherveille Exp $
--  $Id: i2c_master_bit_ctrl.vhd,v 1.11 2004-05-07 11:04:00 rherveille Exp $
--
--
--  $Date: 2004-02-27 07:49:43 $
--  $Date: 2004-05-07 11:04:00 $
--  $Revision: 1.10 $
--  $Revision: 1.11 $
--  $Author: rherveille $
--  $Author: rherveille $
--  $Locker:  $
--  $Locker:  $
--  $State: Exp $
--  $State: Exp $
--
--
-- Change History:
-- Change History:
--               $Log: not supported by cvs2svn $
--               $Log: not supported by cvs2svn $
 
--               Revision 1.10  2004/02/27 07:49:43  rherveille
 
--               Fixed a bug in the arbitration-lost signal generation. VHDL version only.
 
--
--               Revision 1.9  2003/08/12 14:48:37  rherveille
--               Revision 1.9  2003/08/12 14:48:37  rherveille
--               Forgot an 'end if' :-/
--               Forgot an 'end if' :-/
--
--
--               Revision 1.8  2003/08/09 07:01:13  rherveille
--               Revision 1.8  2003/08/09 07:01:13  rherveille
--               Fixed a bug in the Arbitration Lost generation caused by delay on the (external) sda line.
--               Fixed a bug in the Arbitration Lost generation caused by delay on the (external) sda line.
Line 277... Line 280...
            end process gen_busy;
            end process gen_busy;
            busy <= ibusy;
            busy <= ibusy;
 
 
 
 
            -- generate arbitration lost signal
            -- generate arbitration lost signal
 
            -- aribitration lost when:
 
            -- 1) master drives SDA high, but the i2c bus is low
 
            -- 2) stop detected while not requested (detect during 'idle' state)
            gen_al: process(clk, nReset)
            gen_al: process(clk, nReset)
            begin
            begin
              if (nReset = '0') then
              if (nReset = '0') then
                cmd_stop  <= '0';
                cmd_stop  <= '0';
                ial       <= '0';
                ial       <= '0';
Line 295... Line 301...
                    else
                    else
                      cmd_stop <= '0';
                      cmd_stop <= '0';
                    end if;
                    end if;
                  end if;
                  end if;
 
 
                  ial <= (sda_chk and not sSDA and isda_oen) or (sto_condition and not cmd_stop);
                  if (c_state = idle) then
 
                    ial <= '0';
 
                  else
 
                    ial <= (sto_condition and not cmd_stop);
 
                  end if;
 
                  ial <= ial or (sda_chk and not sSDA and isda_oen);
 
 
                end if;
                end if;
              end if;
              end if;
            end process gen_al;
            end process gen_al;
            al <= ial;
            al <= ial;
 
 

powered by: WebSVN 2.1.0

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