load("/home/smlogan/ocean_files/integrate.il") load("/home/smlogan/ocean_files/rise_fall.il") load("/home/smlogan/ocean_files/delay.il") load("/home/smlogan/ocean_files/setup.il") load("/home/smlogan/ocean_files/hold.il") load("/home/smlogan/ocean_files/duty_cycle.il") load("/home/smlogan/ocean_files/skew.il") load("/home/smlogan/ocean_files/tap_spacing.il") load("/home/smlogan/ocean_files/getWave.il") load("/home/smlogan/ocean_files/find_netlist_param.il") load("/home/smlogan/ocean_files/check_for_input_scs.il") print_internal_nodes_file = 0 ; Interative directory number montecarlo_num = 0 sprintf(montecarlo_num_val "%d" montecarlo_num) ; Main routine simulator('spectre) date = strcat("040822") circuit_name = strcat("sdtal5_TB_test_com_vco_div_smlogan_ftc_sdd5e_com_vco_div_rc_cworst_v1p2_v1p1_slowhigh_m40_0p72_16g_mc_sel_div_0") base_results=strcat("/scratch/noclean/dcd_serdes/smlogan/Modules/sdtal5/smlogan_unixrnd.lvn_dev/simulation/sdtal5_TB/test_com_vco_div_smlogan_lvn//maestro_mc/results/maestro/MonteCarlo." montecarlo_num_val "/") sub_dir = strcat("/sdtal5_TB_test_com_vco_div_smlogan_ftc_sdd5e_com_vco_div_rc_cworst_v1p2_v1p1_slowhigh_m40_0p72_16g_mc_sel_div_0/groupRunDataDir/psf/mc1_separate/") sub_netlist_dir = strcat("/sdtal5_TB_test_com_vco_div_smlogan_ftc_sdd5e_com_vco_div_rc_cworst_v1p2_v1p1_slowhigh_m40_0p72_16g_mc_sel_div_0/groupRunDataDir/") sprintf(montecarlo_num_val "%d" montecarlo_num) TSTOP = 12e-09 analysis_int = 4e-09 ; Define clip times clip_start = TSTOP - analysis_int clip_stop = TSTOP ; Set small time period before and after cross times to compute freuqency delta_t = 1e-12 init_val = 1 final_val = 200 ;final_val = 4 sim_case = init_val sim_case_delta = 3 while( sim_case < (final_val + 1) printf("sim_case = %d\n" sim_case) sprintf(sim_case_val "%d" sim_case) sub_sim_case = sim_case while( (sub_sim_case < (sim_case + sim_case_delta)) && (sub_sim_case < (final_val + 1)) ;; ----------- sprintf( sub_sim_case_val "%03d" sub_sim_case) printf( "sub_sim_case = %03d\n" sub_sim_case) results=strcat( base_results sim_case_val sub_dir sub_sim_case_val ) printf("Results directory\n%s\n" results) netlist_dir = strcat( base_results sim_case_val sub_netlist_dir "netlist") printf("Netlist directory\n%s\n" netlist_dir) ;; ----------- ; Check for existence of input.scs file in netlist directory ; Returns a "1" if the input.scs file exists and a "0" otherwise ; Returns are integers if( (check_for_input_scs(netlist_dir) == 1) then printf("Simulation case %d has valid input.scs file.\n" sub_sim_case) ;results=strcat( base_results sim_case_val sub_dir "psf") ;printf("Results directory\n%s\n" results) ;netlist_dir = strcat( base_results sim_case_val sub_dir "netlist") ; Find process case from netlist ; find_netlist_param( param_string column_number netlist_dir) process_case = find_netlist_param( "section" 2 netlist_dir) printf("process_case:\n%s\n" process_case) vdda_val = find_netlist_param( "vdda_val" 4 netlist_dir) printf("Initial value of vdda: %s\n" vdda_val) vdda_val = atof(vdda_val) printf("Initial float value of vdda: %.0f mV\n" vdda_val/1e-03) openResults(results) selectResult('tran) ;ocnPrint(?output "outputs.txt" outputs()) ; Find vdda and temperature vdda_val = VAR("vdda_val") printf("vdda = %.0f mV\n" vdda_val/1e-03) sim_temp = VAR("temp") printf("sim_temp = %.0f C\n" sim_temp) ; Find freq_GHz freq_GHz = VAR("freq_GHz") printf("freq_GHz = %0.1f\n" freq_GHz) ; Find num_periods num_periods = VAR("num_periods") printf("num_periods = %.0f input clock periods of %.4f GHz\n" num_periods freq_GHz) ; Find sel_div_val_variable sel_div_val_variable = VAR("sel_div_val") printf("sel_div_val_variable = %0.0f\n" sel_div_val_variable) ; Compute number of divout output clock periods sel_div_val = if(sel_div_val_variable == 0.0 1.0 sel_div_val) sel_div_val = if(sel_div_val_variable == 1.0 2.0 sel_div_val) sel_div_val = if(sel_div_val_variable == 2.0 3.0 sel_div_val) sel_div_val = if(sel_div_val_variable == 3.0 4.0 sel_div_val) sel_div_val = if(sel_div_val_variable == 4.0 1.5 sel_div_val) sel_div_val = if(sel_div_val_variable == 5.0 5.0 sel_div_val) divout_num_periods = num_periods/sel_div_val printf("divout_num_periods = %.0f output clock periods of %.4f GHz\n" num_periods freq_GHz/sel_div_val) ; Find tstop TSTOP = VAR("tstop") printf("TSTOP = %0.3f ns\n" TSTOP/1e-09) vdda = getWave("vdda" "tran" results) ave_vdda = average(vdda) vth = 0.50*ave_vdda clkin1p = getWave("clkin1p" "tran" results) clkin1n = getWave("clkin1n" "tran" results) clkin1 = clkin1p - clkin1n freq_in = if(frequency(clkin1) frequency(clkin1) 0.0) clk_p = getWave("clk_p" "tran" results) clk_n = getWave("clk_n" "tran" results) clk_ = clk_p - clk_n ; Adds and subtracts delta_t to avoid error with crossing threshold clip_start_clk_p = cross(clk_p vth 2 "rising" nil nil nil) - delta_t clip_end_clk_p = cross(clk_p vth -2 "rising" nil nil nil) + delta_t clip_start_clk_n = cross(clk_n vth 2 "rising" nil nil nil) - delta_t clip_end_clk_n = cross(clk_n vth -2 "rising" nil nil nil) + delta_t clip_start_clk_p = if(clip_start_clk_p clip_start_clk_p 0.0) clip_end_clk_p = if(clip_end_clk_p clip_end_clk_p tstop) clip_start_clk_n = if(clip_start_clk_n clip_start_clk_n 0.0) clip_end_clk_n = if(clip_end_clk_n clip_end_clk_n tstop) if(clip_start_clk_p > 10.0/(1e9*freq_GHz) 0.0 clip_start_clk_p) if(clip_end_clk_p < 10.0/(1e9*freq_GHz) TSTOP) clk_p_clipped = clip( clk_p clip_start_clk_p clip_end_clk_p) clk_n_clipped = clip( clk_n clip_start_clk_n clip_end_clk_n) freq_clk_p = if(frequency(clk_p_clipped) frequency(clk_p_clipped) 0.0) freq_clk_n = if(frequency(clk_n_clipped) frequency(clk_n_clipped) 0.0) divout_p = getWave("divout_p" "tran" results) divout_n = getWave("divout_n" "tran" results) divout = divout_p - divout_n ; Adds and subtracts delta_t to avoid error with crossing threshold clip_start_divout_p = if(cross(divout_p vth -(divout_num_periods - 12) "rising" nil nil nil) > 10.0/(1e9*freq_GHz) 5e-09 (cross(divout_p vth -(divout_num_periods - 12) "rising" nil nil nil) - delta_t)) clip_end_divout_p = if(cross(divout_p vth -2 "rising" nil nil nil) < 10.0/(1e9*freq_GHz) tstop (cross(divout_p vth -2 "rising" nil nil nil) + delta_t)) clip_start_divout_p = if(clip_start_divout_p clip_start_divout_p 0.0) clip_end_divout_p = if(clip_end_divout_p clip_end_divout_p tstop) printf("clip_start_divout_p = %.3f ns, clip_end_divout_p = %.3f ns.\n" clip_start_divout_p/1e-09 clip_end_divout_p/1e-09) divout_p_clipped = clip( divout_p clip_start_divout_p clip_end_divout_p) freq_divout_p = if(frequency(divout_p_clipped) frequency(divout_p_clipped) 0.0) clip_start_divout_n = if(cross(divout_n vth -(divout_num_periods - 12) "rising" nil nil nil) > 10.0/(1e9*freq_GHz) 5e-09 (cross(divout_n vth -(divout_num_periods - 12) "rising" nil nil nil) - delta_t)) clip_end_divout_n = if(cross(divout_n vth -2 "rising" nil nil nil) < 10.0/(1e9*freq_GHz) tstop (cross(divout_n vth -2 "rising" nil nil nil) + delta_t)) clip_start_divout_n = if(clip_start_divout_n clip_start_divout_n 0.0) clip_end_divout_n = if(clip_end_divout_n clip_end_divout_n tstop) ;clip_start_divout_n = if(cross(divout_n vth -(divout_num_periods - 12) "rising" nil nil nil) (cross(divout_n vth -(divout_num_periods - 12) "rising" nil nil nil) - delta_t) 5e-09) ;clip_end_divout_n = if(cross(divout_n vth -2 "rising" nil nil nil) (cross(divout_n vth -2 "rising" nil nil nil) + delta_t) tstop) ;clip_start_divout_n = cross(divout_n vth -(divout_num_periods - 12) "rising" nil nil nil) - delta_t ;clip_end_divout_n = cross(divout_n vth -2 "rising" nil nil nil) + delta_t divout_n_clipped = clip( divout_n clip_start_divout_n clip_end_divout_n) freq_divout_n = if(frequency(divout_n_clipped) frequency(divout_n_clipped) 0.0) printf("clip_start_divout_n = %.3f ns, clip_end_divout_n = %.3f ns.\n" clip_start_divout_n/1e-09 clip_end_divout_n/1e-09) ; Overwrite TSTOP to minimum value of clip_end_divout_p and clip_end_divout_n to allow for incomplete simulations TSTOP = if((clip_end_divout_p > clip_end_divout_n) clip_end_divout_n clip_end_divout_p) ; Find currents ;ivdda = getWave("ivdda:in" "tran" results) ivdda = getWave("/ivdda/PLUS" "tran" results) printf("Completed reading waveforms.\n") ave_ivdda_mA = if(freq_clk_p == 0.0 0.0 1e3*average(clip(ivdda clip_start_divout_p clip_end_divout_p))) ave_pwr_uW = ave_ivdda_mA*ave_vdda/1e-03 ; clip_start_tpd = cross(clk_p vth -12 "falling" nil nil nil) - delta_t ; clip_end_tpd = cross(clk_p vth -2 "falling" nil nil nil) + delta_t ; printf("Propagation delay clip time from %.3f ns to %.3f ns.\n" clip_start_tpd/1e-09 clip_end_tpd/1e-09) ; tpd_divout_p_rising = delay_ps(clk_p "rising" divout_p "rising" ave_vdda clip_start_tpd clip_end_tpd) ; tpd_divout_p_falling = delay_ps(clk_p "falling" divout_p "falling" ave_vdda clip_start_tpd clip_end_tpd) ; tpd_divout_n_rising = delay_ps(clk_n "rising" divout_n "rising" ave_vdda clip_start_tpd clip_end_tpd) ; tpd_divout_n_falling = delay_ps(clk_n "falling" divout_n "falling" ave_vdda clip_start_tpd clip_end_tpd) ; printf("Completed propagation delay time computations.\n") if((sub_sim_case == init_val) then ; Define output file for simulation results and write header sprintf(fname "%s_params_%s.csv" circuit_name date) fp_params = outfile( fname "w") fprintf(fp_params "Corner number,Process,vdda (mV),Temperature (C),") fprintf(fp_params "Desired divider,") fprintf(fp_params "Input clock frequency (GHz),") fprintf(fp_params "clk_p frequency (GHz),") fprintf(fp_params "clk_n frequency (GHz),") fprintf(fp_params "divout_p frequency (GHz),") fprintf(fp_params "divout_n frequency (GHz),") fprintf(fp_params "Divider ratio: divout_p,") fprintf(fp_params "Divider ratio: divout_n,") fprintf(fp_params "Duty cycle error clk_p (%%),") fprintf(fp_params "Duty cycle error clk_n (%%),") fprintf(fp_params "Duty cycle error divout_p (%%),") fprintf(fp_params "Duty cycle error ave divout_p (%%),") fprintf(fp_params "Duty cycle error min divout_p (%%),") fprintf(fp_params "Duty cycle error max divout_p (%%),") fprintf(fp_params "Duty cycle error divout_n (%%),") fprintf(fp_params "Duty cycle error ave divout_n (%%),") fprintf(fp_params "Duty cycle error min divout_n (%%),") fprintf(fp_params "Duty cycle error max divout_n (%%),") fprintf(fp_params "P/N skew clk (rising) (ps),") fprintf(fp_params "P/N skew clk (falling) (ps),") fprintf(fp_params "P/N divout (rising) (ps),") fprintf(fp_params "P/N divout (falling) (ps),") fprintf(fp_params "clk_p Rise time (ps),") fprintf(fp_params "clk_p Fall time (ps),") fprintf(fp_params "clk_n Rise time (ps),") fprintf(fp_params "clk_n Fall time (ps),") fprintf(fp_params "divout_p Rise time (ps),") fprintf(fp_params "divout_p Fall time (ps),") fprintf(fp_params "divout_n Rise time (ps),") fprintf(fp_params "divout_n Fall time (ps),") ; fprintf(fp_params "tpd_clk_p_rising_divout_p_rising (ps),") ; fprintf(fp_params "tpd_clk_p_falling_divout_p_falling (ps),") ; fprintf(fp_params "tpd_clk_n_rising_divout_n_rising (ps),") ; fprintf(fp_params "tpd_clk_n_falling_divout_n_falling (ps),") fprintf(fp_params "Supply current (mA),") fprintf(fp_params "Power (uW)\n") printf("sim_case = %d, sel_div_val = %.4f\n" sub_sim_case sel_div_val) fprintf(fp_params "%d,%s,%.0f,%.0f,%.4f," sub_sim_case process_case vdda_val/1e-03 sim_temp sel_div_val) fprintf(fp_params "%1.8e," freq_in/1e9) fprintf(fp_params "%1.8e," freq_clk_p/1e9) fprintf(fp_params "%1.8e," freq_clk_n/1e9) fprintf(fp_params "%1.8e," freq_divout_p/1e9) fprintf(fp_params "%1.8e," freq_divout_n/1e9) fprintf(fp_params "%1.8e," freq_clk_p/freq_divout_p) fprintf(fp_params "%1.8e," freq_clk_n/freq_divout_n) printf("Averaging clk_p/clk_n between %.3f ns/%.3f ns and %.3f ns/%.3f ns.\n" clip_start_clk_p/1e-09 clip_start_clk_n/1e-09 clip_end_clk_p/1e-09 clip_end_clk_n/1e-09) printf("Averaging divout_p/divout_n between %.3f ns/%.3f ns and %.3f ns/%.3f ns.\n" clip_start_divout_p/1e-09 clip_start_divout_n/1e-09 clip_end_divout_p/1e-09 clip_end_divout_n/1e-09) du_ave_divout_p = average(dutyCycle(clip(divout_p clip_start_divout_p clip_end_divout_p) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_ave_divout_p = if(du_ave_divout_p du_ave_divout_p 0.0) du_min_divout_p = ymin(dutyCycle(clip(divout_p clip_start_divout_p clip_end_divout_p) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_min_divout_p = if(du_min_divout_p du_min_divout_p 0.0) du_max_divout_p = ymax(dutyCycle(clip(divout_p clip_start_divout_p clip_end_divout_p) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_max_divout_p = if(du_max_divout_p du_max_divout_p 0.0) du_ave_divout_n = average(dutyCycle(clip(divout_n clip_start_divout_n clip_end_divout_n) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_ave_divout_n = if(du_ave_divout_n du_ave_divout_n 0.0) du_min_divout_n = ymin(dutyCycle(clip(divout_n clip_start_divout_n clip_end_divout_n) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_min_divout_n = if(du_min_divout_n du_min_divout_n 0.0) du_max_divout_n = ymax(dutyCycle(clip(divout_n clip_start_divout_n clip_end_divout_n) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_max_divout_n = if(du_max_divout_n du_max_divout_n 0.0) printf("Completed frequency and divider ratio computations.\n") fprintf(fp_params "%1.8e," du(clk_p ave_vdda clip_start_clk_p clip_end_clk_p) - 50.0) fprintf(fp_params "%1.8e," du(clk_n ave_vdda clip_start_clk_n clip_end_clk_n) - 50.0) fprintf(fp_params "%1.8e," du(divout_p ave_vdda clip_start_divout_p clip_end_divout_p) - 50.0) fprintf(fp_params "%1.8e," du_ave_divout_p - 50.0) fprintf(fp_params "%1.8e," du_min_divout_p - 50.0) fprintf(fp_params "%1.8e," du_max_divout_p - 50.0) fprintf(fp_params "%1.8e," du(divout_n ave_vdda clip_start_divout_n clip_end_divout_n) - 50.0) fprintf(fp_params "%1.8e," du_ave_divout_n - 50.0) fprintf(fp_params "%1.8e," du_min_divout_n - 50.0) fprintf(fp_params "%1.8e," du_max_divout_n - 50.0) printf("Completed duty-cyle computations.\n") fprintf(fp_params "%1.8e," skew_ps(clk_p "rising" clk_n "falling" ave_vdda clip_start_clk_p clip_end_clk_p)) fprintf(fp_params "%1.8e," skew_ps(clk_p "falling" clk_n "rising" ave_vdda clip_start_clk_n clip_end_clk_n)) fprintf(fp_params "%1.8e," skew_ps(divout_p "rising" divout_n "falling" ave_vdda clip_start_divout_p clip_end_divout_p)) fprintf(fp_params "%1.8e," skew_ps(divout_p "falling" divout_n "rising" ave_vdda clip_start_divout_n clip_end_divout_n)) printf("Completed P/N skew computations.\n") fprintf(fp_params "%1.8e," rise_fall_ps(clk_p ave_vdda "rising" clip_start_clk_p clip_end_clk_p)) fprintf(fp_params "%1.8e," rise_fall_ps(clk_p ave_vdda "falling" clip_start_clk_p clip_end_clk_p)) fprintf(fp_params "%1.8e," rise_fall_ps(clk_n ave_vdda "rising" clip_start_clk_n clip_end_clk_n)) fprintf(fp_params "%1.8e," rise_fall_ps(clk_n ave_vdda "falling" clip_start_clk_n clip_end_clk_n)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_p ave_vdda "rising" clip_start_divout_p clip_end_divout_p)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_p ave_vdda "falling" clip_start_divout_p clip_end_divout_p)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_n ave_vdda "rising" clip_start_divout_n clip_end_divout_n)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_n ave_vdda "falling" clip_start_divout_n clip_end_divout_n)) printf("Completed transition time computations.\n") ; fprintf(fp_params "%1.8e," tpd_divout_p_rising) ; fprintf(fp_params "%1.8e," tpd_divout_p_falling) ; fprintf(fp_params "%1.8e," tpd_divout_n_rising) ; fprintf(fp_params "%1.8e," tpd_divout_n_falling) fprintf(fp_params "%1.8e," ave_ivdda_mA) fprintf(fp_params "%1.8e\n" ave_pwr_uW) printf("Completed supply current computation.\n") close(fp_params) else fp_params = outfile( fname "a") printf("sim_case = %d, sel_div_val = %.4f\n" sim_case sel_div_val) fprintf(fp_params "%d,%s,%.0f,%.0f,%.4f," sub_sim_case process_case vdda_val/1e-03 sim_temp sel_div_val) fprintf(fp_params "%1.8e," freq_in/1e9) fprintf(fp_params "%1.8e," freq_clk_p/1e9) fprintf(fp_params "%1.8e," freq_clk_n/1e9) fprintf(fp_params "%1.8e," freq_divout_p/1e9) fprintf(fp_params "%1.8e," freq_divout_n/1e9) fprintf(fp_params "%1.8e," freq_clk_p/freq_divout_p) fprintf(fp_params "%1.8e," freq_clk_n/freq_divout_n) printf("Averaging clk_p/clk_n between %.3f ns/%.3f ns and %.3f ns/%.3f ns.\n" clip_start_clk_p/1e-09 clip_start_clk_n/1e-09 clip_end_clk_p/1e-09 clip_end_clk_n/1e-09) printf("Averaging divout_p/divout_n between %.3f ns/%.3f ns and %.3f ns/%.3f ns.\n" clip_start_divout_p/1e-09 clip_start_divout_n/1e-09 clip_end_divout_p/1e-09 clip_end_divout_n/1e-09) du_ave_divout_p = average(dutyCycle(clip(divout_p clip_start_divout_p clip_end_divout_p) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_ave_divout_p = if(du_ave_divout_p du_ave_divout_p 0.0) du_min_divout_p = ymin(dutyCycle(clip(divout_p clip_start_divout_p clip_end_divout_p) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_min_divout_p = if(du_min_divout_p du_min_divout_p 0.0) du_max_divout_p = ymax(dutyCycle(clip(divout_p clip_start_divout_p clip_end_divout_p) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_max_divout_p = if(du_max_divout_p du_max_divout_p 0.0) du_ave_divout_n = average(dutyCycle(clip(divout_n clip_start_divout_n clip_end_divout_n) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_ave_divout_n = if(du_ave_divout_n du_ave_divout_n 0.0) du_min_divout_n = ymin(dutyCycle(clip(divout_n clip_start_divout_n clip_end_divout_n) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_min_divout_n = if(du_min_divout_n du_min_divout_n 0.0) du_max_divout_n = ymax(dutyCycle(clip(divout_n clip_start_divout_n clip_end_divout_n) ?mode "user" ?threshold vth ?xName "time" ?outputType "plot")) du_max_divout_n = if(du_max_divout_n du_max_divout_n 0.0) printf("Completed frequency and divider ratio computations.\n") fprintf(fp_params "%1.8e," du(clk_p ave_vdda clip_start_clk_p clip_end_clk_p) - 50.0) fprintf(fp_params "%1.8e," du(clk_n ave_vdda clip_start_clk_n clip_end_clk_n) - 50.0) fprintf(fp_params "%1.8e," du(divout_p ave_vdda clip_start_divout_p clip_end_divout_p) - 50.0) fprintf(fp_params "%1.8e," du_ave_divout_p - 50.0) fprintf(fp_params "%1.8e," du_min_divout_p - 50.0) fprintf(fp_params "%1.8e," du_max_divout_p - 50.0) fprintf(fp_params "%1.8e," du(divout_n ave_vdda clip_start_divout_n clip_end_divout_n) - 50.0) fprintf(fp_params "%1.8e," du_ave_divout_n - 50.0) fprintf(fp_params "%1.8e," du_min_divout_n - 50.0) fprintf(fp_params "%1.8e," du_max_divout_n - 50.0) printf("Completed duty-cyle computations.\n") fprintf(fp_params "%1.8e," skew_ps(clk_p "rising" clk_n "falling" ave_vdda clip_start_clk_p clip_end_clk_p)) fprintf(fp_params "%1.8e," skew_ps(clk_p "falling" clk_n "rising" ave_vdda clip_start_clk_n clip_end_clk_n)) fprintf(fp_params "%1.8e," skew_ps(divout_p "rising" divout_n "falling" ave_vdda clip_start_divout_p clip_end_divout_p)) fprintf(fp_params "%1.8e," skew_ps(divout_p "falling" divout_n "rising" ave_vdda clip_start_divout_n clip_end_divout_n)) printf("Completed P/N skew computations.\n") fprintf(fp_params "%1.8e," rise_fall_ps(clk_p ave_vdda "rising" clip_start_clk_p clip_end_clk_p)) fprintf(fp_params "%1.8e," rise_fall_ps(clk_p ave_vdda "falling" clip_start_clk_p clip_end_clk_p)) fprintf(fp_params "%1.8e," rise_fall_ps(clk_n ave_vdda "rising" clip_start_clk_n clip_end_clk_n)) fprintf(fp_params "%1.8e," rise_fall_ps(clk_n ave_vdda "falling" clip_start_clk_n clip_end_clk_n)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_p ave_vdda "rising" clip_start_divout_p clip_end_divout_p)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_p ave_vdda "falling" clip_start_divout_p clip_end_divout_p)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_n ave_vdda "rising" clip_start_divout_n clip_end_divout_n)) fprintf(fp_params "%1.8e," rise_fall_ps(divout_n ave_vdda "falling" clip_start_divout_n clip_end_divout_n)) printf("Completed transition time computations.\n") ; fprintf(fp_params "%1.8e," tpd_divout_p_rising) ; fprintf(fp_params "%1.8e," tpd_divout_p_falling) ; fprintf(fp_params "%1.8e," tpd_divout_n_rising) ; fprintf(fp_params "%1.8e," tpd_divout_n_falling) fprintf(fp_params "%1.8e," ave_ivdda_mA) fprintf(fp_params "%1.8e\n" ave_pwr_uW) printf("Completed supply current computation.\n") close(fp_params) ) else printf("Simulation case %d has NO input.scs file!!\n" sub_sim_case) ) if((print_internal_nodes_file == 1) then close(fp_int_params) else ) sub_sim_case = sub_sim_case + 1) ; close sub_sim_case loop sim_case = sim_case + sim_case_delta) ; close sim_case loop exit()