|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cmpware.cmp.Link
com.cmpware.cmp.links.BroadcastBus
public class BroadcastBus
This class implements a broadcast bus. It has no handshaking and is used to send a single value to multiple inputs. It is completely up to the user to guarantee that synchronization is performed properly. Note that this implementation does a write on commit(). Also note that there may be many readers and writers, with many read and write addresses. Only the last address set is used. On recommendation is to have the read and write ports at consistent addresses across processors, if possible.
Copyright (c) 2005 Cmpware, Inc. All Rights Reserved.
| Field Summary | |
|---|---|
static java.lang.String |
copyright
Copyright string |
| Constructor Summary | |
|---|---|
BroadcastBus()
|
|
| 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. |
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 |
isReadable()
This method returns a true if the Memory Mapped IO is currently readable. |
boolean |
isWriteable()
This method returns a true if the Memory Mapped IO port is currently writeable. |
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. |
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. |
| Methods inherited from class com.cmpware.cmp.Link |
|---|
get, setBufferSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String copyright
| Constructor Detail |
|---|
public BroadcastBus()
| Method Detail |
|---|
public void reset()
MemoryMappedIOReader
public void write(int val)
throws MemoryMappedIOException
MemoryMappedIOWriter
val - The value to write to the Memory Mapped IO.
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.
public int read()
throws MemoryMappedIOException
MemoryMappedIOReader
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.public void writeCommit()
MemoryMappedIOWriter
public void readCommit()
MemoryMappedIOReader
public void setReadAddress(int addr)
MemoryMappedIOReader
addr - The Memory Mapped IO read address.public int getReadAddress()
MemoryMappedIOReader
public int getReadCount()
MemoryMappedIOReader
public int getReadStallCount()
MemoryMappedIOReader
public void setWriteAddress(int addr)
MemoryMappedIOWriter
addr - The Memory Mapped IO write address.public int getWriteAddress()
MemoryMappedIOWriter
public int getWriteCount()
MemoryMappedIOWriter
public int getWriteStallCount()
MemoryMappedIOWriter
public int getValue()
MemoryMappedIOReader
public boolean isReadable()
MemoryMappedIOReader
public boolean isWriteable()
MemoryMappedIOWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||