torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Virtex2P.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 Virtex2P class.
18 
19 #ifndef TORC_BITSTREAM_VIRTEX2P_HPP
20 #define TORC_BITSTREAM_VIRTEX2P_HPP
21 
22 #include <boost/cstdint.hpp>
24 
25 namespace torc { namespace architecture { class DDB; } }
26 
27 namespace torc {
28 namespace bitstream {
29 
30 namespace bitstream { class Virtex2PUnitTest; }
31 namespace bitstream { class Virtex2PFarUnitTest; }
32 namespace bitstream { void testVirtex2PDevice(const std::string& inDeviceName,
33  const boost::filesystem::path& inWorkingPath); }
34 namespace bitstream { void testVirtex2PFullMapping(const boost::filesystem::path& inWorkingPath); }
35 
36  /// \brief Virtex2P bitstream inherited from Virtex2 bitstream.
37  class Virtex2P : public Virtex2 {
40  friend void torc::bitstream::bitstream::testVirtex2PDevice(const std::string& inDeviceName,
41  const boost::filesystem::path& inWorkingPath);
43  public:
44  // functions
45  /// \brief Initialize the device information.
46  virtual void initializeDeviceInfo(const std::string& inDeviceName);
47  // accessors
48  virtual uint32_t getFrameLength(void) const {
49  using namespace torc::common;
50  // Frame Length Register Value: UG002, v2.2, November 5, 2007, Table 4-15.
51  switch(mDevice) {
52  case eXC2VP2: return 46;
53  case eXC2VP4: return 106;
54  case eXC2VP7: return 106;
55  case eXC2VP20: return 146;
56  case eXC2VPX20: return 146;
57  case eXC2VP30: return 206;
58  case eXC2VP40: return 226;
59  case eXC2VP50: return 226;
60  case eXC2VP70: return 266;
61  case eXC2VPX70: return 266;
62  case eXC2VP100: return 306;
63  default: return 0;
64  }
65  }
66  };
67 
68 } // namespace bitstream
69 } // namespace torc // namespace torc
70 
71 #endif // TORC_BITSTREAM_VIRTEX2P_HPP
friend class torc::bitstream::bitstream::Virtex2PUnitTest
Definition: Virtex2P.hpp:38
virtual uint32_t getFrameLength(void) const
Definition: Virtex2P.hpp:48
void testVirtex2PDevice(const std::string &inDeviceName, const boost::filesystem::path &inWorkingPath)
Virtex2 bitstream.
Definition: Virtex2.hpp:40
EDevice mDevice
Bitstream device enumeration.
void testVirtex2PFullMapping(const boost::filesystem::path &inWorkingPath)
std::string string
boost::uint32_t uint32_t
Imported type name.
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.
Definition: Virtex2P.cpp:47
boost::filesystem::path path
friend class torc::bitstream::bitstream::Virtex2PFarUnitTest
Definition: Virtex2P.hpp:39
Header for the Virtex2 class.
Virtex2P bitstream inherited from Virtex2 bitstream.
Definition: Virtex2P.hpp:37