Line 51... |
Line 51... |
------------------ -------- ---------------------------------------------------
|
------------------ -------- ---------------------------------------------------
|
-- Seth Henry 07/28/11 Design Start
|
-- Seth Henry 07/28/11 Design Start
|
-- Seth Henry 12/19/19 Renamed to "o8_epoch_timer" to fit "theme"
|
-- Seth Henry 12/19/19 Renamed to "o8_epoch_timer" to fit "theme"
|
-- Seth Henry 04/10/20 Overhauled the register interface of the timer to
|
-- Seth Henry 04/10/20 Overhauled the register interface of the timer to
|
-- make the interface more sensible to software.
|
-- make the interface more sensible to software.
|
|
-- Seth Henry 04/160/20 Modified to make use of Open8 bus record
|
|
|
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 63... |
Line 64... |
library work;
|
library work;
|
use work.open8_pkg.all;
|
use work.open8_pkg.all;
|
|
|
entity o8_epoch_timer is
|
entity o8_epoch_timer is
|
generic(
|
generic(
|
Reset_Level : std_logic;
|
|
Address : ADDRESS_TYPE
|
Address : ADDRESS_TYPE
|
);
|
);
|
port(
|
port(
|
Clock : in std_logic;
|
|
Reset : in std_logic;
|
|
uSec_Tick : in std_logic;
|
|
--
|
|
Open8_Bus : in OPEN8_BUS_TYPE;
|
Open8_Bus : in OPEN8_BUS_TYPE;
|
Rd_Data : out DATA_TYPE;
|
Rd_Data : out DATA_TYPE;
|
Interrupt : out std_logic
|
Interrupt : out std_logic
|
);
|
);
|
end entity;
|
end entity;
|
|
|
architecture behave of o8_epoch_timer is
|
architecture behave of o8_epoch_timer is
|
|
|
|
alias Clock is Open8_Bus.Clock;
|
|
alias Reset is Open8_Bus.Reset;
|
|
alias uSec_Tick is Open8_Bus.uSec_Tick;
|
|
|
constant User_Addr : std_logic_vector(15 downto 3)
|
constant User_Addr : std_logic_vector(15 downto 3)
|
:= Address(15 downto 3);
|
:= Address(15 downto 3);
|
|
|
alias Comp_Addr is Open8_Bus.Address(15 downto 3);
|
alias Comp_Addr is Open8_Bus.Address(15 downto 3);
|
signal Addr_Match : std_logic := '0';
|
signal Addr_Match : std_logic := '0';
|