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

Resolve L2SDP-1105

parent fef2a627
No related branches found
No related tags found
1 merge request!449Resolve L2SDP-1105
Showing
with 1605 additions and 0 deletions
......@@ -19,6 +19,7 @@
###############################################################################
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_pins.tcl
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_jesd_pins.tcl
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_beamlets_pins.tcl
source $::env(HDL_WORK)/boards/uniboard2c/libraries/unb2c_board/quartus/pinning/unb2c_ddr_16G_64b_I_pins.tcl
hdl_lib_name = lofar2_unb2c_sdp_station_tbuf_ring
hdl_library_clause_name = lofar2_unb2c_sdp_station_tbuf_ring_lib
hdl_lib_uses_synth = common dp mm unb2c_board tech_ddr lofar2_unb2c_sdp_station
hdl_lib_uses_sim =
hdl_lib_technology = ip_arria10_e2sg
hdl_lib_include_ip =
synth_files =
lofar2_unb2c_sdp_station_tbuf_ring.vhd
test_bench_files =
tb_lofar2_unb2c_sdp_station_tbuf_ring.vhd
tb_tb_lofar2_unb2c_sdp_station_tbuf_ring.vhd
regression_test_vhdl =
tb_tb_lofar2_unb2c_sdp_station_tbuf_ring.vhd
[modelsim_project_file]
modelsim_copy_files =
../../src/data data
modelsim_compile_ip_files =
# Unb2c 16GB-64b DDR4 driver
$HDL_WORK/libraries/technology/ip_arria10_e2sg/ddr4_16g_1600/ddr4_16g_1600_64b/copy_hex_files.tcl
[quartus_project_file]
synth_top_level_entity =
quartus_copy_files =
../../quartus .
../../src/data data
quartus_qsf_files =
$HDL_WORK/boards/uniboard2c/libraries/unb2c_board/quartus/unb2c_board.qsf
quartus_sdc_files =
../../quartus/lofar2_unb2c_sdp_station.sdc
quartus_tcl_files =
lofar2_unb2c_sdp_station_tbuf_ring_pins.tcl
../../quartus/lofar2_unb2c_sdp_station_ip.tcl
quartus_vhdl_files =
quartus_qip_files =
$HDL_BUILD_DIR/unb2c/quartus/lofar2_unb2c_sdp_station_tbuf_ring/qsys_lofar2_unb2c_sdp_station/qsys_lofar2_unb2c_sdp_station.qip
nios2_app_userflags = -DCOMPILE_FOR_GEN2_UNB2
-------------------------------------------------------------------------------
--
-- Copyright 2024
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-------------------------------------------------------------------------------
-- Author : E. Kooistra
-- Purpose:
-- Wrapper for synthesis of Lofar2 SDP Station tbuf_ring design. The wrapper
-- maps the unb2c BCK pin names to the JESD204B signal names.
-- Description:
-- Contains SDPFW for unb2c with complete AIT input stage with 12 ADC
-- streams and TBuf for 16GB DDR4 with 64 DQ in slot I.
library IEEE, common_lib, dp_lib, unb2c_board_lib, tech_ddr_lib, lofar2_unb2c_sdp_station_lib;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use common_lib.common_pkg.all;
use common_lib.common_mem_pkg.all;
use unb2c_board_lib.unb2c_board_pkg.all;
use tech_ddr_lib.tech_ddr_pkg.all;
use dp_lib.dp_stream_pkg.all;
entity lofar2_unb2c_sdp_station_tbuf_ring is
generic (
g_stamp_date : natural := 0; -- Date (YYYYMMDD) -- set by QSF
g_stamp_time : natural := 0; -- Time (HHMMSS) -- set by QSF
g_revision_id : string := "" -- revision ID -- set by QSF
);
port (
-- GENERAL
CLK : in std_logic; -- System Clock
PPS : in std_logic; -- System Sync
WDI : out std_logic; -- Watchdog Clear
INTA : inout std_logic; -- FPGA interconnect line
INTB : inout std_logic; -- FPGA interconnect line
-- Others
VERSION : in std_logic_vector(c_unb2c_board_aux.version_w - 1 downto 0);
ID : in std_logic_vector(c_unb2c_board_aux.id_w - 1 downto 0);
TESTIO : inout std_logic_vector(c_unb2c_board_aux.testio_w - 1 downto 0);
-- 1GbE Control Interface
ETH_CLK : in std_logic_vector(c_unb2c_board_nof_eth - 1 downto 0);
ETH_SGIN : in std_logic_vector(c_unb2c_board_nof_eth - 1 downto 0);
ETH_SGOUT : out std_logic_vector(c_unb2c_board_nof_eth - 1 downto 0);
-- Transceiver clocks
SA_CLK : in std_logic := '0'; -- Clock 10GbE front (qsfp) and ring lines
-- front transceivers QSFP0 for Ring.
QSFP_0_RX : in std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0) := (others => '0');
QSFP_0_TX : out std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0);
-- front transceivers QSFP1 for 10GbE output to CEP.
QSFP_1_RX : in std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0) := (others => '0');
QSFP_1_TX : out std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0);
-- LEDs
QSFP_LED : out std_logic_vector(c_unb2c_board_tr_qsfp_nof_leds - 1 downto 0);
-- ring transceivers
-- . Using qsfp bus width also for ring interfaces
RING_0_RX : in std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0) := (others => '0');
RING_0_TX : out std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0);
RING_1_RX : in std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0) := (others => '0');
RING_1_TX : out std_logic_vector(c_unb2c_board_tr_qsfp.bus_w - 1 downto 0);
-- back transceivers (note only 12 are used in unb2c)
-- . c_unb2c_board_nof_tr_jesd204b = c_sdp_S_pn = 12
BCK_RX : in std_logic_vector(c_unb2c_board_nof_tr_jesd204b - 1 downto 0);
BCK_REF_CLK : in std_logic; -- Use as JESD204B_REFCLK
-- jesd204b syncronization signals (4 syncs)
-- . c_unb2c_board_nof_sync_jesd204b = c_sdp_N_sync_jesd = 4
JESD204B_SYSREF : in std_logic;
JESD204B_SYNC_N : out std_logic_vector(c_unb2c_board_nof_sync_jesd204b - 1 downto 0);
-- DDR4 MB_I memory interface
MB_I_REF_CLK : in std_logic; -- Reference clock for MB_I
MB_I_IN : in t_tech_ddr4_phy_in;
MB_I_IO : inout t_tech_ddr4_phy_io;
MB_I_OU : out t_tech_ddr4_phy_ou
);
end lofar2_unb2c_sdp_station_tbuf_ring;
architecture str of lofar2_unb2c_sdp_station_tbuf_ring is
constant c_design_name : string := "lofar2_unb2c_sdp_station_tbuf_ring";
constant c_design_note : string := "AIT + TBuf + Ring for dump from multiple nodes";
signal JESD204B_SERIAL_DATA : std_logic_vector(
(c_unb2c_board_tr_jesd204b.bus_w * c_unb2c_board_tr_jesd204b.nof_bus) - 1 downto 0);
signal jesd204b_sync_n_arr : std_logic_vector(c_unb2c_board_nof_sync_jesd204b - 1 downto 0);
signal JESD204B_REFCLK : std_logic;
begin
-- Mapping between JESD signal names and UNB2C pin/schematic names
JESD204B_REFCLK <= BCK_REF_CLK;
JESD204B_SERIAL_DATA <= BCK_RX;
JESD204B_SYNC_N(c_unb2c_board_nof_sync_jesd204b - 1 downto 0) <=
jesd204b_sync_n_arr(c_unb2c_board_nof_sync_jesd204b - 1 downto 0);
u_revision : entity lofar2_unb2c_sdp_station_lib.lofar2_unb2c_sdp_station
generic map (
g_design_name => c_design_name,
g_design_note => c_design_note,
g_stamp_date => g_stamp_date,
g_stamp_time => g_stamp_time,
g_revision_id => g_revision_id
)
port map (
-- GENERAL
CLK => CLK,
PPS => PPS,
WDI => WDI,
INTA => INTA,
INTB => INTB,
-- Others
VERSION => VERSION,
ID => ID,
TESTIO => TESTIO,
-- 1GbE Control Interface
ETH_CLK => ETH_CLK,
ETH_SGIN => ETH_SGIN,
ETH_SGOUT => ETH_SGOUT,
-- Transceiver clocks
SA_CLK => SA_CLK,
-- front transceivers QSFP0 for Ring.
QSFP_0_RX => QSFP_0_RX,
QSFP_0_TX => QSFP_0_TX,
-- front transceivers QSFP1 for 10GbE output to CEP.
QSFP_1_RX => QSFP_1_RX,
QSFP_1_TX => QSFP_1_TX,
-- LEDs
QSFP_LED => QSFP_LED,
-- ring transceivers
RING_0_RX => RING_0_RX,
RING_0_TX => RING_0_TX,
RING_1_RX => RING_1_RX,
RING_1_TX => RING_1_TX,
-- back transceivers
JESD204B_SERIAL_DATA => JESD204B_SERIAL_DATA,
JESD204B_REFCLK => JESD204B_REFCLK,
-- jesd204b syncronization signals
JESD204B_SYSREF => JESD204B_SYSREF,
JESD204B_SYNC_N => jesd204b_sync_n_arr,
-- DDR4 MB_I memory interface
MB_I_REF_CLK => MB_I_REF_CLK,
MB_I_IN => MB_I_IN,
MB_I_IO => MB_I_IO,
MB_I_OU => MB_I_OU
);
end str;
###############################################################################
#
# Copyright 2024
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###############################################################################
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_pins.tcl
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_jesd_pins.tcl
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_beamlets_pins.tcl
source $::env(HDL_WORK)/applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/lofar2_unb2c_sdp_station_ring_pins.tcl
source $::env(HDL_WORK)/boards/uniboard2c/libraries/unb2c_board/quartus/pinning/unb2c_ddr_16G_64b_I_pins.tcl
-- --------------------------------------------------------------------------
-- Copyright 2025
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- --------------------------------------------------------------------------
--
-- Author: E. Kooistra, 28 may 2025
-- Purpose: Regression multi tb for tb_lofar2_unb2c_sdp_station_tbuf_ring
-- Description:
-- The multi tb only has one instance, so the tb_tb is more a wrapper to
-- ensure that always the same tb generics are used in the regression test.
-- This allows modifying the generics in the tb.
-- Usage:
-- . Modelsim:
-- > as 4
-- > as 8 # debug to view tbuf states
-- > run -all
-- . Terminal:
-- > cat transcript | grep Error:
library IEEE, common_lib;
use IEEE.std_logic_1164.all;
use common_lib.tb_common_pkg.all;
entity tb_tb_lofar2_unb2c_sdp_station_tbuf_ring is
end tb_tb_lofar2_unb2c_sdp_station_tbuf_ring;
architecture tb of tb_tb_lofar2_unb2c_sdp_station_tbuf_ring is
-- Multi tb
-- . Use tb index offset c_tbi to avoid file IO conflict during modelsim_regression_test_vhdl.py with other tb, like
-- tb_lofar2_unb2c_sdp_station_bf_ring, in shared HDL_IOFILE_SIM_DIR = build/sim directory set by init_hdl.sh.
constant c_tbi : natural := 30;
constant c_tb_end_vec : std_logic_vector(c_tbi to c_tbi) := (others => '1');
signal tb_end_vec : std_logic_vector(c_tb_end_vec'range) := c_tb_end_vec; -- best view as hex in Wave Window
signal tb_end : std_logic := '0';
begin
u_tbuf_ring : entity work.tb_lofar2_unb2c_sdp_station_tbuf_ring
generic map (
g_tb_index => c_tbi,
g_ddr_buffer_size => 256, -- <= 4096, because c_tech_ddr4_sim_4k_64 has 4k = 4096 words of
-- c_sdp_tbuf_W_word = 512b
g_rs_block_size => 100, -- c_sdp_tbuf_rs_block_size = 2000, must be even see sdp_tbuf_output
g_rs_record_nof_block => 3, -- choose > c_rs_nof_block_per_sync to have at least on sync interval
-- for the RSN monitor
g_dump_inter_packet_gap => 0, -- use 1708 for 3 Gbps and g_rs_block_size = 2000
g_dump_page_offset => 0, -- offset relative to recorded_first_page
g_dump_nof_pages => 3, -- g_dump_page_offset + g_dump_nof_pages <= g_rs_record_nof_block, else
-- there will occur read RSN errors for pages that are not available
g_dump_enables => "111111"
);
end tb;
......@@ -60,6 +60,8 @@ package lofar2_unb2c_sdp_station_pkg is
(false, true, false, false, false, 1, true, false, true, 9);
constant c_tbuf_one : t_lofar2_unb2c_sdp_station_config :=
(false, false, false, false, false, 1, false, true, false, 0);
constant c_tbuf_ring : t_lofar2_unb2c_sdp_station_config :=
(false, false, false, false, false, 1, false, true, true, 0);
constant c_full_wg : t_lofar2_unb2c_sdp_station_config :=
(true, true, false, true, true, 1, true, false, true, 9);
constant c_full : t_lofar2_unb2c_sdp_station_config :=
......@@ -86,6 +88,7 @@ package body lofar2_unb2c_sdp_station_pkg is
elsif g_design_name = "lofar2_unb2c_sdp_station_xsub_one" then return c_xsub_one;
elsif g_design_name = "lofar2_unb2c_sdp_station_xsub_ring" then return c_xsub_ring;
elsif g_design_name = "lofar2_unb2c_sdp_station_tbuf_one" then return c_tbuf_one;
elsif g_design_name = "lofar2_unb2c_sdp_station_tbuf_ring" then return c_tbuf_ring;
elsif g_design_name = "lofar2_unb2c_sdp_station_full_wg" then return c_full_wg; -- = baseline
elsif g_design_name = "lofar2_unb2c_sdp_station_full" then return c_full; -- = baseline
elsif g_design_name = "disturb2_unb2c_sdp_station_full_wg" then return c_full_wg_os;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment