Skip to content
Snippets Groups Projects
Commit 6d1c17a8 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Moved constants and fucntions from tech_mac_10g_pkg.vhd to tech_mac_10g_component_pkg.vhd.

parent 85e983d6
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@ build_dir_synth = $HDL_BUILD_DIR
synth_files =
tech_mac_10g_component_pkg.vhd
tech_mac_10g_pkg.vhd
tech_mac_10g_stratixiv.vhd
tech_mac_10g_arria10.vhd
tech_mac_10g.vhd
......
......@@ -40,7 +40,7 @@ USE common_lib.tb_common_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
USE technology_lib.technology_select_pkg.ALL;
USE WORK.tech_mac_10g_pkg.ALL;
USE WORK.tech_mac_10g_component_pkg.ALL;
USE WORK.tb_tech_mac_10g_pkg.ALL;
......
......@@ -32,7 +32,7 @@ USE common_lib.tb_common_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE dp_lib.tb_dp_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
USE work.tech_mac_10g_pkg.ALL;
USE work.tech_mac_10g_component_pkg.ALL;
PACKAGE tb_tech_mac_10g_pkg IS
......
......@@ -65,7 +65,7 @@ USE common_lib.common_mem_pkg.ALL;
USE common_lib.common_interface_layers_pkg.ALL;
USE common_lib.common_network_total_header_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE work.tech_mac_10g_pkg.ALL;
USE work.tech_mac_10g_component_pkg.ALL;
ENTITY tech_mac_10g IS
GENERIC (
......
......@@ -31,7 +31,6 @@ USE common_lib.common_interface_layers_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
USE work.tech_mac_10g_component_pkg.ALL;
USE work.tech_mac_10g_pkg.ALL;
ENTITY tech_mac_10g_arria10 IS
PORT (
......
......@@ -22,11 +22,28 @@
-- Purpose: IP components declarations for various devices that get wrapped by the tech components
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
LIBRARY IEEE, technology_lib, common_lib;
USE IEEE.std_logic_1164.ALL;
USE common_lib.common_pkg.ALL;
USE common_lib.common_interface_layers_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
PACKAGE tech_mac_10g_component_pkg IS
FUNCTION func_tech_mac_10g_csr_addr_w(c_technology : NATURAL) RETURN NATURAL;
CONSTANT c_tech_mac_10g_data_w : NATURAL := c_xgmii_data_w; -- = 64
CONSTANT c_tech_mac_10g_symbol_w : NATURAL := c_byte_w; -- = 8 bit
CONSTANT c_tech_mac_10g_symbols_per_beat : NATURAL := c_tech_mac_10g_data_w / c_tech_mac_10g_symbol_w; -- = 8 symbols
CONSTANT c_tech_mac_10g_empty_w : NATURAL := 3;
CONSTANT c_tech_mac_10g_tx_error_w : NATURAL := 1;
CONSTANT c_tech_mac_10g_rx_error_w : NATURAL := 6;
CONSTANT c_tech_mac_10g_tx_fifo_depth : NATURAL := 256; -- nof words for Tx FIFO
CONSTANT c_tech_mac_10g_rx_fifo_depth : NATURAL := 256; -- nof words for Rx FIFO
------------------------------------------------------------------------------
-- ip_stratixiv
------------------------------------------------------------------------------
......@@ -125,3 +142,18 @@ PACKAGE tech_mac_10g_component_pkg IS
END COMPONENT;
END tech_mac_10g_component_pkg;
PACKAGE BODY tech_mac_10g_component_pkg IS
FUNCTION func_tech_mac_10g_csr_addr_w(c_technology : NATURAL) RETURN NATURAL IS
VARIABLE v_csr_addr_w : NATURAL;
BEGIN
CASE c_technology IS
WHEN c_tech_stratixiv => v_csr_addr_w := 13;
WHEN c_tech_arria10 => v_csr_addr_w := 13; -- 13 with INSERT_CSR_ADAPTOR=1 in ip_arria10_mac_10g.qsys, 10 without
WHEN OTHERS => v_csr_addr_w := 13; -- default to c_tech_stratixiv
END CASE;
RETURN v_csr_addr_w;
END func_tech_mac_10g_csr_addr_w;
END tech_mac_10g_component_pkg;
-------------------------------------------------------------------------------
--
-- Copyright (C) 2014
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- JIVE (Joint Institute for VLBI in Europe) <http://www.jive.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, technology_lib, common_lib;
USE IEEE.std_logic_1164.ALL;
USE common_lib.common_pkg.ALL;
USE common_lib.common_interface_layers_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
PACKAGE tech_mac_10g_pkg IS
FUNCTION func_tech_mac_10g_csr_addr_w(c_technology : NATURAL) RETURN NATURAL;
CONSTANT c_tech_mac_10g_data_w : NATURAL := c_xgmii_data_w; -- = 64
CONSTANT c_tech_mac_10g_symbol_w : NATURAL := c_byte_w; -- = 8 bit
CONSTANT c_tech_mac_10g_symbols_per_beat : NATURAL := c_tech_mac_10g_data_w / c_tech_mac_10g_symbol_w; -- = 8 symbols
CONSTANT c_tech_mac_10g_empty_w : NATURAL := 3;
CONSTANT c_tech_mac_10g_tx_error_w : NATURAL := 1;
CONSTANT c_tech_mac_10g_rx_error_w : NATURAL := 6;
CONSTANT c_tech_mac_10g_tx_fifo_depth : NATURAL := 256; -- nof words for Tx FIFO
CONSTANT c_tech_mac_10g_rx_fifo_depth : NATURAL := 256; -- nof words for Rx FIFO
END tech_mac_10g_pkg;
PACKAGE BODY tech_mac_10g_pkg IS
FUNCTION func_tech_mac_10g_csr_addr_w(c_technology : NATURAL) RETURN NATURAL IS
VARIABLE v_csr_addr_w : NATURAL;
BEGIN
CASE c_technology IS
WHEN c_tech_stratixiv => v_csr_addr_w := 13;
WHEN c_tech_arria10 => v_csr_addr_w := 13; -- 13 with INSERT_CSR_ADAPTOR=1 in ip_arria10_mac_10g.qsys, 10 without
WHEN OTHERS => v_csr_addr_w := 13; -- default to c_tech_stratixiv
END CASE;
RETURN v_csr_addr_w;
END func_tech_mac_10g_csr_addr_w;
END tech_mac_10g_pkg;
......@@ -31,7 +31,6 @@ USE common_lib.common_interface_layers_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE technology_lib.technology_pkg.ALL;
USE work.tech_mac_10g_component_pkg.ALL;
USE work.tech_mac_10g_pkg.ALL;
ENTITY tech_mac_10g_stratixiv IS
PORT (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment