Package edu.byu.ece.rapidSmith.bitstreamTools.configuration

Examples of edu.byu.ece.rapidSmith.bitstreamTools.configuration.BitstreamGenerator


    XilinxConfigurationSpecification spec = DeviceLookup.lookupPartV4V5V6(partname);
   
    int idCode = spec.getIntDeviceIDCode();

    // Creates the initial packets
    BitstreamGenerator v4gen = V4BitstreamGenerator.getSharedInstance();
    PacketListCRC packets = v4gen.createInitialPartialBitstream(idCode);

    // TODO: Create data packets here
    final int size = 1312;
    List<Integer> data = new ArrayList<Integer>(size);
    for (int i = 0; i < size; i++ )
      data.add(0);

    // TODO: figure out the far address
    int topBottom = 0;
    int row = 0;
    int column = 0;
    int minor = 0;

    // Set block type in FAR
    // TODO: need to make it easier to figure out the block number
    int blockType = 0;
    List<BlockType> blockTypes = spec.getBlockTypes();
   
    int i = 0;
    for (BlockType blockTypeI : blockTypes) {
        if (blockTypeI == spec.getBRAMContentBlockType()) {
            blockType = i;
        }
        i++;
    }
     
    int farAddress = FrameAddressRegister.createFAR(spec, topBottom, blockType,
        row, column, minor);

    try {
      BitstreamGenerator.createPartialWritePackets(packets, spec, farAddress, data);
    } catch (BitstreamException e) {
      System.exit(1);
    }
   
    // Creates the ending packets
    v4gen.createEndingPartialBitstream(packets);

    // 4. Create bitstream from the packets
    // TODO: create a non header bitstream and see if it can be parsed
    BitstreamHeader header = new BitstreamHeader("temp.ncd","4VSX550-pg125");   
    Bitstream bitstream = new Bitstream(header,spec.getSyncData(), packets);
View Full Code Here

TOP

Related Classes of edu.byu.ece.rapidSmith.bitstreamTools.configuration.BitstreamGenerator

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.