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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_rtc.vhd] - Diff between revs 190 and 191

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

Rev 190 Rev 191
Line 1... Line 1...
-- VHDL Units :  realtime_clock
-- Copyright (c)2020 Jeremy Seth Henry
 
-- All rights reserved.
 
--
 
-- Redistribution and use in source and binary forms, with or without
 
-- modification, are permitted provided that the following conditions are met:
 
--     * Redistributions of source code must retain the above copyright
 
--       notice, this list of conditions and the following disclaimer.
 
--     * Redistributions in binary form must reproduce the above copyright
 
--       notice, this list of conditions and the following disclaimer in the
 
--       documentation and/or other materials provided with the distribution,
 
--       where applicable (as part of a user interface, debugging port, etc.)
 
--
 
-- THIS SOFTWARE IS PROVIDED BY JEREMY SETH HENRY ``AS IS'' AND ANY
 
-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
-- DISCLAIMED. IN NO EVENT SHALL JEREMY SETH HENRY BE LIABLE FOR ANY
 
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 
-- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
--
 
-- VHDL Units :  o8_rtc
-- Description:  Provides automatically updated registers that maintain the
-- Description:  Provides automatically updated registers that maintain the
--            :   time of day. Keeps track of the day of week, hours, minutes
--            :   time of day. Keeps track of the day of week, hours, minutes
--            :   seconds, and tenths of a second. Module is doubled buffered
--            :   seconds, and tenths of a second. Module is doubled buffered
--            :   to ensure time consistency during accesses. Also provides
--            :   to ensure time consistency during accesses. Also provides
--            :   a programmable periodic interrupt timer, as well as a uSec
--            :   a programmable periodic interrupt timer, as well as a uSec
Line 187... Line 210...
 
 
      Wr_Data_q         <= (others => '0');
      Wr_Data_q         <= (others => '0');
      Reg_Addr_q        <= (others => '0');
      Reg_Addr_q        <= (others => '0');
      Wr_En             <= '0';
      Wr_En             <= '0';
      Rd_En             <= '0';
      Rd_En             <= '0';
      Rd_Data           <= x"00";
      Rd_Data           <= OPEN8_NULLBUS;
 
 
    elsif( rising_edge( Clock ) )then
    elsif( rising_edge( Clock ) )then
 
 
      uSec_Cntr         <= uSec_Cntr - 1;
      uSec_Cntr         <= uSec_Cntr - 1;
      uSec_Tick_i       <= '0';
      uSec_Tick_i       <= '0';
Line 359... Line 382...
      update_ctmr       <= update_ctmr - or_reduce(update_ctmr);
      update_ctmr       <= update_ctmr - or_reduce(update_ctmr);
      if( rtc.frac_ro = '1' )then
      if( rtc.frac_ro = '1' )then
        update_ctmr     <= (others => '1');
        update_ctmr     <= (others => '1');
      end if;
      end if;
 
 
      Rd_Data           <= (others => '0');
      Rd_Data           <= OPEN8_NULLBUS;
      Rd_En             <= Addr_Match and Rd_Enable;
      Rd_En             <= Addr_Match and Rd_Enable;
      if( Rd_En = '1' )then
      if( Rd_En = '1' )then
        case( Reg_Addr_q )is
        case( Reg_Addr_q )is
          when "000" =>
          when "000" =>
            Rd_Data     <= interval;
            Rd_Data     <= interval;

powered by: WebSVN 2.1.0

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