26 Description = QObject::tr (
"4x3 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(
"4x3 AndOr");
52 BitmapFile = (
char *)
"andor4x3";
60 Lines.append(
new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
61 Lines.append(
new Line( 30, -60, 30, 100,QPen(QPen::darkBlue,2)));
62 Lines.append(
new Line( 30, 100,-30,100,QPen(QPen::darkBlue,2)));
63 Lines.append(
new Line(-30, 100,-30,-60,QPen(QPen::darkBlue,2)));
65 Lines.append(
new Line(-30, -20, 0,-20,QPen(QPen::darkBlue,2)));
66 Lines.append(
new Line(-30, 20, 0, 20,QPen(QPen::darkBlue,2)));
67 Lines.append(
new Line(-30, 60, 0, 60,QPen(QPen::darkBlue,2)));
68 Lines.append(
new Line( 0, -60, 0,100,QPen(QPen::darkBlue,2)));
70 Lines.append(
new Line(-50,-50,-30,-50,QPen(QPen::darkBlue,2)));
71 Lines.append(
new Line(-50,-40,-30,-40,QPen(QPen::darkBlue,2)));
72 Lines.append(
new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2)));
74 Lines.append(
new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2)));
75 Lines.append(
new Line(-50, 0,-30, 0,QPen(QPen::darkBlue,2)));
76 Lines.append(
new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2)));
78 Lines.append(
new Line(-50, 30, -30, 30,QPen(QPen::darkBlue,2)));
79 Lines.append(
new Line(-50, 40, -30, 40,QPen(QPen::darkBlue,2)));
80 Lines.append(
new Line(-50, 50,-30, 50,QPen(QPen::darkBlue,2)));
82 Lines.append(
new Line(-50, 70, -30, 70,QPen(QPen::darkBlue,2)));
83 Lines.append(
new Line(-50, 80, -30, 80,QPen(QPen::darkBlue,2)));
84 Lines.append(
new Line(-50, 90,-30, 90,QPen(QPen::darkBlue,2)));
86 Lines.append(
new Line( 30, 20, 50, 20,QPen(QPen::darkBlue,2)));
88 Texts.append(
new Text( -20, -60,
"&", QPen::darkBlue, 12.0));
89 Texts.append(
new Text( -20, -20,
"&", QPen::darkBlue, 12.0));
90 Texts.append(
new Text( -20, 20,
"&", QPen::darkBlue, 12.0));
91 Texts.append(
new Text( -20, 60,
"&", QPen::darkBlue, 12.0));
93 Lines.append(
new Line( 7, -45, 17, -40,QPen(QPen::darkBlue,2)));
94 Lines.append(
new Line( 7, -35, 17, -40,QPen(QPen::darkBlue,2)));
95 Lines.append(
new Line( 7, -30, 17, -35,QPen(QPen::darkBlue,2)));
96 Lines.append(
new Line( 22, -30, 22, -45,QPen(QPen::darkBlue,2)));
125 QString td =
Props.at(1)->Value;
129 QString a11 =
Ports.at(0)->Connection->Name;
130 QString a12 =
Ports.at(1)->Connection->Name;
131 QString a13 =
Ports.at(2)->Connection->Name;
132 QString a21 =
Ports.at(3)->Connection->Name;
133 QString a22 =
Ports.at(4)->Connection->Name;
134 QString a23 =
Ports.at(5)->Connection->Name;
135 QString a31 =
Ports.at(6)->Connection->Name;
136 QString a32 =
Ports.at(7)->Connection->Name;
137 QString a33 =
Ports.at(8)->Connection->Name;
138 QString a41 =
Ports.at(9)->Connection->Name;
139 QString a42 =
Ports.at(10)->Connection->Name;
140 QString a43 =
Ports.at(11)->Connection->Name;
141 QString y =
Ports.at(12)->Connection->Name;
143 s =
"\n " +
Name +
":process (" +
144 a11 +
", " + a12 +
", " + a13 +
", " +
145 a21 +
", " + a22 +
", " + a23 +
", " +
146 a31 +
", " + a32 +
", " + a33 +
", " +
147 a41 +
", " + a42 +
", " + a43 +
")\n" +
149 y +
" <= " +
"(" + a11 +
" and " + a12 +
" and " + a13 +
") or " +
150 "(" + a21 +
" and " + a22 +
" and " + a23 +
") or\n" +
151 " (" + a31 +
" and " + a32 +
" and " + a33 +
") or " +
152 "(" + a41 +
" and " + a42 +
" and " + a43 +
")" + td +
159 QString td =
Props.at(1)->Value;
164 QString a11 =
Ports.at(0)->Connection->Name;
165 QString a12 =
Ports.at(1)->Connection->Name;
166 QString a13 =
Ports.at(2)->Connection->Name;
167 QString a21 =
Ports.at(3)->Connection->Name;
168 QString a22 =
Ports.at(4)->Connection->Name;
169 QString a23 =
Ports.at(5)->Connection->Name;
170 QString a31 =
Ports.at(6)->Connection->Name;
171 QString a32 =
Ports.at(7)->Connection->Name;
172 QString a33 =
Ports.at(8)->Connection->Name;
173 QString a41 =
Ports.at(9)->Connection->Name;
174 QString a42 =
Ports.at(10)->Connection->Name;
175 QString a43 =
Ports.at(11)->Connection->Name;
176 QString y =
Ports.at(12)->Connection->Name;
178 QString v =
"net_reg" +
Name + y;
180 l =
"\n // " +
Name +
" 4x3 andor\n" +
181 " assign " + y +
" = " + v +
";\n" +
182 " reg " + v +
" = 0;\n" +
183 " always @ (" + a11 +
" or " + a12 +
" or " + a13 +
" or "
184 + a21 +
" or " + a22 +
" or " + a23 +
" or "
185 + a31 +
" or " + a32 +
" or " + a33 +
" or "
186 + a41 +
" or " + a42 +
" or " + a43 +
")\n " +
187 " " + v +
" <=" + td +
" (" + a11 +
" && " + a12 +
" && " + a13 +
")" +
" || " +
188 "(" + a21 +
" && " + a22 +
" && " + a23 +
")" +
" ||\n" +
189 " (" + a31 +
" && " + a32 +
" && " + a33 +
")" +
" || " +
190 "(" + a41 +
" && " + a42 +
" && " + a43 +
");\n " ;