27 Description = QObject::tr (
"3to8 demultiplexer verilog device");
30 QObject::tr (
"transfer function high scaling factor")));
32 QObject::tr (
"output delay")
33 +
" ("+QObject::tr (
"s")+
")"));
45 p->
Props.getFirst()->Value =
Props.getFirst()->Value;
52 Name = QObject::tr(
"3to8 Demux");
53 BitmapFile = (
char *)
"dmux3to8";
61 Lines.append(
new Line(-30, -90, 30,-90,QPen(QPen::darkBlue,2)));
62 Lines.append(
new Line( 30, -90, 30, 100,QPen(QPen::darkBlue,2)));
63 Lines.append(
new Line( 30, 100,-30, 100,QPen(QPen::darkBlue,2)));
64 Lines.append(
new Line(-30, 100,-30, -90,QPen(QPen::darkBlue,2)));
66 Lines.append(
new Line(-50,-50,-40,-50,QPen(QPen::darkBlue,2)));
67 Lines.append(
new Line(-50,-30,-30,-30,QPen(QPen::darkBlue,2)));
68 Lines.append(
new Line(-50,-10,-30,-10,QPen(QPen::darkBlue,2)));
69 Lines.append(
new Line(-50, 10,-30, 10,QPen(QPen::darkBlue,2)));
71 Lines.append(
new Line( 30, 90, 50, 90,QPen(QPen::darkBlue,2)));
72 Lines.append(
new Line( 30, 70, 50, 70,QPen(QPen::darkBlue,2)));
73 Lines.append(
new Line( 30, 50, 50, 50,QPen(QPen::darkBlue,2)));
74 Lines.append(
new Line( 30, 30, 50, 30,QPen(QPen::darkBlue,2)));
75 Lines.append(
new Line( 30, 10, 50, 10,QPen(QPen::darkBlue,2)));
76 Lines.append(
new Line( 30,-10, 50,-10,QPen(QPen::darkBlue,2)));
77 Lines.append(
new Line( 30,-30, 50,-30,QPen(QPen::darkBlue,2)));
78 Lines.append(
new Line( 30,-50, 50,-50,QPen(QPen::darkBlue,2)));
80 Arcs.append(
new Arc( -40, -55, 10, 10, 0, 16*360, QPen(QPen::darkBlue,2)));
82 Texts.append(
new Text(-25,-85,
"DMUX", QPen::darkBlue, 12.0));
84 Texts.append(
new Text(-25,-63,
"En", QPen::darkBlue, 12.0));
85 Texts.append(
new Text(-20,-25,
"G", QPen::darkBlue, 12.0));
86 Texts.append(
new Text(-8, -30,
"}", QPen::darkBlue, 16.0));
87 Texts.append(
new Text( 2, -32,
"0", QPen::darkBlue, 12.0));
88 Texts.append(
new Text( 2, -13,
"7", QPen::darkBlue, 12.0));
90 Texts.append(
new Text(-25,-43,
"0", QPen::darkBlue, 12.0));
91 Texts.append(
new Text(-25, -3,
"2", QPen::darkBlue, 12.0));
93 Texts.append(
new Text( 15,-63,
"0", QPen::darkBlue, 12.0));
94 Texts.append(
new Text( 15,-43,
"1", QPen::darkBlue, 12.0));
95 Texts.append(
new Text( 15,-23,
"2", QPen::darkBlue, 12.0));
96 Texts.append(
new Text( 15, -3,
"3", QPen::darkBlue, 12.0));
97 Texts.append(
new Text( 15, 17,
"4", QPen::darkBlue, 12.0));
98 Texts.append(
new Text( 15, 37,
"5", QPen::darkBlue, 12.0));
99 Texts.append(
new Text( 15, 57,
"6", QPen::darkBlue, 12.0));
100 Texts.append(
new Text( 15, 77,
"7", QPen::darkBlue, 12.0));
102 Lines.append(
new Line(0, -11, 12, -11, QPen(QPen::darkBlue,2)));
125 QString td =
Props.at(1)->Value;
129 QString En =
Ports.at(0)->Connection->Name;
130 QString
A =
Ports.at(1)->Connection->Name;
131 QString
B =
Ports.at(2)->Connection->Name;
132 QString
C =
Ports.at(3)->Connection->Name;
133 QString
Y7 =
Ports.at(4)->Connection->Name;
134 QString
Y6 =
Ports.at(5)->Connection->Name;
135 QString
Y5 =
Ports.at(6)->Connection->Name;
136 QString
Y4 =
Ports.at(7)->Connection->Name;
137 QString
Y3 =
Ports.at(8)->Connection->Name;
138 QString
Y2 =
Ports.at(9)->Connection->Name;
139 QString
Y1 =
Ports.at(10)->Connection->Name;
140 QString
Y0 =
Ports.at(11)->Connection->Name;
142 s =
"\n "+
Name+
":process ("+En+
", "+A+
", "+B+
", "+C+
")\n"+
144 " "+Y0+
" <= "+
"(not "+En+
") and (not "+C+
") and (not "+B+
") and (not "+A+
")"+td+
145 " "+Y1+
" <= "+
"(not "+En+
") and (not "+C+
") and (not "+B+
") and "+A+td+
146 " "+Y2+
" <= "+
"(not "+En+
") and (not "+C+
") and "+B+
" and (not "+A+
")"+td+
147 " "+Y3+
" <= "+
"(not "+En+
") and (not "+C+
") and "+B+
" and "+A+td+
148 " "+Y4+
" <= "+
"(not "+En+
") and "+C+
" and (not "+B+
") and (not "+A+
")"+td+
149 " "+Y5+
" <= "+
"(not "+En+
") and "+C+
" and (not "+B+
") and "+A+td+
150 " "+Y6+
" <= "+
"(not "+En+
") and "+C+
" and "+B+
" and (not "+A+
")"+td+
151 " "+Y7+
" <= "+
"(not "+En+
") and "+C+
" and "+B+
" and "+A+td+
158 QString td =
Props.at(1)->Value;
163 QString En =
Ports.at(0)->Connection->Name;
164 QString
A =
Ports.at(1)->Connection->Name;
165 QString
B =
Ports.at(2)->Connection->Name;
166 QString
C =
Ports.at(3)->Connection->Name;
167 QString
Y7 =
Ports.at(4)->Connection->Name;
168 QString
Y6 =
Ports.at(5)->Connection->Name;
169 QString
Y5 =
Ports.at(6)->Connection->Name;
170 QString
Y4 =
Ports.at(7)->Connection->Name;
171 QString
Y3 =
Ports.at(8)->Connection->Name;
172 QString
Y2 =
Ports.at(9)->Connection->Name;
173 QString
Y1 =
Ports.at(10)->Connection->Name;
174 QString
Y0 =
Ports.at(11)->Connection->Name;
176 QString Y7R =
"net_reg" +
Name +
Y7;
177 QString Y6R =
"net_reg" +
Name +
Y6;
178 QString Y5R =
"net_reg" +
Name +
Y5;
179 QString Y4R =
"net_reg" +
Name +
Y4;
180 QString Y3R =
"net_reg" +
Name +
Y3;
181 QString Y2R =
"net_reg" +
Name +
Y2;
182 QString Y1R =
"net_reg" +
Name +
Y1;
183 QString Y0R =
"net_reg" +
Name +
Y0;
185 l =
"\n // " +
Name +
" 3to8 demux\n" +
186 " assign " + Y0 +
" = " + Y0R +
";\n" +
187 " reg " + Y0R +
" = 0;\n" +
188 " assign " + Y1 +
" = " + Y1R +
";\n" +
189 " reg " + Y1R +
" = 0;\n" +
190 " assign " + Y2 +
" = " + Y2R +
";\n" +
191 " reg " + Y2R +
" = 0;\n" +
192 " assign " + Y3 +
" = " + Y3R +
";\n" +
193 " reg " + Y3R +
" = 0;\n" +
194 " assign " + Y4 +
" = " + Y4R +
";\n" +
195 " reg " + Y4R +
" = 0;\n" +
196 " assign " + Y5 +
" = " + Y5R +
";\n" +
197 " reg " + Y5R +
" = 0;\n" +
198 " assign " + Y6 +
" = " + Y6R +
";\n" +
199 " reg " + Y6R +
" = 0;\n" +
200 " assign " + Y7 +
" = " + Y7R +
";\n" +
201 " reg " + Y7R +
" = 0;\n" +
204 " always @ ("+En+
" or "+A+
" or "+B+
" or "+C+
")\n" +
206 " "+Y0R+
" <="+td+
" (~"+En+
") && (~"+C+
") && (~"+B+
") && (~"+A+
");\n"+
207 " "+Y1R+
" <="+td+
" (~"+En+
") && (~"+C+
") && (~"+B+
") && "+A+
";\n"+
208 " "+Y2R+
" <="+td+
" (~"+En+
") && (~"+C+
") && "+B+
" && (~"+A+
");\n"+
209 " "+Y3R+
" <="+td+
" (~"+En+
") && (~"+C+
") && "+B+
" && "+A+
";\n"+
210 " "+Y4R+
" <="+td+
" (~"+En+
") && "+C+
" && (~"+B+
") && (~"+A+
");\n"+
211 " "+Y5R+
" <="+td+
" (~"+En+
") && "+C+
" && (~"+B+
") && "+A+
";\n"+
212 " "+Y6R+
" <="+td+
" (~"+En+
") && "+C+
" && "+B+
" && (~"+A+
");\n"+
213 " "+Y7R+
" <="+td+
" (~"+En+
") && "+C+
" && "+B+
" && "+A+
";\n"+