1 ------------------------------------------------------------------------------- 2 -- File : Heartbeat.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2013-04-30 5 -- Last update: 2014-10-28 6 ------------------------------------------------------------------------------- 7 -- Description: Heartbeat LED output 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.std_logic_unsigned.
all;
21 use ieee.std_logic_arith.
all;
26 --! @ingroup base_general 31 PERIOD_IN_G : :=
6.4E-9; --units
of seconds
32 PERIOD_OUT_G : :=
1.0E-0); --units
of seconds
42 constant CNT_SIZE_C : := bitSize(CNT_MAX_C);
44 type RegType is record 45 cnt : slv(CNT_SIZE_C-1 downto 0);
49 constant REG_INIT_C : RegType := ( 50 cnt => (others => '0'), 53 signal r : RegType := REG_INIT_C;
57 attribute use_dsp48 : ;
64 report "USE_DSP48_G must be either yes, no, auto, or automax" 68 comb :
process (r,
rst)
is 74 if (r.cnt = CNT_MAX_C) then 75 v.cnt := (others => '0');
92 seq :
process (
clk)
is 94 if (rising_edge(clk)) then
PERIOD_OUT_Greal := 1.0E-0
USE_DSP48_Gstring := "no"
PERIOD_IN_Greal := 6.4E-9