You can just print each flit (cout << *t_flit) in InputUnit.cc wakeup function ..
Cheers, Tushar On Mar 20, 2023, at 9:50 PM, Karim Soliman via gem5-users <gem5-users@gem5.org> wrote: inside file mem/ruby/network/garnet/flit.cc I found this function that can print out the flit data during the simulation. But I don't know how to call it during the simulation. // Flit can be printed out for debugging purposes void flit::print(std::ostream& out) const { out << "[flit:: "; out << "PacketId=" << m_packet_id << " "; out << "Id=" << m_id << " "; out << "Type=" << m_type << " "; out << "Size=" << m_size << " "; out << "Vnet=" << m_vnet << " "; out << "VC=" << m_vc << " "; out << "Src NI=" << m_route.src_ni << " "; out << "Src Router=" << m_route.src_router << " "; out << "Dest NI=" << m_route.dest_ni << " "; out << "Dest Router=" << m_route.dest_router << " "; out << "Set Time=" << m_time << " "; out << "Width=" << m_width<< " "; out << "]"; } [https://upload.wikimedia.org/wikipedia/en/thumb/6/64/Pharos_University.jpg/220px-Pharos_University.jpg] Best Regards, Eng. Karim Soliman Teaching Assistant Computer Engineering Department Pharos University in Alexandria (P.U.A) On Tue, Mar 21, 2023 at 9:17 AM Karim Soliman <karim.soli...@pua.edu.eg<mailto:karim.soli...@pua.edu.eg>> wrote: Yes, I understand that. DPRINTF and std::cout work fine with me too. But i'm sorry, my question wasn't about using DPRINTF, I already used it before and it worked fine. My question is about the flit inside the Mesh_XY routing, i want to debug and print the flits or packets to trace it during the simulation. function int RoutingUnit::outportComputeXY(RouteInfo route, int inport, PortDirection inport_dirn) inside mem/ruby/network/garnet/RoutingUnit.cc, doesn't mention anything about the flits or packets. The route variable has the source and destination information and the network interface, i want to get the flit or the packet ID during the simulation - I tried to import #include "mem/ruby/network/garnet/flit.hh" But I still can't see the flit ID or Packet ID. I just want to trace each packet or flit during the simulation. [https://upload.wikimedia.org/wikipedia/en/thumb/6/64/Pharos_University.jpg/220px-Pharos_University.jpg] Best Regards, Eng. Karim Soliman Teaching Assistant Computer Engineering Department Pharos University in Alexandria (P.U.A) On Tue, Mar 21, 2023 at 2:56 AM atul.21csz0013--- via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: Did you run at .debug mode while using Dprintf? Also, I think std::cout will also work for printing. regards Atul _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org<mailto:gem5-users@gem5.org> To unsubscribe send an email to gem5-users-le...@gem5.org<mailto:gem5-users-le...@gem5.org> _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org