From 93897b4cb5546fe925e80ae55900b38c8c65a929 Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Thu, 3 Dec 2020 15:17:22 +0000 Subject: [PATCH] jesd204_rx_static_config: Update to Np 12 interface changes --- .../jesd204_rx_static_config.v | 34 ++++++++++++------- .../jesd204_rx_static_config_ip.tcl | 15 +++++--- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config.v b/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config.v index 7c4151762..34a479c3d 100755 --- a/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config.v +++ b/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config.v @@ -55,7 +55,8 @@ module jesd204_rx_static_config #( parameter SYSREF_DISABLE = 0, parameter SYSREF_ONE_SHOT = 0, /* Only 4, 8 are supported at the moment for 8b/10b and 8 for 64b */ - parameter DATA_PATH_WIDTH = LINK_MODE == 2 ? 8 : 4 + parameter DATA_PATH_WIDTH = LINK_MODE == 2 ? 8 : 4, + parameter TPL_DATA_PATH_WIDTH = LINK_MODE == 2 ? 8 : 4 ) ( input clk, @@ -63,24 +64,31 @@ module jesd204_rx_static_config #( output [NUM_LINKS-1:0] cfg_links_disable, output [9:0] cfg_octets_per_multiframe, output [7:0] cfg_octets_per_frame, - output [7:0] cfg_lmfc_offset, - output cfg_sysref_oneshot, - output cfg_sysref_disable, - - output [7:0] cfg_buffer_delay, - output cfg_buffer_early_release, output cfg_disable_scrambler, output cfg_disable_char_replacement, - output [7:0] cfg_frame_align_err_threshold + output [7:0] cfg_frame_align_err_threshold, + + output [9:0] device_cfg_octets_per_multiframe, + output [7:0] device_cfg_octets_per_frame, + output [7:0] device_cfg_beats_per_multiframe, + output [7:0] device_cfg_lmfc_offset, + output device_cfg_sysref_oneshot, + output device_cfg_sysref_disable, + output device_cfg_buffer_early_release, + output [7:0] device_cfg_buffer_delay ); assign cfg_octets_per_multiframe = (FRAMES_PER_MULTIFRAME * OCTETS_PER_FRAME) - 1; assign cfg_octets_per_frame = OCTETS_PER_FRAME - 1; -assign cfg_lmfc_offset = 1; -assign cfg_sysref_oneshot = SYSREF_ONE_SHOT; -assign cfg_sysref_disable = SYSREF_DISABLE; -assign cfg_buffer_delay = 'h0; -assign cfg_buffer_early_release = BUFFER_EARLY_RELEASE; +assign device_cfg_octets_per_multiframe = (FRAMES_PER_MULTIFRAME * OCTETS_PER_FRAME) - 1; +assign device_cfg_octets_per_frame = OCTETS_PER_FRAME - 1; +assign device_cfg_beats_per_multiframe = ((FRAMES_PER_MULTIFRAME * OCTETS_PER_FRAME) / + TPL_DATA_PATH_WIDTH) - 1; +assign device_cfg_lmfc_offset = 1; +assign device_cfg_sysref_oneshot = SYSREF_ONE_SHOT; +assign device_cfg_sysref_disable = SYSREF_DISABLE; +assign device_cfg_buffer_delay = 'h0; +assign device_cfg_buffer_early_release = BUFFER_EARLY_RELEASE; assign cfg_lanes_disable = {NUM_LANES{1'b0}}; assign cfg_links_disable = {NUM_LINKS{1'b0}}; assign cfg_disable_scrambler = SCR ? 1'b0 : 1'b1; diff --git a/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config_ip.tcl b/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config_ip.tcl index 936988fd9..7c92b6b39 100755 --- a/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config_ip.tcl +++ b/library/jesd204/jesd204_rx_static_config/jesd204_rx_static_config_ip.tcl @@ -57,13 +57,20 @@ adi_add_bus "rx_cfg" "master" \ "analog.com:interface:jesd204_rx_cfg:1.0" \ { \ { "cfg_lanes_disable" "lanes_disable" } \ + { "cfg_links_disable" "links_disable" } \ { "cfg_octets_per_multiframe" "octets_per_multiframe" } \ { "cfg_octets_per_frame" "octets_per_frame" } \ - { "cfg_lmfc_offset" "lmfc_offset" } \ - { "cfg_sysref_oneshot" "sysref_oneshot" } \ - { "cfg_sysref_disable" "sysref_disable" } \ - { "cfg_buffer_early_release" "buffer_early_release" } \ + { "cfg_disable_char_replacement" "disable_char_replacement" } \ + { "cfg_disable_scrambler" "disable_scrambler" } \ { "cfg_frame_align_err_threshold" "frame_align_err_threshold" } \ + { "device_cfg_octets_per_multiframe" "device_octets_per_multiframe" } \ + { "device_cfg_octets_per_frame" "device_octets_per_frame" } \ + { "device_cfg_beats_per_multiframe" "device_beats_per_multiframe" } \ + { "device_cfg_lmfc_offset" "device_lmfc_offset" } \ + { "device_cfg_sysref_oneshot" "device_sysref_oneshot" } \ + { "device_cfg_sysref_disable" "device_sysref_disable" } \ + { "device_cfg_buffer_early_release" "device_buffer_early_release" } \ + { "device_cfg_buffer_delay" "device_buffer_delay" } \ } adi_add_bus_clock "clk" "rx_cfg"