26 Description = QObject::tr (
"4to16 demultiplexer 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(
"4to16 Demux");
52 BitmapFile = (
char *)
"dmux4to16";
60 Lines.append(
new Line(-30, -90, 30,-90,QPen(QPen::darkBlue,2)));
61 Lines.append(
new Line( 30, -90, 30, 110,QPen(QPen::darkBlue,2)));
62 Lines.append(
new Line( 30, 110,-30, 110,QPen(QPen::darkBlue,2)));
63 Lines.append(
new Line(-30, 110,-30, -90,QPen(QPen::darkBlue,2)));
65 Lines.append(
new Line(-50,-50,-40,-50,QPen(QPen::darkBlue,2)));
66 Lines.append(
new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2)));
67 Lines.append(
new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2)));
68 Lines.append(
new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2)));
69 Lines.append(
new Line(-50, 30,-30, 30,QPen(QPen::darkBlue,2)));
71 Lines.append(
new Line( 30, 100, 50,100,QPen(QPen::darkBlue,2)));
72 Lines.append(
new Line( 30, 90, 50, 90,QPen(QPen::darkBlue,2)));
73 Lines.append(
new Line( 30, 80, 50, 80,QPen(QPen::darkBlue,2)));
74 Lines.append(
new Line( 30, 70, 50, 70,QPen(QPen::darkBlue,2)));
75 Lines.append(
new Line( 30, 60, 50, 60,QPen(QPen::darkBlue,2)));
76 Lines.append(
new Line( 30, 50, 50, 50,QPen(QPen::darkBlue,2)));
77 Lines.append(
new Line( 30, 40, 50, 40,QPen(QPen::darkBlue,2)));
78 Lines.append(
new Line( 30, 30, 50, 30,QPen(QPen::darkBlue,2)));
79 Lines.append(
new Line( 30, 20, 50, 20,QPen(QPen::darkBlue,2)));
80 Lines.append(
new Line( 30, 10, 50, 10,QPen(QPen::darkBlue,2)));
81 Lines.append(
new Line( 30, 0, 50, 0,QPen(QPen::darkBlue,2)));
82 Lines.append(
new Line( 30, -10, 50,-10,QPen(QPen::darkBlue,2)));
83 Lines.append(
new Line( 30, -20, 50,-20,QPen(QPen::darkBlue,2)));
84 Lines.append(
new Line( 30, -30, 50,-30,QPen(QPen::darkBlue,2)));
85 Lines.append(
new Line( 30, -40, 50,-40,QPen(QPen::darkBlue,2)));
86 Lines.append(
new Line( 30, -50, 50,-50,QPen(QPen::darkBlue,2)));
88 Arcs.append(
new Arc( -40, -55, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
90 Texts.append(
new Text(-25,-85,
"DMUX", QPen::darkBlue, 12.0));
92 Texts.append(
new Text(-25,-63,
"En", QPen::darkBlue, 12.0));
93 Texts.append(
new Text(-26,-15,
"G", QPen::darkBlue, 12.0));
94 Texts.append(
new Text(-13,-20,
"}", QPen::darkBlue, 16.0));
95 Texts.append(
new Text( -5,-20,
"0", QPen::darkBlue, 12.0));
96 Texts.append(
new Text( -8, 0,
"15", QPen::darkBlue, 12.0));
98 Texts.append(
new Text(-25,-43,
"0", QPen::darkBlue, 12.0));
99 Texts.append(
new Text(-25, 17,
"3", QPen::darkBlue, 12.0));
101 Texts.append(
new Text( 15,-59,
"0", QPen::darkBlue, 9.0));
102 Texts.append(
new Text( 15,-49,
"1", QPen::darkBlue, 9.0));
103 Texts.append(
new Text( 15,-39,
"2", QPen::darkBlue, 9.0));
104 Texts.append(
new Text( 15,-29,
"3", QPen::darkBlue, 9.0));
105 Texts.append(
new Text( 15,-19,
"4", QPen::darkBlue, 9.0));
106 Texts.append(
new Text( 15, -9,
"5", QPen::darkBlue, 9.0));
107 Texts.append(
new Text( 15, 1,
"6", QPen::darkBlue, 9.0));
108 Texts.append(
new Text( 15, 11,
"7", QPen::darkBlue, 9.0));
109 Texts.append(
new Text( 15, 21,
"8", QPen::darkBlue, 9.0));
110 Texts.append(
new Text( 15, 31,
"9", QPen::darkBlue, 9.0));
111 Texts.append(
new Text( 8, 41,
"10", QPen::darkBlue, 9.0));
112 Texts.append(
new Text( 8, 51,
"11", QPen::darkBlue, 9.0));
113 Texts.append(
new Text( 8, 61,
"12", QPen::darkBlue, 9.0));
114 Texts.append(
new Text( 8, 71,
"13", QPen::darkBlue, 9.0));
115 Texts.append(
new Text( 8, 81,
"14", QPen::darkBlue, 9.0));
116 Texts.append(
new Text( 8, 91,
"15", QPen::darkBlue, 9.0));
118 Lines.append(
new Line(-6, 2, 9, 2, QPen(QPen::darkBlue,2)));
150 QString td =
Props.at(1)->Value;
154 QString En =
Ports.at(0)->Connection->Name;
155 QString
A =
Ports.at(1)->Connection->Name;
156 QString
B =
Ports.at(2)->Connection->Name;
157 QString
C =
Ports.at(3)->Connection->Name;
158 QString
D =
Ports.at(4)->Connection->Name;
159 QString
Y15 =
Ports.at(5)->Connection->Name;
160 QString
Y14 =
Ports.at(6)->Connection->Name;
161 QString
Y13 =
Ports.at(7)->Connection->Name;
162 QString
Y12 =
Ports.at(8)->Connection->Name;
163 QString
Y11 =
Ports.at(9)->Connection->Name;
164 QString
Y10 =
Ports.at(10)->Connection->Name;
165 QString
Y9 =
Ports.at(11)->Connection->Name;
166 QString
Y8 =
Ports.at(12)->Connection->Name;
167 QString
Y7 =
Ports.at(13)->Connection->Name;
168 QString
Y6 =
Ports.at(14)->Connection->Name;
169 QString
Y5 =
Ports.at(15)->Connection->Name;
170 QString
Y4 =
Ports.at(16)->Connection->Name;
171 QString
Y3 =
Ports.at(17)->Connection->Name;
172 QString
Y2 =
Ports.at(18)->Connection->Name;
173 QString
Y1 =
Ports.at(19)->Connection->Name;
174 QString
Y0 =
Ports.at(20)->Connection->Name;
176 s =
"\n "+
Name+
":process ("+En+
", "+A+
", "+B+
", "+C+
", "+D+
")\n"+
178 " "+Y0+
" <= "+
"(not "+En+
") and (not "+D+
") and (not "+C+
") and (not "+B+
") and (not "+A+
")"+td+
179 " "+Y1+
" <= "+
"(not "+En+
") and (not "+D+
") and (not "+C+
") and (not "+B+
") and "+A+td+
180 " "+Y2+
" <= "+
"(not "+En+
") and (not "+D+
") and (not "+C+
") and "+B+
" and (not "+A+
")"+td+
181 " "+Y3+
" <= "+
"(not "+En+
") and (not "+D+
") and (not "+C+
") and "+B+
" and "+A+td+
182 " "+Y4+
" <= "+
"(not "+En+
") and (not "+D+
") and "+C+
" and (not "+B+
") and (not "+A+
")"+td+
183 " "+Y5+
" <= "+
"(not "+En+
") and (not "+D+
") and "+C+
" and (not "+B+
") and "+A+td+
184 " "+Y6+
" <= "+
"(not "+En+
") and (not "+D+
") and "+C+
" and "+B+
" and (not "+A+
")"+td+
185 " "+Y7+
" <= "+
"(not "+En+
") and (not "+D+
") and "+C+
" and "+B+
" and "+A+td+
186 " "+Y8+
" <= "+
"(not "+En+
") and "+D+
" and (not "+C+
") and (not "+B+
") and (not "+A+
")"+td+
187 " "+Y9+
" <= "+
"(not "+En+
") and "+D+
" and (not "+C+
") and (not "+B+
") and "+A+td+
188 " "+Y10+
" <= "+
"(not "+En+
") and "+D+
" and (not "+C+
") and "+B+
" and (not "+A+
")"+td+
189 " "+Y11+
" <= "+
"(not "+En+
") and "+D+
" and (not "+C+
") and "+B+
" and "+A+td+
190 " "+Y12+
" <= "+
"(not "+En+
") and "+D+
" and "+C+
" and (not "+B+
") and (not "+A+
")"+td+
191 " "+Y13+
" <= "+
"(not "+En+
") and "+D+
" and "+C+
" and (not "+B+
") and "+A+td+
192 " "+Y14+
" <= "+
"(not "+En+
") and "+D+
" and "+C+
" and "+B+
" and (not "+A+
")"+td+
193 " "+Y15+
" <= "+
"(not "+En+
") and "+D+
" and "+C+
" and "+B+
" and "+A+td+
201 QString td =
Props.at(1)->Value;
206 QString En =
Ports.at(0)->Connection->Name;
207 QString
A =
Ports.at(1)->Connection->Name;
208 QString
B =
Ports.at(2)->Connection->Name;
209 QString
C =
Ports.at(3)->Connection->Name;
210 QString
D =
Ports.at(4)->Connection->Name;
211 QString
Y15 =
Ports.at(5)->Connection->Name;
212 QString
Y14 =
Ports.at(6)->Connection->Name;
213 QString
Y13 =
Ports.at(7)->Connection->Name;
214 QString
Y12 =
Ports.at(8)->Connection->Name;
215 QString
Y11 =
Ports.at(9)->Connection->Name;
216 QString
Y10 =
Ports.at(10)->Connection->Name;
217 QString
Y9 =
Ports.at(11)->Connection->Name;
218 QString
Y8 =
Ports.at(12)->Connection->Name;
219 QString
Y7 =
Ports.at(13)->Connection->Name;
220 QString
Y6 =
Ports.at(14)->Connection->Name;
221 QString
Y5 =
Ports.at(15)->Connection->Name;
222 QString
Y4 =
Ports.at(16)->Connection->Name;
223 QString
Y3 =
Ports.at(17)->Connection->Name;
224 QString
Y2 =
Ports.at(18)->Connection->Name;
225 QString
Y1 =
Ports.at(19)->Connection->Name;
226 QString
Y0 =
Ports.at(20)->Connection->Name;
228 QString Y15R =
"net_reg" +
Name +
Y15;
229 QString Y14R =
"net_reg" +
Name +
Y14;
230 QString Y13R =
"net_reg" +
Name +
Y13;
231 QString Y12R =
"net_reg" +
Name +
Y12;
232 QString Y11R =
"net_reg" +
Name +
Y11;
233 QString Y10R =
"net_reg" +
Name +
Y10;
234 QString Y9R =
"net_reg" +
Name +
Y9;
235 QString Y8R =
"net_reg" +
Name +
Y8;
236 QString Y7R =
"net_reg" +
Name +
Y7;
237 QString Y6R =
"net_reg" +
Name +
Y6;
238 QString Y5R =
"net_reg" +
Name +
Y5;
239 QString Y4R =
"net_reg" +
Name +
Y4;
240 QString Y3R =
"net_reg" +
Name +
Y3;
241 QString Y2R =
"net_reg" +
Name +
Y2;
242 QString Y1R =
"net_reg" +
Name +
Y1;
243 QString Y0R =
"net_reg" +
Name +
Y0;
245 l =
"\n // " +
Name +
" 4to16 demux\n" +
246 " assign " + Y0 +
" = " + Y0R +
";\n" +
247 " reg " + Y0R +
" = 0;\n" +
248 " assign " + Y1 +
" = " + Y1R +
";\n" +
249 " reg " + Y1R +
" = 0;\n" +
250 " assign " + Y2 +
" = " + Y2R +
";\n" +
251 " reg " + Y2R +
" = 0;\n" +
252 " assign " + Y3 +
" = " + Y3R +
";\n" +
253 " reg " + Y3R +
" = 0;\n" +
254 " assign " + Y4 +
" = " + Y4R +
";\n" +
255 " reg " + Y4R +
" = 0;\n" +
256 " assign " + Y5 +
" = " + Y5R +
";\n" +
257 " reg " + Y5R +
" = 0;\n" +
258 " assign " + Y6 +
" = " + Y6R +
";\n" +
259 " reg " + Y6R +
" = 0;\n" +
260 " assign " + Y7 +
" = " + Y7R +
";\n" +
261 " reg " + Y7R +
" = 0;\n" +
262 " assign " + Y8 +
" = " + Y8R +
";\n" +
263 " reg " + Y8R +
" = 0;\n" +
264 " assign " + Y9 +
" = " + Y9R +
";\n" +
265 " reg " + Y9R +
" = 0;\n" +
266 " assign " + Y10 +
" = " + Y10R +
";\n" +
267 " reg " + Y10R +
" = 0;\n" +
268 " assign " + Y11 +
" = " + Y11R +
";\n" +
269 " reg " + Y11R +
" = 0;\n" +
270 " assign " + Y12 +
" = " + Y12R +
";\n" +
271 " reg " + Y12R +
" = 0;\n" +
272 " assign " + Y13 +
" = " + Y13R +
";\n" +
273 " reg " + Y13R +
" = 0;\n" +
274 " assign " + Y14 +
" = " + Y14R +
";\n" +
275 " reg " + Y14R +
" = 0;\n" +
276 " assign " + Y15 +
" = " + Y15R +
";\n" +
277 " reg " + Y15R +
" = 0;\n" +
279 " always @ ("+En+
" or "+A+
" or "+B+
" or "+C+
" or "+D+
")\n" +
281 " "+Y0R+
" <="+td+
" (~"+En+
") && (~"+D+
") && (~"+C+
") && (~"+B+
" ) && (~"+A+
");\n"+
282 " "+Y1R+
" <="+td+
" (~"+En+
") && (~"+D+
") && (~"+C+
") && (~"+B+
" ) && "+A+
";\n"+
283 " "+Y2R+
" <="+td+
" (~"+En+
") && (~"+D+
") && (~"+C+
") && "+B+
" && (~"+A+
");\n"+
284 " "+Y3R+
" <="+td+
" (~"+En+
") && (~"+D+
") && (~"+C+
") && "+B+
" && "+A+
";\n"+
285 " "+Y4R+
" <="+td+
" (~"+En+
") && (~"+D+
") && "+C+
" && (~"+B+
" ) && (~"+A+
");\n"+
286 " "+Y5R+
" <="+td+
" (~"+En+
") && (~"+D+
") && "+C+
" && (~"+B+
" ) && "+A+
";\n"+
287 " "+Y6R+
" <="+td+
" (~"+En+
") && (~"+D+
") && "+C+
" && "+B+
" && ( ~"+A+
");\n"+
288 " "+Y7R+
" <="+td+
" (~"+En+
") && (~"+D+
") && "+C+
" && "+B+
" && "+A+
";\n"+
289 " "+Y8R+
" <="+td+
" (~"+En+
") && "+D+
" && (~"+C+
") && ( ~"+B+
") && (~"+A+
");\n"+
290 " "+Y9R+
" <="+td+
" (~"+En+
") && "+D+
" && (~"+C+
") && ( ~"+B+
") && "+A+
";\n"+
291 " "+Y10R+
" <="+td+
" (~"+En+
") && "+D+
" && (~"+C+
") && "+B+
" && (~"+A+
");\n"+
292 " "+Y11R+
" <="+td+
" (~"+En+
") && "+D+
" && (~"+C+
") && "+B+
" && "+A+
";\n"+
293 " "+Y12R+
" <="+td+
" (~"+En+
") && "+D+
" && "+C+
" && (~"+B+
") && (~"+A+
");\n"+
294 " "+Y13R+
" <="+td+
" (~"+En+
") && "+D+
" && "+C+
" && (~"+B+
") && "+A+
";\n"+
295 " "+Y14R+
" <="+td+
" (~"+En+
") && "+D+
" && "+C+
" && "+B+
" && (~"+A+
");\n"+
296 " "+Y15R+
" <="+td+
" (~"+En+
") && "+D+
" && "+C+
" && "+B+
" && "+A+
";\n"+