Skip to content
Snippets Groups Projects
Select Git revision
  • ac01b3533fd782cd5abb89fa0f972b09568e868a
  • master default protected
  • fix_for_hba_element_list
  • add-stations-upto-cs302
  • L2SS-2347-dithering-dont-change-power-freq
  • L2SS-2347-dithering-is-global-setting
  • refactor-control-power-properties
  • update-lcu-rollout-procedure
  • test-pytango-10.0.3
  • deploy-components-parallel
  • L2SS-2357-fix-ruff
  • sync-up-with-meta-pypcc
  • stabilise-landing-page
  • all-stations-lofar2
  • v0.39.7-backports
  • Move-sdptr-to-v1.5.0
  • fix-build-ubuntu
  • tokens-in-env-files
  • fix-build
  • L2SS-2214-deploy-cdb
  • fix-missing-init
  • v0.56.2 protected
  • v0.56.1 protected
  • v0.56.1-rc8 protected
  • v0.56.1-rc7 protected
  • v0.56.1-rc6 protected
  • v0.56.1-rc5 protected
  • v0.56.1-rc4 protected
  • v0.56.1-rc3 protected
  • v0.56.1-rc2 protected
  • v0.56.0 protected
  • 0.53.0rc2
  • 0.53.0rc1
  • last-working-mapper-refactor
  • v0.52.9 protected
  • v0.52.8 protected
  • v0.52.7 protected
  • v0.55.5-r2 protected
  • v0.52.8-rc1 protected
  • v0.55.5 protected
  • v0.55.4 protected
41 results

Dockerfile

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    common_interval_monitor.vhd 3.23 KiB
    -------------------------------------------------------------------------------
    --
    -- Copyright (C) 2012
    -- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
    -- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
    --
    -- This program is free software: you can redistribute it and/or modify
    -- it under the terms of the GNU General Public License as published by
    -- the Free Software Foundation, either version 3 of the License, or
    -- (at your option) any later version.
    --
    -- This program is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -- GNU General Public License for more details.
    --
    -- You should have received a copy of the GNU General Public License
    -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
    --
    -------------------------------------------------------------------------------
    
    LIBRARY IEEE, common_lib;
    USE IEEE.STD_LOGIC_1164.ALL;
    USE IEEE.NUMERIC_STD.ALL;
    USE common_lib.common_pkg.ALL;
    
    -- Purpose: Monitor the nof valid clock cycles between two in_evt pulses
    -- Description:
    --   The in_evt pulses define the interval. Leave in_val not connected to count
    --   every clock cycle.
    -- Remarks:
    
    ENTITY common_interval_monitor IS
      GENERIC (
        g_interval_cnt_w  : NATURAL := 20   -- wide enough to fit somewhat more than maximum nof valid clock cycles per interval
      );
      PORT (
        rst           : IN  STD_LOGIC;
        clk           : IN  STD_LOGIC;
        -- ST
        in_val        : IN  STD_LOGIC := '1';
        in_evt        : IN  STD_LOGIC;
        -- MM
        interval_cnt  : OUT STD_LOGIC_VECTOR(g_interval_cnt_w-1 DOWNTO 0);
        clk_cnt       : OUT STD_LOGIC_VECTOR(g_interval_cnt_w-1 DOWNTO 0)
      );
    END common_interval_monitor;
    
    
    ARCHITECTURE rtl OF common_interval_monitor IS
    
      SIGNAL i_clk_cnt        : STD_LOGIC_VECTOR(interval_cnt'RANGE);
      SIGNAL nxt_clk_cnt      : STD_LOGIC_VECTOR(interval_cnt'RANGE);
      SIGNAL i_interval_cnt   : STD_LOGIC_VECTOR(interval_cnt'RANGE);
      SIGNAL nxt_interval_cnt : STD_LOGIC_VECTOR(interval_cnt'RANGE);
      
    BEGIN
    
      interval_cnt <= i_interval_cnt;
      clk_cnt      <= i_clk_cnt;
    
      p_clk: PROCESS(clk, rst)
      BEGIN
        IF rst='1' THEN
          i_clk_cnt        <= (OTHERS=>'1');
          i_interval_cnt <= (OTHERS=>'1');
        ELSIF rising_edge(clk) THEN
          i_clk_cnt        <= nxt_clk_cnt;
          i_interval_cnt <= nxt_interval_cnt;
        END IF;