#!/usr/bin/perl my $D; open(WAVE1, "<", "sde_waveguide_template.cmd"); while($l=) { $D .= $l; } close WAVE1; # '1e+18' is nominal $Doping_N_emitter = '2e+18'; #'1e+15' is nominal $Doping_WG1 = '5e+15'; #'1e+15' is nominal $Doping_Active = '1e+15'; # _WAVEGUIDE_WIDTH_ ; 0.12 mkm standard. But we use here 12, not 0.12 # _WAVEGUIDE_1_POSITION_ ; = 2.129 + _WAVEGUIDE_WIDTH_ # _WAVEGUIDE_2_POSITION_ ; = 2.12 - _WAVEGUIDE_WIDTH_ for ($i=1; $i< 50; $i++) { $WAVEGUIDE_WIDTH = $i*0.02; $fname = 100 * $WAVEGUIDE_WIDTH; if ($fname < 100 && $fname >= 10) { $f = "0" . $fname; } if ($fname < 10) { $f = "00" . $fname; } $WAVEGUIDE_1_POSITION = 2.132 + $WAVEGUIDE_WIDTH; $WAVEGUIDE_2_POSITION = 2.12 - $WAVEGUIDE_WIDTH; $WAVEGUIDE_MESHING = 0.002; $W = ''; open(WAVE3, "<", "3D_des_template.cmd"); while($l=) { $W .= $l; } close WAVE3; $WAVEGUIDE_FILE = "0wg_" . $f; $new3D = $D; $new3D =~ s/_WAVEGUIDE_WIDTH_/$WAVEGUIDE_WIDTH/g; $new3D =~ s/_WAVEGUIDE_1_POSITION_/$WAVEGUIDE_1_POSITION/g; $new3D =~ s/_WAVEGUIDE_2_POSITION_/$WAVEGUIDE_2_POSITION/g; $new3D =~ s/_WAVEGUIDE_MESHING_/$WAVEGUIDE_MESHING/g; $new3D =~ s/_FILENAME_/$WAVEGUIDE_FILE/g; $new3D =~ s/_NDOPING_/$Doping_N_emitter/g; $new3D =~ s/_PDOPING_/$Doping_N_emitter/g; $new3D =~ s/_WG1DOPING_/$Doping_WG1/g; $new3D =~ s/_WG2DOPING_/$Doping_WG1/g; $new3D =~ s/_ACTIVEDOPING_/$Doping_Active/g; open (WAVE2, ">", "sde_waveguide.cmd"); print WAVE2 $new3D; close WAVE2; system `/usr/synopsys/bin/sde -e -l sde_waveguide.cmd`; # do not join -e and -l $MyNew3D = $W; $MyNew3D =~ s/_WAVEGUIDE_/$WAVEGUIDE_FILE/g; open (WAVE4, ">", "3D_des_waveguide.cmd"); print WAVE4 $MyNew3D; close WAVE4; system("/usr/synopsys/bin/sdevice 3D_des_waveguide.cmd"); }