// Store the ExtLink pointers for later
m_ext_link_vector.push_back(ext_link);
- int machine_base_idx = MachineType_base_number(
- string_to_MachineType(abs_cntrl->getName()));
+ int machine_base_idx = MachineType_base_number(abs_cntrl->getType());
int ext_idx1 = machine_base_idx + abs_cntrl->getVersion();
int ext_idx2 = ext_idx1 + m_nodes;
int int_idx = router->params()->router_id + 2*m_nodes;
void init();
const Params *params() const { return (const Params *)_params; }
- const NodeID getVersion() const { return m_version; }
+ const NodeID getVersion() const { return m_machineID.getNum(); }
+ const MachineType getType() const { return m_machineID.getType(); }
+
void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; }
// return instance name
- const std::string getName() const { return m_name; }
void blockOnQueue(Address, MessageBuffer*);
void unblock(Address);
void wakeUpAllBuffers();
protected:
- std::string m_name;
NodeID m_version;
MachineID m_machineID;
NodeID m_clusterID;
$c_ident::$c_ident(const Params *p)
: AbstractController(p)
{
- m_name = "${ident}";
+ m_machineID.type = MachineType_${ident};
+ m_machineID.num = m_version;
''')
num_in_ports = len(self.in_ports)
code(' m_in_ports = $num_in_ports;')
MachineType machine_type = string_to_MachineType("${{var.machine.ident}}");
int base M5_VAR_USED = MachineType_base_number(machine_type);
- m_machineID.type = MachineType_${ident};
- m_machineID.num = m_version;
-
// initialize objects
''')