Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions common/transistor/mosfet_4T.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<component version="1.3" xmlns="http://schemas.circuit-diagram.org/circuitDiagramDocument/2012/component/xml">
<declaration>
<meta name="name" value="Mosfet_4T" />
<meta name="minsize" value="60" />
<meta name="canflip" value="true" />
<meta name="author" value="forgetpwd" />
<meta name="additionalinformation" value="http://www.circuit-diagram.org/" />
<meta name="guid" value="b1a6b522-61bd-418b-8931-5b18d645192d" />
<meta name="implementset" value="http://schemas.circuit-diagram.org/circuitDiagramDocument/2012/components/common" />

<property name="Type" type="enum" default="NMOS_core" serialize="t" display="Type">
<option>NMOS_core</option>
<option>PMOS_core</option>
<option>NMOS_IO</option>
<option>PMOS_IO</option>
</property>
<flags>
<option>FlipPrimary</option>
<option>FlipSecondary</option>
<option>MiddleMustAlign</option>
</flags>
<configurations>
<configuration name="NMOS core thin gate" value="Type:NMOS_core" implements="nmoscore" />
<configuration name="PMOS core thin gate" value="Type:PMOS_core" implements="pmoscore" />
<configuration name="NMOS IO thick gate" value="Type:NMOS_IO" implements="nmosio" />
<configuration name="PMOS IO thick gate" value="Type:PMOS_IO" implements="pmosio" />
</configurations>
</declaration>
<connections>
<!-- MOSFET -->
<group conditions="horizontal,$Type!=PMOS_core, $Type!=PMOS_IO">
<connection name="drn" start="_Start" end="_Middle-15x" edge="Start" />
<connection name="src" start="_Middle+15x" end="_End" edge="End" />
<connection name="gate" start="_Middle-40y" end="_Middle-31y" edge="Start" />
<connection name="body" start="_Middle-5y" end="_Middle" edge="End" />
</group>
<group conditions="!horizontal,$Type!=PMOS_core,$Type!=PMOS_IO">
<connection name="drn" start="_Start" end="_Middle-15y" edge="Start" />
<connection name="src" start="_Middle+15y" end="_End" edge="End" />
<connection name="gate" start="_Middle-40x" end="_Middle-31x" edge="Start" />
<connection name="body" start="_Middle-5x" end="_Middle" edge="End" />
</group>
<group conditions="horizontal,$Type!=NMOS_core, $Type!=NMOS_IO">
<connection name="src" start="_Start" end="_Middle-15x" edge="Start" />
<connection name="drn" start="_Middle+15x" end="_End" edge="End" />
<connection name="gate" start="_Middle-40y" end="_Middle-35y" edge="Start" />
<connection name="body" start="_Middle-5y" end="_Middle" edge="End" />
</group>
<group conditions="!horizontal,$Type!=NMOS_core, $Type!=NMOS_IO">
<connection name="src" start="_Start" end="_Middle-15y" edge="Start" />
<connection name="drn" start="_Middle+15y" end="_End" edge="End" />
<connection name="gate" start="_Middle-40x" end="_Middle-35x" edge="Start" />
<connection name="body" start="_Middle-5x" end="_Middle" edge="End" />
</group>
</connections>
<render>
<!-- NMOS core -->
<group conditions="horizontal,$Type==NMOS_core">
<line start="_Start" end="_Middle-12x" />
<line start="_Middle+12x" end="_End" />
<line start="_Middle-25y-14x" end="_Middle-25y+14x" />
<line start="_Middle-40y" end="_Middle-25y" />
<line start="_Middle-18y-15x" end="_Middle-18y+15x" thickness="4" />
<line start="_Middle-18y-12x" end="_Middle-12x" />
<line start="_Middle-18y+12x" end="_Middle+12x" />
</group>
<group conditions="!horizontal,$Type==NMOS_core">
<line start="_Start" end="_Middle-12y" />
<line start="_Middle+12y" end="_End" />
<line start="_Middle-25x-14y" end="_Middle-25x+14y" />
<line start="_Middle-40x" end="_Middle-25x" />
<line start="_Middle-18x-15y" end="_Middle-18x+15y" thickness="4" />
<line start="_Middle-18x-12y" end="_Middle-12y" />
<line start="_Middle-18x+12y" end="_Middle+12y" />
</group>
<!-- PMOS core -->
<group conditions="horizontal,$Type==PMOS_core">
<line start="_Start" end="_Middle-12x" />
<line start="_Middle+12x" end="_End" />
<line start="_Middle-25y-14x" end="_Middle-25y+14x" />
<line start="_Middle-40y" end="_Middle-31y" />
<line start="_Middle-18y-15x" end="_Middle-18y+15x" thickness="4" />
<line start="_Middle-18y-12x" end="_Middle-12x" />
<line start="_Middle-18y+12x" end="_Middle+12x" />
</group>
<group conditions="!horizontal,$Type==PMOS_core">
<line start="_Start" end="_Middle-12y" />
<line start="_Middle+12y" end="_End" />
<line start="_Middle-25x-14y" end="_Middle-25x+14y" />
<line start="_Middle-40x" end="_Middle-31x" />
<line start="_Middle-18x-15y" end="_Middle-18x+15y" thickness="4" />
<line start="_Middle-18x-12y" end="_Middle-12y" />
<line start="_Middle-18x+12y" end="_Middle+12y" />
</group>



<!-- NMOS IO -->
<group conditions="horizontal,$Type==NMOS_IO">
<line start="_Start" end="_Middle-12x" />
<line start="_Middle+12x" end="_End" />
<line start="_Middle-25y-14x" end="_Middle-25y+14x" thickness="4"/>
<line start="_Middle-40y" end="_Middle-25y" />
<line start="_Middle-18y-15x" end="_Middle-18y+15x" thickness="4" />
<line start="_Middle-18y-12x" end="_Middle-12x" />
<line start="_Middle-18y+12x" end="_Middle+12x" />
</group>
<group conditions="!horizontal,$Type==NMOS_IO">
<line start="_Start" end="_Middle-12y" />
<line start="_Middle+12y" end="_End" />
<line start="_Middle-25x-14y" end="_Middle-25x+14y" thickness="4"/>
<line start="_Middle-40x" end="_Middle-25x" />
<line start="_Middle-18x-15y" end="_Middle-18x+15y" thickness="4" />
<line start="_Middle-18x-12y" end="_Middle-12y" />
<line start="_Middle-18x+12y" end="_Middle+12y" />
</group>

<!-- PMOS IO -->
<group conditions="horizontal,$Type==PMOS_IO">
<line start="_Start" end="_Middle-12x" />
<line start="_Middle+12x" end="_End" />
<line start="_Middle-25y-14x" end="_Middle-25y+14x" thickness="4"/>
<line start="_Middle-40y" end="_Middle-31y" />
<line start="_Middle-18y-15x" end="_Middle-18y+15x" thickness="4" />
<line start="_Middle-18y-12x" end="_Middle-12x" />
<line start="_Middle-18y+12x" end="_Middle+12x" />
</group>
<group conditions="!horizontal,$Type==PMOS_IO">
<line start="_Start" end="_Middle-12y" />
<line start="_Middle+12y" end="_End" />
<line start="_Middle-25x-14y" end="_Middle-25x+14y" thickness="4"/>
<line start="_Middle-40x" end="_Middle-31x" />
<line start="_Middle-18x-15y" end="_Middle-18x+15y" thickness="4" />
<line start="_Middle-18x-12y" end="_Middle-12y" />
<line start="_Middle-18x+12y" end="_Middle+12y" />
</group>






<!-- MOSFET N-Channel -->
<group conditions="horizontal,$Type!=PMOS_core,$Type!=PMOS_IO">
<!-- <line start="_Middle+18x" end="_Middle+10y+18x" />
<ellipse centre="_Middle+18x" rx="2" ry="2" fill="true" />-->
<line start="_Middle-18y" end="_Middle" />
<path start="_Middle-15y" data="l 3,4 l -6,0 l 3,-4 l 2,2" fill="true" />
</group>
<group conditions="!horizontal,$Type!=PMOS_core,$Type!=PMOS_IO">
<!--<line start="_Middle+18y" end="_Middle+10x+18y" />
<ellipse centre="_Middle+18y" rx="2" ry="2" fill="true" /> -->
<line start="_Middle-18x" end="_Middle" />
<path start="_Middle-15x" data="l 4,3 l 0,-6 l -4,3 l 2,2" fill="true" />
</group>
<!-- MOSFET P-Channel -->
<group conditions="horizontal,$Type!=NMOS_core,$Type!=NMOS_IO">
<!-- <line start="_Middle-28x" end="_Middle+10y-28x" /> -->
<ellipse centre="_Middle-28y" rx="3" ry="3" fill="false" />
<line start="_Middle-18y" end="_Middle" />
<path start="_Middle-8y" data="l 3,-4 l -6,0 l 3,4 l 2,-2" fill="true" />
</group>
<group conditions="!horizontal,$Type!=NMOS_core,$Type!=NMOS_IO">
<!-- <line start="_Middle-28y" end="_Middle+10x-28y" /> -->
<ellipse centre="_Middle-28x" rx="3" ry="3" fill="false" />
<line start="_Middle-18x" end="_Middle" />
<path start="_Middle-8x" data="l -4,3 l 0,-6 l 4,3 l -2,2" fill="true" />
</group>
</render>
</component>
16 changes: 8 additions & 8 deletions common/transistor/transistor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@
<!-- MOSFET -->
<group conditions="horizontal,$Type==NChannelMosfet">
<connection name="drn" start="_Start" end="_Middle-21x" edge="Start" />
<connection name="gate" start="_Middle+11x" end="_End" edge="End" />
<connection name="src" start="_Middle-40y+10x" end="_Middle-25y+10x" edge="Start" />
<connection name="src" start="_Middle+11x" end="_End" edge="End" />
<connection name="gate" start="_Middle-40y+10x" end="_Middle-25y+10x" edge="Start" />
</group>
<group conditions="!horizontal,$Type==NChannelMosfet">
<connection name="drn" start="_Start" end="_Middle-21y" edge="Start" />
<connection name="gate" start="_Middle+11y" end="_End" edge="End" />
<connection name="src" start="_Middle-40x+10y" end="_Middle-25x+10y" edge="Start" />
<connection name="src" start="_Middle+11y" end="_End" edge="End" />
<connection name="gate" start="_Middle-40x+10y" end="_Middle-25x+10y" edge="Start" />
</group>
<group conditions="horizontal,$Type==PChannelMosfet">
<connection name="src" start="_Start" end="_Middle-21x" edge="Start" />
<connection name="gate" start="_Middle+11x" end="_End" edge="End" />
<connection name="drn" start="_Middle-40y+10x" end="_Middle-25y+10x" edge="Start" />
<connection name="drn" start="_Middle+11x" end="_End" edge="End" />
<connection name="gate" start="_Middle-40y+10x" end="_Middle-25y+10x" edge="Start" />
</group>
<group conditions="!horizontal,$Type==PChannelMosfet">
<connection name="src" start="_Start" end="_Middle-21y" edge="Start" />
<connection name="gate" start="_Middle+11y" end="_End" edge="End" />
<connection name="drn" start="_Middle-40x+10y" end="_Middle-25x+10y" edge="Start" />
<connection name="drn" start="_Middle+11y" end="_End" edge="End" />
<connection name="gate" start="_Middle-40x+10y" end="_Middle-25x+10y" edge="Start" />
</group>
</connections>
<render>
Expand Down