From 96c999fe88a5f600a1a5ddf8c15eadba3051508b Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 18 Sep 2015 13:27:47 -0500 Subject: ruby: print addresses in hex Changeset 4872dbdea907 replaced Address by Addr, but did not make changes to print statements. So the addresses which were being printed in hex earlier along with their line address, were now being printed in decimals. This patch adds a function printAddress(Addr) that can be used to print the address in hex along with the lines address. This function has been put to use in some of the places. At other places, change has been made to print just the address in hex. --- src/mem/protocol/MESI_Two_Level-L1cache.sm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mem/protocol/MESI_Two_Level-L1cache.sm') diff --git a/src/mem/protocol/MESI_Two_Level-L1cache.sm b/src/mem/protocol/MESI_Two_Level-L1cache.sm index c40a47cae..b8a4c6220 100644 --- a/src/mem/protocol/MESI_Two_Level-L1cache.sm +++ b/src/mem/protocol/MESI_Two_Level-L1cache.sm @@ -528,7 +528,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Requestor := machineID; out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); out_msg.MessageSize := MessageSizeType:Control; out_msg.Prefetch := in_msg.Prefetch; @@ -545,7 +545,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Requestor := machineID; out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); out_msg.MessageSize := MessageSizeType:Control; out_msg.Prefetch := in_msg.Prefetch; @@ -562,7 +562,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Requestor := machineID; out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); out_msg.MessageSize := MessageSizeType:Control; out_msg.Prefetch := in_msg.Prefetch; @@ -585,7 +585,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Prefetch := in_msg.Prefetch; out_msg.AccessMode := in_msg.AccessMode; - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); } } @@ -600,7 +600,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") DPRINTF(RubySlicc, "%s\n", machineID); out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); out_msg.MessageSize := MessageSizeType:Control; out_msg.Prefetch := in_msg.Prefetch; @@ -620,7 +620,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); out_msg.MessageSize := MessageSizeType:Control; out_msg.Prefetch := in_msg.Prefetch; @@ -637,7 +637,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Requestor := machineID; out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); - DPRINTF(RubySlicc, "address: %s, destination: %s\n", + DPRINTF(RubySlicc, "address: %#x, destination: %s\n", address, out_msg.Destination); out_msg.MessageSize := MessageSizeType:Control; out_msg.Prefetch := in_msg.Prefetch; @@ -759,7 +759,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") action(forward_eviction_to_cpu, "\cc", desc="sends eviction information to the processor") { if (send_evictions) { - DPRINTF(RubySlicc, "Sending invalidation for %s to the CPU\n", address); + DPRINTF(RubySlicc, "Sending invalidation for %#x to the CPU\n", address); sequencer.evictionCallback(address); } } @@ -790,7 +790,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); out_msg.MessageSize := MessageSizeType:Response_Control; - DPRINTF(RubySlicc, "%s\n", address); + DPRINTF(RubySlicc, "%#x\n", address); } } @@ -802,7 +802,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP") out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, l2_select_low_bit, l2_select_num_bits, intToID(0))); out_msg.MessageSize := MessageSizeType:Response_Control; - DPRINTF(RubySlicc, "%s\n", address); + DPRINTF(RubySlicc, "%#x\n", address); } } -- cgit v1.2.3