@@ -38,23 +38,23 @@ namespace gem5
3838{
3939
4040// The BufferedPort class represents a single node in the network
41- // responsible for storing, sending, and receiving packets .
41+ // responsible for storing, sending, and receiving values .
4242// It tracks its data, address, and maintains statistics for
43- // sent and received packets .
43+ // sent and received values .
4444class BufferedPort : public ClockedObject
4545{
4646 private:
4747 // The address identifier of the port
4848 uint64_t addr;
4949
50- // Queue to hold packets (destination addresses) assigned to the port
51- std::queue<uint64_t > packetQueue ;
50+ // Queue to hold values (destination addresses) assigned to the port
51+ std::queue<uint64_t > valueQueue ;
5252
5353 // Variables to store the most recent received data and source addr
5454 uint64_t lastReceivedData = 0 ;
5555 uint64_t lastReceivedFrom = 0 ;
5656
57- uint64_t missedPackets = 0 ; // Count of missed packets
57+ uint64_t missedValues = 0 ; // Count of missed values
5858
5959 public:
6060 // Constructor: Initializes the BufferedPort with parameters
@@ -66,30 +66,30 @@ class BufferedPort : public ClockedObject
6666 // Retrieves the address of the port
6767 uint64_t getAddr ();
6868
69- // Assigns a packet to the queue with the given destination address
70- void assignPacket (uint64_t dest_addr);
69+ // Assigns a value to the queue with the given destination address
70+ void assignValue (uint64_t dest_addr);
7171
7272 // Receives data from another port
7373 // Stores the received value and source
7474 void receiveData (uint64_t received_data, uint64_t src_addr);
7575
76- // Retrieves and removes the next packet from the queue
77- uint64_t getNextPacket ();
76+ // Retrieves and removes the next value from the queue
77+ uint64_t getNextValue ();
7878
79- // Checks if the port has any packets in its queue
80- bool hasPackets () const ;
79+ // Checks if the port has any values in its queue
80+ bool hasValues () const ;
8181
8282 // Getters for the last received data and source information
8383 uint64_t getLastReceivedData () const { return lastReceivedData; }
8484 uint64_t getLastReceivedFrom () const { return lastReceivedFrom; }
8585
86- // Getter for missed packets count
87- uint64_t getMissedPackets () const { return missedPackets ; }
88- // Increments the missed packets count
89- void incrementMissedPackets ();
86+ // Getter for missed values count
87+ uint64_t getMissedValues () const { return missedValues ; }
88+ // Increments the missed values count
89+ void incrementMissedValues ();
9090
91- // Peeks at the next packet without removing it from the queue
92- uint64_t peekNextPacket () const ;
91+ // Peeks at the next value without removing it from the queue
92+ uint64_t peekNextValue () const ;
9393};
9494
9595} // namespace gem5
0 commit comments