1 /* $Id: ReadPath.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 read path. A read path contains one processor,
10 * one rxbuf, one channel buf, and one or more hw channels.
12 public class ReadPath extends ArchiResource {
14 * Constructor to create an architecture connection with a name.
17 public ReadPath(String name) {
19 _hwChannelList = new Vector<HWChannel>();
25 * @param x visitor object
27 public void accept(ArchiVisitor x) {
28 x.visitComponent(this);
32 * Clone this architectural connection.
34 * @return a new instance of the architectural connection.
37 @SuppressWarnings("unchecked")
38 public Object clone() {
39 ReadPath newObj = (ReadPath) super.clone();
40 newObj.setProcessor(_processor);
41 newObj.setRXBuf(_rxBuf);
42 newObj.setCHBuf(_chBuf);
43 newObj.setHWChannelNameList((Vector)_hwChannelNameList.clone());
49 * Return a string representation of the architectural connection.
51 * @return string representation of the architectural connection
53 public String toString() {
54 return "ReadPath: " + getName();
58 * Return the memory where the receive buffer is located.
60 * @return name of memory
62 public Memory getRXBuf() { return _rxBuf; }
65 * Set the receive buffer location.
67 * @param rxbuf rxbuf location
69 public void setRXBuf(Memory rxbuf) { _rxBuf = rxbuf; }
72 * Return the memory where the channel buffer is located.
74 * @return channel buffer location
76 public Memory getCHBuf() { return _chBuf; }
79 * Set the channel buffer location
81 * @param chbuf memory where channel buffer is located.
83 public void setCHBuf(Memory chbuf) { _chBuf = chbuf; }
86 * Return the list of the HW channels.
88 * @return list of HW channels
90 public Vector<HWChannel> getHWChannelList() { return _hwChannelList; }
93 * Return the processor to which this path is associated.
97 public Processor getProcessor() {
102 * Set the processor to which this path is associated
104 * @param processor processor
106 public void setProcessor(Processor processor) {
107 _processor = processor;
111 protected Processor _processor;
112 protected Memory _rxBuf;
113 protected Memory _chBuf;
114 protected Vector<HWChannel> _hwChannelList;