diff --git a/projects/adaq7980_sdz/common/adaq7980_bd.tcl b/projects/adaq7980_sdz/common/adaq7980_bd.tcl index 508b87f22..e4d1d6c56 100644 --- a/projects/adaq7980_sdz/common/adaq7980_bd.tcl +++ b/projects/adaq7980_sdz/common/adaq7980_bd.tcl @@ -25,7 +25,9 @@ current_bd_instance /spi ## to setup the sample rate of the system change the PULSE_PERIOD value ## the acutal sample rate will be PULSE_PERIOD * (1/sys_cpu_clk) - ad_ip_parameter trigger_gen CONFIG.PULSE_PERIOD 100 + set cycle_per_sec_100mhz 100000000 + set sampling_cycle [expr int(ceil(double($cycle_per_sec_100mhz) / $adc_sampling_rate))] + ad_ip_parameter trigger_gen CONFIG.PULSE_PERIOD $sampling_cycle ad_ip_parameter trigger_gen CONFIG.PULSE_WIDTH 1 ad_ip_parameter execution CONFIG.NUM_OF_CS 1 diff --git a/projects/adaq7980_sdz/zed/system_bd.tcl b/projects/adaq7980_sdz/zed/system_bd.tcl index 5ccf29c95..ceaa440ca 100644 --- a/projects/adaq7980_sdz/zed/system_bd.tcl +++ b/projects/adaq7980_sdz/zed/system_bd.tcl @@ -1,4 +1,8 @@ source $ad_hdl_dir/projects/common/zed/zed_system_bd.tcl + +# specify ADC sampling rate in samples/seconds -- default is 1 MSPS +set adc_sampling_rate 1000000 + source ../common/adaq7980_bd.tcl