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/i8254xGBe.hh | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'src/dev/i8254xGBe.hh') diff --git a/src/dev/i8254xGBe.hh b/src/dev/i8254xGBe.hh index b6da53b09..caffb8c4d 100644 --- a/src/dev/i8254xGBe.hh +++ b/src/dev/i8254xGBe.hh @@ -45,6 +45,7 @@ #include "dev/i8254xGBe_defs.hh" #include "dev/pcidev.hh" #include "dev/pktfifo.hh" +#include "params/IGbE.hh" #include "sim/eventq.hh" class IGbEInt; @@ -585,19 +586,14 @@ class IGbE : public PciDev TxDescCache txDescCache; public: - struct Params : public PciDev::Params + typedef IGbEParams Params; + const Params * + params() const { - Net::EthAddr hardware_address; - bool use_flow_control; - int rx_fifo_size; - int tx_fifo_size; - int rx_desc_cache_size; - int tx_desc_cache_size; - Tick clock; - }; - + return dynamic_cast(_params); + } IGbE(Params *params); - ~IGbE() {;} + ~IGbE() {} Tick clock; inline Tick cycles(int numCycles) const { return numCycles * clock; } @@ -612,9 +608,6 @@ class IGbE : public PciDev void setEthInt(IGbEInt *i) { assert(!etherInt); etherInt = i; } - - const Params *params() const {return (const Params *)_params; } - virtual void serialize(std::ostream &os); virtual void unserialize(Checkpoint *cp, const std::string §ion); virtual unsigned int drain(Event *de); -- cgit v1.2.3