; Main routine simulator('spectre) base_results=strcat("/results/data/Interactive.0/") sub_dir = strcat("") TSTOP = 30e-09 init_val = 1 final_val = sim_case = init_val while( sim_case < (final_val + 1) printf("sim_case = %d\n" sim_case) sprintf(sim_case_val "%d" sim_case) ; Define unique output file for each ADE-XL set of simulation results fname = strcat("" "_" sim_case_val ".csv") fp_params = outfile( fname "w") results=strcat( base_results sim_case_val sub_dir "psf") printf("Results directory\n%s\n" results) openResults( results ) selectResult( 'tran) ;ocnPrint( ?output "outputs.txt" outputs()) ; Load waveform "vc" vc = getData("/vc" ?results "tran" ?resultsDir results) tstart = 0 tstop = TSTOP sim_time = tstart delta_t = (tstop - tstart)/1000.0 while( sim_time < (tstop + 0.10*delta_t) fprintf(fp_params "Time,vc\n") fprintf(fp_params "%1.8e,%1.8e\n" sim_time value( vc sim_time)) sim_time = sim_time + delta_t ) ; end while loop close(fp_params) sim_case = sim_case + 1 ) ; end sim_case loop exit()