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/] [RAMRBEntry.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
import java.lang.String;
7
 
8
/**
9
 * A class recording readback information for a single RAM bit.  The
10
 * class records the type of the RAM and the RAM bit's address in
11
 * addition to the offset, frame, frame offset, and block location
12
 * information recorded by the {@link RBEntry} object.
13
 *
14
 * @author Paul Graham
15
 */
16
public class RAMRBEntry extends RBEntry{
17
 
18
  /** Holds the RAMType for this object (see {@link RAMTypes}). */
19
  RAMTypes RAMType;
20
  /** Holds the address of the RAM bit. */
21
  int address;
22
 
23
  /**
24
   * Constructs a new object based on readback bitstream information
25
   * from the <code>.ll</code> file.
26
   *
27
   * @param new_offset The "junk" bit offset provided by the Virtex2
28
   *                   <code>.ll</code> file.
29
   *
30
   * @param new_frame The frame number of the RAM bit's state
31
   *                  information in the readback bitstream.
32
   *
33
   * @param new_frameOffset The frame offset of the RAM bit's state
34
   *                        information in the readback bitstream.
35
   *
36
   * @param new_block The name of the block holding the RAM.
37
   *
38
   * @param new_RAMType A <code>String</code> representing the type of
39
   *                    the RAM.  This can have one of the following
40
   *                    values: "F", "G", "M", or "B".
41
   *
42
   * @param new_address The bit's address in the RAM.
43
   * */
44
  RAMRBEntry(int new_offset, int new_frame, int new_frameOffset,
45
          String new_block,String new_RAMType,int new_address) throws RAMTypeException {
46
    super(new_offset,new_frame,new_frameOffset,new_block);
47
    if (new_block.startsWith("SLICE"))
48
    {
49
    if(new_RAMType.equals("A"))
50
      RAMType = RAMTypes.A;
51
    else if(new_RAMType.equals("B"))
52
      RAMType = RAMTypes.B;
53
    else if(new_RAMType.equals("C"))
54
      RAMType = RAMTypes.C;
55
    else if(new_RAMType.equals("D"))
56
      RAMType = RAMTypes.D;
57
    else
58
      throw new RAMTypeException("Unknown RAM Type");
59
    }
60
    else
61
    {
62
        if (!new_RAMType.equals("B")) {
63
                throw new RAMTypeException("Unknown RAM Type");
64
        }
65
        RAMType = RAMTypes.BRAM;
66
    }
67
    address = new_address;
68
  }
69
 
70
  /**
71
   * Returns the RAM's type based on the encoding in {@link RAMTypes}.
72
   *
73
   * @return The RAM's type based on the encoding in {@link RAMTypes}.  */
74
  RAMTypes getRAMType() {
75
    return RAMType;
76
  }
77
 
78
  /**
79
   * Returns the RAM bit's address within the RAM.
80
   *
81
   * @return The RAM bit's address within the RAM.  */
82
  int getAddress() {
83
    return address;
84
  }
85
 
86
}
87
 

powered by: WebSVN 2.1.0

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