1.1 Functional Description
(Ask a Question)The following figure shows the block diagram of ADC scaling.
The ADC scaling accumulates the first 8,192 samples of adc_result_ch0_i and adc_result_ch1_i. The calib_done_o signal is asserted after 8,192 samples are accumulated. The accumulated data is averaged and subtracted from each sample thereafter. This value is multiplied with adc_scale_val_i to give the actual ADC result. The block also asserts the over_current_fault_o when the scaled currents are more than the fault_threshold_i value.
During simulation, the block need not accumulate a large number of samples. The g_DEBUG parameter can be set to 1 to reduce the number of samples that are accumulated to 5, while setting it to 0 accumulates 8,192 samples.
