torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SpartanBitstream.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief Header for the SpartanBitstream class.
18 
19 #ifndef TORC_BITSTREAM_SPARTANBITSTREAM_HPP
20 #define TORC_BITSTREAM_SPARTANBITSTREAM_HPP
21 
22 #include <boost/cstdint.hpp>
25 
26 namespace torc {
27 namespace bitstream {
28 
29 namespace bitstream { class SpartanBitstreamUnitTest; }
30 
31  /// \brief Spartan-class bitstream.
32  class SpartanBitstream : virtual public Bitstream, public SpartanPacketVector,
33  public SpartanPacketConstants {
35  protected:
36  // typedefs
37  /// \brief Imported type name.
38  typedef boost::uint32_t uint32_t;
39  // members
40  public:
41  // constructors
42  /// \brief Basic constructor.
44  // functions
45  /// \brief Read bitstream packets from a stream.
46  /// \note This function should be called after the bitstream header has been read.
47  virtual void readPackets(std::istream& inStream);
48  /// \brief Write bitstream packets to a stream.
49  virtual void writePackets(std::ostream& inStream);
50  /// \brief Preflight the packets.
51  virtual void preflightPackets(void);
52  /// \brief Update the header packet length.
53  virtual void updatePacketLength(void);
54  };
55 
56 } // namespace bitstream
57 } // namespace torc
58 
59 #endif // TORC_BITSTREAM_SPARTANBITSTREAM_HPP
Header for the SpartanPacket class.
Bitstream packet constants for Spartan class architectures.
virtual void writePackets(std::ostream &inStream)
Write bitstream packets to a stream.
SpartanBitstream(void)
Basic constructor.
std::vector< SpartanPacket > SpartanPacketVector
Vector of Spartan packets.
Xilinx bitstream base class.
boost::uint32_t uint32_t
Imported type name.
Header for the Bitstream class.
virtual void preflightPackets(void)
Preflight the packets.
virtual void readPackets(std::istream &inStream)
Read bitstream packets from a stream.
virtual void updatePacketLength(void)
Update the header packet length.
friend class torc::bitstream::bitstream::SpartanBitstreamUnitTest