diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 03:07:30 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 03:07:30 +0900 |
commit | 28ff5a039ffe7adbcb4e9c1dd166d0273ea18f8e (patch) | |
tree | 12448cf8e4de22e83153c47b959bedbb7b033be1 /error_utils.c | |
parent | 83ff699011be99df03fc1e07fbdc29a6c69341e4 (diff) |
first attempt at adding lower duty limit when ZOUT=MAX, for -LV option
Diffstat (limited to 'error_utils.c')
-rw-r--r-- | error_utils.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/error_utils.c b/error_utils.c index 31676d0..22f469e 100644 --- a/error_utils.c +++ b/error_utils.c @@ -363,6 +363,14 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-222,"Duty cycle too high or load resistance too low."); break; + case max_zout_error: + format_error_text(response,-222,"Output impedance too high."); + break; + + case max_zout_duty_error: + format_error_text(response,-222,"Duty cycle too high for the internal attenuators."); + break; + case max_soft_current_limit_error: format_error_text(response,-222,"Current limit too high."); break; @@ -860,6 +868,14 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) max_duty_this_ampl = globals.Flash.max_duty_mid2[i]; } + // for -LV option, restrict power dissipated in internal attenuators + if (globals.Flash.switchable_zout[i] && + (globals.ChannelState[i].zout==globals.Flash.zout_max[i]) && + (globals.Flash.switchable_zout_max_duty[i] > 0.0) && + (max_duty_this_ampl > globals.Flash.switchable_zout_max_duty[i])) { + max_duty_this_ampl = globals.Flash.switchable_zout_max_duty[i]; + } + ampl_fixed_max_duty = max_duty_this_ampl; if (globals.Flash.switchable_load[i]) { ampl_fixed_max_duty = max_duty_this_ampl * (ChannelStateToTest[i].load_type / globals.Flash.low_load_type[i]); @@ -1373,6 +1389,17 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) check_initial_max_value (globals.Flash.max_slew[i], &globals.Constraints.err_max_slew[i], ChannelStateToTest[i].slew, max_slew_error, &report_error); } + /* --- check zout / duty settings --- */ + + check_initial_max_value (globals.Flash.zout_max[i], &globals.Constraints.err_max_zout[i], ChannelStateToTest[i].zout, max_zout_error, &report_error); + if (globals.Flash.switchable_zout[i] && + (globals.ChannelState[i].zout==globals.Flash.zout_max[i]) && + (globals.Flash.switchable_zout_max_duty[i] > 0.0) && + (duty_cycle > (globals.Flash.switchable_zout_max_duty[i] / duty_scale))) { + // can only operate at min Zout at high duty cycles, due to attenuator limits + check_another_max_value (globals.Flash.zout_min[i], &globals.Constraints.err_max_zout[i], ChannelStateToTest[i].zout, max_zout_duty_error, &report_error); + } + /* --- check resistance settings --- */ if (globals.Flash.switchable_load[i]) { |