X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FReadPath.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FReadPath.java;h=ce380c17cddfe374a7203cce5bd0927555c316b9;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/architecture/ReadPath.java b/dol/src/dol/datamodel/architecture/ReadPath.java new file mode 100644 index 0000000..ce380c1 --- /dev/null +++ b/dol/src/dol/datamodel/architecture/ReadPath.java @@ -0,0 +1,115 @@ +/* $Id: ReadPath.java 1 2010-02-24 13:03:05Z haidw $ */ +package dol.datamodel.architecture; + +import java.util.Vector; + +import dol.visitor.ArchiVisitor; + +/** + * This class defines a read path. A read path contains one processor, + * one rxbuf, one channel buf, and one or more hw channels. + */ +public class ReadPath extends ArchiResource { + /** + * Constructor to create an architecture connection with a name. + * + */ + public ReadPath(String name) { + super(name); + _hwChannelList = new Vector(); + } + + /** + * Accept a Visitor. + * + * @param x visitor object + */ + public void accept(ArchiVisitor x) { + x.visitComponent(this); + } + + /** + * Clone this architectural connection. + * + * @return a new instance of the architectural connection. + */ + /* + @SuppressWarnings("unchecked") + public Object clone() { + ReadPath newObj = (ReadPath) super.clone(); + newObj.setProcessor(_processor); + newObj.setRXBuf(_rxBuf); + newObj.setCHBuf(_chBuf); + newObj.setHWChannelNameList((Vector)_hwChannelNameList.clone()); + return (newObj); + } + */ + + /** + * Return a string representation of the architectural connection. + * + * @return string representation of the architectural connection + */ + public String toString() { + return "ReadPath: " + getName(); + } + + /** + * Return the memory where the receive buffer is located. + * + * @return name of memory + */ + public Memory getRXBuf() { return _rxBuf; } + + /** + * Set the receive buffer location. + * + * @param rxbuf rxbuf location + */ + public void setRXBuf(Memory rxbuf) { _rxBuf = rxbuf; } + + /** + * Return the memory where the channel buffer is located. + * + * @return channel buffer location + */ + public Memory getCHBuf() { return _chBuf; } + + /** + * Set the channel buffer location + * + * @param chbuf memory where channel buffer is located. + */ + public void setCHBuf(Memory chbuf) { _chBuf = chbuf; } + + /** + * Return the list of the HW channels. + * + * @return list of HW channels + */ + public Vector getHWChannelList() { return _hwChannelList; } + + /** + * Return the processor to which this path is associated. + * + * @return processor + */ + public Processor getProcessor() { + return _processor; + } + + /** + * Set the processor to which this path is associated + * + * @param processor processor + */ + public void setProcessor(Processor processor) { + _processor = processor; + } + + + protected Processor _processor; + protected Memory _rxBuf; + protected Memory _chBuf; + protected Vector _hwChannelList; +}