OpenASIP  2.0
HDBToHtml.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file HDBToHtml.cc
26  *
27  * Implementation of HDBToHtml class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30  * @author Vinogradov Viacheslav(added Verilog generating) 2012
31  * @note rating: red
32  */
33 
34 #include <time.h>
35 
36 #include "HDBToHtml.hh"
37 
38 #include "ContainerTools.hh"
39 
40 #include "FUEntry.hh"
41 #include "FUArchitecture.hh"
42 #include "FUImplementation.hh"
43 #include "FunctionUnit.hh"
44 #include "FUPort.hh"
45 #include "HWOperation.hh"
46 #include "ExecutionPipeline.hh"
47 #include "PipelineElement.hh"
48 #include "FUExternalPort.hh"
49 #include "RFExternalPort.hh"
50 #include "FUPortImplementation.hh"
52 #include "RFEntry.hh"
53 #include "RFArchitecture.hh"
54 #include "RFImplementation.hh"
55 #include "RFPortImplementation.hh"
56 #include "HDBManager.hh"
57 #include "CostEstimationData.hh"
58 #include "DataObject.hh"
59 #include "CostFunctionPlugin.hh"
60 
61 using namespace TTAMachine;
62 using namespace HDB;
63 using std::endl;
64 
65 
66 const std::string HDBToHtml::FU_ENTRIES = "FU Entries";
67 const std::string HDBToHtml::RF_ENTRIES = "RF Entries";
68 const std::string HDBToHtml::RF_IU_ENTRIES = "RF/IU Entries";
69 const std::string HDBToHtml::BUS_ENTRIES = "Bus Entries";
70 const std::string HDBToHtml::SOCKET_ENTRIES = "Socket Entries";
71 const std::string HDBToHtml::FU_ARCHITECTURES = "Function Units";
72 const std::string HDBToHtml::RF_ARCHITECTURES = "Register Files";
73 const std::string HDBToHtml::FU_IMPLEMENTATIONS = "FU Implementations";
74 const std::string HDBToHtml::RF_IMPLEMENTATIONS = "RF Implementations";
75 const std::string HDBToHtml::COST_PLUGINS = "Cost Function Plugins";
76 const std::string HDBToHtml::OPERATION_IMPLEMENTATIONS =
77  "Operation Implementations";
79  "Operation Implementation Resources";
80 
81 /**
82  * The Cosntructor.
83  *
84  * @param hdb HDB
85  */
87  hdb_(hdb) {
88 }
89 
90 /**
91  * The Destructor.
92  */
94 }
95 
96 /**
97  * Generates a html page of a function unit entry->
98  *
99  * @param id ID of the FU entry in the HDB.
100  * @param stream Stream where the html is written to.
101  */
102 void
103 HDBToHtml::fuEntryToHtml(RowID id, std::ostream& stream) {
104 
105  const HDB::FUEntry* entry = hdb_.fuByEntryID(id);
106 
107  stream << "<html><body><small>" << endl;
108  stream << "<b>Function unit entry " << entry->id() << "</b><br>" << endl;
109 
110  stream << "<table>" << endl;
111  stream << "<tr><td align=right><b>Architecture:</b></td><td>";
112  if (entry->hasArchitecture()) {
113  stream << "<a href=\"/" << FU_ARCHITECTURES << "/"
114  << entry->architecture().id() << "\">"
115  << entry->architecture().id() << "</a>"
116  << "</td></tr>" << endl;
117  } else {
118  stream << "-</td></tr>";
119  }
120 
121  stream << "<tr><td align=right><b>Implementation:</b></td><td>";
122  if (entry->hasImplementation()) {
123  stream << "<a href=\"/" << FU_IMPLEMENTATIONS << "/"
124  << entry->implementation().id() << "\">"
125  << entry->implementation().moduleName()
126  << "</a></td></tr>" << endl;
127  } else {
128  stream << "-</td></tr>" << endl;
129  }
130 
131  stream << "<tr><td align=right><b>Cost function plugin:</b></td><td>";
132  if (entry->hasCostFunction()) {
133  const CostFunctionPlugin& plugin = entry->costFunction();
134  stream << "<a href=\"/" << COST_PLUGINS << "/"
135  << plugin.id() << "\">"
136  << plugin.name()
137  << "</a></td></tr>" << endl;
138  } else {
139  stream << "-</td></tr>" << endl;
140  }
141 
142  stream << "</table>";
143 
144  // Cost estimation data
145  const std::set<RowID> costDataIDs = hdb_.fuCostEstimationDataIDs(id);
146  if (!costDataIDs.empty()) {
147  stream << "<b>Cost estimation data:</b>" << endl;
148  stream << "<table bgcolor=#bbbbbb>" << endl;
149  stream << "<tr><th>Name</th><th>Value</th>"
150  << "<th>Plugin</th></tr>" << endl;
151  } else {
152  stream << "No cost estimation data.<br>" << endl;
153  }
154  std::set<RowID>::const_iterator iter = costDataIDs.begin();
155  for (; iter != costDataIDs.end(); iter++) {
156  const CostEstimationData data = hdb_.costEstimationData(*iter);
157  stream << "<tr><td>" << data.name() << "</td>"
158  << "<td align=right>";
159  stream << data.value().stringValue();
160  stream << "</td><td align=center><a href=\"/" << COST_PLUGINS
161  << "/" << data.pluginID() << "\">"
162  << data.pluginID() << "</a></td></tr>" << endl;
163  }
164  stream << "</table>" << endl;
165  stream << "</small></body></html>" << endl;
166 
167  delete entry;
168 }
169 
170 /**
171  * Generates a html page of a register file entry.
172  *
173  * @param id ID of the register file entry.
174  * @param stream Stream where the html is written to.
175  */
176 void
177 HDBToHtml::rfEntryToHtml(RowID id, std::ostream& stream) {
178 
179  const HDB::RFEntry* entry = hdb_.rfByEntryID(id);
180 
181  stream << "<html><body><small>" << endl;
182  stream << "<b>Register file entry " << entry->id() << "</b><br>" << endl;
183 
184  stream << "<table>" << endl;
185  stream << "<tr><td>Architecture:</td><td>";
186  if (entry->hasArchitecture()) {
187  stream << "<a href=\"/" << RF_ARCHITECTURES << "/"
188  << entry->architecture().id() << "\">"
189  << entry->architecture().id() << "</a>"
190  << "</td></tr>" << endl;
191  } else {
192  stream << "-</td></tr>";
193  }
194 
195  stream << "<tr><td><b>Implementation:</b></td><td>";
196  if (entry->hasImplementation()) {
197  stream << "<td><a href=\"/" << RF_IMPLEMENTATIONS << "/"
198  << entry->implementation().id() << "\">"
199  << entry->implementation().moduleName() << "</a>"
200  << "</td></tr>" << endl;
201  } else {
202  stream << "-</td></tr>" << endl;
203  }
204 
205  stream << "<tr><td align=right><b>Cost function plugin:</b></td><td>";
206  if (entry->hasCostFunction()) {
207  const CostFunctionPlugin& plugin = entry->costFunction();
208  stream << "<a href=\"/" << COST_PLUGINS << "/"
209  << plugin.id() << "\">"
210  << plugin.name()
211  << "</a></td></tr>" << endl;
212  } else {
213  stream << "-</td></tr>" << endl;
214  }
215  stream << "</table>";
216 
217  // Cost estimation data
218  const std::set<RowID> costDataIDs = hdb_.rfCostEstimationDataIDs(id);
219  if (!costDataIDs.empty()) {
220  stream << "<b>Cost estimation data:</b>" << endl;
221  stream << "<table bgcolor=#bbbbbb>" << endl;
222  stream << "<tr><th>Name</th><th>Value</th>"
223  << "<th>Plugin</th></tr>" << endl;
224  } else {
225  stream << "No cost estimation data.<br>" << endl;
226  }
227  std::set<RowID>::const_iterator iter = costDataIDs.begin();
228  for (; iter != costDataIDs.end(); iter++) {
229  const CostEstimationData data = hdb_.costEstimationData(*iter);
230  stream << "<tr><td>" << data.name() << "</td>"
231  << "<td align=right>";
232  stream << data.value().stringValue();
233  stream << "</td><td align=center><a href=\"/" << COST_PLUGINS
234  << "/" << data.pluginID() << "\">"
235  << data.pluginID() << "</a></td></tr>" << endl;
236  }
237  stream << "</table>" << endl;
238  stream << "</small></body></html>" << endl;
239  delete entry;
240 }
241 
242 
243 /**
244  * Generates a html page of a bus entry.
245  *
246  * @param id ID of the bus entry.
247  * @param stream Stream where the html is written to.
248  */
249 void
250 HDBToHtml::busEntryToHtml(RowID id, std::ostream& stream) {
251 
252  stream << "<html><body><small>" << endl;
253  stream << "<b>Bus entry " << id << "</b><br>" << endl;
254 
255  stream << "<tr><td align=right><b>Cost estimation data:</b></td><td>";
256 
257  // Cost estimation data
258  const std::set<RowID> costDataIDs = hdb_.busCostEstimationDataIDs(id);
259  if (!costDataIDs.empty()) {
260  stream << "<b>Cost estimation data:</b>" << endl;
261  stream << "<table bgcolor=#bbbbbb>" << endl;
262  stream << "<tr><th>Name</th><th>Value</th>"
263  << "<th>Plugin</th></tr>" << endl;
264  } else {
265  stream << "No cost estimation data.<br>" << endl;
266  }
267  std::set<RowID>::const_iterator iter = costDataIDs.begin();
268  for (; iter != costDataIDs.end(); iter++) {
269  const CostEstimationData data = hdb_.costEstimationData(*iter);
270  stream << "<tr><td>" << data.name() << "</td>"
271  << "<td align=right>";
272  stream << data.value().stringValue();
273  stream << "</td><td align=center><a href=\"/" << COST_PLUGINS
274  << "/" << data.pluginID() << "\">"
275  << data.pluginID() << "</a></td></tr>" << endl;
276  }
277  stream << "</table>" << endl;
278  stream << "</small></body></html>" << endl;
279 }
280 
281 
282 /**
283  * Generates a html page of a socket entry.
284  *
285  * @param id ID of the sovket entry.
286  * @param stream Stream where the html is written to.
287  */
288 void
289 HDBToHtml::socketEntryToHtml(RowID id, std::ostream& stream) {
290 
291  stream << "<html><body><small>" << endl;
292  stream << "<b>Socket entry " << id << "</b><br>" << endl;
293 
294  stream << "<tr><td align=right><b>Cost estimation data:</b></td><td>";
295 
296  // Cost estimation data
297  const std::set<RowID> costDataIDs = hdb_.socketCostEstimationDataIDs(id);
298  if (!costDataIDs.empty()) {
299  stream << "<b>Cost estimation data:</b>" << endl;
300  stream << "<table bgcolor=#bbbbbb>" << endl;
301  stream << "<tr><th>Name</th><th>Value</th>"
302  << "<th>Plugin</th></tr>" << endl;
303  } else {
304  stream << "No cost estimation data.<br>" << endl;
305  }
306  std::set<RowID>::const_iterator iter = costDataIDs.begin();
307  for (; iter != costDataIDs.end(); iter++) {
308  const CostEstimationData data = hdb_.costEstimationData(*iter);
309  stream << "<tr><td>" << data.name() << "</td>"
310  << "<td align=right>";
311  stream << data.value().stringValue();
312  stream << "</td><td align=center><a href=\"/" << COST_PLUGINS
313  << "/" << data.pluginID() << "\">"
314  << data.pluginID() << "</a></td></tr>" << endl;
315  }
316  stream << "</table>" << endl;
317  stream << "</small></body></html>" << endl;
318 }
319 
320 
321 /**
322  * Generates a html page of a function unit architecture.
323  *
324  * @param id ID of the FU architecture.
325  * @param stream Stream where the html is written to.
326  */
327 void
328 HDBToHtml::fuArchToHtml(RowID id, std::ostream& stream) {
329 
330  const FUArchitecture* arch = hdb_.fuArchitectureByID(id);
331  const FunctionUnit& fu = arch->architecture();
332 
333  stream << "<html><body><small>" << endl;
334 
335  //
336  // PORTS
337  //
338  stream << "<b>Ports:</b><br>" << endl;
339  stream << "<table bgcolor=#bbbbbb>" << endl;
340  stream << "<tr><th>Name</th><th>Width</th>"
341  << "<th>Triggering</th>"
342  << "<th>Opcode</th>"
343  << "<th>Guard</th></tr>"
344  << endl;
345 
346  for (int i = 0; i < fu.portCount(); i++) {
347 
348  const BaseFUPort& port = *fu.port(i);
349 
350  stream << "<tr><td align=left>" << port.name() << "</td>";
351 
352  if (arch->hasParameterizedWidth(port.name())) {
353  stream << "<td align=right>param</td>";
354  } else {
355  stream << "<td align=right>" << port.width() << "</td>";
356  }
357 
358  if (port.isTriggering()) {
359  stream << "<td align=center><font color=#009900>yes</font></td>";
360  } else {
361  stream << "<td align=center><font color=#ff0000>no</font></td>";
362  }
363 
364  if (port.isOpcodeSetting()) {
365  stream << "<td align=center><font color=#009900>yes</font></td>";
366  } else {
367  stream << "<td align=center><font color=#ff0000>no</font></td>";
368  }
369 
370  if (arch->hasGuardSupport(port.name())) {
371  stream << "<td align=center><font color=#009900>yes</font></td>";
372  } else {
373  stream << "<td align=center><font color=#ff0000>no</font></td>";
374  }
375  stream << "</tr>" << endl;
376  }
377  stream << "</table><br><br>" << endl;
378 
379  //
380  // OPERATIONS
381  //
382  stream << "<b>Operations:</b><br><br>" << endl;
383  for (int i = 0; i < fu.operationCount(); i++) {
384 
385  const HWOperation& operation = *fu.operation(i);
386  const ExecutionPipeline& pipeline = *operation.pipeline();
387 
388  stream << "<b>" << operation.name() << "</b><br>" << endl;
389  stream << "Latency: " << operation.latency() << endl;
390  stream << "<br>" << endl;
391  stream << "<table><tr><td valing=top>" << endl;
392  stream << "<table bgcolor=#bbbbbb><tr><th>operand</th><th>port</th>";
393  for (int cycle = 0; cycle < operation.latency(); cycle++) {
394  stream << "<th width=20>" << cycle << "</th>";
395  }
396  stream << "</tr>" << endl;
397 
398  // Reads operands.
400  ExecutionPipeline::OperandSet::iterator iter = read.begin();
401  for (; iter != read.end(); iter++) {
402  stream << "<tr><td>" << *iter << "</td><td>"
403  << operation.port(*iter)->name() << "</td>";
404  for (int cycle = 0; cycle < operation.latency(); cycle++) {
406  pipeline.readOperands(cycle), *iter)) {
407  stream << "<td align=center><b>R</b></td>";
408  } else {
409  stream << "<td></td>";
410  }
411  }
412  stream << "</tr>" << endl;
413  }
414 
415  // Written operands.
416  ExecutionPipeline::OperandSet written = pipeline.writtenOperands();
417  iter = written.begin();
418  for (; iter != written.end(); iter++) {
419  stream << "<tr><td>" << *iter << "</td><td>"
420  << operation.port(*iter)->name() << "</td>";
421  for (int cycle = 0; cycle < operation.latency(); cycle++) {
423  pipeline.writtenOperands(cycle), *iter)) {
424  stream << "<td align=center><b>W</b></td>";
425  } else {
426  stream << "<td></td>";
427  }
428  }
429  stream << "</tr>" << endl;
430  }
431  stream << "</table></td>" << endl;
432 
433  stream << "<td valign=top><table bgcolor=#bbbbbb>"
434  << "<tr><th>resource</th>";
435  for (int cycle = 0; cycle < operation.latency(); cycle++) {
436  stream << "<th width=20>" << cycle << "</th>";
437  }
438  stream << "</tr>" << endl;
439 
440  // Resources used.
441  for (int r = 0; r < fu.pipelineElementCount(); r++) {
442  const PipelineElement& res = *fu.pipelineElement(r);
443  stream << "<tr><td>" << res.name() << "</td>";
444  for (int cycle = 0; cycle < operation.latency(); cycle++) {
445  if (pipeline.isResourceUsed(res.name(), cycle)) {
446  stream << "<td align=center><b>X</b></td>";
447  } else {
448  stream << "<td></td>";
449  }
450  }
451  stream << "</tr>" << endl;
452  }
453 
454  stream << "</table></td></tr></table><br><br>" << endl;
455  }
456  stream << "</small></body></html>" << endl;
457 
458  delete arch;
459 }
460 
461 
462 /**
463  * Generates a html page of a register file architecture.
464  *
465  * @param id ID of the register file architecture.
466  * @param stream Stream where the html is written to.
467  */
468 void
469 HDBToHtml::rfArchToHtml(RowID id, std::ostream& stream) {
470 
471  const HDB::RFArchitecture* arch = hdb_.rfArchitectureByID(id);
472 
473  stream << "<html><body><small>" << endl;
474  stream << "<table>" << endl;
475 
476  // Width
477  stream << "<tr><td align=right><b>Width:</b></td>";
478  if (arch->hasParameterizedWidth()) {
479  stream << "<td>param</td>";
480  } else {
481  stream << "<td align=center>" << arch->width() << "</td>";
482  }
483  stream << "</tr>" << endl;
484 
485  // Size
486  stream << "<tr><td align=right><b>Size:</b></td>";
487  if (arch->hasParameterizedSize()) {
488  stream << "<td align=center>param</td>";
489  } else {
490  stream << "<td align=center>" << arch->size() << "</td>";
491  }
492  stream << "</tr>" << endl;
493 
494  stream << "<tr><td align=right><b>Read ports:</b></td><td align=center>"
495  << arch->readPortCount() << "</td></tr>" << endl;
496 
497  stream << "<tr><td align=right><b>Write ports:</b></td><td align=center>"
498  << arch->writePortCount() << "</td></tr>" << endl;
499 
500  stream << "<tr><td align=right><b>Bidirectional ports:</b></td>"
501  << "<td align=center>" << arch->bidirPortCount() << "</td></tr>"
502  << endl;
503 
504  stream << "<tr><td align=right><b>Max reads:</b></td><td align=center>"
505  << arch->maxReads() << "</td></tr>" << endl;
506 
507  stream << "<tr><td align=right><b>Max Writes:</b></td><td align=center>"
508  << arch->maxWrites() << "</td></tr>" << endl;
509 
510  stream << "<tr><td align=right><b>Latency:</b></td><td align=center>"
511  << arch->latency() << "</td></tr>" << endl;
512 
513  stream << "<tr><td align=right><b>Guard support:</b></td>";
514  if (arch->hasGuardSupport()) {
515  stream << "<td align=center>yes</td></tr>";
516  stream << "<tr><td align=right><b>Guard Latency:</b></td>"
517  << "<td align=center>" << arch->guardLatency()
518  << "</td></tr>" << endl;
519  } else {
520  stream << "<td align=center>no</td></tr>";
521  }
522  stream << "<tr><td align=right><b>Zero Register:</b></td><td" <<
523  " align=center>" << arch->zeroRegister() << "</td></tr>" << endl;
524 
525  stream << "</table></small><br>" << endl;
526  stream << "</body></html>" << endl;
527 
528  delete arch;
529 }
530 
531 
532 /**
533  * Generates a html page of a function unit implementation.
534  *
535  * @param id ID of the fu implementation.
536  * @param stream Stream where the html is written to.
537  */
538 void
539 HDBToHtml::fuImplToHtml(RowID id, std::ostream& stream) {
540 
541  RowID entryID = hdb_.fuEntryIDOfImplementation(id);
542  const HDB::FUEntry* entry = hdb_.fuByEntryID(entryID);
543  const HDB::FUImplementation& impl = entry->implementation();
544 
545  stream << "<html><body>" << endl;
546  stream << "<small><table>" << endl;
547 
548  stream << "<tr><td align=right><b>Module name:</b></td><td align=left>"
549  << impl.moduleName() << "</td></tr>" << endl;
550 
551  stream << "<tr><td align=right><b>Opcode port:</b></td><td align=left>"
552  << impl.opcodePort() << "</td></tr>" << endl;
553 
554  stream << "<tr><td align=right><b>Clock port:</b></td><td align=left>"
555  << impl.clkPort() << "</td></tr>" << endl;
556 
557  stream << "<tr><td align=right><b>Reset port:</b></td><td align=left>"
558  << impl.rstPort() << "</td></tr>" << endl;
559 
560  stream << "<tr><td align=right><b>Global lock port:</b></td>"
561  << "<td align=left>"
562  << impl.glockPort() << "</td></tr>" << endl;
563 
564  stream << "<tr><td align=right><b>Global lock req. port:</b></td>"
565  << "<td align=left>"
566  << impl.glockReqPort() << "</td></tr>" << endl;
567 
568  stream << "</table><br><br>" << endl;
569 
570  // Architecture ports.
571  if (impl.architecturePortCount() > 0) {
572  stream << "<b>Architecture ports:</b>" << endl;
573  stream << "<table bgcolor=#bbbbbb>" << endl;
574  stream << "<tr><th>Name</th>"
575  << "<th>Architecture port</th>"
576  << "<th>Load port</th>"
577  << "<th>Guard port</th>"
578  << "<th>Width formula</th></tr>" << endl;
579  } else {
580  stream << "No architecture ports.<br>" << endl;
581  }
582  for (int i = 0; i < impl.architecturePortCount(); i++) {
583 
584  const HDB::FUPortImplementation& port = impl.architecturePort(i);
585  stream << "<tr><td>" << port.name() << "</td>"
586  << "<td>" << port.architecturePort() << "</td>"
587  << "<td>" << port.loadPort() << "</td>"
588  << "<td>" << port.guardPort() << "</td>"
589  << "</td><td>" << port.widthFormula() << "</td></td>" << endl;
590  }
591  stream << "</table><br><br>" << endl;
592 
593 
594  // Opcodes
595  if (impl.opcodeCount() > 0) {
596  stream << "<b>Opcodes:</b>" << endl;
597  stream << "<table bgcolor=#bbbbbb>" << endl;
598  stream << "<tr><th>Operation</th><th>Opcode</th></tr>" << endl;
599  } else {
600  stream << "No opcodes.<br>" << endl;
601  }
602  for (int i = 0; i < impl.opcodeCount(); i++) {
603  stream << "<tr><td>" << impl.opcodeOperation(i) << "</td>"
604  << "<td align=center>" << impl.opcode(impl.opcodeOperation(i))
605  << "</td></tr>" << endl;
606  }
607  stream << "</table><br><br>" << endl;
608 
609  // External ports
610  if (impl.externalPortCount() > 0) {
611  stream << "<b>External ports:</b>" << endl;
612  stream << "<table bgcolor=#bbbbbb>" << endl;
613  stream << "<tr><th>Name</th><th>Direction</th><th>Width formula</th>"
614  << "<th>Parameter dependencies</th>"
615  << "<th>Description</th></tr>" << endl;
616  } else {
617  stream << "No external ports.<br>" << endl;
618  }
619  for (int i = 0; i < impl.externalPortCount(); i++) {
620 
621  const HDB::FUExternalPort& port = impl.externalPort(i);
622  stream << "<tr><td>" << port.name() << "</td><td align=center>";
623  if (port.direction() == HDB::IN) {
624  stream << "in";
625  } else if (port.direction() == HDB::OUT) {
626  stream << "out";
627  } else if (port.direction() == HDB::BIDIR) {
628  stream << "bidir";
629  }
630  stream << "</td><td>" << port.widthFormula() << "</td>";
631  stream << "<td>";
632  for (int dep = 0; dep < port.parameterDependencyCount(); dep++) {
633  if (dep > 0) {
634  stream << ", ";
635  }
636  stream << port.parameterDependency(dep);
637  }
638  stream << "</td><td>" << port.description() << "</td></tr>" << endl;
639  }
640  stream << "</table><br><br>" << endl;
641 
642 
643 
644  // Parameters
645  if (impl.parameterCount() > 0) {
646  stream << "<b>Parameters:</b>" << endl;
647  stream << "<table bgcolor=#bbbbbb>" << endl;
648  stream << "<tr><th>Name</th><th>Type</th><th>Value</th></tr>" << endl;
649  } else {
650  stream << "No parameters.<br>" << endl;
651  }
652  for (int i = 0; i < impl.parameterCount(); i++) {
653 
654  const HDB::FUImplementation::Parameter& parameter = impl.parameter(i);
655  stream << "<tr><td>" << parameter.name << "</td>"
656  << "<td align=center>" << parameter.type << "</td>"
657  << "<td>" << parameter.value << "</td></tr>" << endl;
658  }
659  stream << "</table><br><br>" << endl;
660 
661 
662  // Implementation files
663  if (impl.implementationFileCount() > 0) {
664  stream << "<b>Implementation files:</b>" << endl;
665  stream << "<table bgcolor=#bbbbbb>" << endl;
666  stream << "<tr><th>Path</th><th>Format</th></tr>" << endl;
667  } else {
668  stream << "No implementation files.<br>" << endl;
669  }
670  for (int i = 0; i < impl.implementationFileCount(); i++) {
671  const HDB::BlockImplementationFile& file = impl.file(i);
672  stream << "<tr><td>" << file.pathToFile() << "</td>"
673  << "<td align=center>";
675  stream << "VHDL";
676  }else
678  stream << "Verilog";
679  }
680 
681  stream << "</td></tr>" << endl;
682  }
683  stream << "</table><br><br>" << endl;
684 
685 
686  // Cost estimation data
687  const std::set<RowID> costDataIDs = hdb_.fuCostEstimationDataIDs(entryID);
688  if (!costDataIDs.empty()) {
689  stream << "<b>Cost estimation data:</b>" << endl;
690  stream << "<table bgcolor=#bbbbbb>" << endl;
691  stream << "<tr><th>Name</th><th>Value</th>"
692  << "<th>Plugin</th></tr>" << endl;
693  } else {
694  stream << "No cost estimation data.<br>" << endl;
695  }
696  std::set<RowID>::const_iterator iter = costDataIDs.begin();
697  for (; iter != costDataIDs.end(); iter++) {
698  const CostEstimationData data = hdb_.costEstimationData(*iter);
699  stream << "<tr><td>" << data.name() << "</td>"
700  << "<td align=right>";
701  stream << data.value().stringValue();
702  stream << "</td><td align=center><a href=\"/" << COST_PLUGINS
703  << "/" << data.pluginID() << "\">"
704  << data.pluginID() << "</a></td></tr>" << endl;
705  }
706  stream << "</table>" << endl;
707  stream << "</small></body></html>" << endl;
708 
709 
710  delete entry;
711 }
712 
713 /**
714  * Generates a html page of a register file implementation.
715  *
716  * @param id ID of the RF implementation.
717  * @param stream Stream where the html is written to.
718  */
719 void
720 HDBToHtml::rfImplToHtml(RowID id, std::ostream& stream) {
721 
722  RowID entryID = hdb_.rfEntryIDOfImplementation(id);
723  const RFEntry* entry = hdb_.rfByEntryID(entryID);
724  const RFImplementation& impl = entry->implementation();
725 
726  stream << "<html><body>" << endl;
727  stream << "<small><table>" << endl;
728 
729  stream << "<tr><td align=right><b>Module name:</b></td><td align=center>"
730  << impl.moduleName() << "</td></tr>" << endl;
731 
732  stream << "<tr><td align=right><b>Clock port:</b></td><td align=center>"
733  << impl.clkPort() << "</td></tr>" << endl;
734 
735  stream << "<tr><td align=right><b>Reset port:</b></td><td align=center>"
736  << impl.rstPort() << "</td></tr>" << endl;
737 
738  stream << "<tr><td align=right><b>Global lock port:</b></td>"
739  << "<td align=center>"
740  << impl.glockPort() << "</td></tr>" << endl;
741 
742  stream << "<tr><td align=right><b>Guard port:</b></td>"
743  << "<td align=center>"
744  << impl.guardPort() << "</td></tr>" << endl;
745 
746  stream << "<tr><td align=right><b>Size parameter:</b></td>"
747  << "<td align=center>" << impl.sizeParameter() << "</td></tr>"
748  << endl;
749 
750  stream << "<tr><td align=right><b>Width parameter:</b></td>"
751  << "<td align=center>" << impl.widthParameter() << "</td></tr>"
752  << endl;
753 
754  std::string sac_flag(impl.separateAddressCycleParameter() ?
755  "true" : "false");
756  stream << "<tr><td align=right><b>Separate address cycle:</b></td>"
757  << "<td align=center>"
758  << sac_flag << "</td></tr>" << endl;
759 
760  stream << "</table><br><br>" << endl;
761 
762 
763  // Ports
764  if (impl.portCount() > 0) {
765  stream << "<b>Ports:</b>" << endl;
766  stream << "<table bgcolor=#bbbbbb>" << endl;
767  stream << "<tr><th>Name</th>"
768  << "<th>Direction</th>"
769  << "<th>Load port</th>"
770  << "<th>Opcode port</th>"
771  << "<th>Opcode port width formula</th></tr>" << endl;
772  } else {
773  stream << "No ports.<br>" << endl;
774  }
775  for (int i = 0; i < impl.portCount(); i++) {
776 
777  const HDB::RFPortImplementation& port = impl.port(i);
778  stream << "<tr><td>" << port.name() << "</td><td align=center>";
779  if (port.direction() == HDB::IN) {
780  stream << "in";
781  } else if (port.direction() == HDB::OUT) {
782  stream << "out";
783  } else if (port.direction() == HDB::BIDIR) {
784  stream << "bidir";
785  }
786  stream << "</td><td>" << port.loadPort() << "</td>"
787  << "<td>" << port.opcodePort() << "</td>"
788  << "</td><td>" << port.opcodePortWidthFormula()
789  << "</td></td>" << endl;
790  }
791  stream << "</table><br><br>" << endl;
792 
793  // External ports
794  if (impl.externalPortCount() > 0) {
795  stream << "<b>External ports:</b>" << endl;
796  stream << "<table bgcolor=#bbbbbb>" << endl;
797  stream << "<tr><th>Name</th><th>Direction</th><th>Width formula</th>"
798  << "<th>Parameter dependencies</th>"
799  << "<th>Description</th></tr>" << endl;
800  } else {
801  stream << "No external ports.<br>" << endl;
802  }
803  for (int i = 0; i < impl.externalPortCount(); i++) {
804 
805  const HDB::RFExternalPort& port = impl.externalPort(i);
806  stream << "<tr><td>" << port.name() << "</td><td align=center>";
807  if (port.direction() == HDB::IN) {
808  stream << "in";
809  } else if (port.direction() == HDB::OUT) {
810  stream << "out";
811  } else if (port.direction() == HDB::BIDIR) {
812  stream << "bidir";
813  }
814  stream << "</td><td>" << port.widthFormula() << "</td>";
815  stream << "<td>";
816  for (int dep = 0; dep < port.parameterDependencyCount(); dep++) {
817  if (dep > 0) {
818  stream << ", ";
819  }
820  stream << port.parameterDependency(dep);
821  }
822  stream << "</td><td>" << port.description() << "</td></tr>" << endl;
823  }
824  stream << "</table><br><br>" << endl;
825 
826  // Parameters
827  if (impl.parameterCount() > 0) {
828  stream << "<b>Parameters:</b>" << endl;
829  stream << "<table bgcolor=#bbbbbb>" << endl;
830  stream << "<tr><th>Name</th><th>Type</th><th>Value</th></tr>" << endl;
831  } else {
832  stream << "No parameters.<br>" << endl;
833  }
834  for (int i = 0; i < impl.parameterCount(); i++) {
835 
836  const HDB::RFImplementation::Parameter& parameter = impl.parameter(i);
837  stream << "<tr><td>" << parameter.name << "</td>"
838  << "<td align=center>" << parameter.type << "</td>"
839  << "<td>" << parameter.value << "</td></tr>" << endl;
840  }
841  stream << "</table><br><br>" << endl;
842 
843  // Implementation files
844  if (impl.implementationFileCount() > 0) {
845  stream << "<b>Implementation files:</b>" << endl;
846  stream << "<table bgcolor=#bbbbbb>" << endl;
847  stream << "<tr><th>Path</th><th>Format</th></tr>" << endl;
848  } else {
849  stream << "No implementation files.<br>" << endl;
850  }
851 
852  for (int i = 0; i < impl.implementationFileCount(); i++) {
853  const HDB::BlockImplementationFile& file = impl.file(i);
854  stream << "<tr><td>" << file.pathToFile() << "</td>"
855  << "<td align=center>";
857  stream << "VHDL";
858  }else
860  stream << "Verilog";
861  }
862 
863  stream << "</td></tr>" << endl;
864  }
865  stream << "</table><br><br>" << endl;
866 
867  // Cost estimation data
868  const std::set<RowID> costDataIDs = hdb_.rfCostEstimationDataIDs(entryID);
869  if (!costDataIDs.empty()) {
870  stream << "<b>Cost estimation data:</b>" << endl;
871  stream << "<table bgcolor=#bbbbbb>" << endl;
872  stream << "<tr><th>Name</th><th>Value</th>"
873  << "<th>Plugin</th></tr>" << endl;
874  } else {
875  stream << "No cost estimation data.<br>" << endl;
876  }
877  std::set<RowID>::const_iterator iter = costDataIDs.begin();
878  for (; iter != costDataIDs.end(); iter++) {
879  const CostEstimationData data = hdb_.costEstimationData(*iter);
880  stream << "<tr><td>" << data.name() << "</td>"
881  << "<td align=right>";
882  stream << data.value().stringValue();
883  stream << "</td><td align=center><a href=\"/" << COST_PLUGINS
884  << "/" << data.pluginID() << "\">"
885  << data.pluginID() << "</a></td></tr>" << endl;
886  }
887  stream << "</table>" << endl;
888  stream << "</small></body></html>" << endl;
889 
890  delete entry;
891 }
892 
893 /**
894  * Generates html page of a cost function plugin information.
895  *
896  * @param id Row id of the cost estimation plugin.
897  * @param strem Stream where the html is written to.
898  */
899 void
900 HDBToHtml::costFunctionPluginToHtml(RowID id, std::ostream& stream) {
901 
903 
904  stream << "<html><body><small>" << endl;
905  stream << "<table bgcolor=#bbbbbb>"<< endl;
906 
907  // Plugin name.
908  stream << "<tr><td align=right>Name:</td><td>" << plugin->name()
909  << "</td></tr>" << endl;
910 
911  // Plugin type.
912  stream << "<tr><td align=right>Type:</td><td>";
913  if (plugin->type() == CostFunctionPlugin::COST_FU) {
914  stream << "Function unit cost estimator.";
915  } else if (plugin->type() == CostFunctionPlugin::COST_RF) {
916  stream << "Register file cost estimator.";
917  } else if (plugin->type() == CostFunctionPlugin::COST_DECOMP) {
918  stream << "Decompressor cost estimator.";
919  } else if (plugin->type() == CostFunctionPlugin::COST_ICDEC) {
920  stream << "Interconnection network & decoder cost estimator.";
921  } else {
922  stream << "unknown";
923  }
924  stream << "</td></tr>" << endl;
925 
926  // Plugin file path.
927  stream << "<tr><td align=right>File path:</td><td>"
928  << plugin->pluginFilePath() << "</td></tr>" << endl;
929 
930  // Plugin description.
931  stream << "<tr><td align=right>Description:</td><td>"
932  << plugin->description() << "</td></tr>" << endl;
933 
934  stream << "</table><br><br>"<< endl;
935 
936 
937  // Cost estiamtion data
938  stream << "<b>Cost estimation data:</b>" << endl;
939  stream << "<table bgcolor=#bbbbbb>"<< endl;
940  stream << "<tr><th>Entry type</th><th>Entry ID</th>"
941  << "<th>Key</th><th>Value</th></tr>" << endl;
942 
943  const std::set<RowID> dataIDs = hdb_.costFunctionPluginDataIDs(id);
944  std::set<RowID>::const_iterator iter = dataIDs.begin();
945  for (; iter != dataIDs.end(); iter++) {
947  stream << "<tr>";
948  if (data.hasFUReference()) {
949  // Function unit reference.
950  stream << "<td>FU</td><td><a href=\"/" << FU_ENTRIES << "/"
951  << data.fuReference() << "\">"
952  << data.fuReference() << "</a>";
953  stream << "</td>";
954  } else if (data.hasRFReference()) {
955  // Register file entry reference.
956  stream << "<td>RF</td><td><a href=\"/" << RF_ENTRIES << "/"
957  << data.rfReference() << "\">"
958  << data.rfReference() << "</a>";
959  stream << "</td>";
960  } else if (data.hasBusReference()) {
961  // Bus entry reference.
962  stream << "<td>Bus</td><td>"
963  << data.busReference() << "</a>";
964  stream << "</td>";
965  } else if (data.hasSocketReference()) {
966  // Socket entry reference.
967  stream << "<td>Socket</td><td>"
968  << data.socketReference() << "</a>";
969  stream << "</td>";
970  } else {
971  stream << "<td>-</td><td>-</td>";
972  }
973 
974  stream << "<td>" << data.name() << "</td><td>"
975  << data.value().stringValue() << "</td></tr>" << endl;
976 
977  }
978  stream << "</table>"<< endl;
979  stream << "</small></body></html>" << endl;
980 
981  delete plugin;
982 }
983 
984 
985 void
988 
989  stream << "<html><body>";
990  stream << "<b>Operation Implementation</b><br/>";
991  stream << "operation : " << op.name << "<br/>";
992  stream << "implementation (VHDL) : " << op.implFileVhdl << "<br/>";
993  stream << "implementation (Verilog) : " << op.implFileVerilog << "<br/>";
994  for(const auto& r : op.resources) {
995  stream << "resource : " << r.name
996  << " * " << r.count
997  << "<br/>";
998  }
999  stream << "</body></html>\n";
1000 }
1001 
1002 void
1006 
1007  stream << "<html><body>";
1008  stream << "<b>Operation Implementation Resource</b><br/>";
1009  stream << "name : " << res.name << "<br/>";
1010  for (const auto& sim : res.simFiles) {
1011  stream << "simulation file : " << sim << "<br/>";
1012  }
1013  for (const auto& syn : res.synFiles) {
1014  stream << "synthesis file : " << syn << "<br/>";
1015  }
1016  stream << "</body></html>";
1017 }
HDB::FUArchitecture
Definition: FUArchitecture.hh:55
HDB::FUEntry
Definition: FUEntry.hh:49
HDB::FUExternalPort
Definition: FUExternalPort.hh:52
CostEstimationData::rfReference
RowID rfReference() const
Definition: CostEstimationData.cc:118
HDB::HWBlockImplementation::clkPort
std::string clkPort() const
Definition: HWBlockImplementation.cc:175
HDBToHtml::RF_IMPLEMENTATIONS
static const std::string RF_IMPLEMENTATIONS
Definition: HDBToHtml.hh:73
HDB::HWBlockImplementation::file
BlockImplementationFile & file(int index) const
Definition: HWBlockImplementation.cc:267
HDBToHtml::rfArchToHtml
void rfArchToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:469
HDB::HDBEntry::costFunction
CostFunctionPlugin & costFunction() const
Definition: HDBEntry.cc:111
HDB::RFPortImplementation::opcodePortWidthFormula
std::string opcodePortWidthFormula() const
Definition: RFPortImplementation.cc:132
HDB::RFArchitecture::maxReads
int maxReads() const
Definition: RFArchitecture.cc:447
HDB::HDBManager::fuArchitectureByID
virtual FUArchitecture * fuArchitectureByID(RowID id) const
Definition: HDBManager.cc:2940
CostEstimationData::name
std::string name() const
Definition: CostEstimationData.cc:58
HDBToHtml::costFunctionPluginToHtml
void costFunctionPluginToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:900
HDB::RFEntry::hasImplementation
virtual bool hasImplementation() const
Definition: RFEntry.cc:74
HDB::FUArchitecture::hasParameterizedWidth
bool hasParameterizedWidth(const std::string &port) const
Definition: FUArchitecture.cc:86
HDB::FUImplementation::opcodeCount
int opcodeCount() const
Definition: FUImplementation.cc:194
HDB
Definition: CostDatabase.hh:49
HDB::CostFunctionPlugin::description
std::string description() const
Definition: CostFunctionPlugin.cc:74
TTAMachine::HWOperation
Definition: HWOperation.hh:52
ExecutionPipeline.hh
FUArchitecture.hh
HDB::RFArchitecture::latency
int latency() const
Definition: RFArchitecture.cc:497
DataObject::stringValue
virtual std::string stringValue() const
Definition: DataObject.cc:344
HDB::HDBEntry::id
RowID id() const
Definition: HDBEntry.cc:85
CostEstimationData::pluginID
RowID pluginID() const
Definition: CostEstimationData.cc:88
HDBToHtml.hh
HDB::BlockImplementationFile::VHDL
@ VHDL
VHDL file.
Definition: BlockImplementationFile.hh:48
HDB::FUPortImplementation
Definition: FUPortImplementation.hh:46
CostEstimationData::hasSocketReference
bool hasSocketReference() const
HDB::RFArchitecture::zeroRegister
bool zeroRegister() const
Definition: RFArchitecture.cc:541
HDB::CostFunctionPlugin::id
int id() const
Definition: CostFunctionPlugin.cc:64
HDB::HDBManager::costFunctionPluginDataIDs
std::set< RowID > costFunctionPluginDataIDs(RowID pluginID) const
Definition: HDBManager.cc:6589
TTAMachine::BaseFUPort
Definition: BaseFUPort.hh:44
HDB::RFEntry
Definition: RFEntry.hh:47
HDB::HWBlockImplementation::implementationFileCount
int implementationFileCount() const
Definition: HWBlockImplementation.cc:254
HDB::FUArchitecture::architecture
TTAMachine::FunctionUnit & architecture() const
Definition: FUArchitecture.cc:131
HDB::RFPortImplementation::direction
Direction direction() const
Definition: RFPortImplementation.cc:88
RowID
int RowID
Type definition of row ID in relational databases.
Definition: DBTypes.hh:37
HDBToHtml::busEntryToHtml
void busEntryToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:250
HDB::FUImplementation::externalPort
FUExternalPort & externalPort(int index) const
Definition: FUImplementation.cc:390
HDBToHtml::FU_IMPLEMENTATIONS
static const std::string FU_IMPLEMENTATIONS
Definition: HDBToHtml.hh:72
HDBToHtml::rfEntryToHtml
void rfEntryToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:177
CostEstimationData::hasFUReference
bool hasFUReference() const
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
HDB::HDBManager::OperationImplementationResourceByID
OperationImplementationResource OperationImplementationResourceByID(RowID id) const
Definition: HDBManager.cc:2410
HDB::RFImplementation::parameterCount
int parameterCount() const
Definition: RFImplementation.cc:352
HDBToHtml::fuArchToHtml
void fuArchToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:328
TTAMachine::ExecutionPipeline::writtenOperands
OperandSet writtenOperands(int cycle) const
Definition: ExecutionPipeline.cc:429
HDB::RFArchitecture::hasParameterizedSize
bool hasParameterizedSize() const
Definition: RFArchitecture.cc:282
FUPortImplementation.hh
TTAMachine::PipelineElement::name
const std::string & name() const
TTAMachine::ExecutionPipeline::readOperands
OperandSet readOperands(int cycle) const
Definition: ExecutionPipeline.cc:408
HDB::FUImplementation::opcodePort
std::string opcodePort() const
Definition: FUImplementation.cc:135
HDB::HDBManager::costEstimationData
CostEstimationData costEstimationData(RowID id) const
Definition: HDBManager.cc:6323
HDB::HDBManager::costFunctionPluginByID
CostFunctionPlugin * costFunctionPluginByID(RowID pluginID) const
Definition: HDBManager.cc:6631
HDB::RFImplementation::widthParameter
std::string widthParameter() const
Definition: RFImplementation.cc:154
HDB::BlockImplementationFile
Definition: BlockImplementationFile.hh:44
HDB::HDBEntry::hasCostFunction
bool hasCostFunction() const
Definition: HDBEntry.cc:99
HDB::RFArchitecture::width
int width() const
Definition: RFArchitecture.cc:343
CostEstimationData.hh
TTAMachine::BaseFUPort::isOpcodeSetting
virtual bool isOpcodeSetting() const =0
HDB::HDBManager::rfEntryIDOfImplementation
RowID rfEntryIDOfImplementation(RowID implID) const
Definition: HDBManager.cc:2796
HDB::RFEntry::architecture
RFArchitecture & architecture() const
Definition: RFEntry.cc:145
HDB::HWBlockImplementation::rstPort
std::string rstPort() const
Definition: HWBlockImplementation.cc:197
HDB::FUImplementation::glockReqPort
std::string glockReqPort() const
Definition: FUImplementation.cc:157
HDB::OperationImplementationResource::synFiles
std::vector< std::string > synFiles
Definition: OperationImplementationResource.hh:45
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
HDB::FUImplementation::parameterCount
int parameterCount() const
Definition: FUImplementation.cc:443
TTAMachine::HWOperation::port
virtual FUPort * port(int operand) const
Definition: HWOperation.cc:320
HDBToHtml::OperationImplementationToHtml
void OperationImplementationToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:986
HDB::RFExternalPort
Definition: RFExternalPort.hh:41
HDBToHtml::OPERATION_IMPLEMENTATIONS
static const std::string OPERATION_IMPLEMENTATIONS
Definition: HDBToHtml.hh:75
HDB::RFImplementation::externalPort
RFExternalPort & externalPort(int index) const
Definition: RFImplementation.cc:299
CostEstimationData::busReference
RowID busReference() const
Definition: CostEstimationData.cc:133
HDB::RFImplementation
Definition: RFImplementation.hh:50
HDB::RFImplementation::sizeParameter
std::string sizeParameter() const
Definition: RFImplementation.cc:132
HDBToHtml::FU_ENTRIES
static const std::string FU_ENTRIES
Definition: HDBToHtml.hh:65
HDB::FUArchitecture::hasGuardSupport
bool hasGuardSupport(const std::string &port) const
Definition: FUArchitecture.cc:109
HDB::FUEntry::hasArchitecture
virtual bool hasArchitecture() const
Definition: FUEntry.cc:117
HWOperation.hh
TTAMachine::HWOperation::name
const std::string & name() const
Definition: HWOperation.cc:141
HDBToHtml::COST_PLUGINS
static const std::string COST_PLUGINS
Definition: HDBToHtml.hh:74
RFImplementation.hh
TTAMachine::FunctionUnit::pipelineElement
virtual PipelineElement * pipelineElement(int index) const
Definition: FunctionUnit.cc:523
HDB::RFArchitecture::maxWrites
int maxWrites() const
Definition: RFArchitecture.cc:472
HDBToHtml::HDBToHtml
HDBToHtml(const HDB::HDBManager &hdb)
Definition: HDBToHtml.cc:86
HDB::OperationImplementation::implFileVerilog
std::string implFileVerilog
Definition: OperationImplementation.hh:52
HDB::OperationImplementationResource::simFiles
std::vector< std::string > simFiles
Definition: OperationImplementationResource.hh:46
HDB::ExternalPort::parameterDependency
std::string parameterDependency(int index) const
Definition: ExternalPort.cc:203
HDB::BIDIR
@ BIDIR
Bidirectional port.
Definition: HDBTypes.hh:43
HDB::FUEntry::architecture
FUArchitecture & architecture() const
Definition: FUEntry.cc:129
FUEntry.hh
HDB::HDBManager::rfArchitectureByID
virtual RFArchitecture * rfArchitectureByID(RowID id) const
Definition: HDBManager.cc:2963
HDBToHtml::BUS_ENTRIES
static const std::string BUS_ENTRIES
Definition: HDBToHtml.hh:68
HDBToHtml::hdb_
const HDB::HDBManager & hdb_
HDB to create html from.
Definition: HDBToHtml.hh:80
RFPortImplementation.hh
HDB::Parameter::type
std::string type
Type of the parameter.
Definition: HDBTypes.hh:48
HDBToHtml::RF_IU_ENTRIES
static const std::string RF_IU_ENTRIES
Definition: HDBToHtml.hh:67
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
HDBToHtml::OPERATION_IMPLEMENTATION_RESOURCES
static const std::string OPERATION_IMPLEMENTATION_RESOURCES
Definition: HDBToHtml.hh:76
HDB::HDBManager::fuEntryIDOfImplementation
RowID fuEntryIDOfImplementation(RowID implID) const
Definition: HDBManager.cc:2765
HDB::HDBManager
Definition: HDBManager.hh:82
RFArchitecture.hh
HDB::RFArchitecture::hasParameterizedWidth
bool hasParameterizedWidth() const
Definition: RFArchitecture.cc:271
HDBToHtml::RF_ENTRIES
static const std::string RF_ENTRIES
Definition: HDBToHtml.hh:66
HDB::OperationImplementation::name
std::string name
Definition: OperationImplementation.hh:50
HDB::RFEntry::implementation
RFImplementation & implementation() const
Definition: RFEntry.cc:102
HDB::OperationImplementationResource
Definition: OperationImplementationResource.hh:38
CostEstimationData::socketReference
RowID socketReference() const
Definition: CostEstimationData.cc:148
HDB::PortImplementation::loadPort
std::string loadPort() const
Definition: PortImplementation.cc:96
HDB::RFArchitecture::guardLatency
int guardLatency() const
Definition: RFArchitecture.cc:551
HDB::BlockImplementationFile::pathToFile
std::string pathToFile() const
Definition: BlockImplementationFile.cc:61
HDB::FUImplementation::opcodeOperation
std::string opcodeOperation(int index) const
Definition: FUImplementation.cc:207
HDB::BlockImplementationFile::Verilog
@ Verilog
Verilog file.
Definition: BlockImplementationFile.hh:49
TTAMachine::ExecutionPipeline::OperandSet
std::set< int > OperandSet
Set for operand indexes.
Definition: ExecutionPipeline.hh:58
HDBToHtml::fuImplToHtml
void fuImplToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:539
DataObject.hh
HDB::HDBManager::busCostEstimationDataIDs
std::set< RowID > busCostEstimationDataIDs(RowID busID) const
Definition: HDBManager.cc:6514
TTAMachine::BaseFUPort::isTriggering
virtual bool isTriggering() const =0
CostEstimationData
Definition: CostEstimationData.hh:42
FUImplementation.hh
TTAMachine::Unit::portCount
virtual int portCount() const
Definition: Unit.cc:135
CostEstimationData::value
DataObject value() const
Definition: CostEstimationData.cc:73
TTAMachine::FunctionUnit::pipelineElementCount
virtual int pipelineElementCount() const
Definition: FunctionUnit.cc:507
HDB::OperationImplementation::resources
std::vector< OperationImplementationResource > resources
Definition: OperationImplementation.hh:58
HDBToHtml::rfImplToHtml
void rfImplToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:720
HDB::RFImplementation::port
RFPortImplementation & port(int index) const
Definition: RFImplementation.cc:281
HWBlockArchitecture::id
RowID id() const
Definition: HWBlockArchitecture.cc:79
HDB::RFArchitecture::hasGuardSupport
bool hasGuardSupport() const
Definition: RFArchitecture.cc:519
CostEstimationData::hasBusReference
bool hasBusReference() const
HDB::Parameter::name
std::string name
Name of the parameter.
Definition: HDBTypes.hh:47
HDB::FUImplementation
Definition: FUImplementation.hh:53
HDB::RFArchitecture
Definition: RFArchitecture.hh:50
HDB::RFPortImplementation
Definition: RFPortImplementation.hh:43
HDB::FUImplementation::opcode
int opcode(const std::string &operation) const
Definition: FUImplementation.cc:242
HDB::HDBManager::socketCostEstimationDataIDs
std::set< RowID > socketCostEstimationDataIDs(RowID socketID) const
Definition: HDBManager.cc:6473
HDB::FUPortImplementation::architecturePort
std::string architecturePort() const
Definition: FUPortImplementation.cc:93
FUExternalPort.hh
HDB::HDBManager::OperationImplementationByID
OperationImplementation OperationImplementationByID(RowID id) const
Definition: HDBManager.cc:2248
TTAMachine::PipelineElement
Definition: PipelineElement.hh:46
HDB::PortImplementation::name
std::string name() const
Definition: PortImplementation.cc:74
HDB::HWBlockImplementation::id
RowID id() const
Definition: HWBlockImplementation.cc:128
BlockImplementationFile.hh
CostEstimationData::fuReference
RowID fuReference() const
Definition: CostEstimationData.cc:103
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
HDB::CostFunctionPlugin::pluginFilePath
std::string pluginFilePath() const
Definition: CostFunctionPlugin.cc:94
HDBToHtml::SOCKET_ENTRIES
static const std::string SOCKET_ENTRIES
Definition: HDBToHtml.hh:69
HDB::FUImplementation::parameter
Parameter parameter(int index) const
Definition: FUImplementation.cc:457
HDB::RFPortImplementation::opcodePort
std::string opcodePort() const
Definition: RFPortImplementation.cc:110
HDB::BlockImplementationFile::format
Format format() const
Definition: BlockImplementationFile.cc:70
FUPort.hh
HDB::HDBManager::rfCostEstimationDataIDs
std::set< RowID > rfCostEstimationDataIDs(RowID rfImplID) const
Definition: HDBManager.cc:6432
HDB::FUImplementation::architecturePortCount
int architecturePortCount() const
Definition: FUImplementation.cc:326
CostEstimationData::hasRFReference
bool hasRFReference() const
HDB::OperationImplementationResource::name
std::string name
Definition: OperationImplementationResource.hh:41
HDBToHtml::fuEntryToHtml
void fuEntryToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:103
HDB::RFArchitecture::readPortCount
int readPortCount() const
Definition: RFArchitecture.cc:372
PipelineElement.hh
HDB::IN
@ IN
Input port.
Definition: HDBTypes.hh:41
HDB::RFImplementation::guardPort
std::string guardPort() const
Definition: RFImplementation.cc:176
HDB::RFImplementation::portCount
int portCount() const
Definition: RFImplementation.cc:255
HDB::RFArchitecture::size
int size() const
Definition: RFArchitecture.cc:326
TTAMachine::HWOperation::pipeline
ExecutionPipeline * pipeline() const
Definition: HWOperation.cc:201
HDB::Parameter::value
std::string value
Value of the parameter.
Definition: HDBTypes.hh:49
TTAMachine::ExecutionPipeline
Definition: ExecutionPipeline.hh:55
HDB::RFImplementation::parameter
Parameter parameter(int index) const
Definition: RFImplementation.cc:366
ContainerTools::containsValue
static bool containsValue(const ContainerType &aContainer, const ElementType &aKey)
CostFunctionPlugin.hh
RFEntry.hh
HDB::Parameter
Definition: HDBTypes.hh:46
HDB::HWBlockImplementation::moduleName
std::string moduleName() const
Definition: HWBlockImplementation.cc:153
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
TTAMachine::HWOperation::latency
int latency() const
Definition: HWOperation.cc:216
HDB::ExternalPort::description
std::string description() const
Definition: ExternalPort.cc:150
HDB::ExternalPort::name
std::string name() const
Definition: ExternalPort.cc:84
HDB::HDBManager::fuCostEstimationDataIDs
std::set< RowID > fuCostEstimationDataIDs(RowID fuImplID) const
Definition: HDBManager.cc:6391
HDB::RFArchitecture::bidirPortCount
int bidirPortCount() const
Definition: RFArchitecture.cc:422
HDB::FUEntry::hasImplementation
virtual bool hasImplementation() const
Definition: FUEntry.cc:74
HDB::CostFunctionPlugin::type
CostFunctionPluginType type() const
Definition: CostFunctionPlugin.cc:104
TTAMachine
Definition: Assembler.hh:48
HDB::FUEntry::implementation
FUImplementation & implementation() const
Definition: FUEntry.cc:86
HDB::HWBlockImplementation::glockPort
std::string glockPort() const
Definition: HWBlockImplementation.cc:219
HDBManager.hh
HDB::FUPortImplementation::guardPort
std::string guardPort() const
Definition: FUPortImplementation.cc:115
HDB::RFImplementation::externalPortCount
int externalPortCount() const
Definition: RFImplementation.cc:266
HDB::HDBManager::fuByEntryID
FUEntry * fuByEntryID(RowID id) const
Definition: HDBManager.cc:2828
HDB::ExternalPort::direction
Direction direction() const
Definition: ExternalPort.cc:106
HDBToHtml::socketEntryToHtml
void socketEntryToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:289
HDBToHtml::OperationImplementationResourceToHtml
void OperationImplementationResourceToHtml(RowID id, std::ostream &stream)
Definition: HDBToHtml.cc:1003
HDB::FUImplementation::architecturePort
FUPortImplementation & architecturePort(int index) const
Definition: FUImplementation.cc:351
HDB::CostFunctionPlugin::name
std::string name() const
Definition: CostFunctionPlugin.cc:84
HDB::ExternalPort::widthFormula
std::string widthFormula() const
Definition: ExternalPort.cc:128
HDBToHtml::FU_ARCHITECTURES
static const std::string FU_ARCHITECTURES
Definition: HDBToHtml.hh:70
HDB::RFImplementation::separateAddressCycleParameter
bool separateAddressCycleParameter() const
Definition: RFImplementation.cc:194
HDB::OUT
@ OUT
Output port.
Definition: HDBTypes.hh:42
HDB::RFEntry::hasArchitecture
virtual bool hasArchitecture() const
Definition: RFEntry.cc:117
HDB::CostFunctionPlugin
Definition: CostFunctionPlugin.hh:43
HDBToHtml::RF_ARCHITECTURES
static const std::string RF_ARCHITECTURES
Definition: HDBToHtml.hh:71
HDBToHtml::~HDBToHtml
virtual ~HDBToHtml()
Definition: HDBToHtml.cc:93
HDB::FUImplementation::externalPortCount
int externalPortCount() const
Definition: FUImplementation.cc:337
RFExternalPort.hh
HDB::ExternalPort::parameterDependencyCount
int parameterDependencyCount() const
Definition: ExternalPort.cc:189
HDB::OperationImplementation
Definition: OperationImplementation.hh:47
TTAMachine::BaseFUPort::width
virtual int width() const
Definition: BaseFUPort.cc:109
HDB::RFArchitecture::writePortCount
int writePortCount() const
Definition: RFArchitecture.cc:397
TTAMachine::ExecutionPipeline::isResourceUsed
bool isResourceUsed(const std::string &name, int cycle) const
Definition: ExecutionPipeline.cc:300
HDB::OperationImplementation::implFileVhdl
std::string implFileVhdl
Definition: OperationImplementation.hh:51
FunctionUnit.hh
HDB::HDBManager::rfByEntryID
RFEntry * rfByEntryID(RowID id) const
Definition: HDBManager.cc:2885
HDB::FUPortImplementation::widthFormula
std::string widthFormula() const
Definition: FUPortImplementation.cc:137
ContainerTools.hh