From abc76f20cb98c90e8dab416dd16dfd4a954013ba Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 23 Jul 2007 21:51:38 -0700 Subject: Major changes to how SimObjects are created and initialized. Almost all creation and initialization now happens in python. Parameter objects are generated and initialized by python. The .ini file is now solely for debugging purposes and is not used in construction of the objects in any way. --HG-- extra : convert_revision : 7e722873e417cb3d696f2e34c35ff488b7bff4ed --- src/dev/isa_fake.hh | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src/dev/isa_fake.hh') diff --git a/src/dev/isa_fake.hh b/src/dev/isa_fake.hh index dc2ad48e8..5f54b1af3 100644 --- a/src/dev/isa_fake.hh +++ b/src/dev/isa_fake.hh @@ -35,13 +35,14 @@ #ifndef __ISA_FAKE_HH__ #define __ISA_FAKE_HH__ +#include + #include "base/range.hh" #include "dev/io_device.hh" #include "dev/alpha/tsunami.hh" +#include "params/IsaFake.hh" #include "mem/packet.hh" -#include - /** * IsaFake is a device that returns, BadAddr, 1 or 0 on all reads and * rites. It is meant to be placed at an address range @@ -51,27 +52,19 @@ */ class IsaFake : public BasicPioDevice { - public: - struct Params : public BasicPioDevice::Params - { - Addr pio_size; - bool retBadAddr; - bool updateData; - uint8_t retData8; - uint16_t retData16; - uint32_t retData32; - uint64_t retData64; - std::string warnAccess; - }; protected: - const Params *params() const { return (const Params*)_params; } uint8_t retData8; uint16_t retData16; uint32_t retData32; uint64_t retData64; - public: + typedef IsaFakeParams Params; + const Params * + params() const + { + return dynamic_cast(_params); + } /** * The constructor for Tsunmami Fake just registers itself with the MMU. * @param p params structure -- cgit v1.2.3