1 /*
2     PADRING -- a padring generator for ASICs.
3 
4     Copyright (c) 2019, Niels Moseley <niels@symbioticeda.com>
5 
6     Permission to use, copy, modify, and/or distribute this software for any
7     purpose with or without fee is hereby granted, provided that the above
8     copyright notice and this permission notice appear in all copies.
9 
10     THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11     WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12     MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13     ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14     WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15     ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16     OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 
18 */
19 
20 #include "debugutils.h"
21 #include <sstream>
22 
dumpToConsole(const PRLEFReader::LEFCellInfo_t * cell)23 void DebugUtils::dumpToConsole(const PRLEFReader::LEFCellInfo_t *cell)
24 {
25     std::stringstream ss;
26     ss << "\n";
27 
28     if (cell != nullptr)
29     {
30         ss << "Name:    " << cell->m_name.c_str() << "\n";
31         ss << "Foreign  " << cell->m_foreign.c_str() << "\n";
32         ss << "Width    " << cell->m_sx << "\n";
33         ss << "Height   " << cell->m_sy << "\n";
34         ss << "Type     " << (cell->m_isFiller ? "FILLER" : "REGULAR") << "\n";
35         ss << "Symmetry " << cell->m_symmetry.c_str() << "\n";
36     }
37     else
38     {
39         ss << "Error: cell is a nullptr!\n";
40     }
41     doLog(LOG_INFO, ss.str());
42 }
43 
44