From af2ffbe0a04d132fa330594aab132ce1dbc6e61a Mon Sep 17 00:00:00 2001 From: Rejeesh Kutty Date: Fri, 19 Jun 2015 14:31:07 -0400 Subject: [PATCH] library/cpack- add signaltap --- library/util_cpack/util_cpack.v | 19 +++++++++++++++++-- library/util_cpack/util_cpack_hw.tcl | 7 +++++++ library/util_cpack/util_cpack_ip.tcl | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/library/util_cpack/util_cpack.v b/library/util_cpack/util_cpack.v index 694eea726..0eb2be18b 100755 --- a/library/util_cpack/util_cpack.v +++ b/library/util_cpack/util_cpack.v @@ -34,8 +34,6 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // *************************************************************************** // *************************************************************************** -// *************************************************************************** -// *************************************************************************** `timescale 1ns/100ps @@ -80,6 +78,7 @@ module util_cpack ( parameter CH_DW = 32; parameter CH_CNT = 8; + parameter ST_DEPTH = 0; localparam CH_SCNT = CH_DW/16; localparam CH_MCNT = 8; @@ -173,6 +172,22 @@ module util_cpack ( assign adc_data_s = { adc_data_7, adc_data_6, adc_data_5, adc_data_4, adc_data_3, adc_data_2, adc_data_1, adc_data_0}; + generate + if (ST_DEPTH > 0) begin + sld_signaltap #( + .sld_sample_depth (ST_DEPTH), + .sld_data_bits (CH_CNT*CH_DW), + .sld_trigger_bits (1), + .sld_trigger_level (1), + .sld_trigger_in_enabled (0), + .sld_enable_advanced_trigger (0)) + i_st ( + .acq_clk (adc_clk), + .acq_trigger_in (adc_valid_d), + .acq_data_in (adc_data_d[((CH_CNT*CH_DW)-1):0])); + end + endgenerate + // adc first channel must be always on (doesn't have to be enabled) always @(posedge adc_clk) begin diff --git a/library/util_cpack/util_cpack_hw.tcl b/library/util_cpack/util_cpack_hw.tcl index 571285ea1..2bf9bf6b4 100755 --- a/library/util_cpack/util_cpack_hw.tcl +++ b/library/util_cpack/util_cpack_hw.tcl @@ -35,6 +35,13 @@ set_parameter_property CH_CNT TYPE INTEGER set_parameter_property CH_CNT UNITS None set_parameter_property CH_CNT HDL_PARAMETER true +add_parameter ST_DEPTH INTEGER 0 +set_parameter_property ST_DEPTH DEFAULT_VALUE 1024 +set_parameter_property ST_DEPTH DISPLAY_NAME ST_DEPTH +set_parameter_property ST_DEPTH TYPE INTEGER +set_parameter_property ST_DEPTH UNITS None +set_parameter_property ST_DEPTH HDL_PARAMETER true + # defaults ad_alt_intf clock adc_clk input 1 diff --git a/library/util_cpack/util_cpack_ip.tcl b/library/util_cpack/util_cpack_ip.tcl index dc81941ec..2c5412d13 100644 --- a/library/util_cpack/util_cpack_ip.tcl +++ b/library/util_cpack/util_cpack_ip.tcl @@ -5,6 +5,7 @@ source $ad_hdl_dir/library/scripts/adi_ip.tcl adi_ip_create util_cpack adi_ip_files util_cpack [list \ + "$ad_hdl_dir/library/common/altera/sld_signaltap.v" \ "util_cpack_mux.v" \ "util_cpack_dsf.v" \ "util_cpack.v" \