Deleted Added
sdiff udiff text old ( 11793:ef606668d247 ) new ( 12065:e3e51756dfef )
full compact
1/*
2 * Copyright (c) 2011-2014 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;
9 * redistributions in binary form must reproduce the above copyright

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

38
39AbstractController::AbstractController(const Params *p)
40 : MemObject(p), Consumer(this), m_version(p->version),
41 m_clusterID(p->cluster_id),
42 m_masterId(p->system->getMasterId(name())), m_is_blocking(false),
43 m_number_of_TBEs(p->number_of_TBEs),
44 m_transitions_per_cycle(p->transitions_per_cycle),
45 m_buffer_size(p->buffer_size), m_recycle_latency(p->recycle_latency),
46 memoryPort(csprintf("%s.memory", name()), this, "")
47{
48 if (m_version == 0) {
49 // Combine the statistics from all controllers
50 // of this particular type.
51 Stats::registerDumpCallback(new StatsCallback(this));
52 }
53}
54

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

342 panic("Incorrect packet type received from memory controller!");
343 }
344
345 getMemoryQueue()->enqueue(msg, clockEdge(), cyclesToTicks(Cycles(1)));
346 delete pkt->req;
347 delete pkt;
348}
349
350bool
351AbstractController::MemoryPort::recvTimingResp(PacketPtr pkt)
352{
353 controller->recvTimingResp(pkt);
354 return true;
355}
356
357AbstractController::MemoryPort::MemoryPort(const std::string &_name,
358 AbstractController *_controller,
359 const std::string &_label)
360 : QueuedMasterPort(_name, _controller, reqQueue, snoopRespQueue),
361 reqQueue(*_controller, *this, _label),
362 snoopRespQueue(*_controller, *this, _label),
363 controller(_controller)
364{
365}