From bf50916a3fc93cbe2798a0d27c709e9582c2c54d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 12 Feb 2018 19:08:57 +0100 Subject: [PATCH] motocon: Use new pack infrastructure Use the new util_cpack2 and util_upack2 cores. They have lower utilization that the old util_cpack and util_upack cores. Signed-off-by: Lars-Peter Clausen --- .../motcon2_fmc/common/motcon2_fmc_bd.tcl | 70 ++++++++----------- projects/motcon2_fmc/zed/Makefile | 2 +- 2 files changed, 30 insertions(+), 42 deletions(-) diff --git a/projects/motcon2_fmc/common/motcon2_fmc_bd.tcl b/projects/motcon2_fmc/common/motcon2_fmc_bd.tcl index ca568f294..f5a9fb691 100644 --- a/projects/motcon2_fmc/common/motcon2_fmc_bd.tcl +++ b/projects/motcon2_fmc/common/motcon2_fmc_bd.tcl @@ -123,9 +123,10 @@ ad_ip_parameter current_monitor_m1_dma CONFIG.SYNC_TRANSFER_START true # data packer motor 1 # - ad_ip_instance util_cpack current_monitor_m1_pack - ad_ip_parameter current_monitor_m1_pack CONFIG.NUM_OF_CHANNELS 4 - ad_ip_parameter current_monitor_m1_pack CONFIG.CHANNEL_DATA_WIDTH 16 + ad_ip_instance util_cpack2 current_monitor_m1_pack { \ + NUM_OF_CHANNELS 3 \ + SAMPLE_DATA_WIDTH 16 \ + } # current monitor core motor 2 ad_ip_instance axi_mc_current_monitor current_monitor_m2 @@ -137,9 +138,10 @@ ad_ip_parameter current_monitor_m2_dma CONFIG.DMA_AXI_PROTOCOL_DEST 0 ad_ip_parameter current_monitor_m2_dma CONFIG.SYNC_TRANSFER_START true # data packer motor 2 - ad_ip_instance util_cpack current_monitor_m2_pack - ad_ip_parameter current_monitor_m2_pack CONFIG.NUM_OF_CHANNELS 4 - ad_ip_parameter current_monitor_m2_pack CONFIG.CHANNEL_DATA_WIDTH 16 + ad_ip_instance util_cpack2 current_monitor_m2_pack { \ + NUM_OF_CHANNELS 3 \ + SAMPLE_DATA_WIDTH 16 \ + } #controller # controller core motor 1 @@ -207,27 +209,20 @@ ad_connect adc_m1_vbus_dat_i current_monitor_m1/adc_vbus_dat_i - ad_connect sys_cpu_clk current_monitor_m1_pack/adc_clk - ad_connect sys_cpu_reset current_monitor_m1_pack/adc_rst + ad_connect sys_cpu_clk current_monitor_m1_pack/clk + ad_connect sys_cpu_reset current_monitor_m1_pack/reset - ad_connect current_monitor_m1/adc_enable_ia current_monitor_m1_pack/adc_enable_0 - ad_connect current_monitor_m1/adc_enable_ib current_monitor_m1_pack/adc_enable_1 - ad_connect current_monitor_m1/adc_enable_vbus current_monitor_m1_pack/adc_enable_2 - ad_connect current_monitor_m1_pack/adc_valid_0 current_monitor_m1/i_ready_o - ad_connect current_monitor_m1_pack/adc_valid_1 current_monitor_m1/i_ready_o - ad_connect current_monitor_m1_pack/adc_valid_2 current_monitor_m1/i_ready_o - ad_connect current_monitor_m1/ia_o current_monitor_m1_pack/adc_data_0 - ad_connect current_monitor_m1/ib_o current_monitor_m1_pack/adc_data_1 - ad_connect current_monitor_m1/vbus_o current_monitor_m1_pack/adc_data_2 - ad_connect current_monitor_m1_pack/adc_data current_monitor_m1_dma/fifo_wr_din - ad_connect current_monitor_m1_pack/adc_valid current_monitor_m1_dma/fifo_wr_en - ad_connect current_monitor_m1_pack/adc_sync current_monitor_m1_dma/fifo_wr_sync + ad_connect current_monitor_m1/adc_enable_ia current_monitor_m1_pack/enable_0 + ad_connect current_monitor_m1/adc_enable_ib current_monitor_m1_pack/enable_1 + ad_connect current_monitor_m1/adc_enable_vbus current_monitor_m1_pack/enable_2 + ad_connect current_monitor_m1/i_ready_o current_monitor_m1_pack/fifo_wr_en + ad_connect current_monitor_m1/ia_o current_monitor_m1_pack/fifo_wr_data_0 + ad_connect current_monitor_m1/ib_o current_monitor_m1_pack/fifo_wr_data_1 + ad_connect current_monitor_m1/vbus_o current_monitor_m1_pack/fifo_wr_data_2 - ad_connect current_monitor_m1_pack/adc_enable_3 GND - ad_connect current_monitor_m1_pack/adc_valid_3 GND - ad_connect current_monitor_m1_pack/adc_data_3 GND + ad_connect current_monitor_m1_pack/packed_fifo_wr current_monitor_m1_dma/fifo_wr - # motor 2 + # motor 2 ad_connect sys_cpu_clk current_monitor_m2/ref_clk ad_connect sys_cpu_clk current_monitor_m2_dma/fifo_wr_clk @@ -237,25 +232,18 @@ ad_connect adc_m2_ib_dat_i current_monitor_m2/adc_ib_dat_i ad_connect adc_m2_vbus_dat_i current_monitor_m2/adc_vbus_dat_i - ad_connect sys_cpu_clk current_monitor_m2_pack/adc_clk - ad_connect sys_cpu_reset current_monitor_m2_pack/adc_rst + ad_connect sys_cpu_clk current_monitor_m2_pack/clk + ad_connect sys_cpu_reset current_monitor_m2_pack/reset - ad_connect current_monitor_m2/adc_enable_ia current_monitor_m2_pack/adc_enable_0 - ad_connect current_monitor_m2/adc_enable_ib current_monitor_m2_pack/adc_enable_1 - ad_connect current_monitor_m2/adc_enable_vbus current_monitor_m2_pack/adc_enable_2 - ad_connect current_monitor_m2_pack/adc_valid_0 current_monitor_m2/i_ready_o - ad_connect current_monitor_m2_pack/adc_valid_1 current_monitor_m2/i_ready_o - ad_connect current_monitor_m2_pack/adc_valid_2 current_monitor_m2/i_ready_o - ad_connect current_monitor_m2/ia_o current_monitor_m2_pack/adc_data_0 - ad_connect current_monitor_m2/ib_o current_monitor_m2_pack/adc_data_1 - ad_connect current_monitor_m2/vbus_o current_monitor_m2_pack/adc_data_2 - ad_connect current_monitor_m2_pack/adc_valid current_monitor_m2_dma/fifo_wr_en - ad_connect current_monitor_m2_pack/adc_data current_monitor_m2_dma/fifo_wr_din - ad_connect current_monitor_m2_pack/adc_sync current_monitor_m2_dma/fifo_wr_sync + ad_connect current_monitor_m2/adc_enable_ia current_monitor_m2_pack/enable_0 + ad_connect current_monitor_m2/adc_enable_ib current_monitor_m2_pack/enable_1 + ad_connect current_monitor_m2/adc_enable_vbus current_monitor_m2_pack/enable_2 + ad_connect current_monitor_m2/i_ready_o current_monitor_m2_pack/fifo_wr_en + ad_connect current_monitor_m2/ia_o current_monitor_m2_pack/fifo_wr_data_0 + ad_connect current_monitor_m2/ib_o current_monitor_m2_pack/fifo_wr_data_1 + ad_connect current_monitor_m2/vbus_o current_monitor_m2_pack/fifo_wr_data_2 - ad_connect current_monitor_m2_pack/adc_enable_3 GND - ad_connect current_monitor_m2_pack/adc_valid_3 GND - ad_connect current_monitor_m2_pack/adc_data_3 GND + ad_connect current_monitor_m2_pack/packed_fifo_wr current_monitor_m2_dma/fifo_wr #controller # motor 1 diff --git a/projects/motcon2_fmc/zed/Makefile b/projects/motcon2_fmc/zed/Makefile index c400b32b8..80a43e31b 100644 --- a/projects/motcon2_fmc/zed/Makefile +++ b/projects/motcon2_fmc/zed/Makefile @@ -18,8 +18,8 @@ LIB_DEPS += axi_mc_controller LIB_DEPS += axi_mc_current_monitor LIB_DEPS += axi_mc_speed LIB_DEPS += axi_spdif_tx -LIB_DEPS += util_cpack LIB_DEPS += util_gmii_to_rgmii LIB_DEPS += util_i2c_mixer +LIB_DEPS += util_pack/util_cpack2 include ../../scripts/project-xilinx.mk