Skip to content

Commit ff4fcf1

Browse files
authored
CR-1248332: Display vss reset IP info under the --info option (#9298)
* display info about the kernels in ip_layout section but not in build_metadata section Signed-off-by: xvijaysri <vijaysri@xilinx.com> * added comments Signed-off-by: xvijaysri <vijaysri@xilinx.com> --------- Signed-off-by: xvijaysri <vijaysri@xilinx.com>
1 parent 5b7698a commit ff4fcf1

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/runtime_src/tools/xclbinutil/FormattedOutput.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ reportKernels(std::ostream& _ostream,
773773
}
774774

775775
boost::property_tree::ptree& ptXclBin = _ptMetaData.get_child("xclbin");
776+
std::vector<std::string> kernel_names;
776777
auto userRegions = XUtil::as_vector<boost::property_tree::ptree>(ptXclBin, "user_regions");
777778
for (auto& userRegion : userRegions) {
778779
auto kernels = XUtil::as_vector<boost::property_tree::ptree>(userRegion, "kernels");
@@ -784,6 +785,7 @@ reportKernels(std::ostream& _ostream,
784785

785786
auto sKernel = ptKernel.get<std::string>("name");
786787
_ostream << boost::format("%s %s\n") % "Kernel:" % sKernel;
788+
kernel_names.push_back(sKernel);
787789

788790
auto ports = XUtil::as_vector<boost::property_tree::ptree>(ptKernel, "ports");
789791
auto arguments = XUtil::as_vector<boost::property_tree::ptree>(ptKernel, "arguments");
@@ -909,6 +911,24 @@ reportKernels(std::ostream& _ostream,
909911
}
910912
}
911913
}
914+
// Print all remaining IPs and the base address
915+
for (auto& ptIPData : ipLayout) {
916+
// m_name is of the form '<kernel name>:<instance name>'
917+
auto sKernelInstance = ptIPData.get<std::string>("m_name");
918+
auto pos = sKernelInstance.find(':');
919+
if (pos != std::string::npos){
920+
auto sKernel = sKernelInstance.substr(0,pos);
921+
auto sInstance = sKernelInstance.substr(pos+1);
922+
// If the kernel name matches one of the kernels in build metadata, do nothing
923+
if(std::find(kernel_names.begin(), kernel_names.end(), sKernel) == kernel_names.end()) {
924+
_ostream << boost::format("%s %s\n") % "Kernel:" % sKernel;
925+
_ostream << "--------------------------\n";
926+
_ostream << boost::format("%-16s %s\n") % "Instance:" % sInstance;
927+
auto sBaseAddress = ptIPData.get<std::string>("m_base_address");
928+
_ostream << boost::format(" %-13s %s\n") % "Base Address:" % sBaseAddress;
929+
}
930+
}
931+
}
912932
}
913933

914934
void

0 commit comments

Comments
 (0)