Skip to content
Snippets Groups Projects
Select Git revision
  • fe63f781f1ca31c1d3ee6ff34fbe32d2f58c6c37
  • master default protected
  • zhang-master-patch-34807
  • add-single-element-interface
  • ast-919-readthedocs
  • ncp_fix
  • workaround-wsclean-issue-83
  • ast-645-add-beam-normalisation-mode-preapplied
  • ast-645-add-beam-normalisation-mode-jm
  • activate-oskar-pybindings
  • disable-element-beam-1
  • submodulesync
  • fix-eigen
  • ncp_check
  • random-fixes
  • lobes-se607-1
  • test-schaapcommon
  • just-testing
  • extend-add_beaminfo-script
  • extend-telescope-interface-to-support-dp3
  • lobes-investigation
  • v0.3.1
  • v0.3.0
  • v0.2.0
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
28 results

tlofar_lba.cc

  • Forked from ResearchAndDevelopment / EveryBeam
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    technology_pkg.vhd 5.60 KiB
    -------------------------------------------------------------------------------
    --
    -- Copyright (C) 2014
    -- 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/>.
    --
    -------------------------------------------------------------------------------
    
    -- Purpose: Define the list of FPGA technology identifiers
    -- Description:
    --   The technology dependent IP is organised per FPGA device type. Each FPGA
    --   type that is supported has a c_tech_<device_name> identifier constant.
    -- Remark:
    -- . The package also contains some low level functions that often are copied
    --   from common_pkg.vhd. They need to be redefined in this technology_pkg.vhd
    --   because the common_lib also use technology dependent IP like RAM, FIFO,
    --   DDIO. Therefore common_lib can not be used in the IP wrappers for those
    --   IP blocks, because common_lib is compiled later.
    -- . For technology wrappers that are not used by components in common_lib the
    --   common_pkg.vhd can be used. Similar technology wrappers that are not used
    --   by components in dp_lib can use the dp_stream_pkg.
    
    LIBRARY IEEE;
    USE IEEE.STD_LOGIC_1164.ALL;
    USE IEEE.MATH_REAL.ALL;
    
    PACKAGE technology_pkg IS
    
      -- Technology identifiers
      CONSTANT c_tech_inferred           : INTEGER := 0;
      CONSTANT c_tech_virtex4            : INTEGER := 1;   -- e.g. used on RSP3 for Lofar
      CONSTANT c_tech_stratixiv          : INTEGER := 2;   -- e.g. used on UniBoard1
      CONSTANT c_tech_virtex6            : INTEGER := 3;   -- e.g. used on Roach2 for Casper
      CONSTANT c_tech_virtex7            : INTEGER := 4;   -- e.g. used on Roach3 for Casper
      CONSTANT c_tech_arria10_proto      : INTEGER := 5;   -- e.g. used on UniBoard2 first proto (1 board version "00" may 2015)
      CONSTANT c_tech_arria10_e3sge3     : INTEGER := 6;   -- e.g. used on UniBoard2 second run (7 boards version "01" dec 2015)
      CONSTANT c_tech_arria10_e1sg       : INTEGER := 7;   -- e.g. used on UniBoard2b third run (5 ARTS boards version "01" feb 2017)
      CONSTANT c_tech_arria10_e2sg       : INTEGER := 8;   -- e.g. used on UniBoard2c (2 LOFAR2.0 SDP boards version "11" f 2021)
      CONSTANT c_tech_ultrascale         : INTEGER := 9;   -- e.g. used on Alveo FPGA platforms
      CONSTANT c_tech_nof_technologies   : INTEGER := 10;
    
      -- Functions
      FUNCTION tech_sel_a_b(sel : BOOLEAN; a, b : STRING)  RETURN STRING;
      FUNCTION tech_sel_a_b(sel : BOOLEAN; a, b : INTEGER) RETURN INTEGER;
    
      FUNCTION tech_true_log2(n : NATURAL) RETURN NATURAL;  -- tech_true_log2(n) = log2(n)
      FUNCTION tech_ceil_log2(n : NATURAL) RETURN NATURAL;  -- tech_ceil_log2(n) = log2(n), but force tech_ceil_log2(1) = 1
      
      FUNCTION tech_ceil_div(n, d : NATURAL) RETURN NATURAL;   -- tech_ceil_div    = n/d + (n MOD d)/=0
    
      FUNCTION tech_nat_to_mbps_str( n : IN NATURAL ) RETURN STRING;
      
    END technology_pkg;
    
    PACKAGE BODY technology_pkg IS
    
      FUNCTION tech_sel_a_b(sel : BOOLEAN; a, b : STRING) RETURN STRING IS