26 Description = QObject::tr (
"8to1 multiplexer 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(
"8to1 Mux");
52 BitmapFile = (
char *)
"mux8to1";
54 if(getNewOne)
return new mux8to1();
60 Lines.append(
new Line(-30, -80, 30,-80,QPen(Qt::darkBlue,2)));
61 Lines.append(
new Line( 30, -80, 30, 190,QPen(Qt::darkBlue,2)));
62 Lines.append(
new Line( 30, 190,-30, 190,QPen(Qt::darkBlue,2)));
63 Lines.append(
new Line(-30, 190,-30, -80,QPen(Qt::darkBlue,2)));
65 Lines.append(
new Line(-50,-40,-40,-40,QPen(Qt::darkBlue,2)));
66 Lines.append(
new Line(-50,-20,-30, -20,QPen(Qt::darkBlue,2)));
67 Lines.append(
new Line(-50, 0, -30, 0,QPen(Qt::darkBlue,2)));
68 Lines.append(
new Line(-50, 20, -30, 20,QPen(Qt::darkBlue,2)));
70 Lines.append(
new Line(-50, 40, -30, 40,QPen(Qt::darkBlue,2)));
71 Lines.append(
new Line(-50, 60, -30, 60,QPen(Qt::darkBlue,2)));
72 Lines.append(
new Line(-50, 80, -30, 80,QPen(Qt::darkBlue,2)));
73 Lines.append(
new Line(-50, 100,-30,100,QPen(Qt::darkBlue,2)));
74 Lines.append(
new Line(-50, 120,-30,120,QPen(Qt::darkBlue,2)));
75 Lines.append(
new Line(-50, 140,-30,140,QPen(Qt::darkBlue,2)));
76 Lines.append(
new Line(-50, 160,-30,160,QPen(Qt::darkBlue,2)));
77 Lines.append(
new Line(-50, 180,-30,180,QPen(Qt::darkBlue,2)));
78 Lines.append(
new Line( 30, 60, 50, 60,QPen(Qt::darkBlue,2)));
80 Arcs.append(
new Arc( -40, -45, 10, 10, 0, 16*360, QPen(Qt::darkBlue,2)));
82 Texts.append(
new Text(-17,-75,
"MUX", Qt::darkBlue, 12.0));
84 Texts.append(
new Text(-25,-53,
"En", Qt::darkBlue, 12.0));
85 Texts.append(
new Text(-14,-13,
"G", Qt::darkBlue, 12.0));
86 Texts.append(
new Text(-1, -18,
"}", Qt::darkBlue, 16.0));
87 Texts.append(
new Text( 12,-22,
"0", Qt::darkBlue, 12.0));
88 Texts.append(
new Text( 12, -2,
"7", Qt::darkBlue, 12.0));
90 Texts.append(
new Text(-25,-31,
"0", Qt::darkBlue, 12.0));
91 Texts.append(
new Text(-25, 7,
"2", Qt::darkBlue, 12.0));
93 Texts.append(
new Text(-25, 27,
"0", Qt::darkBlue, 12.0));
94 Texts.append(
new Text(-25, 47,
"1", Qt::darkBlue, 12.0));
95 Texts.append(
new Text(-25, 67,
"2", Qt::darkBlue, 12.0));
96 Texts.append(
new Text(-25, 87,
"3", Qt::darkBlue, 12.0));
97 Texts.append(
new Text(-25,107,
"4", Qt::darkBlue, 12.0));
98 Texts.append(
new Text(-25,127,
"5", Qt::darkBlue, 12.0));
99 Texts.append(
new Text(-25,147,
"6", Qt::darkBlue, 12.0));
100 Texts.append(
new Text(-25,167,
"7", Qt::darkBlue, 12.0));
102 Lines.append(
new Line(11, 0, 23, 0, QPen(Qt::darkBlue,2)));
126 QString td =
Props.at(1)->Value;
130 QString En =
Ports.at(0)->Connection->Name;
131 QString A =
Ports.at(1)->Connection->Name;
132 QString B =
Ports.at(2)->Connection->Name;
133 QString C =
Ports.at(3)->Connection->Name;
134 QString D0 =
Ports.at(4)->Connection->Name;
135 QString D1 =
Ports.at(5)->Connection->Name;
136 QString D2 =
Ports.at(6)->Connection->Name;
137 QString D3 =
Ports.at(7)->Connection->Name;
138 QString D4 =
Ports.at(8)->Connection->Name;
139 QString D5 =
Ports.at(9)->Connection->Name;
140 QString D6 =
Ports.at(10)->Connection->Name;
141 QString D7 =
Ports.at(11)->Connection->Name;
142 QString y =
Ports.at(12)->Connection->Name;
144 s =
"\n " +
Name +
":process (" + En +
", " + A +
", " + B +
", " + C +
", " +
145 D0 +
", " + D1 +
", " + D2 +
", " + D3 +
", " +
146 D4 +
", " + D5 +
", " + D6 +
", " + D7 +
")\n" +
148 y +
" <= " +
"(not " + En +
") and ((" + D7 +
" and " + C +
" and " + B +
" and " + A +
") or\n" +
149 " (" + D6 +
" and " + C +
" and " + B +
" and not "+ A +
") or\n" +
150 " (" + D5 +
" and " + C +
" and not "+ B +
" and " + A +
") or\n" +
151 " (" + D4 +
" and " + C +
" and not " + B +
" and not "+A +
") or\n" +
152 " (" + D3 +
" and not " + C +
" and " + B +
" and " + A +
") or\n" +
153 " (" + D2 +
" and not " + C +
" and " + B +
" and not "+ A +
") or\n" +
154 " (" + D1 +
" and not " + C +
" and not "+ B +
" and " + A +
") or\n" +
155 " (" + D0 +
" and not " + C +
" and not " + B +
" and not "+A +
"))" + td +
162 QString td =
Props.at(1)->Value;
167 QString En =
Ports.at(0)->Connection->Name;
168 QString A =
Ports.at(1)->Connection->Name;
169 QString B =
Ports.at(2)->Connection->Name;
170 QString C =
Ports.at(3)->Connection->Name;
171 QString D0 =
Ports.at(4)->Connection->Name;
172 QString D1 =
Ports.at(5)->Connection->Name;
173 QString D2 =
Ports.at(6)->Connection->Name;
174 QString D3 =
Ports.at(7)->Connection->Name;
175 QString D4 =
Ports.at(8)->Connection->Name;
176 QString D5 =
Ports.at(9)->Connection->Name;
177 QString D6 =
Ports.at(10)->Connection->Name;
178 QString D7 =
Ports.at(11)->Connection->Name;
179 QString y =
Ports.at(12)->Connection->Name;
181 QString v =
"net_reg" +
Name + y;
183 l =
"\n // " +
Name +
" 8to1 mux\n" +
184 " assign " + y +
" = " + v +
";\n" +
185 " reg " + v +
" = 0;\n" +
186 " always @ (" + En +
" or " + A +
" or " + B +
" or " + C +
" or " +
187 D0 +
" or " + D1 +
" or " + D2 +
" or " + D3 +
" or " +
188 D4 +
" or " + D5 +
" or " + D6 +
" or " + D7 +
")\n" +
189 " " + v +
" <=" + td +
" (" + D7 +
" && " + C +
" && " + B +
" && " + A +
")" +
" ||\n" +
190 " (" + D6 +
" && " + C +
" && " + B +
" && ~"+ A +
")" +
" ||\n" +
191 " (" + D5 +
" && " + C +
" && ~"+ B +
" && " + A +
")" +
" ||\n" +
192 " (" + D4 +
" && " + C +
" && ~"+ B +
" && ~"+ A +
")" +
" ||\n" +
193 " (" + D3 +
" && ~" + C +
" && " + B +
" && " + A +
")" +
" ||\n" +
194 " (" + D2 +
" && ~" + C +
" && " + B +
" && ~"+ A +
")" +
" ||\n" +
195 " (" + D1 +
" && ~" + C +
" && ~"+ B +
" && " + A +
")" +
" ||\n" +
196 " (" + D0 +
" && ~" + C +
" && ~"+ B +
" && ~"+ A +
")" +
";\n" ;
bool VHDL_Delay(QString &td, const QString &Name)
Q3PtrList< struct Arc > Arcs
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 *)