com.cmpware.cmp.mmio
Interface MemoryMappedIOWriter

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

public interface MemoryMappedIOWriter

This interface defines the write 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 getValue()
          This method returns the most recently written value of the Memory Mapped IO port.
 int getWriteAddress()
          This method returns the processor address to which the write port of this Memory Mapped IO is mapped.
 int getWriteCount()
          This method returns the number of times the write port has been accessed.
 int getWriteStallCount()
          This method returns the number of times the write port has stalled.
 boolean isWriteable()
          This method returns a true if the Memory Mapped IO port is currently writeable.
 void reset()
          This abstract class is used to reset the link.
 void setWriteAddress(int addr)
          This method sets the write address of the Memory Mapped IO.
 void write(int val)
          This method writes a word to the Memory Mapped IO.
 void writeCommit()
          All Memory Mapped IO writes are performed whenever data is available.
 

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.


write

void write(int val)
           throws MemoryMappedIOException
This method writes a word to the Memory Mapped IO.

Parameters:
val - The value to write to the Memory Mapped IO.
Throws:
MemoryMappedIOException - - this method throws a MemoryMappedIOException if the write could not be completed on this cycle. This will typically cause a stall of the processor and a retry on the next cycle.

writeCommit

void writeCommit()
All Memory Mapped IO writes 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.


setWriteAddress

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

Parameters:
addr - The Memory Mapped IO write address.

getWriteAddress

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

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

getWriteCount

int getWriteCount()
This method returns the number of times the write port has been accessed.

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

getWriteStallCount

int getWriteStallCount()
This method returns the number of times the write port has stalled.

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

isWriteable

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

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

getValue

int getValue()
This method returns the most recently written value of the Memory Mapped IO port. 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 port. Note that this value may or may not have already been read.