ruby: remove the function functionalReadBuffers()

This function was added when I had incorrectly arrived at the conclusion
that such a function can improve the chances of a functional read succeeding.
As was later realized, this is not possible in the current setup.  While the
code using this function was dropped long back, this function was not.  Hence
the patch.
This commit is contained in:
Nilay Vaish 2014-11-06 05:42:20 -06:00
parent d25b722e4a
commit 68ddfab8a4
2 changed files with 2 additions and 29 deletions

View file

@ -76,11 +76,8 @@ class AbstractController : public ClockedObject, public Consumer
virtual void recordCacheTrace(int cntrl, CacheRecorder* tr) = 0; virtual void recordCacheTrace(int cntrl, CacheRecorder* tr) = 0;
virtual Sequencer* getSequencer() const = 0; virtual Sequencer* getSequencer() const = 0;
//! These functions are used by ruby system to read/write the message //! These functions are used by ruby system to read/write the data blocks
//! queues that exist with in the controller. //! that exist with in the controller.
//! The boolean return value indicates if the read was performed
//! successfully.
virtual bool functionalReadBuffers(PacketPtr&) = 0;
virtual void functionalRead(const Address &addr, PacketPtr) = 0; virtual void functionalRead(const Address &addr, PacketPtr) = 0;
//! The return value indicates the number of messages written with the //! The return value indicates the number of messages written with the
//! data from the packet. //! data from the packet.

View file

@ -285,7 +285,6 @@ class $c_ident : public AbstractController
void recordCacheTrace(int cntrl, CacheRecorder* tr); void recordCacheTrace(int cntrl, CacheRecorder* tr);
Sequencer* getSequencer() const; Sequencer* getSequencer() const;
bool functionalReadBuffers(PacketPtr&);
uint32_t functionalWriteBuffers(PacketPtr&); uint32_t functionalWriteBuffers(PacketPtr&);
void countTransition(${ident}_State state, ${ident}_Event event); void countTransition(${ident}_State state, ${ident}_Event event);
@ -988,29 +987,6 @@ $c_ident::${{action.ident}}(const Address& addr)
for func in self.functions: for func in self.functions:
code(func.generateCode()) code(func.generateCode())
# Function for functional reads from messages buffered in the controller
code('''
bool
$c_ident::functionalReadBuffers(PacketPtr& pkt)
{
''')
for var in self.objects:
vtype = var.type
if vtype.isBuffer:
vid = "m_%s_ptr" % var.ident
code('if ($vid->functionalRead(pkt)) { return true; }')
for var in self.config_parameters:
vtype = var.type_ast.type
if vtype.isBuffer:
vid = "m_%s_ptr" % var.ident
code('if ($vid->functionalRead(pkt)) { return true; }')
code('''
return false;
}
''')
# Function for functional writes to messages buffered in the controller # Function for functional writes to messages buffered in the controller
code(''' code('''
uint32_t uint32_t