com.cmpware.cmp.mmio
Interface MemoryMappedIOReader

All Known Implementing Classes:
BroadcastBus, CellBE_FIFO, CellBE_MailboxStatus, CellBE_SharedRegister, FIFO, Link, PipelineRegister, SharedRegister

public interface MemoryMappedIOReader

This interface defines the read access to the Memory Mapped IO.

Copyright (c) 2004, 2005 Cmpware, Inc. All Rights Reserved.

Author:
SAG

Field Summary
static java.lang.String copyright
          Copyright string
 
Method Summary
 int getReadAddress()
          This method returns the processor address to which the read port of this Memory Mapped IO is mapped.
 int getReadCount()
          This method returns the number of times the read port has been accessed.
 int getReadStallCount()
          This method returns the number of times the read port has stalled.
 int getValue()
          This method returns the most recently written value of the Memory Mapped IO.
 boolean isReadable()
          This method returns a true if the Memory Mapped IO is currently readable.
 int read()
          This method reads a value from the Memory Mapped IO port.
 void readCommit()
          All Memory Mapped IO reads are performed whenever data is available.
 void reset()
          This abstract class is used to reset the link.
 void setReadAddress(int addr)
          This method sets the read address of the Memeory Mapped IO.
 

Field Detail

copyright

static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values
Method Detail

reset

void reset()
This abstract class is used to reset the link. This may be necessary in links that have state.


read

int read()
         throws MemoryMappedIOException
This method reads a value from the Memory Mapped IO port.

Returns:
This method reads a value from the Memory mapped IO port.
Throws:
MemoryMappedIOException - - this method throws a MemoryMappedIOException if the read could not be completed on this cycle. This will typically cause a stall of the processor and a retry on the next cycle.

readCommit

void readCommit()
All Memory Mapped IO reads are performed whenever data is available. But because this is a multiprocessor simulation environment, it may not be proper to flag this communication resource as "free" until the end of the simulation cycle. This is necessary to preserve clock boundaries in multiprocessor simulation environments. This method should be called at the end of all activity in a simulation cycle and should tag the resource as free as necessary.


setReadAddress

void setReadAddress(int addr)
This method sets the read address of the Memeory Mapped IO. Note that is only provides the adddress value for convenience when displaying Memory Mapped IO status information. This does not effect how the Memory Mapped IO is decoded.

Parameters:
addr - The Memory Mapped IO read address.

getReadAddress

int getReadAddress()
This method returns the processor address to which the read port of this Memory Mapped IO is mapped.

Returns:
This method returns the processor address to which the read port of this Memory Mapped IO is mapped.

getReadCount

int getReadCount()
This method returns the number of times the read port has been accessed.

Returns:
This method returns the number of times the read port has been accessed.

getReadStallCount

int getReadStallCount()
This method returns the number of times the read port has stalled.

Returns:
This method returns the number of times the read port has stalled.

isReadable

boolean isReadable()
This method returns a true if the Memory Mapped IO is currently readable. A false is returned otherwise.

Returns:
This method returns a true if the Memory Mapped IO is currently readable. A false is returned otherwise.

getValue

int getValue()
This method returns the most recently written value of the Memory Mapped IO. Note that this value may or may not have already been read.

Returns:
This method returns the most recently written value of the Memory Mapped IO. Note that this value may or may not have already been read.