OpenCores
URL https://opencores.org/ocsvn/fpga-cf/fpga-cf/trunk

Subversion Repositories fpga-cf

[/] [fpga-cf/] [trunk/] [java/] [src/] [edu/] [byu/] [cc/] [plieber/] [fpgaenet/] [debug/] [llparse/] [RBLocation.java] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 peteralieb
/*
2
@LICENSE@
3
*/
4
 
5
package edu.byu.cc.plieber.fpgaenet.debug.llparse;
6
 
7
/**
8
 * This class is used to keep track of the location of a symbol
9
 * (flip-flop or RAM) in the readback bitstream. This is mainly used
10
 * by {@link Virtex2ToJHDLSyms} and {@link RBSym} objects.
11
 *
12
 * @author Paul Graham  */
13
public class RBLocation {
14
 
15
  /** Holds the readback bitstream absolute offset. */
16
  public int offset;
17
  /** Holds the readback bitstream frame number. */
18
  public int frame;
19
  /** Holds the readback bitstream frame offset. */
20
  public int frameOffset;
21
 
22
  /**
23
   * Constructs an object, setting the <code>frame</code> and
24
   * <code>frameOffset</code> to the illegal values of -1 */
25
  public RBLocation() {
26
    offset = -1;
27
    frame = -1;
28
    frameOffset = -1;
29
  }
30
 
31
  /**
32
   * Constructs an object, copying the values of an existing
33
   * <code>RBLocation</code> object to the new object.
34
   *
35
   * @param rbloc The RBLocation object to copy. */
36
  public RBLocation(RBLocation rbloc) {
37
    offset = rbloc.offset;
38
    frame = rbloc.frame;
39
    frameOffset = rbloc.frameOffset;
40
  }
41
 
42
  /**
43
   * Constructs an object by directly setting the frame and frame
44
   * offset based on its parameters.
45
   *
46
   * @deprecated See {@link RBLocation#RBLocation(int,int,int)}
47
   *
48
   * @param newFrame An integer representing the frame number for a
49
   *                 bit in the readback bitstream.
50
   *
51
   * @param newFrameOffset An integer representing the frame offset
52
   *                       for a bit in the readback bitstream. */
53
  public RBLocation(int newFrame, int newFrameOffset) {
54
    offset = -1;
55
    frame = newFrame;
56
    frameOffset = newFrameOffset;
57
  }
58
 
59
  /**
60
   * Constructs an object by directly setting the frame and frame
61
   * offset based on its parameters.
62
   * @param newFrame An integer representing the absolute offset for a
63
   *                 bit in the readback bitstream.
64
   *
65
   * @param newFrame An integer representing the frame number for a
66
   *                 bit in the readback bitstream.
67
   *
68
   * @param newFrameOffset An integer representing the frame offset
69
   *                       for a bit in the readback bitstream. */
70
  public RBLocation(int newOffset, int newFrame, int newFrameOffset) {
71
    offset = newOffset;
72
    frame = newFrame;
73
    frameOffset = newFrameOffset;
74
  }
75
 
76
  /**
77
   * Sets the frame and frame offset based on its parameters.
78
   *
79
   * @deprecated See {@link RBLocation#setLocation(int,int,int)}
80
   *
81
   * @param newFrame An integer representing the frame number for a
82
   *                 bit in the readback bitstream.
83
   *
84
   * @param newFrameOffset An integer representing the frame offset
85
   *                       for a bit in the readback bitstream. */
86
  public void setLocation(int newFrame, int newFrameOffset) {
87
    offset = -1;
88
    frame = newFrame;
89
    frameOffset = newFrameOffset;
90
  }
91
 
92
  /**
93
   * Sets the frame and frame offset based on its parameters.
94
   *
95
   * @param newOffset An integer representing the absolute offset for
96
   *                  a bit in the readback bitstream.
97
   *
98
   * @param newFrame An integer representing the frame number for a
99
   *                 bit in the readback bitstream.
100
   *
101
   * @param newFrameOffset An integer representing the frame offset
102
   *                       for a bit in the readback bitstream. */
103
  public void setLocation(int newOffset, int newFrame, int newFrameOffset) {
104
    offset = newOffset;
105
    frame = newFrame;
106
    frameOffset = newFrameOffset;
107
  }
108
 
109
  /**
110
   * Returns a <code>String</code> describing the frame and frame
111
   * offset for a bit in the readback bitstream.
112
   *
113
   * @return A <code>String</code> describing the frame and frame
114
   * offset for a bit in the readback bitstream. */
115
  public String toString() {
116
    return "Offset: "+offset+" Frame: "+frame+" FrameOffset: "+frameOffset;
117
  }
118
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.