Skip to content
Snippets Groups Projects
Commit c30011fc authored by Tobias Friemel's avatar Tobias Friemel
Browse files

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
parent ac199248
No related branches found
No related tags found
No related merge requests found
#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);
}
#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__
from Device import BasicPioDevice
class FailGem5Device(BasicPioDevice):
type = 'FailGem5Device'
#include "Gem5Controller.hpp"
namespace fail {
int interrupt_to_fire = -1;
} // end-of-namespace: fail
\ No newline at end of file
void Gem5Controller::save(const std::string &path)
{
}
void Gem5Controller::restore(const std::string &path)
{
}
void Gem5Controller::reboot()
{
}
} // end-of-namespace: fail
#ifndef __GEM5_CONTROLLER_HPP__
#define __GEM5_CONTROLLER_HPP__
#include <string>
#include "../SimulatorController.hpp"
namespace fail {
......
......@@ -6,4 +6,11 @@ if env['TARGET_ISA'] == 'no':
env.Append(CPPPATH=Dir('../../../../../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')
#include "faildev.hh"
\ No newline at end of file
#include "../SALInst.hpp"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment