26 Description = QObject::tr (
"4x2 andor verilog device");
29 QObject::tr (
"transfer function high scaling factor")));
31 QObject::tr (
"output delay")
32 +
" ("+QObject::tr (
"s")+
")"));
44 p->
Props.getFirst()->Value =
Props.getFirst()->Value;
51 Name = QObject::tr(
"4x2 AndOr");
52 BitmapFile = (
char *)
"andor4x2";
60 Lines.append(
new Line(-30, -60, 30,-60,QPen(Qt::darkBlue,2)));
61 Lines.append(
new Line( 30, -60, 30, 60,QPen(Qt::darkBlue,2)));
62 Lines.append(
new Line( 30, 60,-30, 60,QPen(Qt::darkBlue,2)));
63 Lines.append(
new Line(-30, 60,-30,-60,QPen(Qt::darkBlue,2)));
65 Lines.append(
new Line(-30, -30, 0,-30,QPen(Qt::darkBlue,2)));
66 Lines.append(
new Line(-30, 0, 0, 0,QPen(Qt::darkBlue,2)));
67 Lines.append(
new Line(-30, 30, 0, 30,QPen(Qt::darkBlue,2)));
68 Lines.append(
new Line( 0, -60, 0, 60,QPen(Qt::darkBlue,2)));
70 Lines.append(
new Line(-50,-50,-30,-50,QPen(Qt::darkBlue,2)));
71 Lines.append(
new Line(-50,-40,-30,-40,QPen(Qt::darkBlue,2)));
72 Lines.append(
new Line(-50,-20,-30,-20,QPen(Qt::darkBlue,2)));
73 Lines.append(
new Line(-50,-10,-30,-10,QPen(Qt::darkBlue,2)));
75 Lines.append(
new Line(-50, 10, -30, 10,QPen(Qt::darkBlue,2)));
76 Lines.append(
new Line(-50, 20, -30, 20,QPen(Qt::darkBlue,2)));
77 Lines.append(
new Line(-50, 40, -30, 40,QPen(Qt::darkBlue,2)));
78 Lines.append(
new Line(-50, 50, -30, 50,QPen(Qt::darkBlue,2)));
79 Lines.append(
new Line( 30, 0, 50, 0,QPen(Qt::darkBlue,2)));
81 Texts.append(
new Text( -20, -60,
"&", Qt::darkBlue, 12.0));
82 Texts.append(
new Text( -20, -30,
"&", Qt::darkBlue, 12.0));
83 Texts.append(
new Text( -20, 0,
"&", Qt::darkBlue, 12.0));
84 Texts.append(
new Text( -20, 30,
"&", Qt::darkBlue, 12.0));
86 Lines.append(
new Line( 7, -45, 17, -40,QPen(Qt::darkBlue,2)));
87 Lines.append(
new Line( 7, -35, 17, -40,QPen(Qt::darkBlue,2)));
88 Lines.append(
new Line( 7, -30, 17, -35,QPen(Qt::darkBlue,2)));
89 Lines.append(
new Line( 22, -30, 22, -45,QPen(Qt::darkBlue,2)));
111 QString td =
Props.at(1)->Value;
115 QString a11 =
Ports.at(0)->Connection->Name;
116 QString a12 =
Ports.at(1)->Connection->Name;
117 QString a21 =
Ports.at(2)->Connection->Name;
118 QString a22 =
Ports.at(3)->Connection->Name;
119 QString a31 =
Ports.at(4)->Connection->Name;
120 QString a32 =
Ports.at(5)->Connection->Name;
121 QString a41 =
Ports.at(6)->Connection->Name;
122 QString a42 =
Ports.at(7)->Connection->Name;
123 QString y =
Ports.at(8)->Connection->Name;
125 s =
"\n " +
Name +
":process ("+a11+
", "+a12+
", "+a21+
", "+ a22+
", "+
126 a31+
", "+a32+
", "+a41+
", "+a42 +
")\n"+
128 y+
" <= "+
"("+a11+
" and "+a12+
") or "+
"("+a21+
" and "+a22+
") or "+
129 "\n ("+a31+
" and " +a32+
") or "+
"("+a41+
" and "+a42+
")"+td+
136 QString td =
Props.at(1)->Value;
141 QString a11 =
Ports.at(0)->Connection->Name;
142 QString a12 =
Ports.at(1)->Connection->Name;
143 QString a21 =
Ports.at(2)->Connection->Name;
144 QString a22 =
Ports.at(3)->Connection->Name;
145 QString a31 =
Ports.at(4)->Connection->Name;
146 QString a32 =
Ports.at(5)->Connection->Name;
147 QString a41 =
Ports.at(6)->Connection->Name;
148 QString a42 =
Ports.at(7)->Connection->Name;
149 QString y =
Ports.at(8)->Connection->Name;
151 QString v =
"net_reg" +
Name + y;
153 l =
"\n // " +
Name +
" 4x2 andor\n" +
154 " assign " + y +
" = " + v +
";\n" +
155 " reg " + v +
" = 0;\n" +
156 " always @ (" + a11 +
" or " + a12 +
" or "
157 + a21 +
" or " + a22 +
" or "
158 + a31 +
" or " + a32 +
" or "
159 + a41 +
" or " + a42 +
")\n " +
160 " " + v +
" <=" + td +
" (" + a11 +
" && " + a12 +
")" +
" || " +
161 "(" + a21 +
" && " + a22 +
")" +
" || " +
162 "(" + a31 +
" && " + a32 +
")" +
" || " +
163 "(" + a41 +
" && " + a42 +
")" +
";\n" ;
bool VHDL_Delay(QString &td, const QString &Name)
bool Verilog_Delay(QString &td, const QString &Name)
Definitions and declarations for the main application.
Q3PtrList< Property > Props
Superclass of all schematic drawing elements.
static Element * info(QString &, char *&, bool getNewOne=false)
virtual void recreate(Schematic *)