File: or.xsym

package info (click to toggle)
caneda 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,764 kB
  • sloc: cpp: 16,593; vhdl: 236; xml: 61; ansic: 18; makefile: 9
file content (93 lines) | stat: -rw-r--r-- 4,186 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0"?>
<!DOCTYPE caneda>
<!--
***************************************************************************
* Copyright (C) 2016 by Pablo Daniel Pareja Obregon                       *
*                                                                         *
* This is free software; you can redistribute it and/or modify            *
* it under the terms of the GNU General Public License as published by    *
* the Free Software Foundation; either version 2, or (at your option)     *
* any later version.                                                      *
*                                                                         *
* This software is distributed in the hope that it will be useful,        *
* but WITHOUT ANY WARRANTY; without even the implied warranty of          *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
* GNU General Public License for more details.                            *
*                                                                         *
* You should have received a copy of the GNU General Public License       *
* along with this package; see the file COPYING.  If not, write to        *
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,   *
* Boston, MA 02110-1301, USA.                                             *
***************************************************************************
-->

<component name="OR" version="0.1.0" label="X">
    <displaytext>
        <lang lang="C">OR</lang>
    </displaytext>

    <description>
        <lang lang="C">CMOS OR gate.</lang>
    </description>

    <symbol>
        <painting name="line" line="0,0,8,0" pos="-30,-10" transform="1,0,0,1,0,0"/>
        <painting name="line" line="0,0,8,0" pos="-30,10" transform="1,0,0,1,0,0"/>
        <painting name="line" line="0,0,5,0" pos="15,0" transform="1,0,0,1,0,0"/>

        <painting name="ellipseArc" ellipse="0,0,15,40" pos="-35,-20" transform="1,0,0,1,0,0">
            <properties startAngle="-90" spanAngle="180"/>
        </painting>
        <painting name="ellipseArc" ellipse="0,0,80,40" pos="-65,-20" transform="1,0,0,1,0,0">
            <properties startAngle="-90" spanAngle="90"/>
        </painting>
        <painting name="ellipseArc" ellipse="0,0,80,40" pos="-65,-20" transform="1,0,0,1,0,0">
            <properties startAngle="0" spanAngle="90"/>
        </painting>
    </symbol>

    <ports>
        <port name="vss" pos="-10,20"/>
        <port name="vdd" pos="-10,-20"/>
        <port name="A" pos="-30,-10"/>
        <port name="B" pos="-30,10"/>
        <port name="out" pos="20,0"/>
    </ports>

    <properties pos="0,0">
        <property name="Wn" default="9u" unit="m" visible="false">
            <description>
                <lang lang="C">NMOS transistor width</lang>
            </description>
        </property>
        <property name="Ln" default="3u" unit="m" visible="false">
            <description>
                <lang lang="C">NMOS transistor length</lang>
            </description>
        </property>
        <property name="Wp" default="15u" unit="m" visible="false">
            <description>
                <lang lang="C">PMOS transistor width</lang>
            </description>
        </property>
        <property name="Lp" default="3u" unit="m" visible="false">
            <description>
                <lang lang="C">PMOS transistor length</lang>
            </description>
        </property>
    </properties>

    <models>
        <model type="spice" syntax="X%label %port{vss} %port{vdd} %port{A} %port{B} %port{out} CMOS_OR lp=%property{Lp} wp=%property{Wp} l_n=%property{Ln} wn=%property{Wn}
                %subcircuit{CMOS_OR vss vdd A B out wn=9u l_n=3u wp=15u lp=3u
                %nM1 1 B vss vss NMOS l={l_n} w={wn}
                %nM2 1 A vss vss NMOS l={l_n} w={wn}
                %nM3 2 A vdd vdd PMOS l={lp} w={wp}
                %nM4 1 B 2 vdd PMOS l={lp} w={wp}
                %nM5 out 1 vdd vdd PMOS l={lp} w={wp}
                %nM6 out 1 vss vss NMOS l={l_n} w={wn}
                %n.model NMOS NMOS
                %n.model PMOS PMOS
                }"/>
    </models>
</component>