Explorar el Código

Merge branch 'S5443_dev_prng_added_and_fp32_zero_results_replaced_by_trace_average_noize_level' into S5443

Shalambala hace 2 años
padre
commit
97790836c4
Se han modificado 55 ficheros con 54683 adiciones y 107949 borrados
  1. 13225 0
      S5443_M/S5443.ip_user_files/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v
  2. 14575 0
      S5443_M/S5443.ip_user_files/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl
  3. 1 1
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.v
  4. 1 0
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.vhdl
  5. 16 16
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/sim/MeasDataFifo.v
  6. 63 10
      S5443_M/S5443.srcs/constrs_1/new/S5443Top.xdc
  7. 0 0
      S5443_M/S5443.srcs/sources_1/ip/.Xil/.MeasDataFifo.xcix.lock
  8. BIN
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/blk_mem_gen_v8_4_vhsyn_rfs.vhd
  9. BIN
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.dcp
  10. 0 72
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.veo
  11. 0 32
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.vho
  12. 0 582
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.xci
  13. 0 64
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.xdc
  14. 0 69
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_clocks.xdc
  15. 0 57
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_ooc.xdc
  16. 0 4712
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v
  17. 0 5582
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl
  18. 0 254
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/doc/fifo_generator_v13_2_changelog.txt
  19. 0 7777
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/fifo_generator_v13_2_rfs.v
  20. 0 18837
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/fifo_generator_v13_2_rfs.vhd
  21. 0 31975
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/fifo_generator_v13_2_vhsyn_rfs.vhd
  22. 0 10519
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/simulation/fifo_generator_vlog_beh.v
  23. 0 806
      S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/synth/MeasDataFifo.vhd
  24. 6 2
      S5443_M/S5443.srcs/sources_1/new/ExtDspInterface/DspInterface.v
  25. 6 7
      S5443_M/S5443.srcs/sources_1/new/FftDataFiltering/DecimFilterWrapper.v
  26. 12 10
      S5443_M/S5443.srcs/sources_1/new/InternalDsp/ComplPrng.v
  27. 15 12
      S5443_M/S5443.srcs/sources_1/new/InternalDsp/DspPipeline.v
  28. 40 22
      S5443_M/S5443.srcs/sources_1/new/InternalDsp/InternalDsp.v
  29. 1 1
      S5443_M/S5443.srcs/sources_1/new/InternalDsp/MeasCtrlModule.v
  30. 53 5
      S5443_M/S5443.srcs/sources_1/new/InternalDsp/WinParameters.v
  31. 8 2
      S5443_M/S5443.srcs/sources_1/new/Math/MyIntToFp.v
  32. 54 7
      S5443_M/S5443.srcs/sources_1/new/MeasDataFifo/FifoController.v
  33. 52 17
      S5443_M/S5443.srcs/sources_1/new/MeasDataFifo/MeasDataFifoWrapper.v
  34. 4 4
      S5443_M/S5443.srcs/sources_1/new/PulseMeas/MeasStartEventGen.v
  35. 0 61
      S5443_M/S5443.srcs/sources_1/new/PulseMeas/PulseEventGen.v
  36. 23 17
      S5443_M/S5443.srcs/sources_1/new/PulseMeas/PulseGenV2.v
  37. 50 36
      S5443_M/S5443.srcs/sources_1/new/S5443Top.v
  38. 10 10
      S5443_M/S5443.srcs/sources_1/new/S5443TopPulseProfileTb.v
  39. 3 24
      S5443_S/S5443.srcs/constrs_1/new/S5443Top.xdc
  40. BIN
      S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.dcp
  41. 12462 12476
      S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v
  42. 13684 13724
      S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl
  43. 3 3
      S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.v
  44. 3 0
      S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.vhdl
  45. 34 30
      S5443_S/S5443.srcs/sources_1/new/ExtDspInterface/DspInterface.v
  46. 13 11
      S5443_S/S5443.srcs/sources_1/new/InternalDsp/ComplPrng.v
  47. 17 18
      S5443_S/S5443.srcs/sources_1/new/InternalDsp/DspPipeline.v
  48. 62 39
      S5443_S/S5443.srcs/sources_1/new/InternalDsp/InternalDsp.v
  49. 1 1
      S5443_S/S5443.srcs/sources_1/new/InternalDsp/MeasCtrlModule.v
  50. 53 5
      S5443_S/S5443.srcs/sources_1/new/InternalDsp/WinParameters.v
  51. 8 2
      S5443_S/S5443.srcs/sources_1/new/Math/MyIntToFp.v
  52. 54 7
      S5443_S/S5443.srcs/sources_1/new/MeasDataFifo/FifoController.v
  53. 52 17
      S5443_S/S5443.srcs/sources_1/new/MeasDataFifo/MeasDataFifoWrapper.v
  54. 4 4
      S5443_S/S5443.srcs/sources_1/new/PulseMeas/MeasStartEventGen.v
  55. 15 10
      S5443_S/S5443.srcs/sources_1/new/S5443Top.v

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 13225 - 0
S5443_M/S5443.ip_user_files/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 14575 - 0
S5443_M/S5443.ip_user_files/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl


+ 1 - 1
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.v

@@ -1,7 +1,7 @@
 // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
 // --------------------------------------------------------------------------------
 // Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
-// Date        : Fri Nov 19 10:12:01 2021
+// Date        : Wed Sep 14 10:24:19 2022
 // Host        : DESKTOP-RMARCDV running 64-bit major release  (build 9200)
 // Command     : write_verilog -force -mode synth_stub -rename_top MeasDataFifo -prefix
 //               MeasDataFifo_ MeasDataFifo_stub.v

+ 1 - 0
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.vhdl

@@ -1,7 +1,7 @@
 -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
 -- --------------------------------------------------------------------------------
 -- Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
+-- Date        : Wed Sep 14 10:24:19 2022
 -- Host        : DESKTOP-RMARCDV running 64-bit major release  (build 9200)
 -- Command     : write_vhdl -force -mode synth_stub -rename_top MeasDataFifo -prefix
 --               MeasDataFifo_ MeasDataFifo_stub.vhdl

+ 16 - 16
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/sim/MeasDataFifo.v

@@ -85,7 +85,7 @@ output wire empty;
     .C_COMMON_CLOCK(1),
     .C_SELECT_XPM(0),
     .C_COUNT_TYPE(0),
-    .C_DATA_COUNT_WIDTH(10),
+    .C_DATA_COUNT_WIDTH(12),
     .C_DEFAULT_VALUE("BlankString"),
     .C_DIN_WIDTH(256),
     .C_DOUT_RST_VAL("0"),
@@ -117,17 +117,17 @@ output wire empty;
     .C_OVERFLOW_LOW(0),
     .C_PRELOAD_LATENCY(1),
     .C_PRELOAD_REGS(0),
-    .C_PRIM_FIFO_TYPE("1kx36"),
+    .C_PRIM_FIFO_TYPE("4kx9"),
     .C_PROG_EMPTY_THRESH_ASSERT_VAL(2),
     .C_PROG_EMPTY_THRESH_NEGATE_VAL(3),
     .C_PROG_EMPTY_TYPE(0),
-    .C_PROG_FULL_THRESH_ASSERT_VAL(1022),
-    .C_PROG_FULL_THRESH_NEGATE_VAL(1021),
+    .C_PROG_FULL_THRESH_ASSERT_VAL(4094),
+    .C_PROG_FULL_THRESH_NEGATE_VAL(4093),
     .C_PROG_FULL_TYPE(0),
-    .C_RD_DATA_COUNT_WIDTH(10),
-    .C_RD_DEPTH(1024),
+    .C_RD_DATA_COUNT_WIDTH(12),
+    .C_RD_DEPTH(4096),
     .C_RD_FREQ(1),
-    .C_RD_PNTR_WIDTH(10),
+    .C_RD_PNTR_WIDTH(12),
     .C_UNDERFLOW_LOW(0),
     .C_USE_DOUT_RST(1),
     .C_USE_ECC(0),
@@ -138,10 +138,10 @@ output wire empty;
     .C_USE_FWFT_DATA_COUNT(0),
     .C_VALID_LOW(0),
     .C_WR_ACK_LOW(0),
-    .C_WR_DATA_COUNT_WIDTH(10),
-    .C_WR_DEPTH(1024),
+    .C_WR_DATA_COUNT_WIDTH(12),
+    .C_WR_DEPTH(4096),
     .C_WR_FREQ(1),
-    .C_WR_PNTR_WIDTH(10),
+    .C_WR_PNTR_WIDTH(12),
     .C_WR_RESPONSE_LATENCY(1),
     .C_MSGON_VAL(1),
     .C_ENABLE_RST_SYNC(1),
@@ -297,12 +297,12 @@ output wire empty;
     .din(din),
     .wr_en(wr_en),
     .rd_en(rd_en),
-    .prog_empty_thresh(10'B0),
-    .prog_empty_thresh_assert(10'B0),
-    .prog_empty_thresh_negate(10'B0),
-    .prog_full_thresh(10'B0),
-    .prog_full_thresh_assert(10'B0),
-    .prog_full_thresh_negate(10'B0),
+    .prog_empty_thresh(12'B0),
+    .prog_empty_thresh_assert(12'B0),
+    .prog_empty_thresh_negate(12'B0),
+    .prog_full_thresh(12'B0),
+    .prog_full_thresh_assert(12'B0),
+    .prog_full_thresh_negate(12'B0),
     .int_clk(1'D0),
     .injectdbiterr(1'D0),
     .injectsbiterr(1'D0),

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 63 - 10
S5443_M/S5443.srcs/constrs_1/new/S5443Top.xdc


+ 0 - 0
S5443_M/S5443.srcs/sources_1/ip/.Xil/.MeasDataFifo.xcix.lock


BIN
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/blk_mem_gen_v8_4_vhsyn_rfs.vhd


BIN
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.dcp


+ 0 - 72
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.veo

@@ -1,72 +0,0 @@
-// (c) Copyright 1995-2023 Xilinx, Inc. All rights reserved.
-// 
-// This file contains confidential and proprietary information
-// of Xilinx, Inc. and is protected under U.S. and
-// international copyright and other intellectual property
-// laws.
-// 
-// DISCLAIMER
-// This disclaimer is not a license and does not grant any
-// rights to the materials distributed herewith. Except as
-// otherwise provided in a valid license issued to you by
-// Xilinx, and to the maximum extent permitted by applicable
-// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
-// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
-// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
-// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
-// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
-// (2) Xilinx shall not be liable (whether in contract or tort,
-// including negligence, or under any other theory of
-// liability) for any loss or damage of any kind or nature
-// related to, arising under or in connection with these
-// materials, including for any direct, or any indirect,
-// special, incidental, or consequential loss or damage
-// (including loss of data, profits, goodwill, or any type of
-// loss or damage suffered as a result of any action brought
-// by a third party) even if such damage or loss was
-// reasonably foreseeable or Xilinx had been advised of the
-// possibility of the same.
-// 
-// CRITICAL APPLICATIONS
-// Xilinx products are not designed or intended to be fail-
-// safe, or for use in any application requiring fail-safe
-// performance, such as life-support or safety devices or
-// systems, Class III medical devices, nuclear facilities,
-// applications related to the deployment of airbags, or any
-// other applications that could lead to death, personal
-// injury, or severe property or environmental damage
-// (individually and collectively, "Critical
-// Applications"). Customer assumes the sole risk and
-// liability of any use of Xilinx products in Critical
-// Applications, subject only to applicable laws and
-// regulations governing limitations on product liability.
-// 
-// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
-// PART OF THIS FILE AT ALL TIMES.
-// 
-// DO NOT MODIFY THIS FILE.
-
-// IP VLNV: xilinx.com:ip:fifo_generator:13.2
-// IP Revision: 5
-
-// The following must be inserted into your Verilog file for this
-// core to be instantiated. Change the instance name and port connections
-// (in parentheses) to your own signal names.
-
-//----------- Begin Cut here for INSTANTIATION Template ---// INST_TAG
-MeasDataFifo your_instance_name (
-  .clk(clk),      // input wire clk
-  .srst(srst),    // input wire srst
-  .din(din),      // input wire [255 : 0] din
-  .wr_en(wr_en),  // input wire wr_en
-  .rd_en(rd_en),  // input wire rd_en
-  .dout(dout),    // output wire [255 : 0] dout
-  .full(full),    // output wire full
-  .empty(empty)  // output wire empty
-);
-// INST_TAG_END ------ End INSTANTIATION Template ---------
-
-// You must compile the wrapper file MeasDataFifo.v when simulating
-// the core, MeasDataFifo. When compiling the wrapper file, be sure to
-// reference the Verilog simulation library.
-

+ 0 - 32
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.vho

@@ -1,89 +0,0 @@
-
-
-
-------------- Begin Cut here for COMPONENT Declaration ------ COMP_TAG
-COMPONENT MeasDataFifo
-  PORT (
-    clk : IN STD_LOGIC;
-    srst : IN STD_LOGIC;
-    din : IN STD_LOGIC_VECTOR(255 DOWNTO 0);
-    wr_en : IN STD_LOGIC;
-    rd_en : IN STD_LOGIC;
-    dout : OUT STD_LOGIC_VECTOR(255 DOWNTO 0);
-    full : OUT STD_LOGIC;
-    empty : OUT STD_LOGIC
-  );
-END COMPONENT;
-
-
-------------- Begin Cut here for INSTANTIATION Template ----- INST_TAG
-your_instance_name : MeasDataFifo
-  PORT MAP (
-    clk => clk,
-    srst => srst,
-    din => din,
-    wr_en => wr_en,
-    rd_en => rd_en,
-    dout => dout,
-    full => full,
-    empty => empty
-  );
-
-

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 582
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.xci


+ 0 - 64
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.xdc

@@ -1,64 +0,0 @@
- 
- 
- 
- 
- 
-
-################################################################################
-# (c) Copyright 2009 - 2013 Xilinx, Inc. All rights reserved.
-# 
-# This file contains confidential and proprietary information
-# of Xilinx, Inc. and is protected under U.S. and
-# international copyright and other intellectual property
-# laws.
-# 
-# DISCLAIMER
-# This disclaimer is not a license and does not grant any
-# rights to the materials distributed herewith. Except as
-# otherwise provided in a valid license issued to you by
-# Xilinx, and to the maximum extent permitted by applicable
-# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
-# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
-# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
-# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
-# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
-# (2) Xilinx shall not be liable (whether in contract or tort,
-# including negligence, or under any other theory of
-# liability) for any loss or damage of any kind or nature
-# related to, arising under or in connection with these
-# materials, including for any direct, or any indirect,
-# special, incidental, or consequential loss or damage
-# (including loss of data, profits, goodwill, or any type of
-# loss or damage suffered as a result of any action brought
-# by a third party) even if such damage or loss was
-# reasonably foreseeable or Xilinx had been advised of the
-# possibility of the same.
-# 
-# CRITICAL APPLICATIONS
-# Xilinx products are not designed or intended to be fail-
-# safe, or for use in any application requiring fail-safe
-# performance, such as life-support or safety devices or
-# systems, Class III medical devices, nuclear facilities,
-# applications related to the deployment of airbags, or any
-# other applications that could lead to death, personal
-# injury, or severe property or environmental damage
-# (individually and collectively, "Critical
-# Applications"). Customer assumes the sole risk and
-# liability of any use of Xilinx products in Critical
-# Applications, subject only to applicable laws and
-# regulations governing limitations on product liability.
-# 
-# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
-# PART OF THIS FILE AT ALL TIMES.
-#
-################################################################################
-
-#------------------------------------------------------------------------------#
-#                         Native FIFO Constraints                              #
-#------------------------------------------------------------------------------#
-
-
-
-
-################################################################################
-

+ 0 - 69
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_clocks.xdc

@@ -1,69 +0,0 @@
-################################################################################
-# (c) Copyright 2009 - 2013 Xilinx, Inc. All rights reserved.
-# 
-# This file contains confidential and proprietary information
-# of Xilinx, Inc. and is protected under U.S. and
-# international copyright and other intellectual property
-# laws.
-# 
-# DISCLAIMER
-# This disclaimer is not a license and does not grant any
-# rights to the materials distributed herewith. Except as
-# otherwise provided in a valid license issued to you by
-# Xilinx, and to the maximum extent permitted by applicable
-# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
-# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
-# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
-# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
-# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
-# (2) Xilinx shall not be liable (whether in contract or tort,
-# including negligence, or under any other theory of
-# liability) for any loss or damage of any kind or nature
-# related to, arising under or in connection with these
-# materials, including for any direct, or any indirect,
-# special, incidental, or consequential loss or damage
-# (including loss of data, profits, goodwill, or any type of
-# loss or damage suffered as a result of any action brought
-# by a third party) even if such damage or loss was
-# reasonably foreseeable or Xilinx had been advised of the
-# possibility of the same.
-# 
-# CRITICAL APPLICATIONS
-# Xilinx products are not designed or intended to be fail-
-# safe, or for use in any application requiring fail-safe
-# performance, such as life-support or safety devices or
-# systems, Class III medical devices, nuclear facilities,
-# applications related to the deployment of airbags, or any
-# other applications that could lead to death, personal
-# injury, or severe property or environmental damage
-# (individually and collectively, "Critical
-# Applications"). Customer assumes the sole risk and
-# liability of any use of Xilinx products in Critical
-# Applications, subject only to applicable laws and
-# regulations governing limitations on product liability.
-# 
-# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
-# PART OF THIS FILE AT ALL TIMES.
-#
-################################################################################
-#------------------------------------------------------------------------------#
-#                         Native FIFO Constraints                              #
-#------------------------------------------------------------------------------#
-
-#set wr_clock          [get_clocks -of_objects [get_ports wr_clk]]
-#set rd_clock          [get_clocks -of_objects [get_ports rd_clk]]
-#set wr_clk_period     [get_property PERIOD $wr_clock]
-#set rd_clk_period     [get_property PERIOD $rd_clock]
-#set skew_value [expr {(($wr_clk_period < $rd_clk_period) ? $wr_clk_period : $rd_clk_period)} ]
-
-
-# Set max delay on cross clock domain path for Block/Distributed RAM based FIFO
-
-## set_max_delay -from [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*rd_pntr_gc_reg[*]] -to [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*gsync_stage[1].wr_stg_inst/Q_reg_reg[*]] -datapath_only [get_property -min PERIOD $rd_clock]
-## set_bus_skew -from [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*rd_pntr_gc_reg[*]] -to [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*gsync_stage[1].wr_stg_inst/Q_reg_reg[*]] $skew_value
-
-## set_max_delay -from [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*wr_pntr_gc_reg[*]] -to [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*gsync_stage[1].rd_stg_inst/Q_reg_reg[*]] -datapath_only [get_property -min PERIOD $wr_clock]
-## set_bus_skew -from [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*wr_pntr_gc_reg[*]] -to [get_cells inst_fifo_gen/gconvfifo.rf/grf.rf/gntv_or_sync_fifo.gcx.clkx/*gsync_stage[1].rd_stg_inst/Q_reg_reg[*]] $skew_value
-#set_false_path -from [get_cells -hierarchical -filter {NAME =~ *gsckt_wrst.gic_rst.sckt_wrst_i_reg}] -to [get_cells -hierarchical -filter {NAME =~ *gsckt_wrst.gic_rst.garst_sync_ic[1].rd_rst_inst/Q_reg_reg[0]}]
-#set_false_path -from [get_cells -hierarchical -filter {NAME =~ *gsckt_wrst.gic_rst.garst_sync_ic[3].rd_rst_inst/Q_reg_reg[0]}] -to [get_cells -hierarchical -filter {NAME =~ *gsckt_wrst.gic_rst.garst_sync_ic[1].rd_rst_wr_inst/Q_reg_reg[0]}]
-################################################################################

+ 0 - 57
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_ooc.xdc

@@ -1,57 +0,0 @@
-# (c) Copyright 2012-2023 Xilinx, Inc. All rights reserved.
-# 
-# This file contains confidential and proprietary information
-# of Xilinx, Inc. and is protected under U.S. and
-# international copyright and other intellectual property
-# laws.
-# 
-# DISCLAIMER
-# This disclaimer is not a license and does not grant any
-# rights to the materials distributed herewith. Except as
-# otherwise provided in a valid license issued to you by
-# Xilinx, and to the maximum extent permitted by applicable
-# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
-# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
-# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
-# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
-# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
-# (2) Xilinx shall not be liable (whether in contract or tort,
-# including negligence, or under any other theory of
-# liability) for any loss or damage of any kind or nature
-# related to, arising under or in connection with these
-# materials, including for any direct, or any indirect,
-# special, incidental, or consequential loss or damage
-# (including loss of data, profits, goodwill, or any type of
-# loss or damage suffered as a result of any action brought
-# by a third party) even if such damage or loss was
-# reasonably foreseeable or Xilinx had been advised of the
-# possibility of the same.
-# 
-# CRITICAL APPLICATIONS
-# Xilinx products are not designed or intended to be fail-
-# safe, or for use in any application requiring fail-safe
-# performance, such as life-support or safety devices or
-# systems, Class III medical devices, nuclear facilities,
-# applications related to the deployment of airbags, or any
-# other applications that could lead to death, personal
-# injury, or severe property or environmental damage
-# (individually and collectively, "Critical
-# Applications"). Customer assumes the sole risk and
-# liability of any use of Xilinx products in Critical
-# Applications, subject only to applicable laws and
-# regulations governing limitations on product liability.
-# 
-# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
-# PART OF THIS FILE AT ALL TIMES.
-# 
-# DO NOT MODIFY THIS FILE.
-# #########################################################
-#
-# This XDC is used only in OOC mode for synthesis, implementation
-#
-# #########################################################
-
-
-create_clock -period 10 -name clk [get_ports clk]
-
-

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 4712
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 5582
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl


+ 0 - 254
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/doc/fifo_generator_v13_2_changelog.txt

@@ -1,254 +0,0 @@
-2020.2:
- * Version 13.2 (Rev. 5)
- * No changes
-
-2020.1.1:
- * Version 13.2 (Rev. 5)
- * No changes
-
-2020.1:
- * Version 13.2 (Rev. 5)
- * No changes
-
-2019.2.2:
- * Version 13.2 (Rev. 5)
- * No changes
-
-2019.2.1:
- * Version 13.2 (Rev. 5)
- * No changes
-
-2019.2:
- * Version 13.2 (Rev. 5)
- * General: IP Waivers update in constraint files. No functional changes
- * Revision change in one or more subcores
-
-2019.1.3:
- * Version 13.2 (Rev. 4)
- * No changes
-
-2019.1.2:
- * Version 13.2 (Rev. 4)
- * No changes
-
-2019.1.1:
- * Version 13.2 (Rev. 4)
- * No changes
-
-2019.1:
- * Version 13.2 (Rev. 4)
- * Bug Fix: Destination Clock not connected properly for some XPM_CDC instances when in common clock mode. Conditions added to connect the correct clock
- * Other: IP Waivers added in constraint files. No functional changes
- * Revision change in one or more subcores
-
-2018.3.1:
- * Version 13.2 (Rev. 3)
- * No changes
-
-2018.3:
- * Version 13.2 (Rev. 3)
- * Feature Enhancement: None
- * Other: Reduced simulation warnings in Behavioral model. No functional changes
- * Revision change in one or more subcores
-
-2018.2:
- * Version 13.2 (Rev. 2)
- * No changes
-
-2018.1:
- * Version 13.2 (Rev. 2)
- * Bug Fix: Enable Safety Circuit option was unintentionally made available for user selection when Enable Reset Synchronization is not selected. This unintentional enablement is corrected and Enable Safety Circuit is available for user selection only if Enable Reset Synchronization option is selected
- * Bug Fix: REQP-1839 DRC warning removed from example test bench
- * Bug Fix: Read Data Count in behavioral model is updated to start with a valid value when Enable Reset Synchronization option is not selected
- * Other: As FIFO Generator core uses XPM_CDC module, user must ensure that the wr_rst and rd_rst overlap for at least C_SYNCHRONIZER_STAGE+1 slowest clock cycles if Enable Reset Synchronization option is disabled
-
-2017.4:
- * Version 13.2 (Rev. 1)
- * Revision change in one or more subcores
-
-2017.3:
- * Version 13.2
- * Feature Enhancement: Enable Safety Circuit option is made default for BRAM based FIFOs when Asynchronous Reset is selected
- * Feature Enhancement: All outputs are made synchronous to respective clock domain when Enable Safety Circuit option is selected
- * Feature Enhancement: All outputs are invalid for reset duration + 60 slowest clock cycles when Enable Safety Circuit option is selected
- * Feature Enhancement: All outputs are invalid for reset duration + 30 slowest clock cycles when Enable Safety Circuit option is not selected
- * Feature Enhancement: The outputs of FIFO Generator may be Xs for initial few clock cycles if the core is configured without reset. It is recommended to wait for 15 slowest clock cycles at the beginning of behavioral simulation (from time 0) before accessing the FIFO
-
-2017.2:
- * Version 13.1 (Rev. 4)
- * No changes
-
-2017.1:
- * Version 13.1 (Rev. 4)
- * Bug Fix: FIFO Generator core was constructing the buit-in FIFO sub-optimally for 2K-deep and 36-bit wide configuration. This is corrected to use the optimal FIFO structure
- * Bug Fix: In order to enable the tool to perform the recovery check on the reset, set_false_path for reset is kept only from the input port to the first flop where it connects to
- * Feature Enhancement: Updated the FIFO Generator's constraints to improve tool performance processing its XDC
- * Other: Internal device family change, no functional changes
- * Revision change in one or more subcores
-
-2016.4:
- * Version 13.1 (Rev. 3)
- * Port Change: None
- * Bug Fix: Supported features table in the first page of GUI updated to reflect the asymmetry support for common clock BRAM FIFO
- * Feature Enhancement: None
- * Revision change in one or more subcores
-
-2016.3:
- * Version 13.1 (Rev. 2)
- * Port Change: wr_rst_busy and rd_rst_busy ports made available if safety circuit is enabled
- * Bug Fix: Fixed issue which was causing the m_axis_tvalid to go high after the reset is released and no valid data written to the FIFO
- * Feature Enhancement: Safety circuit is made independent of Output Register and Enable Reset Synchronization options
- * Other: Added support for future devices
- * Other: Source HDL files are concatenated into a single file to speed up synthesis and simulation. No changes required by the user
- * Revision change in one or more subcores
-
-2016.2:
- * Version 13.1 (Rev. 1)
- * Revision change in one or more subcores
-
-2016.1:
- * Version 13.1
- * Delivering only Verilog behavioral model.
- * Constraint(s) for Independent Clocks Distributed RAM FIFO is changed, which may issue a CDC-1 warning that can be safely ignored.
- * Output Register option is updated to offer either Embedded Register or Fabric Register or Both Embedded and Fabric Registers.
- * Updated the FIFO Generator GUI to provide Embedded Register option for Built-in FIFO when ECC mode in selected.
- * Programmable Full and Programmable Empty Threshold range has been reduced for UltraScale and UltraScale+ Built-in FIFO configurations. For more information on the exact threshold range change, refer the PG(057)
- * Programmable Full and Programmable Empty Threshold values were reset to its default values when the previous version of the core is upgraded to the latest version. This has been corrected
- * Revision change in one or more subcores
-
-2015.4.2:
- * Version 13.0 (Rev. 1)
- * No changes
-
-2015.4.1:
- * Version 13.0 (Rev. 1)
- * No changes
-
-2015.4:
- * Version 13.0 (Rev. 1)
- * Fixed safety circuit related warnings in Behavioral model
- * Revision change in one or more subcores
-
-2015.3:
- * Version 13.0
- * Additional safety circuit option provided for asynchronous reset configurations.
- * Delivering only VHDL behavioral model.
- * Added asymmetric port width support for 7-series Common Clock Block RAM FIFO
- * IP revision number added to HDL module, library, and include file names, to support designs with both locked and upgraded IP instances
-
-2015.2.1:
- * Version 12.0 (Rev. 4)
- * No changes
-
-2015.2:
- * Version 12.0 (Rev. 4)
- * No changes
-
-2015.1:
- * Version 12.0 (Rev. 4)
- * Delivering  non encrypted behavioral models.
- * Enabled out-of-context clock frequency setting by adding FREQ_HZ parameter to clock ports
- * Enabling behavioral simulation for Built-in FIFO configurations changes the simulation file names and delivery structure.
- * Supported devices and production status are now determined automatically, to simplify support for future devices
-
-2014.4.1:
- * Version 12.0 (Rev. 3)
- * No changes
-
-2014.4:
- * Version 12.0 (Rev. 3)
- * Reduced DRC warnings.
- * Internal device family change, no functional changes
- * Encrypted source files are concatenated together to reduce the number of files and to reduce simulator compile time
-
-2014.3:
- * Version 12.0 (Rev. 2)
- * Added support for Asynchronous AXI Stream Packet FIFO for UltraScale devices.
- * Added support for write data count and read data count for Asynchronous AXI Stream Packet FIFO for UltraScale devices.
- * Added support for write data count and read data count for Common Clock Block RAM FIFO when Asymmetric Port Width option is enabled for UltraScale devices.
- * Added support for Low Latency Built-in FIFO for UltraScale devices.
-
-2014.2:
- * Version 12.0 (Rev. 1)
- * Repackaged to improve internal automation, no functional changes.
-
-2014.1:
- * Version 12.0
- * Asynchronous reset port (rst) for Built-in FIFO configurations is removed for UltraScale Built-in FIFO configurations. When upgrading from previously released core, 'rst' port will be replaced by 'srst' port.
- * Synchronous reset (srst) mechanism is changed now for UltraScale devices. FIFO Generator will now provide wr_rst_busy and rd_rst_busy output ports. When wr_rst_busy is active low, the core is ready for write operation and when rd_rst_busy is active low, the core is ready for read operation.
- * Added asymmetric port width support for Common Clock Block RAM FIFO, Common Clock Built-in FIFO and Independent Clocks Built-in FIFO configurations for UltraScale Devices
- * Added 'sleep' input port for Common Clock Built-in FIFO and Independent Clocks Built-in FIFO configurations only for UltraScale Devices
- * Internal device family name change, no functional changes
-
-2013.4:
- * Version 11.0 (Rev. 1)
- * Added support for Ultrascale devices
- * Common Clock Builtin FIFO is set as default implementation type only for UltraScale devices
- * Embedded Register option is always ON for Block RAM and Builtin FIFOs only for UltraScale devices
- * Reset is sampled with respect to wr_clk/clk and then synchronized before the use in FIFO Generator only for UltraScale devices
-
-2013.3:
- * Version 11.0
- * AXI ID Tags (s_axi_wid and m_axi_wid) are now determined by AXI protocol type (AXI4, AXI3). When upgrading from previously released core, these signals will be removed when AXI_Type = AXI4_Full.
- * AXI Lock signals (s_axi_awlock, m_axi_awlock, s_axi_arlock and m_axi_arlock) are now determined by AXI Protocol type (AXI4, AXI3). When upgrading from previously released core, these signals width will reduce from 2-bits to 1-bit when AXI_Type=AXI4_Full
- * Removed restriction on packet size in AXI4 Stream FIFO mode. Now, the packet size can be up to FIFO depth
- * Enhanced support for IP Integrator
- * Reduced warnings in synthesis and simulation
- * Added support for Cadence IES and Synopsys VCS simulators
- * Improved GUI speed and responsiveness, no functional changes
- * Increased the maximum number of synchronization stages from 4 to 8. The minimum FIFO depth is limited to 32 when number of synchronization stages is > 4
-
-2013.2:
- * Version 10.0 (Rev. 1)
- * Constraints processing order changed
-
-2013.1:
- * Version 10.0
- * Native Vivado Release
- * There have been no functional or interface changes to this IP.  The version number has changed to support unique versioning in Vivado starting with 2013.1.
-
-(c) Copyright 2002 - 2020 Xilinx, Inc. All rights reserved.
-
-This file contains confidential and proprietary information
-of Xilinx, Inc. and is protected under U.S. and
-international copyright and other intellectual property
-laws.
-
-DISCLAIMER
-This disclaimer is not a license and does not grant any
-rights to the materials distributed herewith. Except as
-otherwise provided in a valid license issued to you by
-Xilinx, and to the maximum extent permitted by applicable
-law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
-WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
-AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
-BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
-(2) Xilinx shall not be liable (whether in contract or tort,
-including negligence, or under any other theory of
-liability) for any loss or damage of any kind or nature
-related to, arising under or in connection with these
-materials, including for any direct, or any indirect,
-special, incidental, or consequential loss or damage
-(including loss of data, profits, goodwill, or any type of
-loss or damage suffered as a result of any action brought
-by a third party) even if such damage or loss was
-reasonably foreseeable or Xilinx had been advised of the
-possibility of the same.
-
-CRITICAL APPLICATIONS
-Xilinx products are not designed or intended to be fail-
-safe, or for use in any application requiring fail-safe
-performance, such as life-support or safety devices or
-systems, Class III medical devices, nuclear facilities,
-applications related to the deployment of airbags, or any
-other applications that could lead to death, personal
-injury, or severe property or environmental damage
-(individually and collectively, "Critical
-Applications"). Customer assumes the sole risk and
-liability of any use of Xilinx products in Critical
-Applications, subject only to applicable laws and
-regulations governing limitations on product liability.
-
-THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
-PART OF THIS FILE AT ALL TIMES.

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 7777
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/fifo_generator_v13_2_rfs.v


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 18837
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/fifo_generator_v13_2_rfs.vhd


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 31975
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/hdl/fifo_generator_v13_2_vhsyn_rfs.vhd


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 10519
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/simulation/fifo_generator_vlog_beh.v


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 806
S5443_M/S5443.srcs/sources_1/ip/MeasDataFifo/synth/MeasDataFifo.vhd


+ 6 - 2
S5443_M/S5443.srcs/sources_1/new/ExtDspInterface/DspInterface.v

@@ -33,9 +33,10 @@ module	DspInterface
 )
 (
 	input	Clk_i,
-	input	ClkPpiOut_i,
 	input	Rst_i,
 	input	OscWind_i,
+	input	StartMeasDsp_i,
+	input	DspReadyForRx_i,
 	input	[31:0]	MeasNum_i,
 	
 	input	Mosi_i,
@@ -61,6 +62,7 @@ module	DspInterface
 	output	Ss1_o,
 	input	Miso_i,
 	output	Miso_o,
+
 	
 	output	[CmdRegWidth-1:0]	CmdDataReg_o,
 	output	CmdDataVal_o,
@@ -283,9 +285,11 @@ MeasDataFifoWrapper
 MeasDataFifoInst
 (
 	.Clk_i			(Clk_i), 
-	.ClkPpiOut_i	(ClkPpiOut_i), 
 	.Rst_i			(Rst_i),	
 	.PpiBusy_i		(ppiBusy),	
+	.MeasNum_i		(MeasNum_i),	
+	.StartMeasDsp_i	(StartMeasDsp_i),	
+	.DspReadyForRx_i(DspReadyForRx_i),	
 	// .MeasDataBus_i	(measDataBus),
 	.MeasDataBus_i	(dataForFifo),
 	// .MeasDataVal_i	(LpOutStart_i),	

+ 6 - 7
S5443_M/S5443.srcs/sources_1/new/FftDataFiltering/DecimFilterWrapper.v

@@ -21,9 +21,9 @@
 module	DecimFilterWrapper
 #(	
 	parameter	AdcDataWidth		=	14,
-	parameter	N	=	4,
+	parameter	N	=	2,
 	parameter	M	=	1,
-	parameter	FilteredDataWidth	=	21,
+	parameter	FilteredDataWidth	=	26,
 	parameter	FirOutDataWidth		=	48,
 	parameter	FirOutCutBit		=	42
 )
@@ -118,7 +118,7 @@ AdcNcoSinMult
 	.Clk_i		(Clk_i),
 	.Val_i		(1'b1),
 	.FactorA_i	(ncoSin),
-	.FactorB_i	(ncoSin),	
+	.FactorB_i	(AdcData_i),	
 	.Result_o	(adcSinResult),
 	.ResultVal_o(adcSinVal)
 );
@@ -135,7 +135,7 @@ AdcNcoCosMult
 	.Clk_i		(Clk_i),
 	.Val_i		(1'b1),
 	.FactorA_i	(ncoCos),
-	.FactorB_i	(ncoSin),
+	.FactorB_i	(AdcData_i),
 	.Result_o	(adcCosResult),
 	.ResultVal_o(adcCosVal)
 );
@@ -153,7 +153,7 @@ cicFilterInstI
 	.Clk_i			(Clk_i),
 	.Rst_i			(Rst_i),
 	.DecimFactor_i	(DecimFactor_i),
-	// .Data_i			({{7{AdcData_i[AdcDataWidth-1]}},AdcData_i}),
+	// .Data_i			({{12{AdcData_i[AdcDataWidth-1]}},AdcData_i}),
 	.Data_i			(adcCosResult),
 	.DataNd_i		(OscWind_i),
 	.Data_o			(decimDataI),
@@ -173,8 +173,7 @@ cicFilterInstQ
 	.Clk_i			(Clk_i),
 	.Rst_i			(Rst_i),
 	.DecimFactor_i	(DecimFactor_i),
-	// .Data_i			(AdcData_i),
-	// .Data_i			({{7{AdcData_i[AdcDataWidth-1]}},AdcData_i}),
+	// .Data_i			({{12{AdcData_i[AdcDataWidth-1]}},AdcData_i}),
 	.Data_i			(adcSinResult),
 	.DataNd_i		(OscWind_i),
 	.Data_o			(decimDataQ),

+ 12 - 10
S5443_M/S5443.srcs/sources_1/new/InternalDsp/ComplPrng.v

@@ -22,11 +22,12 @@ module ComplPrng
 	parameter OutDataWidth = 20
 )
 (
-	input [InDataWidth-1:0] Data_i,
+	// input [InDataWidth-1:0] Data_i,
 	input Clk_i,
 	input Rst_i,
 
-	output signed	[OutDataWidth-1:0] DataAndPrng_o
+	// output signed	[OutDataWidth-1:0] DataAndPrng_o
+	output signed	[OutDataWidth-1:0] PrngData_o
 );
 //================================================================================
 //	REG/WIRE
@@ -50,7 +51,8 @@ reg	signed	[OutDataWidth-1:0]	dataAndPrngReg;
 assign	dataPrngCut			=	dataPrng[31-:DataPrngWidth];
 // assign	dataPrngCutExtended	=	{{OutDataWidth-DataPrngWidth{dataPrngCut[DataPrngWidth-1]}}, dataPrngCut};
 // assign	DataAndPrng_o		=	adcDataExtended+dataPrngCutExtended;
-assign	DataAndPrng_o		=	dataAndPrngReg;
+// assign	DataAndPrng_o		=	dataAndPrngReg;
+assign	PrngData_o			=	dataPrngCutExtended;
 //================================================================================
 //	CODING
 //================================================================================
@@ -82,12 +84,12 @@ always @(posedge Clk_i) begin
 	end
 end
 
-always @(posedge Clk_i) begin
-	if (Rst_i) begin
-		dataAndPrngReg	<=	0;
-	end else begin
-		dataAndPrngReg	<=	Data_i+dataPrngCutExtended;
-	end
-end
+// always @(posedge Clk_i) begin
+	// if (Rst_i) begin
+		// dataAndPrngReg	<=	0;
+	// end else begin
+		// dataAndPrngReg	<=	Data_i+dataPrngCutExtended;
+	// end
+// end
 
 endmodule

+ 15 - 12
S5443_M/S5443.srcs/sources_1/new/InternalDsp/DspPipeline.v

@@ -20,6 +20,7 @@ module DspPipeline
     input	StartFpConv_i,
 	
 	input	[WindCorrCoefWidth-1:0]	FilterCorrCoef_i,
+	input	[WindCorrCoefWidth-1:0]	AverageNoizeLvl_i,
 	input	[AdcCorrData-1:0]	AdcData_i,
 	input	[WindWidth-1:0]		Wind_i,
 	input	[NcoWidth-1:0]		NcoSin_i,
@@ -173,12 +174,13 @@ MyIntToFp
 )
 QToFp32
 (	
-	.Clk_i			(Clk_i),
-	.Rst_i			(Rst_i),
-	.InData_i		(AccResultQ),
-	.InDataVal_i	(StartFpConv_i),
-	.OutData_o		(qFp32Result),
-	.OutDataVal_o	(qFp32ResultVal)
+	.Clk_i				(Clk_i),
+	.Rst_i				(Rst_i),
+	.InData_i			(AccResultQ),
+	.AverageNoizeLvl_i	(AverageNoizeLvl_i),
+	.InDataVal_i		(StartFpConv_i),
+	.OutData_o			(qFp32Result),
+	.OutDataVal_o		(qFp32ResultVal)
 );
 
 MyIntToFp
@@ -190,12 +192,13 @@ MyIntToFp
 )
 IToFp32
 (	
-	.Clk_i			(Clk_i),
-	.Rst_i			(Rst_i),
-	.InData_i		(AccResultI),
-	.InDataVal_i	(StartFpConv_i),
-	.OutData_o		(iFp32Result),
-	.OutDataVal_o	(iFp32ResultVal)
+	.Clk_i				(Clk_i),
+	.Rst_i				(Rst_i),
+	.InData_i			(AccResultI),
+	.AverageNoizeLvl_i	(AverageNoizeLvl_i),
+	.InDataVal_i		(StartFpConv_i),
+	.OutData_o			(iFp32Result),
+	.OutDataVal_o		(iFp32ResultVal)
 );
 
 //===============================Result*NormCoeff=================================

+ 40 - 22
S5443_M/S5443.srcs/sources_1/new/InternalDsp/InternalDsp.v

@@ -91,6 +91,7 @@ module InternalDsp
 //  REG/WIRE
 	wire	[WindNormCoefWidth-1:0]	windNormCoef;
 	wire	[WindPNumWidth-1:0]		windPointsNum;
+	wire	[WindPNumWidth-1:0]		averageNoizeLvl;
 	wire	[WindNcoPhIncWidth-1:0]	windPhInc;
 	wire	[WindNcoPhIncWidth-1:0]	winPhIncStart;
 	
@@ -104,9 +105,12 @@ module InternalDsp
 	wire	[CorrAdcDataWidth-1:0]	adcDataBusExt	[ChNum-1:0];
 	wire	[CorrAdcDataWidth-1:0]	gatedAdcDataBus	[ChNum-1:0];
 	wire	[CorrAdcDataWidth-1:0]	calAdcData		[ChNum-1:0];
+	wire	[CorrAdcDataWidth-1:0]	prngData;
+	reg		[CorrAdcDataWidth-1:0]	prngDataBus		[ChNum-1:0];
 	wire	[ChNum-1:0]	calDone;
 	
 	genvar g;
+	integer i;
 	
 	wire	[ResultWidth-1:0]	resultImBus		[ChNum-1:0];
 	wire	[ResultWidth-1:0]	resultReBus		[ChNum-1:0];
@@ -152,6 +156,10 @@ module InternalDsp
 	assign	adcDataBus	[ChNum-3]	=	{{2{Adc1ChR1Data_i[AdcDataWidth-1]}},Adc1ChR1Data_i,4'b0};
 	assign	adcDataBus	[ChNum-4]	=	{{2{Adc1ChT1Data_i[AdcDataWidth-1]}},Adc1ChT1Data_i,4'b0};
 	
+	assign	adcDataBusExt	[ChNum-1]	=	calAdcData	[ChNum-1]+prngDataBus[ChNum-1];
+	assign	adcDataBusExt	[ChNum-2]	=	calAdcData	[ChNum-2]+prngDataBus[ChNum-2];
+	assign	adcDataBusExt	[ChNum-3]	=	calAdcData	[ChNum-3]+prngDataBus[ChNum-3];
+	assign	adcDataBusExt	[ChNum-4]	=	calAdcData	[ChNum-4]+prngDataBus[ChNum-4];
 	
 	assign	gatedAdcDataBus	[ChNum-1]	=	adc2ChT2DataGated;
 	assign	gatedAdcDataBus	[ChNum-2]	=	adc2ChR2DataGated;
@@ -255,13 +263,14 @@ WinParameters
 )
 WinParameters
 (	
-	.Clk_i			(Clk_i),
-	.Rst_i			(Rst_i),
-	.FilterCmd_i	(measCtrlReg[15-:8]),
-	.WinPhInc_o		(windPhInc),
-	.WinPhIncStart_o(winPhIncStart),
-	.WinNormCoef_o	(windNormCoef),
-	.WinPointsNum_o	(windPointsNum)
+	.Clk_i				(Clk_i),
+	.Rst_i				(Rst_i),
+	.FilterCmd_i		(measCtrlReg[15-:8]),
+	.WinPhInc_o			(windPhInc),
+	.WinPhIncStart_o	(winPhIncStart),
+	.WinNormCoef_o		(windNormCoef),
+	.WinPointsNum_o		(windPointsNum),
+	.AverageNoiseLvl_o	(averageNoizeLvl)
 );
 
 //----------------------------------------------
@@ -306,6 +315,29 @@ ncoInst
 	.Val_o		()
 );
 
+
+ComplPrng
+#(
+	.DataPrngWidth	(8),
+	.InDataWidth 	(CorrAdcDataWidth),
+	.OutDataWidth	(CorrAdcDataWidth)
+)
+ComplPrngAdderInst
+(
+	// .Data_i	(calAdcData[g]),
+	.Clk_i	(Clk_i),
+	.Rst_i	(Rst_i),
+
+	// .DataAndPrng_o	(adcDataBusExt[g]),
+	.PrngData_o		(prngData)
+);
+
+always @(posedge Clk_i) begin
+	prngDataBus[0]  <= prngData;
+	for(i=1; i<4; i=i+1) begin
+		prngDataBus	[i]<=prngDataBus[i-1];
+	end
+end
 //------------------------------------------------
 //Generating needed amount of calculating channels
 generate
@@ -328,21 +360,6 @@ generate
 			.CalDone_o				(calDone[g]),
 			.CalibratedAdcData_o	(calAdcData[g])
 		);
-
-		ComplPrng
-		#(
-			.DataPrngWidth	(8),
-			.InDataWidth 	(CorrAdcDataWidth),
-			.OutDataWidth	(CorrAdcDataWidth)
-		)
-		ComplPrngAdderInst
-		(
-			.Data_i	(calAdcData[g]),
-			.Clk_i	(Clk_i),
-			.Rst_i	(Rst_i),
-
-			.DataAndPrng_o	(adcDataBusExt[g])
-		);
 		
 		DspPipeline	
 		#(	
@@ -363,6 +380,7 @@ generate
 			.StartFpConv_i		(StartFpConv),
 			
 			.FilterCorrCoef_i	({filterCorrCoefHReg[0+:WindNcoPhIncWidth-CmdDataRegWith],filterCorrCoefLReg}),
+			.AverageNoizeLvl_i	(averageNoizeLvl),
 			.AdcData_i			(gatedAdcDataBus[g]),
 			.Wind_i				(wind),
 			.NcoSin_i			(ncoCos),

+ 1 - 1
S5443_M/S5443.srcs/sources_1/new/InternalDsp/MeasCtrlModule.v

@@ -326,7 +326,7 @@ module MeasCtrlModule
 				measWind	=	1'b0;
 			end
 		end	else	begin
-			measWind	<=	1'b0;
+			measWind	=	1'b0;
 		end
 	end
 

+ 53 - 5
S5443_M/S5443.srcs/sources_1/new/InternalDsp/WinParameters.v

@@ -32,7 +32,8 @@ module WinParameters
 	output		[WindPhIncWidth-1:0]	WinPhInc_o,
 	output		[WindPhIncWidth-1:0]	WinPhIncStart_o,
 	output		[WindNormCoefWidth-1:0]	WinNormCoef_o,
-	output		[WindPNumWidth-1:0]		WinPointsNum_o
+	output		[WindPNumWidth-1:0]		WinPointsNum_o,
+	output		[WindPNumWidth-1:0]		AverageNoiseLvl_o
 );
 //================================================================================
 //  REG/WIRE
@@ -40,13 +41,15 @@ module WinParameters
 	reg [WindPhIncWidth-1:0]	windPhInc;
 	reg	[WindNormCoefWidth-1:0]	winNormCoef;
 	reg	[WindPNumWidth-1:0]		winPointsNum;
+	reg	[WindPNumWidth-1:0]		averageNoiseLvl;
 //================================================================================
 //  ASSIGNMENTS
 //================================================================================	
-	assign	WinPhInc_o 		=	windPhInc;
-	assign	WinPhIncStart_o =	32'h80000000;
-	assign	WinNormCoef_o	=	winNormCoef;
-	assign	WinPointsNum_o	=	winPointsNum;
+	assign	WinPhInc_o 			=	windPhInc;
+	assign	WinPhIncStart_o		 =	32'h80000000;
+	assign	WinNormCoef_o		=	winNormCoef;
+	assign	WinPointsNum_o		=	winPointsNum;
+	assign	AverageNoiseLvl_o	=	averageNoiseLvl;
 //================================================================================
 //  CODING
 //================================================================================	
@@ -57,201 +60,241 @@ always	@	(posedge	Clk_i)	begin
 						windPhInc		<=	32'h2a8;
 						winNormCoef		<=	32'h3342b45d;
 						winPointsNum	<=	32'h30291a0;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h1 : begin//	1.5	Hz
 						windPhInc		<=	32'h3fc;
 						winNormCoef		<=	32'h3391cf5e;
 						winPointsNum	<=	32'h201b66a;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h2 : begin//	2	Hz
 						windPhInc		<=	32'h550;
 						winNormCoef		<=	32'h33c269d2;
 						winPointsNum	<=	32'h18148d0;
+						averageNoiseLvl	<=	32'h0;
 					 end
 			8'h3 : begin//	3	Hz
 						windPhInc		<=	32'h7f9;
 						winNormCoef		<=	32'h3411ccc1;
 						winPointsNum	<=	32'h100db35;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h4 : begin//	5	Hz
 						windPhInc		<=	32'hd49;
 						winNormCoef		<=	32'h347301aa;
 						winPointsNum	<=	32'h9a1d20;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h5 : begin//	7	Hz
 						windPhInc		<=	32'h129a;
 						winNormCoef		<=	32'h34aa19fd;
 						winPointsNum	<=	32'h6e14cd;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h10 : begin//	10	Hz
 						windPhInc		<=	32'h1a93;
 						winNormCoef		<=	32'h34f3005d;
 						winPointsNum	<=	32'h4d0e90;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h11 : begin//	15	Hz
 						windPhInc		<=	32'h27dd;
 						winNormCoef		<=	32'h35363ff7;
 						winPointsNum	<=	32'h335f0a;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h12 : begin//	20	Hz
 						windPhInc		<=	32'h3527;
 						winNormCoef		<=	32'h3572ffba;
 						winPointsNum	<=	32'h268748;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h13 : begin//	30	Hz
 						windPhInc		<=	32'h4fbb;
 						winNormCoef		<=	32'h35b63fa7;
 						winPointsNum	<=	32'h19af85;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h14 : begin//	50	Hz
 						windPhInc		<=	32'h84e3;
 						winNormCoef		<=	32'h3617df9c;
 						winPointsNum	<=	32'hf6950;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h15 : begin//	70	Hz
 						windPhInc		<=	32'hba0b;
 						winNormCoef		<=	32'h36549f77;
 						winPointsNum	<=	32'hb0214;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h20 : begin//	100	Hz
 						windPhInc		<=	32'h109c7;
 						winNormCoef		<=	32'h3697df93;
 						winPointsNum	<=	32'h7b4a8;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h21 : begin//	150	Hz
 						windPhInc		<=	32'h18eab;
 						winNormCoef		<=	32'h36e3cf84;
 						winPointsNum	<=	32'h5231a;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h22 : begin//	200	Hz
 						windPhInc		<=	32'h21390;
 						winNormCoef		<=	32'h3717df94;
 						winPointsNum	<=	32'h3da54;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h23 : begin//	300	Hz 
 						windPhInc		<=	32'h31d5b;
 						winNormCoef		<=	32'h3763cf83;
 						winPointsNum	<=	32'h2918d;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h24 : begin//	500	Hz
 						windPhInc		<=	32'h530e3;
 						winNormCoef		<=	32'h37bdd7e8;
 						winPointsNum	<=	32'h18a88;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h25 : begin//	700	Hz
 						windPhInc		<=	32'h7449e;
 						winNormCoef		<=	32'h3804e417;
 						winPointsNum	<=	32'h119ce;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h30 : begin//	1	kHz
 						windPhInc		<=	32'ha61fc;
 						winNormCoef		<=	32'h383dd7e8;
 						winPointsNum	<=	32'hc544;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h31 : begin//	1.5	kHz
 						windPhInc		<=	32'hf92fb;
 						winNormCoef		<=	32'h388e6329;
 						winPointsNum	<=	32'h8382;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h32 : begin//	2	kHz
 						windPhInc		<=	32'h14c3f9;
 						winNormCoef		<=	32'h38bdd900;
 						winPointsNum	<=	32'h62a2;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h33 : begin//	3	kHz
 						windPhInc		<=	32'h1f25f6;
 						winNormCoef		<=	32'h390e6466;
 						winPointsNum	<=	32'h41c1;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h34 : begin//	5	kHz
 						windPhInc		<=	32'h33ee26;
 						winNormCoef		<=	32'h396d509f;
 						winPointsNum	<=	32'h2774;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h35 : begin//	7	kHz
 						windPhInc		<=	32'h48bca9;
 						winNormCoef		<=	32'h39a61fcc;
 						winPointsNum	<=	32'h1c2e;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h40 : begin//	10	kHz
 						windPhInc		<=	32'h67dc4c;
 						winNormCoef		<=	32'h39ed577f;
 						winPointsNum	<=	32'h13ba;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h41 : begin//	15	kHz
 						windPhInc		<=	32'h9c09c0;
 						winNormCoef		<=	32'h3a3206c8;
 						winPointsNum	<=	32'hd26;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h42 : begin//	20	kHz
 						windPhInc 		<=	32'hd00d00;
 						winNormCoef		<=	32'h3a6d577f;
 						winPointsNum	<=	32'h9dd;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h43 : begin//	30	kHz
 						windPhInc		<=	32'h1381381;
 						winNormCoef		<=	32'h3ab1e1ce;
 						winPointsNum	<=	32'h693;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h44 : begin//	50	kHz
 						windPhInc		<=	32'h2082082;
 						winNormCoef		<=	32'h3b1444c4;
 						winPointsNum	<=	32'h3f2;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h45 : begin//	70	KHz
 						windPhInc		<=	32'h2d82d82;
 						winNormCoef		<=	32'h3b4fb73a;
 						winPointsNum	<=	32'h2d1;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h50 : begin//	100	KHz
 						windPhInc		<=	32'h4104104;
 						winNormCoef		<=	32'h3b944cd1;
 						winPointsNum	<=	32'h1f9;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h51 : begin//	150	KHz
 						windPhInc 		<=	32'h6186186;
 						winNormCoef		<=	32'h3bdeed44;
 						winPointsNum	<=	32'h150;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h52 : begin//	200	KHz
 						windPhInc		<=	32'h8421084;
 						winNormCoef		<=	32'h3c1442d8;
 						winPointsNum	<=	32'hfc;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h53 : begin//	300	KHz
 						windPhInc 		<=	32'hc30c30c;
 						winNormCoef		<=	32'h3c5ed0fd;
 						winPointsNum	<=	32'ha8;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h54 : begin//	500	KHz
 						windPhInc 		<=	32'h1c71c71;
 						winNormCoef		<=	32'h3ce38e38;
 						winPointsNum	<=	32'h90;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h55 : begin//	700	KHz
 						windPhInc		<=	32'h2828282;
 						winNormCoef		<=	32'h3d20a0a0;
 						winPointsNum	<=	32'h66;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h60 : begin//	1	MHz
 						windPhInc 		<=	32'h38e38e3;
 						winNormCoef		<=	32'h3d638e39;
 						winPointsNum	<=	32'h48;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h61 : begin//	1.5	MHz
 						windPhInc 		<=	32'h5555555;
 						winNormCoef		<=	32'h3daaaaab;
 						winPointsNum	<=	32'h30;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h62 : begin//	2	MHz
 						windPhInc 		<=	32'h71c71c7;
 						winNormCoef		<=	32'h3de38e39;
 						winPointsNum	<=	32'h24;
+						averageNoiseLvl	<=	32'h0;
 					end	
 			8'h63 : begin
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3e124925;
 						winPointsNum	<=	32'he;
+						averageNoiseLvl	<=	32'h3b83126f;
 					end	
 			// 8'h64 : begin//	5	MHz
 						// windPhInc 		<=	32'h12492492;
@@ -285,28 +328,33 @@ always	@	(posedge	Clk_i)	begin
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3e800000;
 						winPointsNum	<=	32'h8;
+						averageNoiseLvl	<=	32'h3bc49ba6;
 					end	
 			8'h70 : begin
 						// параметры для калибровки - прямоугольное окно 65536 отсчетов	2^16
 						windPhInc 		<=	32'h1FFFFFFF;
 						winNormCoef		<=	32'h6D13892;
 						winPointsNum	<=	32'h10000;
+						averageNoiseLvl	<=	32'h0;
 					end	
 			8'h71 : begin							
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3eaaaaab;
 						winPointsNum	<=	32'h6;
+						averageNoiseLvl	<=	32'h3c03126f;
 					end	
 			8'h72 : begin	
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3f000000;
 						winPointsNum	<=	32'h4;
+						averageNoiseLvl	<=	32'h3a83126f;
 					end
 					
 			default: begin	
 						windPhInc 		<=	32'h15555555;
 						winNormCoef		<=	32'h3e86cfea;
 						winPointsNum	<=	32'hc;
+						averageNoiseLvl	<=	32'h0;
 					 end					 
 		endcase
 	end	

+ 8 - 2
S5443_M/S5443.srcs/sources_1/new/Math/MyIntToFp.v

@@ -25,7 +25,7 @@ module	MyIntToFp
 	parameter	ManWidth	=	23,
 	parameter	FracWidth	=	17
 )
-(Clk_i,Rst_i,InData_i,InDataVal_i,OutData_o,OutDataVal_o);
+(Clk_i,Rst_i,InData_i,AverageNoizeLvl_i,InDataVal_i,OutData_o,OutDataVal_o);
 
 	input	Clk_i;
 	input	Rst_i;
@@ -35,6 +35,7 @@ module	MyIntToFp
 	localparam	OutWidth	=	1+ExpWidth+ManWidth;	//sign+ExpWidth+ManWidth
 	localparam	ExpConst	=	(2**(ExpWidth-1))-1;
 	
+	input		[OutWidth-1:0]	AverageNoizeLvl_i;
 	output	reg	[OutWidth-1:0]	OutData_o;
 	output	reg	OutDataVal_o;
 	
@@ -115,7 +116,12 @@ always	@(posedge	Clk_i	or	posedge	Rst_i)	begin
 		OutDataVal_o	<=	1'b0;
 	end	else	begin
 		if	(outValR)	begin
-			OutData_o	<=	fpOut;
+			if	(fpOut!=0)	begin
+				OutData_o	<=	fpOut;
+			end	else	begin
+				// OutData_o	<=	32'h3a83126f;
+				OutData_o	<=	AverageNoizeLvl_i;
+			end
 		end
 		OutDataVal_o	<=	outValR;
 	end

+ 54 - 7
S5443_M/S5443.srcs/sources_1/new/MeasDataFifo/FifoController.v

@@ -1,12 +1,39 @@
 `timescale 1ns / 1ps
+
+//////////////////////////////////////////////////////////////////////////////////
+// Company: 
+// Engineer: 
+// 
+// Create Date:    14:12:30 06/03/2020 
+// Design Name: 
+// Module Name:    WinParameters 
+// Project Name: 
+// Target Devices: 
+// Tool versions: 
+// Description: 
+//
+// Dependencies: kek
+//
+// Revision: 
+// Revision 0.01 - File Created
+// Additional Comments: 
+//
+//
+//////////////////////////////////////////////////////////////////////////////////
 	
 module FifoController	
+#(
+	parameter	TxInPack		=	200,		
+	parameter	WorkTimeCycles	=	404000
+	// parameter	WorkTimeCycles	=	20000
+)
 (
 	input	Clk_i, 
-	input	ClkPpiOut_i, 
 	input	Rst_i,	
 	input	PpiBusy_i,	
+	input	DspReadyForRx_i,
 	input	MeasDataVal_i,
+	input	[32-1:0]	MeasNum_i,
 	input	FullFlag_i,
 	input	EmptyFlag_i,
 	
@@ -19,20 +46,36 @@ module FifoController
 //  REG/WIRE
 //================================================================================
 	reg	rdEn;
+	reg	[13:0]	wrCnt;
 //================================================================================
 //  ASSIGNMENTS
 //================================================================================
 	assign	MeasDataVal_o	=	rdEn&(!PpiBusy_i);
 	assign	RdEn_o			=	rdEn&(!PpiBusy_i);
+	
 //================================================================================
 //  CODING
 //================================================================================		
 
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
-		if	(MeasDataVal_i)	begin
-			if	(!FullFlag_i)	begin
-				WrEn_o	<=	1'b1;
+		if	(WrEn_o)	begin
+			wrCnt	<=	wrCnt+14'd1;
+		end	
+	end	else	begin
+		wrCnt	<=	14'd0;
+	end
+end
+
+always	@(posedge	Clk_i)	begin
+	if	(!Rst_i)	begin
+		if	(!FullFlag_i)	begin
+			if	(MeasDataVal_i)	begin
+				if	(wrCnt!=MeasNum_i)	begin
+					WrEn_o	<=	1'b1;
+				end	else	begin
+					WrEn_o	<=	1'b0;
+				end
 			end	else	begin
 				WrEn_o	<=	1'b0;
 			end
@@ -46,9 +89,13 @@ end
 
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
-		if	(!PpiBusy_i)	begin
-			if	(!EmptyFlag_i)	begin
-				rdEn	<=	1'b1;
+		if	(!DspReadyForRx_i)	begin
+			if	(!PpiBusy_i)	begin
+				if	(!EmptyFlag_i)	begin
+					rdEn	<=	1'b1;
+				end	else	begin
+					rdEn	<=	1'b0;
+				end
 			end	else	begin
 				rdEn	<=	1'b0;
 			end

+ 52 - 17
S5443_M/S5443.srcs/sources_1/new/MeasDataFifo/MeasDataFifoWrapper.v

@@ -1,4 +1,4 @@
-`timescale 1ns / 1ps
+`timescale 1ns / 1ns
 	
 module MeasDataFifoWrapper	
 #(	
@@ -7,9 +7,11 @@ module MeasDataFifoWrapper
 )
 (
 	input	Clk_i, 
-	input	ClkPpiOut_i, 
 	input	Rst_i,	
 	input	PpiBusy_i,	
+	input	StartMeasDsp_i,
+	input	DspReadyForRx_i,
+	input	[DataWidth-1:0]	MeasNum_i,
 	
 	input	[DataWidth*(ChNum*2)-1:0]	MeasDataBus_i,
 	input	MeasDataVal_i,
@@ -25,23 +27,54 @@ module MeasDataFifoWrapper
 	wire	emptyFlag;
 	wire	wrEn;
 	wire	rdEn;
-	wire	fifoRst;
 
+	reg		startMeasDspReg;
+	wire	startMeasDspNeg;
+	wire	startMeasDspPos;
+	
+	reg		ppiBusyReg;
+	
+	reg		rstFromDsp;
+	wire	trueRstFromDsp;
+	
+	integer	i;
+	reg	[0:0]	rstFromDspPipe	[49:0];
+	
+	reg		[13:0]	rdCnt;
+	wire	rstOr;
+	
 //================================================================================
 //  ASSIGNMENTS
 //================================================================================
-	assign	MeasDataVal_o	=	rdEn;	
+	assign	rstOr	=	Rst_i|startMeasDspPos;
+	assign	MeasDataVal_o		=	rdEn;
+	assign	startMeasDspPos		=	(StartMeasDsp_i&(!startMeasDspReg));
 //================================================================================
 //  CODING
 //================================================================================		
 
-	
+always	@(posedge	Clk_i)	begin
+	if	(!rstOr)	begin
+		if	(rdEn)	begin
+			rdCnt	<=	rdCnt+14'd1;
+		end	
+	end	else	begin
+		rdCnt	<=	14'd0;
+	end
+end
+
+always	@(posedge	Clk_i)	begin
+	if	(!Rst_i)	begin
+		startMeasDspReg	<=	StartMeasDsp_i;
+	end	else	begin
+		startMeasDspReg	<=	1'b0;
+	end
+end
+
 MeasDataFifo	MeasDataFifoInst
 (
 	.clk	(Clk_i),
-	// .srst	(fifoRst),
-	// .srst	(Rst_i|fifoRst),
-	.srst	(Rst_i),
+	.srst	(Rst_i|startMeasDspPos),
 	.din	(MeasDataBus_i),
 	.wr_en	(wrEn),
 	.rd_en	(rdEn),
@@ -53,16 +86,18 @@ MeasDataFifo	MeasDataFifoInst
   
 FifoController	FifoControllerInst
 (
-	.Clk_i			(Clk_i), 
-	.Rst_i			(Rst_i),	
-	.PpiBusy_i		(PpiBusy_i),	
-	.MeasDataVal_i	(MeasDataVal_i),
-	.FullFlag_i		(fullFlag),
-	.EmptyFlag_i	(emptyFlag),
+	.Clk_i				(Clk_i), 
+	.Rst_i				(Rst_i|startMeasDspPos),	
+	.DspReadyForRx_i	(DspReadyForRx_i),	
+	.PpiBusy_i			(PpiBusy_i),	
+	.MeasNum_i			(MeasNum_i),	
+	.MeasDataVal_i		(MeasDataVal_i),
+	.FullFlag_i			(fullFlag),
+	.EmptyFlag_i		(emptyFlag),
 	
-	.MeasDataVal_o	(),
-	.WrEn_o			(wrEn),
-	.RdEn_o			(rdEn)
+	.MeasDataVal_o		(),
+	.WrEn_o				(wrEn),
+	.RdEn_o				(rdEn)
 );
 
 endmodule

+ 4 - 4
S5443_M/S5443.srcs/sources_1/new/PulseMeas/MeasStartEventGen.v

@@ -65,17 +65,17 @@ module	MeasStartEventGen
 		end
 	end
 	
-	always	@(*)	begin
+	always	@(posedge	Clk_i)	begin
 		if	(!Rst_i)	begin
 			if	(StartMeasDsp_i)	begin
 				if	(measTrigPos)	begin
-					startMeasEvent	=	1'b1;
+					startMeasEvent	<=	1'b1;
 				end
 			end	else	begin
-				startMeasEvent	=	0;
+				startMeasEvent	<=	0;
 			end
 		end	else	begin
-			startMeasEvent	=	0;
+			startMeasEvent	<=	0;
 		end
 	end
 	

+ 0 - 61
S5443_M/S5443.srcs/sources_1/new/PulseMeas/PulseEventGen.v

@@ -1,61 +0,0 @@
-`timescale 1ns / 1ps
-//////////////////////////////////////////////////////////////////////////////////
-// Company: 
-// Engineer: 
-// 
-// Create Date:    10:02:35 04/20/2020 
-// Design Name: 
-// Module Name:    mult_module 
-// Project Name: 
-// Target Devices: 
-// Tool versions: 
-// Description: 
-//
-// Dependencies: 
-//
-// Revision: 
-// Revision 0.01 - File Created
-// Additional Comments: 
-//
-//////////////////////////////////////////////////////////////////////////////////
-module	MeasStartEventGen	
-#(	
-	parameter	CmdDataRegWith	=	24
-)
-(
-	input	Rst_i,
-	input	Clk_i,
-	
-	input	MeasModeReg_i,
-	input	PriRegH_i,
-	input	PriRegL_i,
-	
-	output	StartPulse_o
-);	
-
-//================================================================================
-//  LOCALPARAM
-
-//================================================================================
-	reg	startPulse;
-	
-//================================================================================
-//  ASSIGNMENTS
-	assign	StartPulse_o	=	startPulse;
-//================================================================================
-//  CODING
-
-
-
-endmodule
-
-
-
-
-
-
-
-
-
-
-

+ 23 - 17
S5443_M/S5443.srcs/sources_1/new/PulseMeas/PulseGenV2.v

@@ -18,7 +18,7 @@
 // Additional Comments: 
 //
 //////////////////////////////////////////////////////////////////////////////////
-module	PulseGenV2	
+module	PulseGen	
 #(	
 	parameter	CmdRegWidth	=	32
 )
@@ -70,7 +70,7 @@ module	PulseGenV2
 	reg	[1:0]	nextState;
 	
 	reg		pulseDone;	
-	wire	delayDone	=	(currState	==	PULSE)?	delayCnt==currDelValue-1:1'b0;	
+	wire	delayDone	=	(currState	==	DELAY)?	delayCnt==currDelValue-1:1'b0;	
 	
 	wire	zeroDelay	=	(P1Del_i==0);
 	
@@ -115,7 +115,7 @@ always	@(posedge	Clk_i)	begin
 				delayCnt	<=	0;
 			end
 		end	else	begin
-			if	(currState	==	PULSE)	begin
+			if	(currState	==	DELAY)	begin
 				delayCnt	<=	delayCnt+1;
 			end	else	begin
 				delayCnt	<=	0;
@@ -128,7 +128,7 @@ end
 
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
-		if	(pulse)	begin
+		if	(currState	==	PULSE)	begin
 			widthCnt	<=	widthCnt+1;
 		end	else	begin
 			widthCnt	<=	0;
@@ -141,12 +141,8 @@ end
 always	@(*)	begin
 	if	(!Rst_i)	begin
 		if	(currState	==	PULSE)	begin
-			if	(delayDone)	begin
-				if	(widthCnt==currWidthValue-1)	begin
-					pulseDone	=	1'b1;
-				end	else	begin
-					pulseDone	=	1'b0;
-				end
+			if	(widthCnt==currWidthValue-1)	begin
+				pulseDone	=	1'b1;
 			end	else	begin
 				pulseDone	=	1'b0;
 			end
@@ -247,16 +243,28 @@ always	@(*)	begin
 	case(currState)
 	IDLE	:	begin
 					if (enPulseEn)	begin
+						if	(zeroDelay)	begin
+							nextState = PULSE;
+						end	else begin
+							nextState = DELAY;
+						end
+					end	else	begin
+						nextState = IDLE;
+					end
+				end
+				
+	DELAY	:	begin
+					if	(delayDone)	begin
 						nextState = PULSE;
 					end	else begin
-						nextState = IDLE;
+						nextState = DELAY;
 					end
 				end
 
 	PULSE	:	begin
 					if	(pulseDone)	begin
 						if	(!patternDone)	begin
-							nextState  = PULSE;
+							nextState  = DELAY;
 						end	else begin
 							nextState  = IDLE;
 						end
@@ -274,13 +282,11 @@ always	@(*)	begin
 				IDLE:	begin
 							pulse	=	1'b0;
 						end
-				PULSE:	begin
-						if	(delayDone)	begin
-							pulse	=	1'b1;
-						end	
-						if	(pulseDone)	begin
+				DELAY:	begin
 							pulse	=	1'b0;
 						end
+				PULSE:	begin
+							pulse	=	1'b1;
 						end
 				default:begin
 							pulse	=	1'b0;

+ 50 - 36
S5443_M/S5443.srcs/sources_1/new/S5443Top.v

@@ -112,7 +112,7 @@ module	S5443Top
 	
 	//fpga-dsp signals
 	input	StartMeas_i,		//"high"- start meas, "low"-stop meas
-	output	StartMeas_o,
+	output	StartMeasEvent_o,
 	output	EndMeas_o,
 	
 	output	TimersClk_o,
@@ -137,7 +137,9 @@ module	S5443Top
 	output	Mod_o,
 	
 	//gain lines
-	inout	SensEnM_io,
+	input	DspReadyForRx_i,
+	output	DspReadyForRxToFpgaS_o,
+	
 	output	StartMeasDsp_o,
 	output	[ChNum-1:0]	AmpEn_o,	//	0-adc1ChA 1-adc1ChB 2-adc2ChA 3-adc2ChB
 	
@@ -154,6 +156,8 @@ module	S5443Top
 	wire	[AdcDataWidth-1:0]	adc2ChT2Data;
 	
 	reg		startMeasSync;
+	reg		startMeasSyncR;
+	reg		startMeasSyncRR;
 	wire	startMeasEvent;
 	wire	intTrig1;
 	reg		startMeasEventReg;
@@ -255,10 +259,6 @@ module	S5443Top
 	wire	[ChNum-1:0]	ampEnNewStates;
 	wire	[ChNum-1:0]	sensEn;
 	
-	// wire	sensEnAll	=	(gainCtrl[0])?	((|sensEn)|sensEnReg):1'b0;
-	reg		sensEnReg;
-	wire	sensEnNeg	=	(sensEnReg&!SensEnM_io);
-	
 	wire	[ChNum-1:0]	gainManual;
 	wire	[ChNum-1:0]	gainAutoEn;
 	
@@ -396,6 +396,10 @@ module	S5443Top
 	wire	trigFromDspEvent;
 	wire	oscWind;
 	wire	oscDataRdFlag;
+	
+	reg		dspReadyForRxReg;
+	reg		dspReadyForRxRegR;
+	reg		dspReadyForRxRegRR;
 //================================================================================
 //  assignments
 //================================================================================	
@@ -515,12 +519,10 @@ module	S5443Top
 	assign	Adc1InitCs_o	=	adc0InitCs;
 	assign	Adc2InitCs_o	=	adc1InitCs;
 	assign	AdcInitRst_o	=	adcCtrl[0];
-	
-	// assign	Led_o	=	ledReg	&(adc1ImT1|adc1ReT1|adc1ImR1|adc1ReR1|adc2ImT2|adc2ReT2|adc2ImR2|adc2ReR2);
-	// assign	Led_o	=	ledReg	|(|ampEnNewStates);
+
 	assign	Led_o	=	ledReg	|(|ampEnNewStates);
 	
-	assign	StartMeas_o	=	startMeasEvent;
+	assign	StartMeasEvent_o	=	startMeasEvent;
 	
 	assign	EndMeas_o	=	stopMeas|stopMeasR; //stretching pulse for 1 more clk period
 	
@@ -554,14 +556,16 @@ module	S5443Top
 	assign	Trig6to1Dir_o	[5]	=	!measCtrl[21];
 	
 	assign	Trig6to1_io	[0]	=	(measCtrl[16])	?	1'bz:extPortsMuxedOut[0];	//1 - in, 0 - out
+	// assign	Trig6to1_io	[0]	=	(measCtrl[16])	?	1'bz:LpOutFs_o;	//1 - in, 0 - out
 	assign	Trig6to1_io	[1]	=	(measCtrl[17])	?	1'bz:extPortsMuxedOut[1];	//1 - in, 0 - out
+	// assign	Trig6to1_io	[1]	=	(measCtrl[17])	?	1'bz:LpOutFs_o;	//1 - in, 0 - out
 	assign	Trig6to1_io	[2]	=	(measCtrl[18])	?	1'bz:extPortsMuxedOut[2];	//1 - in, 0 - out
 	assign	Trig6to1_io	[3]	=	(measCtrl[19])	?	1'bz:extPortsMuxedOut[3];	//1 - in, 0 - out
 	assign	Trig6to1_io	[4]	=	(measCtrl[20])	?	1'bz:extPortsMuxedOut[4];	//1 - in, 0 - out
 	assign	Trig6to1_io	[5]	=	(measCtrl[21])	?	1'bz:extPortsMuxedOut[5];	//1 - in, 0 - out
-
-	assign	SensEnM_io	=	(|sensEn)?	1'b0:1'bz;
-	assign	StartMeasDsp_o	=	StartMeas_i;
+	
+	assign	DspReadyForRxToFpgaS_o	=	dspReadyForRxRegR;
+	assign	StartMeasDsp_o	=	startMeasSyncR;
 //================================================================================
 //  CODING
 //================================================================================
@@ -571,8 +575,24 @@ always	@(posedge	gclk)	begin	//stretching pulse
 	stopMeasR	<=	stopMeas;
 end
 
-always	@(posedge	gclk)	begin	//stretching pulse
-	sensEnReg	<=	SensEnM_io;
+always	@(posedge	gclk)	begin
+	if	(!initRst)	begin
+		dspReadyForRxReg	<=	DspReadyForRx_i;
+		dspReadyForRxRegR	<=	dspReadyForRxReg;
+		dspReadyForRxRegRR	<=	dspReadyForRxRegR;
+		
+		startMeasSync	<=	StartMeas_i;
+		startMeasSyncR	<=	startMeasSync;
+		startMeasSyncRR	<=	startMeasSyncR;
+	end	else	begin
+		dspReadyForRxReg	<=	1'b0;
+		dspReadyForRxRegR	<=	1'b0;
+		dspReadyForRxRegRR	<=	1'b0;
+		
+		startMeasSync	<=	1'b0;
+		startMeasSyncR	<=	1'b0;
+		startMeasSyncRR	<=	1'b0;
+	end
 end
 
 //--------------------------------------------------------------------------------
@@ -663,6 +683,8 @@ ExternalDspInterface
 	.Clk_i				(gclk),
 	.Rst_i				(initRst),
 	.OscWind_i			(oscWind),
+	.StartMeasDsp_i		(startMeasSyncRR),
+	.DspReadyForRx_i	(dspReadyForRxRegRR),
 	.MeasNum_i			({measNum2[7:0],measNum1}),
 	
 	.Mosi_i				(Mosi_i),
@@ -677,15 +699,15 @@ ExternalDspInterface
 	
 	.OscDataRdFlag_o	(oscDataRdFlag),
 	
-	.Adc1ChT1Data_i		(adc1ChT1Data),	
-	.Adc1ChR1Data_i		(adc1ChR1Data),	
-	.Adc2ChR2Data_i		(adc2ChT2Data),	
-	.Adc2ChT2Data_i		(adc2ChR2Data),	
+	// .Adc1ChT1Data_i		(adc1ChT1Data),	
+	// .Adc1ChR1Data_i		(adc1ChR1Data),	
+	// .Adc2ChR2Data_i		(adc2ChT2Data),	
+	// .Adc2ChT2Data_i		(adc2ChR2Data),	
 
-	// .Adc1ChT1Data_i		(AdcData_i),	
-	// .Adc1ChR1Data_i		(AdcData_i),	
-	// .Adc2ChR2Data_i		(AdcData_i),	
-	// .Adc2ChT2Data_i		(AdcData_i),	
+	.Adc1ChT1Data_i		(AdcData_i),	
+	.Adc1ChR1Data_i		(AdcData_i),	
+	.Adc2ChR2Data_i		(AdcData_i),	
+	.Adc2ChT2Data_i		(AdcData_i),	
 	
 	// .Adc1ChT1Data_i		(14'h1fff),	
 	// .Adc1ChR1Data_i		(14'h257f),	
@@ -726,14 +748,6 @@ ExternalDspInterface
 //--------------------------------------------------------------------------------
 //	Internal DSP calculation module
 //--------------------------------------------------------------------------------
-always	@(posedge	gclk)	begin
-	if	(!initRst)	begin
-		startMeasSync	<=	StartMeas_i;
-	end	else	begin
-		startMeasSync	<=	1'b0;
-	end
-end
-
 NcoRstGen	NcoRstGenInst
 (
 	.Clk_i				(gclk),
@@ -773,7 +787,7 @@ InternalDsp
 	.GatingPulse_i		(gatingPulse),
 	
 	.StartMeas_i		(measStart),
-	.StartMeasDsp_i		(startMeasSync),
+	.StartMeasDsp_i		(startMeasSyncRR),
 	.OscDataRdFlag_i	(oscDataRdFlag),
 	
 	.MeasNum_i			({measNum2[7:0],measNum1}),
@@ -1116,7 +1130,7 @@ MeasTrigMux
 	.MuxCtrl_i		(muxCtrl3[14:10]),
 
 	.DspTrigOut_i	(1'b0),
-	.DspStartCmd_i	(startMeasSync),
+	.DspStartCmd_i	(startMeasSyncRR),
 	.IntTrig_i		(1'b0),
 	.IntTrig2_i		(1'b0),
 	.PulseBus_i		(7'b0),
@@ -1134,7 +1148,7 @@ MeasStartEventGen	MeasStartEventGenInst
 	.Clk_i				(gclk),
 	
 	.MeasTrig_i			(measTrig),
-	.StartMeasDsp_i		(startMeasSync),
+	.StartMeasDsp_i		(startMeasSyncRR),
 	
 	.StartMeasEvent_o	(startMeasEvent),
 	.InitTrig_o			()
@@ -1288,7 +1302,7 @@ ExtPortsMux
 	.MuxCtrl_i		(extTrigMuxCtrlArray[l]),
 
 	.DspTrigOut_i	(DspTrigOut_i),
-	.DspStartCmd_i	(startMeasSync), //tut nichego nebilo 14.02.2023 zamknul suda startMeasSync
+	.DspStartCmd_i	(startMeasSyncRR), //tut nichego nebilo 14.02.2023 zamknul suda startMeasSync
 	.IntTrig_i		(intTrig1),
 	.IntTrig2_i		(intTrig2),
 	.PulseBus_i		(pulseBus),
@@ -1392,7 +1406,7 @@ SampleStrobeMux
 
 	.DspTrigOut_i	(1'b0),
 	.DspStartCmd_i	(1'b0),
-	.IntTrig_i		(1'b0),
+	.IntTrig_i		(intTrig1),
 	.IntTrig2_i		(1'b0),
 	.PulseBus_i		(pulseBus),
 	.ExtPortsBus_i	(Trig6to1_io),

+ 10 - 10
S5443_M/S5443.srcs/sources_1/new/S5443TopPulseProfileTb.v

@@ -325,8 +325,7 @@ S5443Top MasterFpga
 	
 	//fpga-dsp signals
 	.StartMeas_i		(startCalcCmdReg),
-	// .StartMeas_i		(1'b0),
-	.StartMeas_o		(startMeasS),
+	.StartMeasEvent_o	(startMeasS),
 	.EndMeas_o			(endMeas),
 	.TimersClk_o		(),
 	
@@ -347,10 +346,11 @@ S5443Top MasterFpga
 	.Mod_o				(),	
 	
 	//gain lines
-	.SensEnM_io			(sensEn),
-	.AmpEn_o			(),	//	0-adc1ChA 1-adc1ChB 2-adc2ChA 3-adc2ChB
-	.AdcData_i			(sin_value[17-:14])
-	// .AdcData_i			(Data_i)
+	.DspReadyForRx_i		(1'b0),
+	.DspReadyForRxToFpgaS_o	(),
+	.AmpEn_o				(),	//	0-adc1ChA 1-adc1ChB 2-adc2ChA 3-adc2ChB
+	// .AdcData_i				(sin_value[17-:14])
+	.AdcData_i			(Data_i)
 );
 
 parameter	IDLE	=	2'h0;
@@ -546,9 +546,9 @@ always	@(posedge	Clk41)	begin
 			DspSpiData		<=	MuxCtrl3RegCmd;
 		end	else	if	(cmdCnt	==	68)	begin
 			DspSpiData		<=	AdcCtrl;
-		end	else	if	(cmdCnt	==	200)	begin
-			DspSpiData		<=	AdcCtrl;
-		end	else	if	(cmdCnt	==	250)	begin
+		end	else	if	(cmdCnt	==	99)	begin
+			DspSpiData		<=	{8'h58,24'd100};
+		end	else	if	(cmdCnt	==	100)	begin
 			DspSpiData		<=	MeasCmdFft;
 		end else	begin
 			DspSpiData	<=	32'hfffffff;
@@ -633,7 +633,7 @@ end
 	real signal;
 	always @ (posedge Clk50)
 		begin
-			if (tb_cnt >= 11200)
+			if (tb_cnt >= 4505)
 				begin
 					phase = phase + phaseInc;
 					phaseInc <= phaseInc + 0.0005;

+ 3 - 24
S5443_S/S5443.srcs/constrs_1/new/S5443Top.xdc

@@ -144,8 +144,8 @@ set_property IOSTANDARD LVCMOS25 [get_ports {AmpEn_o[2]}]
 set_property PACKAGE_PIN B15 [get_ports {AmpEn_o[3]}]
 set_property IOSTANDARD LVCMOS25 [get_ports {AmpEn_o[3]}]
 
-set_property PACKAGE_PIN N15 [get_ports SensEnS_io]
-set_property IOSTANDARD LVCMOS33 [get_ports SensEnS_io]
+set_property PACKAGE_PIN N15 [get_ports DspReadyForRx_i]
+set_property IOSTANDARD LVCMOS33 [get_ports DspReadyForRx_i]
 
 set_property PACKAGE_PIN L15 [get_ports StartMeasDsp_i]
 set_property IOSTANDARD LVCMOS33 [get_ports StartMeasDsp_i]
@@ -170,25 +170,4 @@ set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets Ss_i_IBUF]
 
 
 
-create_debug_core u_ila_0 ila
-set_property ALL_PROBE_SAME_MU true [get_debug_cores u_ila_0]
-set_property ALL_PROBE_SAME_MU_CNT 1 [get_debug_cores u_ila_0]
-set_property C_ADV_TRIGGER false [get_debug_cores u_ila_0]
-set_property C_DATA_DEPTH 1024 [get_debug_cores u_ila_0]
-set_property C_EN_STRG_QUAL false [get_debug_cores u_ila_0]
-set_property C_INPUT_PIPE_STAGES 0 [get_debug_cores u_ila_0]
-set_property C_TRIGIN_EN false [get_debug_cores u_ila_0]
-set_property C_TRIGOUT_EN false [get_debug_cores u_ila_0]
-set_property port_width 1 [get_debug_ports u_ila_0/clk]
-connect_debug_port u_ila_0/clk [get_nets [list gclk_BUFG]]
-set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe0]
-set_property port_width 14 [get_debug_ports u_ila_0/probe0]
-connect_debug_port u_ila_0/probe0 [get_nets [list {adc2ChR2Data[0]} {adc2ChR2Data[1]} {adc2ChR2Data[2]} {adc2ChR2Data[3]} {adc2ChR2Data[4]} {adc2ChR2Data[5]} {adc2ChR2Data[6]} {adc2ChR2Data[7]} {adc2ChR2Data[8]} {adc2ChR2Data[9]} {adc2ChR2Data[10]} {adc2ChR2Data[11]} {adc2ChR2Data[12]} {adc2ChR2Data[13]}]]
-create_debug_port u_ila_0 probe
-set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe1]
-set_property port_width 14 [get_debug_ports u_ila_0/probe1]
-connect_debug_port u_ila_0/probe1 [get_nets [list {adc1ChR1Data[0]} {adc1ChR1Data[1]} {adc1ChR1Data[2]} {adc1ChR1Data[3]} {adc1ChR1Data[4]} {adc1ChR1Data[5]} {adc1ChR1Data[6]} {adc1ChR1Data[7]} {adc1ChR1Data[8]} {adc1ChR1Data[9]} {adc1ChR1Data[10]} {adc1ChR1Data[11]} {adc1ChR1Data[12]} {adc1ChR1Data[13]}]]
-set_property C_CLK_INPUT_FREQ_HZ 300000000 [get_debug_cores dbg_hub]
-set_property C_ENABLE_CLK_DIVIDER false [get_debug_cores dbg_hub]
-set_property C_USER_SCAN_CHAIN 1 [get_debug_cores dbg_hub]
-connect_debug_port dbg_hub/clk [get_nets gclk_BUFG]
+

BIN
S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo.dcp


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 12462 - 12476
S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.v


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 13684 - 13724
S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_sim_netlist.vhdl


+ 3 - 3
S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.v

@@ -1,10 +1,10 @@
 // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
 // --------------------------------------------------------------------------------
 // Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
-// Date        : Mon Feb 20 11:34:29 2023
+// Date        : Mon Feb 20 11:34:27 2023
 // Host        : DESKTOP-RMARCDV running 64-bit major release  (build 9200)
-// Command     : write_verilog -force -mode synth_stub
-//               c:/Users/Stepan/Desktop/4portCompact/S5443Current/S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.v
+// Command     : write_verilog -force -mode synth_stub -rename_top MeasDataFifo -prefix
+//               MeasDataFifo_ MeasDataFifo_stub.v
 // Design      : MeasDataFifo
 // Purpose     : Stub declaration of top-level module interface
 // Device      : xc7s25csga225-2

+ 3 - 0
S5443_S/S5443.srcs/sources_1/ip/MeasDataFifo/MeasDataFifo_stub.vhdl

@@ -1,10 +1,10 @@
 -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
 -- --------------------------------------------------------------------------------
 -- Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
+-- Date        : Mon Feb 20 11:34:27 2023
 -- Host        : DESKTOP-RMARCDV running 64-bit major release  (build 9200)
+-- Command     : write_vhdl -force -mode synth_stub -rename_top MeasDataFifo -prefix
+--               MeasDataFifo_ MeasDataFifo_stub.vhdl
 -- Design      : MeasDataFifo
 -- Purpose     : Stub declaration of top-level module interface
 -- Device      : xc7s25csga225-2

+ 34 - 30
S5443_S/S5443.srcs/sources_1/new/ExtDspInterface/DspInterface.v

@@ -33,9 +33,10 @@ module	DspInterface
 )
 (
 	input	Clk_i,
-	input	ClkPpiOut_i,
 	input	Rst_i,
 	input	OscWind_i,
+	input	StartMeasDsp_i,
+	input	DspReadyForRx_i,
 	input	[31:0]	MeasNum_i,
 	
 	input	Mosi_i,
@@ -61,6 +62,7 @@ module	DspInterface
 	output	Ss1_o,
 	input	Miso_i,
 	output	Miso_o,
+
 	
 	output	[CmdRegWidth-1:0]	CmdDataReg_o,
 	output	CmdDataVal_o,
@@ -227,33 +229,33 @@ DecimFilterWrapper	DecimFilter
 	.FilteredDataVal_o	(filteredDecimDataVal)
 );
 
-FftDataFormer	FftDataFormerInst
-(
-	.Clk_i				(Clk_i), 
-	.Rst_i				(Rst_i),	
-	.OscWind_i			(OscWind_i),
-	.MeasNum_i			(MeasNum_i),
-	
-	.AdcData_i			({filteredDecimDataI,filteredDecimDataQ}),
+// FftDataFormer	FftDataFormerInst
+// (
+	// .Clk_i				(Clk_i), 
+	// .Rst_i				(Rst_i),	
+	// .OscWind_i			(OscWind_i),
+	// .MeasNum_i			(MeasNum_i),
+	
+	// .AdcData_i			({filteredDecimDataI,filteredDecimDataQ}),
 	// .AdcData_i			({testPatternData,testPatternData}),
-	.AdcDataVal_i		(filteredDecimDataVal),
+	// .AdcDataVal_i		(filteredDecimDataVal),
 	
-	.OscDataBus_o		(fftDataBus),
-	.OscDataBusVal_o	(fftDataBusVal)
-);
+	// .OscDataBus_o		(fftDataBus),
+	// .OscDataBusVal_o	(fftDataBusVal)
+// );
 
-OscDataFormer	BypassDataFormer
-(
-	.Clk_i				(Clk_i), 
-	.Rst_i				(Rst_i),	
-	.OscWind_i			(OscWind_i),
-	.MeasNum_i			(MeasNum_i),
-	
-	.AdcData_i			(currDataChannel),	
-	
-	.OscDataBus_o		(bypassDataBus),
-	.OscDataBusVal_o	(bypassDataBusVal)
-);
+// OscDataFormer	BypassDataFormer
+// (
+	// .Clk_i				(Clk_i), 
+	// .Rst_i				(Rst_i),	
+	// .OscWind_i			(OscWind_i),
+	// .MeasNum_i			(MeasNum_i),
+	
+	// .AdcData_i			(currDataChannel),	
+	
+	// .OscDataBus_o		(bypassDataBus),
+	// .OscDataBusVal_o	(bypassDataBusVal)
+// );
 
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
@@ -283,13 +285,15 @@ MeasDataFifoWrapper
 MeasDataFifoInst
 (
 	.Clk_i			(Clk_i), 
-	.ClkPpiOut_i	(ClkPpiOut_i), 
 	.Rst_i			(Rst_i),	
 	.PpiBusy_i		(ppiBusy),	
-	// .MeasDataBus_i	(measDataBus),
-	.MeasDataBus_i	(dataForFifo),
-	// .MeasDataVal_i	(LpOutStart_i),	
-	.MeasDataVal_i	(dataForFifoVal),	
+	.MeasNum_i		(MeasNum_i),	
+	.StartMeasDsp_i	(StartMeasDsp_i),	
+	.DspReadyForRx_i(DspReadyForRx_i),	
+	.MeasDataBus_i	(measDataBus),
+	// .MeasDataBus_i	(dataForFifo),
+	.MeasDataVal_i	(LpOutStart_i),	
+	// .MeasDataVal_i	(dataForFifoVal),	
 	
 	.MeasDataBus_o	(measDataBusTx),
 	.MeasDataVal_o	(measDataValTx)

+ 13 - 11
S5443_S/S5443.srcs/sources_1/new/InternalDsp/ComplPrng.v

@@ -22,11 +22,12 @@ module ComplPrng
 	parameter OutDataWidth = 20
 )
 (
-	input [InDataWidth-1:0] Data_i,
+	// input [InDataWidth-1:0] Data_i,
 	input Clk_i,
 	input Rst_i,
 
-	output signed	[OutDataWidth-1:0] DataAndPrng_o
+	// output signed	[OutDataWidth-1:0] DataAndPrng_o
+	output signed	[OutDataWidth-1:0] PrngData_o
 );
 //================================================================================
 //	REG/WIRE
@@ -46,11 +47,12 @@ reg	signed	[OutDataWidth-1:0]	dataAndPrngReg;
 //================================================================================
 //	ASSIGNMENTS
 //================================================================================
-assign	adcDataExtended		=	{Data_i[InDataWidth-1], Data_i[InDataWidth-1], Data_i, 4'b0};
+// assign	adcDataExtended		=	{Data_i[InDataWidth-1], Data_i[InDataWidth-1], Data_i, 4'b0};
 assign	dataPrngCut			=	dataPrng[31-:DataPrngWidth];
 // assign	dataPrngCutExtended	=	{{OutDataWidth-DataPrngWidth{dataPrngCut[DataPrngWidth-1]}}, dataPrngCut};
 // assign	DataAndPrng_o		=	adcDataExtended+dataPrngCutExtended;
-assign	DataAndPrng_o		=	dataAndPrngReg;
+// assign	DataAndPrng_o		=	dataAndPrngReg;
+assign	PrngData_o			=	dataPrngCutExtended;
 //================================================================================
 //	CODING
 //================================================================================
@@ -82,12 +84,12 @@ always @(posedge Clk_i) begin
 	end
 end
 
-always @(posedge Clk_i) begin
-	if (Rst_i) begin
-		dataAndPrngReg	<=	0;
-	end else begin
-		dataAndPrngReg	<=	adcDataExtended+dataPrngCutExtended;
-	end
-end
+// always @(posedge Clk_i) begin
+	// if (Rst_i) begin
+		// dataAndPrngReg	<=	0;
+	// end else begin
+		// dataAndPrngReg	<=	Data_i+dataPrngCutExtended;
+	// end
+// end
 
 endmodule

+ 17 - 18
S5443_S/S5443.srcs/sources_1/new/InternalDsp/DspPipeline.v

@@ -20,6 +20,7 @@ module DspPipeline
     input	StartFpConv_i,
 	
 	input	[WindCorrCoefWidth-1:0]	FilterCorrCoef_i,
+	input	[WindCorrCoefWidth-1:0]	AverageNoizeLvl_i,
 	input	[AdcCorrData-1:0]	AdcData_i,
 	input	[WindWidth-1:0]		Wind_i,
 	input	[NcoWidth-1:0]		NcoSin_i,
@@ -46,9 +47,7 @@ module DspPipeline
 	wire	adcWindCosResultVal;
 	
 	wire	[AccWidth-1:0]	AccResultI;
-	wire	AccResultIVal;
 	wire	[AccWidth-1:0]	AccResultQ;
-	wire	AccResultQVal;
 	
 	wire	[ResultWidth-1:0]	NormResultI;
 	wire	NormResultIVal;
@@ -147,8 +146,7 @@ SummAccQ
     .Val_i		(adcWindSinResultVal),
 	
 	.Data_i		(adcWindSinResult[53:0]),
-	.Result_o	(AccResultQ),
-	.ResultVal_o(AccResultQVal)
+	.Result_o	(AccResultQ)
 );
 
 SumAcc
@@ -163,8 +161,7 @@ SummAccI
     .Val_i		(adcWindCosResultVal),
 	
 	.Data_i		(adcWindCosResult[53:0]),
-	.Result_o	(AccResultI),
-	.ResultVal_o(AccResultIVal)
+	.Result_o	(AccResultI)
 );
 
 //===============================InToFpConv=======================================
@@ -177,12 +174,13 @@ MyIntToFp
 )
 QToFp32
 (	
-	.Clk_i			(Clk_i),
-	.Rst_i			(Rst_i),
-	.InData_i		(AccResultQ),
-	.InDataVal_i	(StartFpConv_i),
-	.OutData_o		(qFp32Result),
-	.OutDataVal_o	(qFp32ResultVal)
+	.Clk_i				(Clk_i),
+	.Rst_i				(Rst_i),
+	.InData_i			(AccResultQ),
+	.AverageNoizeLvl_i	(AverageNoizeLvl_i),
+	.InDataVal_i		(StartFpConv_i),
+	.OutData_o			(qFp32Result),
+	.OutDataVal_o		(qFp32ResultVal)
 );
 
 MyIntToFp
@@ -194,12 +192,13 @@ MyIntToFp
 )
 IToFp32
 (	
-	.Clk_i			(Clk_i),
-	.Rst_i			(Rst_i),
-	.InData_i		(AccResultI),
-	.InDataVal_i	(StartFpConv_i),
-	.OutData_o		(iFp32Result),
-	.OutDataVal_o	(iFp32ResultVal)
+	.Clk_i				(Clk_i),
+	.Rst_i				(Rst_i),
+	.InData_i			(AccResultI),
+	.AverageNoizeLvl_i	(AverageNoizeLvl_i),
+	.InDataVal_i		(StartFpConv_i),
+	.OutData_o			(iFp32Result),
+	.OutDataVal_o		(iFp32ResultVal)
 );
 
 //===============================Result*NormCoeff=================================

+ 62 - 39
S5443_S/S5443.srcs/sources_1/new/InternalDsp/InternalDsp.v

@@ -91,6 +91,7 @@ module InternalDsp
 //  REG/WIRE
 	wire	[WindNormCoefWidth-1:0]	windNormCoef;
 	wire	[WindPNumWidth-1:0]		windPointsNum;
+	wire	[WindPNumWidth-1:0]		averageNoizeLvl;
 	wire	[WindNcoPhIncWidth-1:0]	windPhInc;
 	wire	[WindNcoPhIncWidth-1:0]	winPhIncStart;
 	
@@ -99,14 +100,17 @@ module InternalDsp
 	wire	[NcoWidth-1:0]	ncoCos;
 	wire	[NcoWidth-1:0]	ncoSin;
 	
-	// wire	[CorrAdcDataWidth-1:0]	adcDataBus	[ChNum-1:0];
-	wire	[AdcDataWidth-1:0]	adcDataBus	[ChNum-1:0];
+	wire	[CorrAdcDataWidth-1:0]	adcDataBus	[ChNum-1:0];
+	// wire	[AdcDataWidth-1:0]	adcDataBus	[ChNum-1:0];
 	wire	[CorrAdcDataWidth-1:0]	adcDataBusExt	[ChNum-1:0];
 	wire	[CorrAdcDataWidth-1:0]	gatedAdcDataBus	[ChNum-1:0];
 	wire	[CorrAdcDataWidth-1:0]	calAdcData		[ChNum-1:0];
+	wire	[CorrAdcDataWidth-1:0]	prngData;
+	reg		[CorrAdcDataWidth-1:0]	prngDataBus		[ChNum-1:0];
 	wire	[ChNum-1:0]	calDone;
 	
 	genvar g;
+	integer i;
 	
 	wire	[ResultWidth-1:0]	resultImBus		[ChNum-1:0];
 	wire	[ResultWidth-1:0]	resultReBus		[ChNum-1:0];
@@ -128,25 +132,34 @@ module InternalDsp
 	
 	wire	[31:0]	windArg;
 	
-	wire	[CorrAdcDataWidth-1:0]	adc1ChT1DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-4]:{CorrAdcDataWidth{1'b0}};
-	wire	[CorrAdcDataWidth-1:0]	adc1ChR1DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-3]:{CorrAdcDataWidth{1'b0}};
-	wire	[CorrAdcDataWidth-1:0]	adc2ChR2DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-2]:{CorrAdcDataWidth{1'b0}};
-	wire	[CorrAdcDataWidth-1:0]	adc2ChT2DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-1]:{CorrAdcDataWidth{1'b0}};	
+	// wire	[CorrAdcDataWidth-1:0]	adc1ChT1DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-4]:{CorrAdcDataWidth{1'b0}};
+	// wire	[CorrAdcDataWidth-1:0]	adc1ChR1DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-3]:{CorrAdcDataWidth{1'b0}};
+	// wire	[CorrAdcDataWidth-1:0]	adc2ChR2DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-2]:{CorrAdcDataWidth{1'b0}};
+	// wire	[CorrAdcDataWidth-1:0]	adc2ChT2DataGated	=	(GatingPulse_i)?	calAdcData[ChNum-1]:{CorrAdcDataWidth{1'b0}};	
+	
+	wire	[CorrAdcDataWidth-1:0]	adc1ChT1DataGated	=	(GatingPulse_i)?	adcDataBusExt[ChNum-4]:{CorrAdcDataWidth{1'b0}};
+	wire	[CorrAdcDataWidth-1:0]	adc1ChR1DataGated	=	(GatingPulse_i)?	adcDataBusExt[ChNum-3]:{CorrAdcDataWidth{1'b0}};
+	wire	[CorrAdcDataWidth-1:0]	adc2ChR2DataGated	=	(GatingPulse_i)?	adcDataBusExt[ChNum-2]:{CorrAdcDataWidth{1'b0}};
+	wire	[CorrAdcDataWidth-1:0]	adc2ChT2DataGated	=	(GatingPulse_i)?	adcDataBusExt[ChNum-1]:{CorrAdcDataWidth{1'b0}};	
 	
 	wire	[WindNcoPhIncWidth-1:0]	ncoPhInc = {ifFtwHReg[0+:WindNcoPhIncWidth-CmdDataRegWith],ifFtwLReg};
 //================================================================================
 //  ASSIGNMENTS
 	
-	assign	adcDataBus	[ChNum-1]	=	Adc2ChT2Data_i;
-	assign	adcDataBus	[ChNum-2]	=	Adc2ChR2Data_i;
-	assign	adcDataBus	[ChNum-3]	=	Adc1ChR1Data_i;
-	assign	adcDataBus	[ChNum-4]	=	Adc1ChT1Data_i;
+	// assign	adcDataBus	[ChNum-1]	=	Adc2ChT2Data_i;
+	// assign	adcDataBus	[ChNum-2]	=	Adc2ChR2Data_i;
+	// assign	adcDataBus	[ChNum-3]	=	Adc1ChR1Data_i;
+	// assign	adcDataBus	[ChNum-4]	=	Adc1ChT1Data_i;
 
-	// assign	adcDataBus	[ChNum-1]	=	{{2{Adc2ChT2Data_i[AdcDataWidth-1]}},Adc2ChT2Data_i,4'b0};
-	// assign	adcDataBus	[ChNum-2]	=	{{2{Adc2ChR2Data_i[AdcDataWidth-1]}},Adc2ChR2Data_i,4'b0};
-	// assign	adcDataBus	[ChNum-3]	=	{{2{Adc1ChR1Data_i[AdcDataWidth-1]}},Adc1ChR1Data_i,4'b0};
-	// assign	adcDataBus	[ChNum-4]	=	{{2{Adc1ChT1Data_i[AdcDataWidth-1]}},Adc1ChT1Data_i,4'b0};
+	assign	adcDataBus	[ChNum-1]	=	{{2{Adc2ChT2Data_i[AdcDataWidth-1]}},Adc2ChT2Data_i,4'b0};
+	assign	adcDataBus	[ChNum-2]	=	{{2{Adc2ChR2Data_i[AdcDataWidth-1]}},Adc2ChR2Data_i,4'b0};
+	assign	adcDataBus	[ChNum-3]	=	{{2{Adc1ChR1Data_i[AdcDataWidth-1]}},Adc1ChR1Data_i,4'b0};
+	assign	adcDataBus	[ChNum-4]	=	{{2{Adc1ChT1Data_i[AdcDataWidth-1]}},Adc1ChT1Data_i,4'b0};
 	
+	assign	adcDataBusExt	[ChNum-1]	=	calAdcData	[ChNum-1]+prngDataBus[ChNum-1];
+	assign	adcDataBusExt	[ChNum-2]	=	calAdcData	[ChNum-2]+prngDataBus[ChNum-2];
+	assign	adcDataBusExt	[ChNum-3]	=	calAdcData	[ChNum-3]+prngDataBus[ChNum-3];
+	assign	adcDataBusExt	[ChNum-4]	=	calAdcData	[ChNum-4]+prngDataBus[ChNum-4];
 	
 	assign	gatedAdcDataBus	[ChNum-1]	=	adc2ChT2DataGated;
 	assign	gatedAdcDataBus	[ChNum-2]	=	adc2ChR2DataGated;
@@ -250,13 +263,14 @@ WinParameters
 )
 WinParameters
 (	
-	.Clk_i			(Clk_i),
-	.Rst_i			(Rst_i),
-	.FilterCmd_i	(measCtrlReg[15-:8]),
-	.WinPhInc_o		(windPhInc),
-	.WinPhIncStart_o(winPhIncStart),
-	.WinNormCoef_o	(windNormCoef),
-	.WinPointsNum_o	(windPointsNum)
+	.Clk_i				(Clk_i),
+	.Rst_i				(Rst_i),
+	.FilterCmd_i		(measCtrlReg[15-:8]),
+	.WinPhInc_o			(windPhInc),
+	.WinPhIncStart_o	(winPhIncStart),
+	.WinNormCoef_o		(windNormCoef),
+	.WinPointsNum_o		(windPointsNum),
+	.AverageNoiseLvl_o	(averageNoizeLvl)
 );
 
 //----------------------------------------------
@@ -301,26 +315,34 @@ ncoInst
 	.Val_o		()
 );
 
+
+ComplPrng
+#(
+	.DataPrngWidth	(8),
+	.InDataWidth 	(CorrAdcDataWidth),
+	.OutDataWidth	(CorrAdcDataWidth)
+)
+ComplPrngAdderInst
+(
+	// .Data_i	(calAdcData[g]),
+	.Clk_i	(Clk_i),
+	.Rst_i	(Rst_i),
+
+	// .DataAndPrng_o	(adcDataBusExt[g]),
+	.PrngData_o		(prngData)
+);
+
+always @(posedge Clk_i) begin
+	prngDataBus[0]  <= prngData;
+	for(i=1; i<4; i=i+1) begin
+		prngDataBus	[i]<=prngDataBus[i-1];
+	end
+end
 //------------------------------------------------
 //Generating needed amount of calculating channels
 generate
 	for	(g=0;	g<ChNum;	g=g+1)	begin	:DspChannel
 	
-		ComplPrng
-		#(
-			.DataPrngWidth	(6),
-			.InDataWidth 	(AdcDataWidth),
-			.OutDataWidth	(CorrAdcDataWidth)
-		)
-		ComplPrngAdderInst
-		(
-			.Data_i	(adcDataBus[g]),
-			.Clk_i	(Clk_i),
-			.Rst_i	(Rst_i),
-
-			.DataAndPrng_o	(adcDataBusExt[g])
-		);
-
 		AdcCalibration 
 		#(	
 			// .AccNum			(32),
@@ -332,13 +354,13 @@ generate
 			.Clk_i					(Clk_i),
 			.Rst_i					(Rst_i),
 			.CalModeEn_i			(CalModeEn_i),
-			.AdcData_i				(adcDataBusExt[g]),
-			// .AdcData_i				(adcDataBus[g]),
+			// .AdcData_i				(adcDataBusExt[g]),
+			.AdcData_i				(adcDataBus[g]),
 			
 			.CalDone_o				(calDone[g]),
 			.CalibratedAdcData_o	(calAdcData[g])
 		);
-
+		
 		DspPipeline	
 		#(	
 			.AdcDataWidth		(AdcDataWidth),
@@ -358,6 +380,7 @@ generate
 			.StartFpConv_i		(StartFpConv),
 			
 			.FilterCorrCoef_i	({filterCorrCoefHReg[0+:WindNcoPhIncWidth-CmdDataRegWith],filterCorrCoefLReg}),
+			.AverageNoizeLvl_i	(averageNoizeLvl),
 			.AdcData_i			(gatedAdcDataBus[g]),
 			.Wind_i				(wind),
 			.NcoSin_i			(ncoCos),

+ 1 - 1
S5443_S/S5443.srcs/sources_1/new/InternalDsp/MeasCtrlModule.v

@@ -326,7 +326,7 @@ module MeasCtrlModule
 				measWind	=	1'b0;
 			end
 		end	else	begin
-			measWind	<=	1'b0;
+			measWind	=	1'b0;
 		end
 	end
 

+ 53 - 5
S5443_S/S5443.srcs/sources_1/new/InternalDsp/WinParameters.v

@@ -32,7 +32,8 @@ module WinParameters
 	output		[WindPhIncWidth-1:0]	WinPhInc_o,
 	output		[WindPhIncWidth-1:0]	WinPhIncStart_o,
 	output		[WindNormCoefWidth-1:0]	WinNormCoef_o,
-	output		[WindPNumWidth-1:0]		WinPointsNum_o
+	output		[WindPNumWidth-1:0]		WinPointsNum_o,
+	output		[WindPNumWidth-1:0]		AverageNoiseLvl_o
 );
 //================================================================================
 //  REG/WIRE
@@ -40,13 +41,15 @@ module WinParameters
 	reg [WindPhIncWidth-1:0]	windPhInc;
 	reg	[WindNormCoefWidth-1:0]	winNormCoef;
 	reg	[WindPNumWidth-1:0]		winPointsNum;
+	reg	[WindPNumWidth-1:0]		averageNoiseLvl;
 //================================================================================
 //  ASSIGNMENTS
 //================================================================================	
-	assign	WinPhInc_o 		=	windPhInc;
-	assign	WinPhIncStart_o =	32'h80000000;
-	assign	WinNormCoef_o	=	winNormCoef;
-	assign	WinPointsNum_o	=	winPointsNum;
+	assign	WinPhInc_o 			=	windPhInc;
+	assign	WinPhIncStart_o		 =	32'h80000000;
+	assign	WinNormCoef_o		=	winNormCoef;
+	assign	WinPointsNum_o		=	winPointsNum;
+	assign	AverageNoiseLvl_o	=	averageNoiseLvl;
 //================================================================================
 //  CODING
 //================================================================================	
@@ -57,201 +60,241 @@ always	@	(posedge	Clk_i)	begin
 						windPhInc		<=	32'h2a8;
 						winNormCoef		<=	32'h3342b45d;
 						winPointsNum	<=	32'h30291a0;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h1 : begin//	1.5	Hz
 						windPhInc		<=	32'h3fc;
 						winNormCoef		<=	32'h3391cf5e;
 						winPointsNum	<=	32'h201b66a;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h2 : begin//	2	Hz
 						windPhInc		<=	32'h550;
 						winNormCoef		<=	32'h33c269d2;
 						winPointsNum	<=	32'h18148d0;
+						averageNoiseLvl	<=	32'h0;
 					 end
 			8'h3 : begin//	3	Hz
 						windPhInc		<=	32'h7f9;
 						winNormCoef		<=	32'h3411ccc1;
 						winPointsNum	<=	32'h100db35;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h4 : begin//	5	Hz
 						windPhInc		<=	32'hd49;
 						winNormCoef		<=	32'h347301aa;
 						winPointsNum	<=	32'h9a1d20;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h5 : begin//	7	Hz
 						windPhInc		<=	32'h129a;
 						winNormCoef		<=	32'h34aa19fd;
 						winPointsNum	<=	32'h6e14cd;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h10 : begin//	10	Hz
 						windPhInc		<=	32'h1a93;
 						winNormCoef		<=	32'h34f3005d;
 						winPointsNum	<=	32'h4d0e90;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h11 : begin//	15	Hz
 						windPhInc		<=	32'h27dd;
 						winNormCoef		<=	32'h35363ff7;
 						winPointsNum	<=	32'h335f0a;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h12 : begin//	20	Hz
 						windPhInc		<=	32'h3527;
 						winNormCoef		<=	32'h3572ffba;
 						winPointsNum	<=	32'h268748;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h13 : begin//	30	Hz
 						windPhInc		<=	32'h4fbb;
 						winNormCoef		<=	32'h35b63fa7;
 						winPointsNum	<=	32'h19af85;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h14 : begin//	50	Hz
 						windPhInc		<=	32'h84e3;
 						winNormCoef		<=	32'h3617df9c;
 						winPointsNum	<=	32'hf6950;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h15 : begin//	70	Hz
 						windPhInc		<=	32'hba0b;
 						winNormCoef		<=	32'h36549f77;
 						winPointsNum	<=	32'hb0214;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h20 : begin//	100	Hz
 						windPhInc		<=	32'h109c7;
 						winNormCoef		<=	32'h3697df93;
 						winPointsNum	<=	32'h7b4a8;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h21 : begin//	150	Hz
 						windPhInc		<=	32'h18eab;
 						winNormCoef		<=	32'h36e3cf84;
 						winPointsNum	<=	32'h5231a;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h22 : begin//	200	Hz
 						windPhInc		<=	32'h21390;
 						winNormCoef		<=	32'h3717df94;
 						winPointsNum	<=	32'h3da54;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h23 : begin//	300	Hz 
 						windPhInc		<=	32'h31d5b;
 						winNormCoef		<=	32'h3763cf83;
 						winPointsNum	<=	32'h2918d;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h24 : begin//	500	Hz
 						windPhInc		<=	32'h530e3;
 						winNormCoef		<=	32'h37bdd7e8;
 						winPointsNum	<=	32'h18a88;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h25 : begin//	700	Hz
 						windPhInc		<=	32'h7449e;
 						winNormCoef		<=	32'h3804e417;
 						winPointsNum	<=	32'h119ce;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h30 : begin//	1	kHz
 						windPhInc		<=	32'ha61fc;
 						winNormCoef		<=	32'h383dd7e8;
 						winPointsNum	<=	32'hc544;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h31 : begin//	1.5	kHz
 						windPhInc		<=	32'hf92fb;
 						winNormCoef		<=	32'h388e6329;
 						winPointsNum	<=	32'h8382;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h32 : begin//	2	kHz
 						windPhInc		<=	32'h14c3f9;
 						winNormCoef		<=	32'h38bdd900;
 						winPointsNum	<=	32'h62a2;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h33 : begin//	3	kHz
 						windPhInc		<=	32'h1f25f6;
 						winNormCoef		<=	32'h390e6466;
 						winPointsNum	<=	32'h41c1;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h34 : begin//	5	kHz
 						windPhInc		<=	32'h33ee26;
 						winNormCoef		<=	32'h396d509f;
 						winPointsNum	<=	32'h2774;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h35 : begin//	7	kHz
 						windPhInc		<=	32'h48bca9;
 						winNormCoef		<=	32'h39a61fcc;
 						winPointsNum	<=	32'h1c2e;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h40 : begin//	10	kHz
 						windPhInc		<=	32'h67dc4c;
 						winNormCoef		<=	32'h39ed577f;
 						winPointsNum	<=	32'h13ba;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h41 : begin//	15	kHz
 						windPhInc		<=	32'h9c09c0;
 						winNormCoef		<=	32'h3a3206c8;
 						winPointsNum	<=	32'hd26;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h42 : begin//	20	kHz
 						windPhInc 		<=	32'hd00d00;
 						winNormCoef		<=	32'h3a6d577f;
 						winPointsNum	<=	32'h9dd;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h43 : begin//	30	kHz
 						windPhInc		<=	32'h1381381;
 						winNormCoef		<=	32'h3ab1e1ce;
 						winPointsNum	<=	32'h693;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h44 : begin//	50	kHz
 						windPhInc		<=	32'h2082082;
 						winNormCoef		<=	32'h3b1444c4;
 						winPointsNum	<=	32'h3f2;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h45 : begin//	70	KHz
 						windPhInc		<=	32'h2d82d82;
 						winNormCoef		<=	32'h3b4fb73a;
 						winPointsNum	<=	32'h2d1;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h50 : begin//	100	KHz
 						windPhInc		<=	32'h4104104;
 						winNormCoef		<=	32'h3b944cd1;
 						winPointsNum	<=	32'h1f9;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h51 : begin//	150	KHz
 						windPhInc 		<=	32'h6186186;
 						winNormCoef		<=	32'h3bdeed44;
 						winPointsNum	<=	32'h150;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h52 : begin//	200	KHz
 						windPhInc		<=	32'h8421084;
 						winNormCoef		<=	32'h3c1442d8;
 						winPointsNum	<=	32'hfc;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h53 : begin//	300	KHz
 						windPhInc 		<=	32'hc30c30c;
 						winNormCoef		<=	32'h3c5ed0fd;
 						winPointsNum	<=	32'ha8;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h54 : begin//	500	KHz
 						windPhInc 		<=	32'h1c71c71;
 						winNormCoef		<=	32'h3ce38e38;
 						winPointsNum	<=	32'h90;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h55 : begin//	700	KHz
 						windPhInc		<=	32'h2828282;
 						winNormCoef		<=	32'h3d20a0a0;
 						winPointsNum	<=	32'h66;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h60 : begin//	1	MHz
 						windPhInc 		<=	32'h38e38e3;
 						winNormCoef		<=	32'h3d638e39;
 						winPointsNum	<=	32'h48;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h61 : begin//	1.5	MHz
 						windPhInc 		<=	32'h5555555;
 						winNormCoef		<=	32'h3daaaaab;
 						winPointsNum	<=	32'h30;
+						averageNoiseLvl	<=	32'h0;
 					end
 			8'h62 : begin//	2	MHz
 						windPhInc 		<=	32'h71c71c7;
 						winNormCoef		<=	32'h3de38e39;
 						winPointsNum	<=	32'h24;
+						averageNoiseLvl	<=	32'h0;
 					end	
 			8'h63 : begin
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3e124925;
 						winPointsNum	<=	32'he;
+						averageNoiseLvl	<=	32'h3b83126f;
 					end	
 			// 8'h64 : begin//	5	MHz
 						// windPhInc 		<=	32'h12492492;
@@ -285,28 +328,33 @@ always	@	(posedge	Clk_i)	begin
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3e800000;
 						winPointsNum	<=	32'h8;
+						averageNoiseLvl	<=	32'h3bc49ba6;
 					end	
 			8'h70 : begin
 						// параметры для калибровки - прямоугольное окно 65536 отсчетов	2^16
 						windPhInc 		<=	32'h1FFFFFFF;
 						winNormCoef		<=	32'h6D13892;
 						winPointsNum	<=	32'h10000;
+						averageNoiseLvl	<=	32'h0;
 					end	
 			8'h71 : begin							
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3eaaaaab;
 						winPointsNum	<=	32'h6;
+						averageNoiseLvl	<=	32'h3c03126f;
 					end	
 			8'h72 : begin	
 						windPhInc 		<=	32'h0;
 						winNormCoef		<=	32'h3f000000;
 						winPointsNum	<=	32'h4;
+						averageNoiseLvl	<=	32'h3a83126f;
 					end
 					
 			default: begin	
 						windPhInc 		<=	32'h15555555;
 						winNormCoef		<=	32'h3e86cfea;
 						winPointsNum	<=	32'hc;
+						averageNoiseLvl	<=	32'h0;
 					 end					 
 		endcase
 	end	

+ 8 - 2
S5443_S/S5443.srcs/sources_1/new/Math/MyIntToFp.v

@@ -25,7 +25,7 @@ module	MyIntToFp
 	parameter	ManWidth	=	23,
 	parameter	FracWidth	=	17
 )
-(Clk_i,Rst_i,InData_i,InDataVal_i,OutData_o,OutDataVal_o);
+(Clk_i,Rst_i,InData_i,AverageNoizeLvl_i,InDataVal_i,OutData_o,OutDataVal_o);
 
 	input	Clk_i;
 	input	Rst_i;
@@ -35,6 +35,7 @@ module	MyIntToFp
 	localparam	OutWidth	=	1+ExpWidth+ManWidth;	//sign+ExpWidth+ManWidth
 	localparam	ExpConst	=	(2**(ExpWidth-1))-1;
 	
+	input		[OutWidth-1:0]	AverageNoizeLvl_i;
 	output	reg	[OutWidth-1:0]	OutData_o;
 	output	reg	OutDataVal_o;
 	
@@ -115,7 +116,12 @@ always	@(posedge	Clk_i	or	posedge	Rst_i)	begin
 		OutDataVal_o	<=	1'b0;
 	end	else	begin
 		if	(outValR)	begin
-			OutData_o	<=	fpOut;
+			if	(fpOut!=0)	begin
+				OutData_o	<=	fpOut;
+			end	else	begin
+				// OutData_o	<=	32'h3a83126f;
+				OutData_o	<=	AverageNoizeLvl_i;
+			end
 		end
 		OutDataVal_o	<=	outValR;
 	end

+ 54 - 7
S5443_S/S5443.srcs/sources_1/new/MeasDataFifo/FifoController.v

@@ -1,12 +1,39 @@
 `timescale 1ns / 1ps
+
+//////////////////////////////////////////////////////////////////////////////////
+// Company: 
+// Engineer: 
+// 
+// Create Date:    14:12:30 06/03/2020 
+// Design Name: 
+// Module Name:    WinParameters 
+// Project Name: 
+// Target Devices: 
+// Tool versions: 
+// Description: 
+//
+// Dependencies: kek
+//
+// Revision: 
+// Revision 0.01 - File Created
+// Additional Comments: 
+//
+//
+//////////////////////////////////////////////////////////////////////////////////
 	
 module FifoController	
+#(
+	parameter	TxInPack		=	200,		
+	parameter	WorkTimeCycles	=	404000
+	// parameter	WorkTimeCycles	=	20000
+)
 (
 	input	Clk_i, 
-	input	ClkPpiOut_i, 
 	input	Rst_i,	
 	input	PpiBusy_i,	
+	input	DspReadyForRx_i,
 	input	MeasDataVal_i,
+	input	[32-1:0]	MeasNum_i,
 	input	FullFlag_i,
 	input	EmptyFlag_i,
 	
@@ -19,20 +46,36 @@ module FifoController
 //  REG/WIRE
 //================================================================================
 	reg	rdEn;
+	reg	[13:0]	wrCnt;
 //================================================================================
 //  ASSIGNMENTS
 //================================================================================
 	assign	MeasDataVal_o	=	rdEn&(!PpiBusy_i);
 	assign	RdEn_o			=	rdEn&(!PpiBusy_i);
+	
 //================================================================================
 //  CODING
 //================================================================================		
 
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
-		if	(MeasDataVal_i)	begin
-			if	(!FullFlag_i)	begin
-				WrEn_o	<=	1'b1;
+		if	(WrEn_o)	begin
+			wrCnt	<=	wrCnt+14'd1;
+		end	
+	end	else	begin
+		wrCnt	<=	14'd0;
+	end
+end
+
+always	@(posedge	Clk_i)	begin
+	if	(!Rst_i)	begin
+		if	(!FullFlag_i)	begin
+			if	(MeasDataVal_i)	begin
+				if	(wrCnt!=MeasNum_i)	begin
+					WrEn_o	<=	1'b1;
+				end	else	begin
+					WrEn_o	<=	1'b0;
+				end
 			end	else	begin
 				WrEn_o	<=	1'b0;
 			end
@@ -46,9 +89,13 @@ end
 
 always	@(posedge	Clk_i)	begin
 	if	(!Rst_i)	begin
-		if	(!PpiBusy_i)	begin
-			if	(!EmptyFlag_i)	begin
-				rdEn	<=	1'b1;
+		if	(!DspReadyForRx_i)	begin
+			if	(!PpiBusy_i)	begin
+				if	(!EmptyFlag_i)	begin
+					rdEn	<=	1'b1;
+				end	else	begin
+					rdEn	<=	1'b0;
+				end
 			end	else	begin
 				rdEn	<=	1'b0;
 			end

+ 52 - 17
S5443_S/S5443.srcs/sources_1/new/MeasDataFifo/MeasDataFifoWrapper.v

@@ -1,4 +1,4 @@
-`timescale 1ns / 1ps
+`timescale 1ns / 1ns
 	
 module MeasDataFifoWrapper	
 #(	
@@ -7,9 +7,11 @@ module MeasDataFifoWrapper
 )
 (
 	input	Clk_i, 
-	input	ClkPpiOut_i, 
 	input	Rst_i,	
 	input	PpiBusy_i,	
+	input	StartMeasDsp_i,
+	input	DspReadyForRx_i,
+	input	[DataWidth-1:0]	MeasNum_i,
 	
 	input	[DataWidth*(ChNum*2)-1:0]	MeasDataBus_i,
 	input	MeasDataVal_i,
@@ -25,23 +27,54 @@ module MeasDataFifoWrapper
 	wire	emptyFlag;
 	wire	wrEn;
 	wire	rdEn;
-	wire	fifoRst;
 
+	reg		startMeasDspReg;
+	wire	startMeasDspNeg;
+	wire	startMeasDspPos;
+	
+	reg		ppiBusyReg;
+	
+	reg		rstFromDsp;
+	wire	trueRstFromDsp;
+	
+	integer	i;
+	reg	[0:0]	rstFromDspPipe	[49:0];
+	
+	reg		[13:0]	rdCnt;
+	wire	rstOr;
+	
 //================================================================================
 //  ASSIGNMENTS
 //================================================================================
-	assign	MeasDataVal_o	=	rdEn;	
+	assign	rstOr	=	Rst_i|startMeasDspPos;
+	assign	MeasDataVal_o		=	rdEn;
+	assign	startMeasDspPos		=	(StartMeasDsp_i&(!startMeasDspReg));
 //================================================================================
 //  CODING
 //================================================================================		
 
-	
+always	@(posedge	Clk_i)	begin
+	if	(!rstOr)	begin
+		if	(rdEn)	begin
+			rdCnt	<=	rdCnt+14'd1;
+		end	
+	end	else	begin
+		rdCnt	<=	14'd0;
+	end
+end
+
+always	@(posedge	Clk_i)	begin
+	if	(!Rst_i)	begin
+		startMeasDspReg	<=	StartMeasDsp_i;
+	end	else	begin
+		startMeasDspReg	<=	1'b0;
+	end
+end
+
 MeasDataFifo	MeasDataFifoInst
 (
 	.clk	(Clk_i),
-	// .srst	(fifoRst),
-	// .srst	(Rst_i|fifoRst),
-	.srst	(Rst_i),
+	.srst	(Rst_i|startMeasDspPos),
 	.din	(MeasDataBus_i),
 	.wr_en	(wrEn),
 	.rd_en	(rdEn),
@@ -53,16 +86,18 @@ MeasDataFifo	MeasDataFifoInst
   
 FifoController	FifoControllerInst
 (
-	.Clk_i			(Clk_i), 
-	.Rst_i			(Rst_i),	
-	.PpiBusy_i		(PpiBusy_i),	
-	.MeasDataVal_i	(MeasDataVal_i),
-	.FullFlag_i		(fullFlag),
-	.EmptyFlag_i	(emptyFlag),
+	.Clk_i				(Clk_i), 
+	.Rst_i				(Rst_i|startMeasDspPos),	
+	.DspReadyForRx_i	(DspReadyForRx_i),	
+	.PpiBusy_i			(PpiBusy_i),	
+	.MeasNum_i			(MeasNum_i),	
+	.MeasDataVal_i		(MeasDataVal_i),
+	.FullFlag_i			(fullFlag),
+	.EmptyFlag_i		(emptyFlag),
 	
-	.MeasDataVal_o	(),
-	.WrEn_o			(wrEn),
-	.RdEn_o			(rdEn)
+	.MeasDataVal_o		(),
+	.WrEn_o				(wrEn),
+	.RdEn_o				(rdEn)
 );
 
 endmodule

+ 4 - 4
S5443_S/S5443.srcs/sources_1/new/PulseMeas/MeasStartEventGen.v

@@ -65,17 +65,17 @@ module	MeasStartEventGen
 		end
 	end
 	
-	always	@(*)	begin
+	always	@(posedge	Clk_i)	begin
 		if	(!Rst_i)	begin
 			if	(StartMeasDsp_i)	begin
 				if	(measTrigPos)	begin
-					startMeasEvent	=	1'b1;
+					startMeasEvent	<=	1'b1;
 				end
 			end	else	begin
-				startMeasEvent	=	0;
+				startMeasEvent	<=	0;
 			end
 		end	else	begin
-			startMeasEvent	=	0;
+			startMeasEvent	<=	0;
 		end
 	end
 	

+ 15 - 10
S5443_S/S5443.srcs/sources_1/new/S5443Top.v

@@ -113,7 +113,7 @@ module	S5443Top
 	output	Overload_o,
 	
 	//gain lines
-	inout	SensEnS_io,	
+	input	DspReadyForRx_i,	
 	output	[ChNum-1:0]	AmpEn_o,	//	0-adc1ChA 1-adc1ChB 2-adc2ChA 3-adc2ChB
 	
 	///test port for testbench
@@ -233,9 +233,6 @@ module	S5443Top
 	wire	[ChNum-1:0]	ampEnNewStates;
 	wire	[ChNum-1:0]	sensEn;
 	
-	reg		sensEnReg;
-	wire	sensEnNeg	=	(sensEnReg&!SensEnS_io);
-	
 	wire	[ChNum-1:0]	gainManual;
 	wire	[ChNum-1:0]	gainAutoEn;
 	
@@ -372,6 +369,7 @@ module	S5443Top
 	wire	oscDataRdFlag;
 	wire	dspBusy;
 	wire	fifoEn;
+	reg		dspReadyForRxReg;
 //================================================================================
 //  assignments
 //================================================================================	
@@ -512,7 +510,7 @@ module	S5443Top
 	assign	AmpEn_o	[0]	=	~ampEnNewStates[1];	
 	
 	assign	Overload_o	=	overCtrlR;
-	assign	SensEnS_io	=	(|sensEn)?	1'b0:1'bz;
+	// assign	Overload_o	=	intTrig2;
 //================================================================================
 //  CODING
 //================================================================================
@@ -522,10 +520,13 @@ always	@(posedge	gclk)	begin
 	stopMeasR	<=	stopMeas;
 end
 
-always	@(posedge	gclk)	begin	
-	sensEnReg	<=	SensEnS_io;
+always	@(posedge	gclk)	begin
+	if	(!initRst)	begin
+		dspReadyForRxReg	<=	DspReadyForRx_i;
+	end	else	begin
+		dspReadyForRxReg	<=	1'b0;
+	end
 end
-
 //--------------------------------------------------------------------------------
 //	Data Receiving Interface
 //--------------------------------------------------------------------------------
@@ -612,6 +613,9 @@ ExternalDspInterface
 	.Clk_i				(gclk),
 	.Rst_i				(initRst),
 	.OscWind_i			(oscWind),
+	.StartMeasDsp_i		(startMeasSync),
+	// .DspReadyForRx_i	(dspReadyForRxReg),
+	.DspReadyForRx_i	(dspReadyForRxReg),
 	.MeasNum_i			({measNum2[7:0],measNum1}),
 	
 	.Mosi_i				(Mosi_i),
@@ -731,7 +735,8 @@ MeasStartEventGen	IntTrig2GenInst
 	.MeasTrig_i			(trigForIntTrig2),
 	.StartMeasDsp_i		(intTrig1),
 	
-	.StartMeasEvent_o	(intTrig2)
+	.StartMeasEvent_o	(),
+	.InitTrig_o			(intTrig2)
 );
 
 InternalDsp	
@@ -1177,7 +1182,7 @@ SampleStrobeMux
 
 	.DspTrigOut_i	(1'b0),
 	.DspStartCmd_i	(1'b0),
-	.IntTrig_i		(1'b0),
+	.IntTrig_i		(intTrig1),
 	.IntTrig2_i		(1'b0),
 	.PulseBus_i		(pulseBus),
 	.ExtPortsBus_i	(),