AbstractController.hh (9996:150338b8ba12) AbstractController.hh (10005:8c2b0dc16ccd)
1/*
2 * Copyright (c) 2009 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 42 unchanged lines hidden (view full) ---

51class AbstractController : public ClockedObject, public Consumer
52{
53 public:
54 typedef RubyControllerParams Params;
55 AbstractController(const Params *p);
56 void init();
57 const Params *params() const { return (const Params *)_params; }
58
1/*
2 * Copyright (c) 2009 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 42 unchanged lines hidden (view full) ---

51class AbstractController : public ClockedObject, public Consumer
52{
53 public:
54 typedef RubyControllerParams Params;
55 AbstractController(const Params *p);
56 void init();
57 const Params *params() const { return (const Params *)_params; }
58
59 const int & getVersion() const { return m_version; }
59 const NodeID getVersion() const { return m_version; }
60 void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; }
61
62 // return instance name
63 const std::string getName() const { return m_name; }
64 void blockOnQueue(Address, MessageBuffer*);
65 void unblock(Address);
66
67 virtual MessageBuffer* getMandatoryQueue() const = 0;

--- 60 unchanged lines hidden (view full) ---

128 { fatal("getQueuesFromPeer() should be called only if implemented!"); }
129
130 void stallBuffer(MessageBuffer* buf, Address addr);
131 void wakeUpBuffers(Address addr);
132 void wakeUpAllBuffers(Address addr);
133 void wakeUpAllBuffers();
134
135 protected:
60 void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; }
61
62 // return instance name
63 const std::string getName() const { return m_name; }
64 void blockOnQueue(Address, MessageBuffer*);
65 void unblock(Address);
66
67 virtual MessageBuffer* getMandatoryQueue() const = 0;

--- 60 unchanged lines hidden (view full) ---

128 { fatal("getQueuesFromPeer() should be called only if implemented!"); }
129
130 void stallBuffer(MessageBuffer* buf, Address addr);
131 void wakeUpBuffers(Address addr);
132 void wakeUpAllBuffers(Address addr);
133 void wakeUpAllBuffers();
134
135 protected:
136 int m_transitions_per_cycle;
137 int m_buffer_size;
138 Cycles m_recycle_latency;
139 std::string m_name;
140 NodeID m_version;
136 std::string m_name;
137 NodeID m_version;
141 Network* m_net_ptr;
142 MachineID m_machineID;
138 MachineID m_machineID;
139 NodeID m_clusterID;
140
141 Network* m_net_ptr;
143 bool m_is_blocking;
144 std::map<Address, MessageBuffer*> m_block_map;
145 typedef std::vector<MessageBuffer*> MsgVecType;
146 typedef std::map< Address, MsgVecType* > WaitingBufType;
147 WaitingBufType m_waiting_buffers;
148 unsigned int m_in_ports;
149 unsigned int m_cur_in_port;
150 int m_number_of_TBEs;
142 bool m_is_blocking;
143 std::map<Address, MessageBuffer*> m_block_map;
144 typedef std::vector<MessageBuffer*> MsgVecType;
145 typedef std::map< Address, MsgVecType* > WaitingBufType;
146 WaitingBufType m_waiting_buffers;
147 unsigned int m_in_ports;
148 unsigned int m_cur_in_port;
149 int m_number_of_TBEs;
150 int m_transitions_per_cycle;
151 int m_buffer_size;
152 Cycles m_recycle_latency;
151
152 //! Map from physical network number to the Message Buffer.
153 std::map<uint32_t, MessageBuffer*> peerQueueMap;
154
155 //! Counter for the number of cycles when the transitions carried out
156 //! were equal to the maximum allowed
157 uint64_t m_fully_busy_cycles;
158

--- 30 unchanged lines hidden ---
153
154 //! Map from physical network number to the Message Buffer.
155 std::map<uint32_t, MessageBuffer*> peerQueueMap;
156
157 //! Counter for the number of cycles when the transitions carried out
158 //! were equal to the maximum allowed
159 uint64_t m_fully_busy_cycles;
160

--- 30 unchanged lines hidden ---