Gem5 is now linked against fail (not fully working)
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1466 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
27
src/core/sal/gem5/FailGem5Device.cc
Normal file
27
src/core/sal/gem5/FailGem5Device.cc
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include "FailGem5Device.hh"
|
||||||
|
#include "debug/Fail.hh"
|
||||||
|
|
||||||
|
#include "../SALInst.hpp"
|
||||||
|
|
||||||
|
FailGem5Device::FailGem5Device(Params *p)
|
||||||
|
: BasicPioDevice(p)
|
||||||
|
{
|
||||||
|
pioSize = 0x60;
|
||||||
|
DPRINTF(Fail, "Fail startup()\n");
|
||||||
|
fail::simulator.startup();
|
||||||
|
}
|
||||||
|
|
||||||
|
Tick FailGem5Device::read(PacketPtr pkt)
|
||||||
|
{
|
||||||
|
return pioDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tick FailGem5Device::write(PacketPtr pkt)
|
||||||
|
{
|
||||||
|
return pioDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
FailGem5Device* FailGem5DeviceParams::create()
|
||||||
|
{
|
||||||
|
return new FailGem5Device(this);
|
||||||
|
}
|
||||||
19
src/core/sal/gem5/FailGem5Device.hh
Normal file
19
src/core/sal/gem5/FailGem5Device.hh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef __FAILGEM5_DEVICE_HH__
|
||||||
|
#define __FAILGEM5_DEVICE_HH__
|
||||||
|
|
||||||
|
#include "dev/io_device.hh"
|
||||||
|
#include "params/FailGem5Device.hh"
|
||||||
|
|
||||||
|
class FailGem5Device : public BasicPioDevice
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef FailGem5DeviceParams Params;
|
||||||
|
|
||||||
|
FailGem5Device(Params *p);
|
||||||
|
|
||||||
|
virtual Tick read(PacketPtr pkt);
|
||||||
|
|
||||||
|
virtual Tick write(PacketPtr pkt);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __FAILGEM5_DEVICE_HH__
|
||||||
5
src/core/sal/gem5/FailGem5Device.py
Normal file
5
src/core/sal/gem5/FailGem5Device.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from Device import BasicPioDevice
|
||||||
|
|
||||||
|
class FailGem5Device(BasicPioDevice):
|
||||||
|
type = 'FailGem5Device'
|
||||||
|
|
||||||
@ -1,7 +1,22 @@
|
|||||||
|
#include "Gem5Controller.hpp"
|
||||||
|
|
||||||
namespace fail {
|
namespace fail {
|
||||||
|
|
||||||
int interrupt_to_fire = -1;
|
int interrupt_to_fire = -1;
|
||||||
|
|
||||||
} // end-of-namespace: fail
|
void Gem5Controller::save(const std::string &path)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gem5Controller::restore(const std::string &path)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gem5Controller::reboot()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // end-of-namespace: fail
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
#ifndef __GEM5_CONTROLLER_HPP__
|
#ifndef __GEM5_CONTROLLER_HPP__
|
||||||
#define __GEM5_CONTROLLER_HPP__
|
#define __GEM5_CONTROLLER_HPP__
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "../SimulatorController.hpp"
|
#include "../SimulatorController.hpp"
|
||||||
|
|
||||||
namespace fail {
|
namespace fail {
|
||||||
|
|||||||
@ -6,4 +6,11 @@ if env['TARGET_ISA'] == 'no':
|
|||||||
env.Append(CPPPATH=Dir('../../../../../src/core/'))
|
env.Append(CPPPATH=Dir('../../../../../src/core/'))
|
||||||
env.Append(CPPPATH=Dir('../../../../../build/src/core/'))
|
env.Append(CPPPATH=Dir('../../../../../build/src/core/'))
|
||||||
|
|
||||||
Source('faildev.cc')
|
env.Append(LIBPATH=Dir('../../../../../build/lib/'))
|
||||||
|
#env.Append(LIBS=['fail', 'sal', 'comm', 'cpn', 'efw', 'util', 'pthread'])
|
||||||
|
env.Append(LIBS=['fail'])
|
||||||
|
|
||||||
|
|
||||||
|
SimObject('FailGem5Device.py')
|
||||||
|
Source('FailGem5Device.cc')
|
||||||
|
DebugFlag('Fail')
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
#include "faildev.hh"
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#include "../SALInst.hpp"
|
|
||||||
Reference in New Issue
Block a user