/* Program: dk_watts.c Revision: 24-May-2025 This program is used to calculate the Power Dissipation of the MSU part of the DK circuit board. Specifically this program will not see or take into consideration any power that is consumed by: the TOMCat, by the USB Cameras, or by the 5V0 feed to the Interposers. This program will see and take into consideration the 1V8 and 3V3 power feed to the Interposers (if the Interposers are connected). There are 6 DCDC Converters that power all of the MSU part of the DK circuit board and in cases some of these DCDC Converters also power external circuits, e.g. the 1V8 and 3V3 converters also send power to the Interposers. All 6 of these DCDC Converters are themselves powered the the 96 Volt to 5 Volt Converter. The 6 DCDC Converters are: Input Expected Output Current Load DCDC Output Bus Our DK Board Sample Current Expected Converter Voltage Name Principal Loads: Resistor Amps Efficiency --------- ------- --------- ----------------- -------- -------- ---------- 1 1V00 Bulk_1V00 ADC_Analog_1V00 20 mOhm 1.4 70 % ADC_Digital_1V00 2 1V05 Bulk_1V05 Core_1V05 20 mOhm 3.0 80 % XCVR_1V05 3 1V2 Bulk_1V2 DDR4 Memory 10 mOhm 3.0 80 % FPGA Banks #0, #6 4 1V8 Bulk_1V8 ADC_Analog_1V8 25 mOhm 1.5 75 % ADC_Digital_1V8 FPGA_1V8 FPGA Bank #9 to Interposers & miscellaneous 5 2V5 Bulk_2V5 Analog_2V5 25 mOhm 1.5 80 % Digital_2V5 FPGA Bank #9 Aux FPGA PLLs & Clk Buf 6 3V3 Bulk_3V3 Banks 1,2,3,5,7 25 mOhm 1.5 85 % to Interposers & miscellaneous This program starts by asking the operator to input the Voltage drop across the 6x input shunt resistors that feed the 6x DCDC Converters. Then the program makes some simple calculations for each of the 6x DCDC Converters: I_input = V_drop_measured / R_shunt W_input = I_input * 5.0 Volts W_output = W_input * Efficiency I_output = W_output / V_output The following arrays are used. All arrays run from 0:6. The index of 0 is not used but is the default starting index for C arrays. Only Indexes 1:6 are used and the index of a given element matches the Reference Designator of the particular DCDC Converter. V_drop_measured R_shunt I_input W_input Efficiency W_output V_bus I_output There are a number of constants that are used by this program: The voltage of the bus that feeds the input of the DCDC Converters, i.e. 5.0 Volts The efficiencies of the 6 DCDC Converters at their individual operating points The output bus voltages of the 6 DCDC Converters The output information from this program is the following: For each of the DCDC Converter's: V_drop_measured Input current Output current Output Watts Summary information output by this program Total Input current used by all 6 DCDC Converters Total Input Watts used by all 6 DCDC Converters Total Output Watts delivered by all 6 DCDC Converters */