X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FWritePath.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FWritePath.java;h=80244a7bb58092cf65b8b28478a4daaf5fb1beb9;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/architecture/WritePath.java b/dol/src/dol/datamodel/architecture/WritePath.java new file mode 100644 index 0000000..80244a7 --- /dev/null +++ b/dol/src/dol/datamodel/architecture/WritePath.java @@ -0,0 +1,113 @@ +/* $Id: WritePath.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 write path. A write path contains one processor, + * one txbuf, one channel buf, and one or more hw channels. + */ +public class WritePath extends ArchiResource { + /** + * Constructor to create an architecture connection with a name. + */ + public WritePath(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() { + WritePath newObj = (WritePath) super.clone(); + newObj.setProcessor(_processor); + newObj.setTXBuf(_txBuf); + 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 "WritePath: " + getName(); + } + + /** + * Return the memory where the transmit buffer is located. + * + * @return name of memory + */ + public Memory getTXBuf() { return _txBuf; } + + /** + * Set the transmit buffer location. + * + * @param txbuf txbuf location + */ + public void setTXBuf(Memory txbuf) { _txBuf = txbuf; } + + /** + * 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 _txBuf; + protected Memory _chBuf; + protected Vector _hwChannelList; +}