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 172 and 176

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

Rev 172 Rev 176
Line 7... Line 7...
--            :    tick for external use.
--            :    tick for external use.
--
--
-- Register Map:
-- Register Map:
-- Offset  Bitfield Description                        Read/Write
-- Offset  Bitfield Description                        Read/Write
--   0x0   AAAAAAAA Periodic Interval Timer in uS      (RW)
--   0x0   AAAAAAAA Periodic Interval Timer in uS      (RW)
--   0x1   -AAAAAAA Tenths  (0x00 - 0x63)              (RW)
--   0x1   -AAAAAAA Tenths  (0x00 - 0x99)              (RW)
--   0x2   --AAAAAA Seconds (0x00 - 0x3B)              (RW)
--   0x2   --AAAAAA Seconds (0x00 - 0x59)              (RW)
--   0x3   --AAAAAA Minutes (0x00 - 0x3B)              (RW)
--   0x3   --AAAAAA Minutes (0x00 - 0x59)              (RW)
--   0x4   ---AAAAA Hours   (0x00 - 0x17)              (RW)
--   0x4   ---AAAAA Hours   (0x00 - 0x23)              (RW)
--   0x5   -----AAA Day of Week (0x00 - 0x06)          (RW)
--   0x5   -----AAA Day of Week (0x00 - 0x06)          (RW)
--   0x6   -------- Update RTC regs from Shadow Regs   (WO)
--   0x6   -------- Update RTC regs from Shadow Regs   (WO)
--   0x7   A------- Update Shadow Regs from RTC regs   (RW)
--   0x7   A------- Update Shadow Regs from RTC regs   (RW)
--                  A = Update is Busy
--                  A = Update is Busy
 
--
 
-- Note that values are stored in packed BCD, not hex
 
 
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
  use ieee.std_logic_unsigned.all;
  use ieee.std_logic_unsigned.all;
  use ieee.std_logic_arith.all;
  use ieee.std_logic_arith.all;
Line 207... Line 210...
 
 
      uSec_Cntr         <= uSec_Cntr - 1;
      uSec_Cntr         <= uSec_Cntr - 1;
      uSec_Tick_i       <= '0';
      uSec_Tick_i       <= '0';
      if( uSec_Cntr = 0 )then
      if( uSec_Cntr = 0 )then
        uSec_Cntr       <= DLY_1USEC;
        uSec_Cntr       <= DLY_1USEC;
        uSec_Tick_i     <= or_reduce(Interval);
        uSec_Tick_i     <= '1';
      end if;
      end if;
 
 
      pit.timer_ro      <= '0';
      pit.timer_ro      <= '0';
 
 
      rtc.frac_ro       <= '0';
      rtc.frac_ro       <= '0';

powered by: WebSVN 2.1.0

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