From 09b55d5ca98747a3c33b6fca10541104626bc2c3 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 1 Jan 2000 00:15:59 +0900 Subject: Rename piece-wise-linear variables for clarity, dropping reference to obsolete 12bit values --- flash.c | 154 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 77 insertions(+), 77 deletions(-) (limited to 'flash.c') diff --git a/flash.c b/flash.c index 0178f30..d8c3529 100644 --- a/flash.c +++ b/flash.c @@ -526,15 +526,15 @@ static void initFlashValues(FlashStruct *mem) mem->enable_avrq_extra_ampls=0; for (i=0; ivcc1_pwl_Vc_norm4095[0][0][0][i]=0; - mem->vcc1_pwl_amp[0][0][0][i]=0.0; - mem->vcc2_pwl_Vc_norm4095[0][0][0][i]=0; - mem->vcc2_pwl_amp[0][0][0][i]=0.0; + mem->vcc1_dacval[0][0][0][i]=0; + mem->vcc1_pwl[0][0][0][i]=0.0; + mem->vcc2_dacval[0][0][0][i]=0; + mem->vcc2_pwl[0][0][0][i]=0.0; } - mem->vcc1_pwl_Vc_norm4095[0][0][0][1]=dac_max; - mem->vcc1_pwl_amp[0][0][0][1]=10.0; - mem->vcc2_pwl_Vc_norm4095[0][0][0][1]=dac_max; - mem->vcc2_pwl_amp[0][0][0][1]=25; + mem->vcc1_dacval[0][0][0][1]=dac_max; + mem->vcc1_pwl[0][0][0][1]=10.0; + mem->vcc2_dacval[0][0][0][1]=dac_max; + mem->vcc2_pwl[0][0][0][1]=25; for (i=0; islew_pwl_time[i][j][k][m]=0.0; - mem->slew_pwl_Vc_norm4095[i][j][k][m]=0; + mem->slew_pwl[i][j][k][m]=0.0; + mem->slew_dacval[i][j][k][m]=0; int temp_int; @@ -553,52 +553,52 @@ static void initFlashValues(FlashStruct *mem) temp_int = dac_max; - mem->period_pwl_time[i][j][k][m]=(47e-9*power_of_ten)+41e-9; - mem->pw_pwl_time[i][j][k][m]=(6e-9*power_of_ten)+20e-9; - mem->delay_pwl_time[i][j][k][m]=((6e-9*power_of_ten)+10e-9) * (i+1.0); - mem->burst_pwl_time[i][j][k][m]=(22e-9*power_of_ten)+25e-9; + mem->period_pwl[i][j][k][m]=(47e-9*power_of_ten)+41e-9; + mem->pw_pwl[i][j][k][m]=(6e-9*power_of_ten)+20e-9; + mem->delay_pwl[i][j][k][m]=((6e-9*power_of_ten)+10e-9) * (i+1.0); + mem->burst_pwl[i][j][k][m]=(22e-9*power_of_ten)+25e-9; } else if (m==1) { temp_int = dac_max/2.15; - mem->period_pwl_time[i][j][k][m]=(100e-9*power_of_ten)+50e-9; - mem->pw_pwl_time[i][j][k][m]=(14e-9*power_of_ten)+25e-9; - mem->delay_pwl_time[i][j][k][m]=((14e-9*power_of_ten)+30e-9) * (i+1.0); - mem->burst_pwl_time[i][j][k][m]=(33e-9*power_of_ten)+10e-9; + mem->period_pwl[i][j][k][m]=(100e-9*power_of_ten)+50e-9; + mem->pw_pwl[i][j][k][m]=(14e-9*power_of_ten)+25e-9; + mem->delay_pwl[i][j][k][m]=((14e-9*power_of_ten)+30e-9) * (i+1.0); + mem->burst_pwl[i][j][k][m]=(33e-9*power_of_ten)+10e-9; } else if (m==2) { temp_int = dac_max/4.6; - mem->period_pwl_time[i][j][k][m]=(230e-9*power_of_ten)+100e-9; - mem->pw_pwl_time[i][j][k][m]=(28e-9*power_of_ten)+50e-9; - mem->delay_pwl_time[i][j][k][m]=((28e-9*power_of_ten)+60e-9) * (i+1.0); - mem->burst_pwl_time[i][j][k][m]=(50e-9*power_of_ten)+10e-9; + mem->period_pwl[i][j][k][m]=(230e-9*power_of_ten)+100e-9; + mem->pw_pwl[i][j][k][m]=(28e-9*power_of_ten)+50e-9; + mem->delay_pwl[i][j][k][m]=((28e-9*power_of_ten)+60e-9) * (i+1.0); + mem->burst_pwl[i][j][k][m]=(50e-9*power_of_ten)+10e-9; } else if (m==3) { temp_int = dac_max / 10; - mem->period_pwl_time[i][j][k][m]=(470e-9*power_of_ten)+160e-9; - mem->pw_pwl_time[i][j][k][m]=(70e-9*power_of_ten)+80e-9; - mem->delay_pwl_time[i][j][k][m]=((70e-9*power_of_ten))+90e-9 * (i+1.0); - mem->burst_pwl_time[i][j][k][m]=(110e-9*power_of_ten)+10e-9; + mem->period_pwl[i][j][k][m]=(470e-9*power_of_ten)+160e-9; + mem->pw_pwl[i][j][k][m]=(70e-9*power_of_ten)+80e-9; + mem->delay_pwl[i][j][k][m]=((70e-9*power_of_ten))+90e-9 * (i+1.0); + mem->burst_pwl[i][j][k][m]=(110e-9*power_of_ten)+10e-9; } else if (m==4) { temp_int = dac_max / 20 ; - mem->period_pwl_time[i][j][k][m]=(900e-9*power_of_ten)+200e-9; - mem->pw_pwl_time[i][j][k][m]=(140e-9*power_of_ten)+80e-9; - mem->delay_pwl_time[i][j][k][m]=((140e-9*power_of_ten)+90e-9) * (i+1.0); - mem->burst_pwl_time[i][j][k][m]=(220e-9*power_of_ten)+10e-9; + mem->period_pwl[i][j][k][m]=(900e-9*power_of_ten)+200e-9; + mem->pw_pwl[i][j][k][m]=(140e-9*power_of_ten)+80e-9; + mem->delay_pwl[i][j][k][m]=((140e-9*power_of_ten)+90e-9) * (i+1.0); + mem->burst_pwl[i][j][k][m]=(220e-9*power_of_ten)+10e-9; } else { temp_int = 0; - mem->pw_pwl_time[i][j][k][m]=0.0; - mem->delay_pwl_time[i][j][k][m]=0.0; - mem->period_pwl_time[i][j][k][m]=0.0; - mem->burst_pwl_time[i][j][k][m]=0.0; + mem->pw_pwl[i][j][k][m]=0.0; + mem->delay_pwl[i][j][k][m]=0.0; + mem->period_pwl[i][j][k][m]=0.0; + mem->burst_pwl[i][j][k][m]=0.0; } - mem->pw_pwl_Vc_norm4095[i][j][k][m]=temp_int; - mem->delay_pwl_Vc_norm4095[i][j][k][m]=temp_int; - mem->period_pwl_Vc_norm4095[i][j][k][m]=temp_int; - mem->burst_pwl_Vc_norm4095[i][j][k][m]=temp_int; + mem->pw_dacval[i][j][k][m]=temp_int; + mem->delay_dacval[i][j][k][m]=temp_int; + mem->period_dacval[i][j][k][m]=temp_int; + mem->burst_dacval[i][j][k][m]=temp_int; } } power_of_ten*=10.0; @@ -611,17 +611,17 @@ static void initFlashValues(FlashStruct *mem) for (k=0; krise_time_pwl_Vc_norm4095[i][j][k][m]=dac_max; - mem->rise_time_pwl_time[i][j][k][m]=(1e-9+power_of_two); + mem->rise_time_dacval[i][j][k][m]=dac_max; + mem->rise_time_pwl[i][j][k][m]=(1e-9+power_of_two); } else if (m==1) { - mem->rise_time_pwl_Vc_norm4095[i][j][k][m]=dac_max/2; - mem->rise_time_pwl_time[i][j][k][m]=(1e-9+(power_of_two*1.5)); + mem->rise_time_dacval[i][j][k][m]=dac_max/2; + mem->rise_time_pwl[i][j][k][m]=(1e-9+(power_of_two*1.5)); } else if (m==2) { - mem->rise_time_pwl_Vc_norm4095[i][j][k][m]=dac_max/4.6; - mem->rise_time_pwl_time[i][j][k][m]=(1e-9+(power_of_two*3.0)); + mem->rise_time_dacval[i][j][k][m]=dac_max/4.6; + mem->rise_time_pwl[i][j][k][m]=(1e-9+(power_of_two*3.0)); } else { - mem->rise_time_pwl_Vc_norm4095[i][j][k][m]=0; - mem->rise_time_pwl_time[i][j][k][m]=0.0; + mem->rise_time_dacval[i][j][k][m]=0; + mem->rise_time_pwl[i][j][k][m]=0.0; } } } @@ -637,12 +637,12 @@ static void initFlashValues(FlashStruct *mem) for (j=0; j<10; j++) for (k=0; k<5; k++) for (m=0; m<2; m++) { - mem->ampl_pwl_Vc_norm4095[i][k][m][j]=0; - mem->ampl_pwl_amp[i][k][m][j]=0.0; + mem->ampl_dacval[i][k][m][j]=0; + mem->ampl_pwl[i][k][m][j]=0.0; } - mem->ampl_pwl_Vc_norm4095[i][0][0][1]=dac_max; - mem->ampl_pwl_amp[i][0][0][1]=100.0; + mem->ampl_dacval[i][0][0][1]=dac_max; + mem->ampl_pwl[i][0][0][1]=100.0; for (j=0; jrcl_frequency[i][j]=10000.0; @@ -670,36 +670,36 @@ static void initFlashValues(FlashStruct *mem) mem->mon_vi_ratio[i][j][k]=0.050*(j+1); } - mem->load_type_pwl_time[i][0][0][0] = 200; - mem->load_type_pwl_time[i][0][0][1] = 10000; - mem->load_type_pwl_Vc_norm4095[i][0][0][0] = dac_max; - mem->load_type_pwl_Vc_norm4095[i][0][0][1] = dac_max / 60; + mem->load_type_pwl[i][0][0][0] = 200; + mem->load_type_pwl[i][0][0][1] = 10000; + mem->load_type_dacval[i][0][0][0] = dac_max; + mem->load_type_dacval[i][0][0][1] = dac_max / 60; for (j=2; j<10; j++) { - mem->load_type_pwl_time[i][0][0][j] = 0; - mem->load_type_pwl_Vc_norm4095[i][0][0][j] = 0; + mem->load_type_pwl[i][0][0][j] = 0; + mem->load_type_dacval[i][0][0][j] = 0; } - mem->slew_pwl_time[i][4][0][0]=80e6; - mem->slew_pwl_time[i][4][0][1]=240e6; - mem->slew_pwl_time[i][3][0][0]=40e6; - mem->slew_pwl_time[i][3][0][1]=120e6; - mem->slew_pwl_time[i][2][0][0]=20e6; - mem->slew_pwl_time[i][2][0][1]=60e6; - mem->slew_pwl_time[i][1][0][0]=10e6; - mem->slew_pwl_time[i][1][0][1]=30e6; - mem->slew_pwl_time[i][0][0][0]=5e6; - mem->slew_pwl_time[i][0][0][1]=15e6; - - mem->slew_pwl_Vc_norm4095[i][0][0][1]=dac_max; - mem->slew_pwl_Vc_norm4095[i][1][0][1]=dac_max; - mem->slew_pwl_Vc_norm4095[i][2][0][1]=dac_max; - mem->slew_pwl_Vc_norm4095[i][3][0][1]=dac_max; - mem->slew_pwl_Vc_norm4095[i][4][0][1]=dac_max; + mem->slew_pwl[i][4][0][0]=80e6; + mem->slew_pwl[i][4][0][1]=240e6; + mem->slew_pwl[i][3][0][0]=40e6; + mem->slew_pwl[i][3][0][1]=120e6; + mem->slew_pwl[i][2][0][0]=20e6; + mem->slew_pwl[i][2][0][1]=60e6; + mem->slew_pwl[i][1][0][0]=10e6; + mem->slew_pwl[i][1][0][1]=30e6; + mem->slew_pwl[i][0][0][0]=5e6; + mem->slew_pwl[i][0][0][1]=15e6; + + mem->slew_dacval[i][0][0][1]=dac_max; + mem->slew_dacval[i][1][0][1]=dac_max; + mem->slew_dacval[i][2][0][1]=dac_max; + mem->slew_dacval[i][3][0][1]=dac_max; + mem->slew_dacval[i][4][0][1]=dac_max; } /* special consideration for CH2 delay */ - mem->delay_pwl_time[1][0][0][0]=-0.1e-9; + mem->delay_pwl[1][0][0][0]=-0.1e-9; for (i=0; irouting_required[i]=0; @@ -773,12 +773,12 @@ static void initFlashValues(FlashStruct *mem) for (j=0; j<10; j++) { for (k=0; k<5; k++) { - mem->os_pwl_Vc_norm4095[i][k][0][j]=0; - mem->os_pwl_amp[i][k][0][j]=0.0; + mem->os_dacval[i][k][0][j]=0; + mem->os_pwl[i][k][0][j]=0.0; } } - mem->os_pwl_Vc_norm4095[i][0][0][1]=dac_max; - mem->os_pwl_amp[i][0][0][1]=100.0; + mem->os_dacval[i][0][0][1]=dac_max; + mem->os_pwl[i][0][0][1]=100.0; mem->ampl_DAC[i]=0; mem->os_DAC[i]=1; -- cgit