26 Description = QObject::tr (
"4x4 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(
"4x4 AndOr");
52 BitmapFile = (
char *)
"andor4x4";
60 Lines.append(
new Line(-30, -60, 30,-60,QPen(QPen::darkBlue,2)));
61 Lines.append(
new Line( 30, -60, 30, 140,QPen(QPen::darkBlue,2)));
62 Lines.append(
new Line( 30, 140,-30,140,QPen(QPen::darkBlue,2)));
63 Lines.append(
new Line(-30, 140,-30,-60,QPen(QPen::darkBlue,2)));
65 Lines.append(
new Line(-30, -10, 0,-10,QPen(QPen::darkBlue,2)));
66 Lines.append(
new Line(-30, 40, 0, 40,QPen(QPen::darkBlue,2)));
67 Lines.append(
new Line(-30, 90, 0, 90,QPen(QPen::darkBlue,2)));
68 Lines.append(
new Line( 0, -60, 0,140,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)));
73 Lines.append(
new Line(-50,-20,-30,-20,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)));
77 Lines.append(
new Line(-50, 20,-30, 20,QPen(QPen::darkBlue,2)));
78 Lines.append(
new Line(-50, 30,-30, 30,QPen(QPen::darkBlue,2)));
80 Lines.append(
new Line(-50, 50, -30, 50,QPen(QPen::darkBlue,2)));
81 Lines.append(
new Line(-50, 60, -30, 60,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)));
85 Lines.append(
new Line(-50, 100,-30,100,QPen(QPen::darkBlue,2)));
86 Lines.append(
new Line(-50, 110,-30,110,QPen(QPen::darkBlue,2)));
87 Lines.append(
new Line(-50, 120,-30,120,QPen(QPen::darkBlue,2)));
88 Lines.append(
new Line(-50, 130,-30,130,QPen(QPen::darkBlue,2)));
90 Lines.append(
new Line( 30, 40, 50, 40,QPen(QPen::darkBlue,2)));
92 Texts.append(
new Text( -20, -60,
"&", QPen::darkBlue, 12.0));
93 Texts.append(
new Text( -20, -10,
"&", QPen::darkBlue, 12.0));
94 Texts.append(
new Text( -20, 40,
"&", QPen::darkBlue, 12.0));
95 Texts.append(
new Text( -20, 90,
"&", QPen::darkBlue, 12.0));
97 Lines.append(
new Line( 7, -45, 17, -40,QPen(QPen::darkBlue,2)));
98 Lines.append(
new Line( 7, -35, 17, -40,QPen(QPen::darkBlue,2)));
99 Lines.append(
new Line( 7, -30, 17, -35,QPen(QPen::darkBlue,2)));
100 Lines.append(
new Line( 22, -30, 22, -45,QPen(QPen::darkBlue,2)));
132 QString td =
Props.at(1)->Value;
136 QString a11 =
Ports.at(0)->Connection->Name;
137 QString a12 =
Ports.at(1)->Connection->Name;
138 QString a13 =
Ports.at(2)->Connection->Name;
139 QString a14 =
Ports.at(3)->Connection->Name;
140 QString a21 =
Ports.at(4)->Connection->Name;
141 QString a22 =
Ports.at(5)->Connection->Name;
142 QString a23 =
Ports.at(6)->Connection->Name;
143 QString a24 =
Ports.at(7)->Connection->Name;
144 QString a31 =
Ports.at(8)->Connection->Name;
145 QString a32 =
Ports.at(9)->Connection->Name;
146 QString a33 =
Ports.at(10)->Connection->Name;
147 QString a34 =
Ports.at(11)->Connection->Name;
148 QString a41 =
Ports.at(12)->Connection->Name;
149 QString a42 =
Ports.at(13)->Connection->Name;
150 QString a43 =
Ports.at(14)->Connection->Name;
151 QString a44 =
Ports.at(15)->Connection->Name;
153 QString y =
Ports.at(16)->Connection->Name;
155 s =
"\n " +
Name +
":process (" +
156 a11 +
", " + a12 +
", " + a13 +
", " + a14 +
", " +
157 a21 +
", " + a22 +
", " + a23 +
", " + a24 +
", " +
158 a31 +
", " + a32 +
", " + a33 +
", " + a34 +
", " +
159 a41 +
", " + a42 +
", " + a43 +
", " + a44 +
")\n" +
161 y +
" <= " +
"(" + a11 +
" and " + a12 +
" and " + a13 +
" and " + a14 +
") or " +
162 "(" + a21 +
" and " + a22 +
" and " + a23 +
" and " + a24 +
") or\n" +
163 " (" + a31 +
" and " + a32 +
" and " + a33 +
" and " + a34 +
") or " +
164 "(" + a41 +
" and " + a42 +
" and " + a43 +
" and " + a43 +
")" + td +
171 QString td =
Props.at(1)->Value;
174 QString a11 =
Ports.at(0)->Connection->Name;
175 QString a12 =
Ports.at(1)->Connection->Name;
176 QString a13 =
Ports.at(2)->Connection->Name;
177 QString a14 =
Ports.at(3)->Connection->Name;
178 QString a21 =
Ports.at(4)->Connection->Name;
179 QString a22 =
Ports.at(5)->Connection->Name;
180 QString a23 =
Ports.at(6)->Connection->Name;
181 QString a24 =
Ports.at(7)->Connection->Name;
182 QString a31 =
Ports.at(8)->Connection->Name;
183 QString a32 =
Ports.at(9)->Connection->Name;
184 QString a33 =
Ports.at(10)->Connection->Name;
185 QString a34 =
Ports.at(11)->Connection->Name;
186 QString a41 =
Ports.at(12)->Connection->Name;
187 QString a42 =
Ports.at(13)->Connection->Name;
188 QString a43 =
Ports.at(14)->Connection->Name;
189 QString a44 =
Ports.at(15)->Connection->Name;
191 QString y =
Ports.at(16)->Connection->Name;
195 QString v =
"net_reg" +
Name + y;
197 l =
"\n // " +
Name +
" 4x4 andor\n" +
198 " assign " + y +
" = " + v +
";\n" +
199 " reg " + v +
" = 0;\n" +
200 " always @ (" + a11 +
" or " + a12 +
" or " + a13 +
" or " + a14 +
" or "
201 + a21 +
" or " + a22 +
" or " + a23 +
" or " + a24 +
" or "
202 + a31 +
" or " + a32 +
" or " + a33 +
" or " + a34 +
" or "
203 + a41 +
" or " + a42 +
" or " + a43 +
" or " + a44 +
")\n " +
204 " " + v +
" <=" + td +
" (" + a11 +
" && " + a12 +
" && " + a13 +
" && " + a14 +
")" +
" || " +
205 "(" + a21 +
" && " + a22 +
" && " + a23 +
" && " + a24 +
")" +
" ||\n" +
206 " (" + a31 +
" && " + a32 +
" && " + a33 +
" && " + a34 +
")" +
" || " +
207 "(" + a41 +
" && " + a42 +
" && " + a43 +
" && " + a44 +
");\n" ;