virtual void recordCacheTrace(int cntrl, CacheRecorder* tr) = 0;
virtual Sequencer* getSequencer() const = 0;
- //! These functions are used by ruby system to read/write the message
- //! queues that exist with in the controller.
- //! The boolean return value indicates if the read was performed
- //! successfully.
- virtual bool functionalReadBuffers(PacketPtr&) = 0;
+ //! These functions are used by ruby system to read/write the data blocks
+ //! that exist with in the controller.
virtual void functionalRead(const Address &addr, PacketPtr) = 0;
//! The return value indicates the number of messages written with the
//! data from the packet.
void recordCacheTrace(int cntrl, CacheRecorder* tr);
Sequencer* getSequencer() const;
- bool functionalReadBuffers(PacketPtr&);
uint32_t functionalWriteBuffers(PacketPtr&);
void countTransition(${ident}_State state, ${ident}_Event event);
for func in self.functions:
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
code('''
uint32_t