Examples of Bitstream


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

    }

    createEndingPartialBitstream(packets);

    // 4. Create bitstream from the packets
        return new Bitstream(header, fpga.getDeviceSpecification().getSyncData(), packets);
  }
View Full Code Here

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

      System.err.println("A bitstream filename must be specified with the "+
          bitstreamOption + " option");
      printUsageAndExit();
    }

    Bitstream bitstream = BitstreamParser.parseBitstreamExitOnError(bitstreamFileName);   
    if (printResultMessage)
      System.out.println("Bitstream parsed correctly:"+bitstreamFileName);
    return bitstream;
  }
View Full Code Here

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

    String bitstreamFileName = getBitstreamFileNameFromOptions(options,bitstreamOption);
    if (bitstreamFileName == null) {
      return null;
    }

    Bitstream bitstream = BitstreamParser.parseBitstreamExitOnError(bitstreamFileName);   
    if (printResultMessage)
      System.out.println("Bitstream parsed correctly:"+bitstreamFileName);
    return bitstream;
  }
View Full Code Here

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

     
      fpga = ReadbackFPGA.parseRawReadbackDataFromOptionsExitOnError(readbackfilename,
          part);

    } else {
      Bitstream bitstream = parseRequiredBitstreamFromOptionsExitOnError(options, regular_bitstream_file_option, true);
      // get data from a bitstream
      /////////////////////////////////////////////////////////////////////
      // 2. Obtain part information
      /////////////////////////////////////////////////////////////////////
      XilinxConfigurationSpecification partInfo = getPartInfoExitOnError(options, bitstream, true);
View Full Code Here

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

                // TODO Auto-generated catch block
                e.printStackTrace();
            }
           
            // generate output .bit and output .mcs
            Bitstream inputBitstream = null;
            try {
                inputBitstream = BitstreamParser.parseBitstream(inputBit);
            } catch (BitstreamParseException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
           
            FileOutputStream os_bit = null;
            try {
                os_bit = new FileOutputStream(outputBit);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
           
            try {
                inputBitstream.outputHeaderBitstream(os_bit);
            } catch (IOException e) {
                e.printStackTrace();
            }
           
            FileOutputStream os_mcs = null;
            try {
                os_mcs = new FileOutputStream(outputMcs);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
           
            try {
                inputBitstream.writeBitstreamToMCS(os_mcs);
            } catch (IOException e) {
                e.printStackTrace();
            }
           
            // compare bitstreams
View Full Code Here

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

       
        String inputName = args[0];
        String outputName = args[1];
        String mcsName = args[2];
       
        Bitstream bs = null;
        try {
            bs = BitstreamParser.parseBitstream(inputName);
        } catch (BitstreamParseException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
       
        FileOutputStream os_bit = null;
        try {
            os_bit = new FileOutputStream(new File(outputName));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
       
        try {
            bs.outputHeaderBitstream(os_bit);
        } catch (IOException e) {
            e.printStackTrace();
        }
       
        FileOutputStream os_mcs = null;
        try {
            os_mcs = new FileOutputStream(new File(mcsName));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
       
        try {
            bs.writeBitstreamToMCS(os_mcs);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

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

                // Parse bitstream for ID code
                _deviceIDCodes.add(parseBitstreamForIDCode(kFilePrefix + ".bit"));

                // Parse bitstream for row counts
                Bitstream bitstream = null;
                try {
                    bitstream = BitstreamParser.parseBitstream(kFilePrefix + ".bit");
                } catch (BitstreamParseException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

                Set<Integer> topRows = new HashSet<Integer>();
                Set<Integer> bottomRows = new HashSet<Integer>();

                PacketList packets = bitstream.getPackets();
                for (Packet packet : packets) {
                    if (packet.getRegType() == RegisterType.LOUT) {
                        int farAddress = packet.getData().get(0);
                        int currentRow = (farAddress & _rowMask) >>> _rowBitPos;
                        int currentTopBottom = (farAddress & _topBottomMask) >>> _topBottomBitPos;
View Full Code Here

Examples of javazoom.jl.decoder.Bitstream

        int nTotalMS = AudioSystem.NOT_SPECIFIED;
        boolean nVBR = false;
        AudioFormat.Encoding encoding = null;
        try
        {
            Bitstream m_bitstream = new Bitstream(pis);
            int streamPos = m_bitstream.header_pos();
            aff_properties.put("mp3.header.pos", new Integer(streamPos));
            Header m_header = m_bitstream.readFrame();
            // nVersion = 0 => MPEG2-LSF (Including MPEG2.5), nVersion = 1 => MPEG1
            nVersion = m_header.version();
            if (nVersion == 2) aff_properties.put("mp3.version.mpeg", Float.toString(2.5f));
            else aff_properties.put("mp3.version.mpeg", Integer.toString(2 - nVersion));
            // nLayer = 1,2,3
            nLayer = m_header.layer();
            aff_properties.put("mp3.version.layer", Integer.toString(nLayer));
            nSFIndex = m_header.sample_frequency();
            nMode = m_header.mode();
            aff_properties.put("mp3.mode", new Integer(nMode));
            nChannels = nMode == 3 ? 1 : 2;
            aff_properties.put("mp3.channels", new Integer(nChannels));
            nVBR = m_header.vbr();
            af_properties.put("vbr", new Boolean(nVBR));
            aff_properties.put("mp3.vbr", new Boolean(nVBR));
            aff_properties.put("mp3.vbr.scale", new Integer(m_header.vbr_scale()));
            FrameSize = m_header.calculate_framesize();
            aff_properties.put("mp3.framesize.bytes", new Integer(FrameSize));
            if (FrameSize < 0) throw new UnsupportedAudioFileException("Invalid FrameSize : " + FrameSize);
            nFrequency = m_header.frequency();
            aff_properties.put("mp3.frequency.hz", new Integer(nFrequency));
            FrameRate = (float) ((1.0 / (m_header.ms_per_frame())) * 1000.0);
            aff_properties.put("mp3.framerate.fps", new Float(FrameRate));
            if (FrameRate < 0) throw new UnsupportedAudioFileException("Invalid FrameRate : " + FrameRate);
            // Remove heading tag length from real stream length.
            int tmpLength = mLength;
            if ((streamPos > 0) && (mLength != AudioSystem.NOT_SPECIFIED) && (streamPos < mLength)) tmpLength = tmpLength - streamPos;
            if (mLength != AudioSystem.NOT_SPECIFIED)
            {
                aff_properties.put("mp3.length.bytes", new Integer(mLength));
                nTotalFrames = m_header.max_number_of_frames(tmpLength);
                aff_properties.put("mp3.length.frames", new Integer(nTotalFrames));
            }
            BitRate = m_header.bitrate();
            af_properties.put("bitrate", new Integer(BitRate));
            aff_properties.put("mp3.bitrate.nominal.bps", new Integer(BitRate));
            nHeader = m_header.getSyncHeader();
            encoding = sm_aEncodings[nVersion][nLayer - 1];
            aff_properties.put("mp3.version.encoding", encoding.toString());
            if (mLength != AudioSystem.NOT_SPECIFIED)
            {
                nTotalMS = Math.round(m_header.total_ms(tmpLength));
                aff_properties.put("duration", new Long((long) nTotalMS * 1000L));
            }
            aff_properties.put("mp3.copyright", new Boolean(m_header.copyright()));
            aff_properties.put("mp3.original", new Boolean(m_header.original()));
            aff_properties.put("mp3.crc", new Boolean(m_header.checksums()));
            aff_properties.put("mp3.padding", new Boolean(m_header.padding()));
            InputStream id3v2 = m_bitstream.getRawID3v2();
            if (id3v2 != null)
            {
                aff_properties.put("mp3.id3tag.v2", id3v2);
                parseID3v2Frames(id3v2, aff_properties);
            }
View Full Code Here

Examples of javazoom.jl.decoder.Bitstream

      byteslength = -1;
    }   
    m_encodedStream = inputStream;   
    shoutlst = IcyListener.getInstance();
    shoutlst.reset();
    m_bitstream = new Bitstream(inputStream);
    m_decoder = new Decoder(null);
    m_equalizer = new Equalizer();
    m_equalizer_values = new float[32];
    for (int b=0;b<m_equalizer.getBandCount();b++)
    {
View Full Code Here

Examples of javazoom.jl.decoder.Bitstream

   * */
 
  public MyPlayer(Mp3InputStream fileIn) throws JavaLayerException {
    super(fileIn);
    fileStream = fileIn;
    bitstream = new Bitstream(fileStream);
    maxFramesNumber = getFramesCount(fileIn.getName());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.