Line 27... |
Line 27... |
-- Register Map:
|
-- Register Map:
|
-- Offset Bitfield Description Read/Write
|
-- Offset Bitfield Description Read/Write
|
-- 0x00 BA------ Recieve Clock Status (RO)
|
-- 0x00 BA------ Recieve Clock Status (RO)
|
-- A = Clock Line State (follows input)
|
-- A = Clock Line State (follows input)
|
-- B = Clock Detect (1 = transition detected)
|
-- B = Clock Detect (1 = transition detected)
|
|
--
|
|
-- Revision History
|
|
-- Author Date Change
|
|
------------------ -------- ---------------------------------------------------
|
|
-- Seth Henry 04/16/20 Revision block added
|
|
|
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 40... |
Line 45... |
use work.open8_pkg.all;
|
use work.open8_pkg.all;
|
|
|
entity o8_clk_detect is
|
entity o8_clk_detect is
|
generic(
|
generic(
|
Threshold_Count : integer;
|
Threshold_Count : integer;
|
Address : ADDRESS_TYPE;
|
Address : ADDRESS_TYPE
|
Reset_Level : std_logic
|
|
);
|
);
|
port(
|
port(
|
Clock : in std_logic;
|
|
Reset : in std_logic;
|
|
--
|
|
Ref_Clk_In : in std_logic;
|
Ref_Clk_In : 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_clk_detect is
|
architecture behave of o8_clk_detect is
|
|
|
|
alias Clock is Open8_Bus.Clock;
|
|
alias Reset is Open8_Bus.Reset;
|
|
|
constant User_Addr : std_logic_vector(15 downto 0) := Address;
|
constant User_Addr : std_logic_vector(15 downto 0) := Address;
|
alias Comp_Addr is Open8_Bus.Address(15 downto 0);
|
alias Comp_Addr is Open8_Bus.Address(15 downto 0);
|
signal Addr_Match : std_logic := '0';
|
signal Addr_Match : std_logic := '0';
|
|
|
signal Rd_En : std_logic := '0';
|
signal Rd_En : std_logic := '0';
|