36 const Device& device, std::ostream& outStream)
39 m_outputStream = &outStream;
43 m_deviceIsolatedPIPCount = 0;
44 m_deviceZeroPIPCount = 0;
45 m_deviceNotIsolatedPIPCount = 0;
52 size_t tileTypeDbCount = tileTypeDbs.size();
53 for (
size_t i = 0; i < tileTypeDbCount; ++i)
57 printTileType(tileTypeDb, tileType);
61 printPIPCounts(0, m_devicePIPCount, m_deviceIsolatedPIPCount,
62 m_deviceZeroPIPCount, m_deviceNotIsolatedPIPCount);
71 size_t pipControlSetCount = pipControlSets.size();
76 m_tileTypePIPCount = 0;
77 m_tileTypeIsolatedPIPCount = 0;
78 m_tileTypeZeroPIPCount = 0;
79 m_tileTypeNotIsolatedPIPCount = 0;
86 for (
size_t i = 0; i < pipControlSetCount; ++i)
89 printPIPControlSet(pipControlSet, i, wires, pips);
93 printPIPCounts(1, m_tileTypePIPCount, m_tileTypeIsolatedPIPCount,
94 m_tileTypeZeroPIPCount, m_tileTypeNotIsolatedPIPCount);
97 m_devicePIPCount += m_tileTypePIPCount;
98 m_deviceIsolatedPIPCount += m_tileTypeIsolatedPIPCount;
99 m_deviceZeroPIPCount += m_tileTypeZeroPIPCount;
100 m_deviceNotIsolatedPIPCount += m_tileTypeNotIsolatedPIPCount;
104 void DeviceCfgDbStats::printPIPControlSet(
const PIPControlSet& cs,
105 size_t csIndex,
const Wires& wires,
const PIPs& pips)
108 size_t isolatedPIPCount = 0;
109 size_t zeroPIPCount = 0;
110 size_t notIsolatedPIPCount = 0;
118 size_t bitPositionCount = bitPositions.size();
119 for (
size_t i = 0; i < bitPositionCount; ++i)
122 (*m_outputStream) << bitPositions[i];
128 size_t pipCount = pipBitValues.size();
129 for (
size_t i = 0; i < pipCount; ++i)
143 boost::uint32_t value = pipBitValue.
bitValue();
147 ++notIsolatedPIPCount;
164 m_tileTypePIPCount += pipCount;
165 m_tileTypeIsolatedPIPCount += isolatedPIPCount;
166 m_tileTypeZeroPIPCount += zeroPIPCount;
167 m_tileTypeNotIsolatedPIPCount += notIsolatedPIPCount;
171 void DeviceCfgDbStats::printPIPCounts(
size_t indent,
size_t total,
172 size_t isolated,
size_t zero,
size_t notIsolated)
177 float fTotal = ((total != 0) ? (100.0f / total) : 0);
178 (*m_outputStream) << std::fixed << std::setprecision(1);