1 /* $Id: WritePath.java 1 2010-02-24 13:03:05Z haidw $ */
2 package dol.datamodel.architecture;
4 import java.util.Vector;
6 import dol.visitor.ArchiVisitor;
9 * This class defines a write path. A write path contains one processor,
10 * one txbuf, one channel buf, and one or more hw channels.
12 public class WritePath extends ArchiResource {
14 * Constructor to create an architecture connection with a name.
16 public WritePath(String name) {
18 _hwChannelList = new Vector<HWChannel>();
24 * @param x visitor object
26 public void accept(ArchiVisitor x) {
27 x.visitComponent(this);
31 * Clone this architectural connection.
33 * @return a new instance of the architectural connection.
36 @SuppressWarnings("unchecked")
37 public Object clone() {
38 WritePath newObj = (WritePath) super.clone();
39 newObj.setProcessor(_processor);
40 newObj.setTXBuf(_txBuf);
41 newObj.setCHBuf(_chBuf);
42 newObj.setHWChannelNameList((Vector)_hwChannelNameList.clone());
48 * Return a string representation of the architectural connection.
50 * @return string representation of the architectural connection
52 public String toString() {
53 return "WritePath: " + getName();
57 * Return the memory where the transmit buffer is located.
59 * @return name of memory
61 public Memory getTXBuf() { return _txBuf; }
64 * Set the transmit buffer location.
66 * @param txbuf txbuf location
68 public void setTXBuf(Memory txbuf) { _txBuf = txbuf; }
71 * Return the memory where the channel buffer is located.
73 * @return channel buffer location
75 public Memory getCHBuf() { return _chBuf; }
78 * Set the channel buffer location
80 * @param chbuf memory where channel buffer is located.
82 public void setCHBuf(Memory chbuf) { _chBuf = chbuf; }
85 * Return the list of the HW channels.
87 * @return list of HW channels
89 public Vector<HWChannel> getHWChannelList() { return _hwChannelList; }
92 * Return the processor to which this path is associated.
96 public Processor getProcessor() {
101 * Set the processor to which this path is associated.
103 * @param processor processor
105 public void setProcessor(Processor processor) {
106 _processor = processor;
109 protected Processor _processor;
110 protected Memory _txBuf;
111 protected Memory _chBuf;
112 protected Vector<HWChannel> _hwChannelList;