simple_memobj.cc (13784:1941dc118243) simple_memobj.cc (14252:1659a606447f)
1/*
2 * Copyright (c) 2017 Jason Lowe-Power
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;

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

28 * Authors: Jason Lowe-Power
29 */
30
31#include "learning_gem5/part2/simple_memobj.hh"
32
33#include "debug/SimpleMemobj.hh"
34
35SimpleMemobj::SimpleMemobj(SimpleMemobjParams *params) :
1/*
2 * Copyright (c) 2017 Jason Lowe-Power
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;

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

28 * Authors: Jason Lowe-Power
29 */
30
31#include "learning_gem5/part2/simple_memobj.hh"
32
33#include "debug/SimpleMemobj.hh"
34
35SimpleMemobj::SimpleMemobj(SimpleMemobjParams *params) :
36 MemObject(params),
36 SimObject(params),
37 instPort(params->name + ".inst_port", this),
38 dataPort(params->name + ".data_port", this),
39 memPort(params->name + ".mem_side", this),
40 blocked(false)
41{
42}
43
44Port &

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

50 if (if_name == "mem_side") {
51 return memPort;
52 } else if (if_name == "inst_port") {
53 return instPort;
54 } else if (if_name == "data_port") {
55 return dataPort;
56 } else {
57 // pass it along to our super class
37 instPort(params->name + ".inst_port", this),
38 dataPort(params->name + ".data_port", this),
39 memPort(params->name + ".mem_side", this),
40 blocked(false)
41{
42}
43
44Port &

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

50 if (if_name == "mem_side") {
51 return memPort;
52 } else if (if_name == "inst_port") {
53 return instPort;
54 } else if (if_name == "data_port") {
55 return dataPort;
56 } else {
57 // pass it along to our super class
58 return MemObject::getPort(if_name, idx);
58 return SimObject::getPort(if_name, idx);
59 }
60}
61
62void
63SimpleMemobj::CPUSidePort::sendPacket(PacketPtr pkt)
64{
65 // Note: This flow control is very simple since the memobj is blocking.
66

--- 173 unchanged lines hidden ---
59 }
60}
61
62void
63SimpleMemobj::CPUSidePort::sendPacket(PacketPtr pkt)
64{
65 // Note: This flow control is very simple since the memobj is blocking.
66

--- 173 unchanged lines hidden ---