Hi Riddhi, The size field in the packet class is in bytes. To print the data of a packet you could use the following:
DDUMP(Flag, pkt->getConstPtr<uint8_t>(), pkt->getSize()); Where Flag is the debugging flag that will enable the print and pkt is the packet you want to print. You will also need to include the header “base/trace.hh”. Nikos From: gem5-users <gem5-users-boun...@gem5.org> on behalf of Google <thakker.wri...@gmail.com> Reply-To: gem5 users mailing list <gem5-users@gem5.org> Date: Tuesday, 10 July 2018 at 07:51 To: "gem5-users@gem5.org" <gem5-users@gem5.org> Subject: [gem5-users] size variable in Packet class Hi all, I am asking a very basic question but I am confused as to what the size variable in Packet class represents. When I ran dram/sweep.py config file, I saw that the size turns out to 1,4,8, and 64 for different cases. In the packet.hh, the comment says that size represents the size of request or transfer, so is it in bits or bytes ? There is a data pointer (*data, packet.hh line 333). I want to print out the data that this pointer points to for that I need to know the size of the request made and accordingly the data will be printed. So I am not able make out whether size is in terms of bits or bytes. Thanks in advance. Regards, Riddhi Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users