Package edu.byu.ece.rapidSmith.bitstreamTools.bitstream

Examples of edu.byu.ece.rapidSmith.bitstreamTools.bitstream.Packet


  public static void printFDRIWrite(XilinxConfigurationSpecification spec, Iterator<Packet> pi,
      boolean printAllFrames) {
    boolean debug = false;
    while (pi.hasNext()) {
      Packet p = pi.next();
      if (debug) System.out.println(p.toString(false));
     
      if (p.getPacketType() == PacketType.ONE &&
        p.getOpcode() == PacketOpcode.WRITE &&
        p.getRegType() == RegisterType.FAR) {
       
        // Get FAR address
        int farAddress = p.getData().get(0);

        // Skip all following commands until the FDRI command arrives
        while (pi.hasNext() && !(p.getOpcode() == PacketOpcode.WRITE && p.getRegType() == RegisterType.FDRI)) {
          p = pi.next();
          if (debug) System.out.println("skip:"+p.toString(false));
        }
        // get the write command after the FDRI
        if (pi.hasNext()) {
          p = pi.next();
          if (debug) System.out.println("final write:"+p.toString(false));
          if (p.getOpcode() == PacketOpcode.WRITE) {
            // Print out command
            int words = p.getData().size();
            int frames = (words/spec.getFrameSize());
            if (!printAllFrames) {
              System.out.println("Initial FAR:"+ FrameAddressRegister.toString(spec,farAddress));
              System.out.println("FDRI words="+words + " (" + frames + " frames)");
              //System.out.println("Ending FAR:"+ FrameAddressRegister.toString(spec,farAddress+frames-1));
View Full Code Here

TOP

Related Classes of edu.byu.ece.rapidSmith.bitstreamTools.bitstream.Packet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.