154 using ActionDataResourceUsage = Resources_Schema_Logger::ActionDataResourceUsage;
155 using ClotResourceUsage = Resources_Schema_Logger::ClotResourceUsage;
156 using ElementUsage = Resources_Schema_Logger::ElementUsage;
157 using ExactMatchResultBusResourceUsage =
158 Resources_Schema_Logger::ExactMatchResultBusResourceUsage;
159 using ExactMatchSearchBusResourceUsage =
160 Resources_Schema_Logger::ExactMatchSearchBusResourceUsage;
161 using HashBitsResourceUsage = Resources_Schema_Logger::HashBitsResourceUsage;
162 using HashDistResourceUsage = Resources_Schema_Logger::HashDistributionResourceUsage;
163 using LogicalTableResourceUsage = Resources_Schema_Logger::LogicalTableResourceUsage;
164 using MapRamResourceUsage = Resources_Schema_Logger::MapRamResourceUsage;
165 using MauStageResourceUsage = Resources_Schema_Logger::MauStageResourceUsage;
166 using MeterAluResourceUsage = Resources_Schema_Logger::MeterAluResourceUsage;
167 using ParserResources = Resources_Schema_Logger::ParserResources;
168 using PhvResourceUsage = Resources_Schema_Logger::PhvResourceUsage;
169 using RamResourceUsage = Resources_Schema_Logger::RamResourceUsage;
170 using ResourceUsage = Resources_Schema_Logger::ResourceUsage;
171 using GatewayResourceUsage = Resources_Schema_Logger::GatewayResourceUsage;
172 using StashResourceUsage = Resources_Schema_Logger::StashResourceUsage;
173 using StatisticAluResourceUsage = Resources_Schema_Logger::StatisticAluResourceUsage;
174 using TcamResourceUsage = Resources_Schema_Logger::TcamResourceUsage;
175 using TindResultBusResourceUsage = Resources_Schema_Logger::TindResultBusResourceUsage;
176 using VliwResourceUsage = Resources_Schema_Logger::VliwResourceUsage;
177 using XbarResourceUsage = Resources_Schema_Logger::XbarResourceUsage;
181 std::string filePath;
182 std::string manifestPath;
183 std::vector<Resources::StageResources> stageResources;
184 const ParserResources *parserResources =
nullptr;
185 std::vector<ClotResourceUsage *> clotResources;
190 bool preorder(
const IR::BFN::Pipe *p)
override;
196 bool preorder(
const IR::MAU::Table *tbl)
override;
205 void collectTableUsage(
cstring name,
const IR::MAU::Table *table);
207 void collectXbarBytesUsage(
unsigned int stage,
const IXBar::Use *alloc);
217 XbarResourceUsage *logXbarBytes(
unsigned stageNo)
const;
219 HashBitsResourceUsage *logHashBits(
unsigned stageNo)
const;
221 HashDistResourceUsage *logHashDist(
unsigned stageNo)
const;
223 void logMemories(
unsigned int stage, RamResourceUsage *ramsRes, MapRamResourceUsage *mapRamsRes,
224 GatewayResourceUsage *gatewaysRes, StashResourceUsage *stashesRes,
225 MeterAluResourceUsage *meterRes, StatisticAluResourceUsage *statisticsRes,
226 TcamResourceUsage *tcamsRes)
const;
228 LogicalTableResourceUsage *logLogicalTables(
int stageNo)
const;
230 ActionDataResourceUsage *logActionBusBytes(
unsigned int stageNo)
const;
232 void logActionSlots(MauStageResourceUsage *msru)
const;
234 VliwResourceUsage *logVliw(
unsigned int stageNo)
const;
236 ExactMatchSearchBusResourceUsage *logExactMemSearchBuses(
unsigned int stageNo)
const;
238 ExactMatchResultBusResourceUsage *logExactMemResultBuses(
unsigned int stageNo)
const;
240 TindResultBusResourceUsage *logTindResultBuses(
unsigned int stageNo)
const;
242 MauStageResourceUsage *logStage(
int stageNo);
247 const std::string &outdir)
248 : clotInfo(clotInfo), filePath(filename) {
249 manifestPath = filename.substr(outdir.size() + 1);