def createMesh(device, region): devsim.create_2d_mesh(mesh="dog") devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=0, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=0.5e-5, ps=1e-8) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=1e-5, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="y", pos=0, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="y", pos=1e-5, ps=1e-6) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=-1e-8, ps=1e-8) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=1.001e-5, ps=1e-8) devsim.add_2d_region(mesh="dog", material="Si", region=region) devsim.add_2d_region(mesh="dog", material="Si", region="air1", xl=-1e-8, xh=0) devsim.add_2d_region(mesh="dog", material="Si", region="air2", xl=1.0e-5, xh=1.001e-5) devsim.add_2d_contact(mesh="dog", name="top", region=region, yl=0.8e-5, yh=1e-5, xl=0, xh=0, bloat=1e-10, material="metal") devsim.add_2d_contact(mesh="dog", name="bot", region=region, xl=1e-5, xh=1e-5, bloat=1e-10, material="metal") devsim.finalize_mesh(mesh="dog") devsim.create_device(mesh="dog", device=device)
# error if region doesn't have any triangles # last add_region has highest precedence # allow use of names or tags # check my parser to verify that adding is possible (via dynamic_cast) # note this region won't have equation numbers devsim.add_2d_region( mesh="dog", material="gas", region="gas1", yl=-.001, yh=0.0) devsim.add_2d_region( mesh="dog", material="gas", region="gas2", yl=1.0, yh=1.001) devsim.add_2d_region( mesh="dog", material="Oxide", region="r0", xl=xmin, xh=xmax, yl=ymid1, yh=ymin) devsim.add_2d_region( mesh="dog", material="Silicon", region="r1", xl=xmin, xh=xmax, yl=ymid2, yh=ymid1) devsim.add_2d_region( mesh="dog", material="Silicon", region="r2", xl=xmin, xh=xmax, yl=ymid2, yh=ymax) #warn when leftover triangles are not encapsulated by region # not specifying bounding box means all intersecting nodes #bounding box is optional devsim.add_2d_interface( mesh="dog", name="i0", region0="r0", region1="r1") devsim.add_2d_interface( mesh="dog", name="i1", region0="r1", region1="r2", xl=0, xh=1, yl=ymid2, yh=ymid2, bloat=1.0e-10) devsim.add_2d_contact( mesh="dog", name="top", region="r0", yl=ymin, yh=ymin, bloat=1.0e-10, material="metal") devsim.add_2d_contact( mesh="dog", name="bot", region="r2", yl=ymax, yh=ymax, bloat=1.0e-10, material="metal") #contact can only apply interface devsim.finalize_mesh( mesh="dog") devsim.create_device(mesh="dog", device=device) devsim.node_model(device=device, name="NetDoping", region="gas1", equation="1e18") devsim.node_model(device=device, name="NetDoping", region="r0", equation="1e18") devsim.node_model(device=device, name="NetDoping", region="r1", equation="-1e15") devsim.node_model(device=device, name="NetDoping", region="r2", equation="-1e15") devsim.node_model(device=device, name="NetDoping", region="gas2", equation="-1e15") devsim.interface_normal_model(device=device, region="r0", interface="i0") devsim.interface_normal_model(device=device, region="r1", interface="i0") devsim.interface_normal_model(device=device, region="r1", interface="i1") devsim.interface_normal_model(device=device, region="r2", interface="i1")
devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=-1e-8, ps=1e-8) devsim.add_2d_mesh_line(mesh="dog", dir="x", pos=1.001e-5, ps=1e-8) devsim.add_2d_region(mesh="dog", material="Si", region=region) devsim.add_2d_region(mesh="dog", material="Si", region="air1", xl=-1e-8, xh=0) devsim.add_2d_region(mesh="dog", material="Si", region="air2", xl=1.0e-5, xh=1.001e-5) devsim.add_2d_contact(mesh="dog", name="top", region=region, xl=0, xh=0, bloat=1e-10, material="metal") devsim.add_2d_contact(mesh="dog", name="bot", region=region, xl=1e-5, xh=1e-5, bloat=1e-10, material="metal") devsim.finalize_mesh(mesh="dog") devsim.create_device(mesh="dog", device=device) test_common.SetupResistorConstants(device, region)
yh=y2, xl=x1, xh=x4) devsim.add_2d_region(mesh=device, material="metal", region="m2", yl=y3, yh=y4, xl=x2, xh=x3) # must be air since contacts don't have any equations devsim.add_2d_contact(mesh=device, name="bot", region="air", yl=y1, yh=y2, xl=x1, xh=x4, material="metal") devsim.add_2d_contact(mesh=device, name="top", region="air", yl=y3, yh=y4, xl=x2, xh=x3, material="metal") devsim.finalize_mesh(mesh=device) devsim.create_device(mesh=device, device=device) ###
devsim.add_2d_mesh_line(mesh="mos", dir="y", pos=y_device_bottom, ps=max_y_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_center, ps=x_channel_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_gate_left, ps=x_channel_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_bulk_left, ps=x_diffusion_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_gate_right, ps=x_channel_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_bulk_right, ps=x_diffusion_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_device_right, ps=max_x_spacing) devsim.add_2d_mesh_line(mesh="mos", dir="x", pos=x_device_left, ps=max_x_spacing) devsim.add_2d_region(mesh="mos", material="Air" , region="air") devsim.add_2d_region(mesh="mos", material="Silicon", region="bulk", xl=x_bulk_left, xh=x_bulk_right, yl=y_bulk_bottom, yh=y_bulk_top) devsim.add_2d_region(mesh="mos", material="Silicon", region="gate", xl=x_gate_left, xh=x_gate_right, yl=y_oxide_top, yh=y_gate_top) devsim.add_2d_region(mesh="mos", material="Oxide" , region="oxide", xl=x_gate_left, xh=x_gate_right, yl=y_bulk_top, yh=y_oxide_top) devsim.add_2d_contact(mesh="mos", name="gate", region="gate", yl=y_gate_top, yh=y_gate_top, material="metal") devsim.add_2d_contact(mesh="mos", name="body", region="bulk", yl=y_bulk_bottom, yh=y_bulk_bottom, material="metal") devsim.add_2d_contact(mesh="mos", name="source", region="bulk", yl=y_bulk_top, yh=y_bulk_top, xl=x_device_left, xh=x_gate_left, material="metal") devsim.add_2d_contact(mesh="mos", name="drain" , region="bulk", yl=y_bulk_top, yh=y_bulk_top, xl=x_gate_right, xh=x_device_right, material="metal") devsim.add_2d_interface(mesh="mos", name="gate_oxide", region0="gate", region1="oxide") devsim.add_2d_interface(mesh="mos", name="bulk_oxide", region0="bulk", region1="oxide") devsim.finalize_mesh(mesh="mos") devsim.create_device(mesh="mos", device=device) format_dict= { 'gate_doping' : gate_doping, 'source_doping' : source_doping, 'drain_doping' : drain_doping, 'body_doping' : body_doping,