torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VirtexE.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 VirtexE class.
18 
19 #ifndef TORC_BITSTREAM_VIRTEXE_HPP
20 #define TORC_BITSTREAM_VIRTEXE_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 VirtexEUnitTest; }
31 namespace bitstream { class VirtexEFarUnitTest; }
32 namespace bitstream { void testVirtexEDevice(const std::string& inDeviceName,
33  const boost::filesystem::path& inWorkingPath); }
34 namespace bitstream { void testVirtexEFullMapping(const boost::filesystem::path& inWorkingPath); }
35 
36  /// \brief VirtexE bitstream inherited from Virtex bitstream.
37  class VirtexE : public Virtex {
40  friend void torc::bitstream::bitstream::testVirtexEDevice(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  /// \brief Initialize the maps between frame indexes and frame addresses.
48  /// \detail This is generally only useful for internal purposes.
49  virtual void initializeFrameMaps(void);
50  // accessors
51  virtual uint32_t getFrameLength(void) const {
52  using namespace torc::common;
53  // Frame Length Register Value: XAPP151, v.1.7, October 20, 2004, Table 24.
54  switch(mDevice) {
55  case eXCV50E: return 12;
56  case eXCV100E: return 14;
57  case eXCV200E: return 18;
58  case eXCV300E: return 21;
59  case eXCV400E: return 25;
60  case eXCV405E: return 25;
61  case eXCV600E: return 30;
62  case eXCV812E: return 34;
63  case eXCV1000E: return 39;
64  case eXCV1600E: return 43;
65  case eXCV2000E: return 48;
66  case eXCV2600E: return 54;
67  case eXCV3200E: return 61;
68  default: return 0;
69  }
70  }
71  /// \brief Return the number of frame rows for the current device.
72  virtual uint32_t getFrameRowCount(void) const { return 0; }
73  };
74 
75 } // namespace bitstream
76 } // namespace torc
77 
78 #endif // TORC_BITSTREAM_VIRTEXE_HPP
void testVirtexEDevice(const std::string &inDeviceName, const boost::filesystem::path &inWorkingPath)
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.
Definition: VirtexE.cpp:48
EDevice mDevice
Bitstream device enumeration.
virtual uint32_t getFrameRowCount(void) const
Return the number of frame rows for the current device.
Definition: VirtexE.hpp:72
std::string string
virtual uint32_t getFrameLength(void) const
Definition: VirtexE.hpp:51
boost::uint32_t uint32_t
Imported type name.
void testVirtexEFullMapping(const boost::filesystem::path &inWorkingPath)
boost::filesystem::path path
Header for the Virtex class.
Virtex bitstream.
Definition: Virtex.hpp:40
friend class torc::bitstream::bitstream::VirtexEFarUnitTest
Definition: VirtexE.hpp:39
VirtexE bitstream inherited from Virtex bitstream.
Definition: VirtexE.hpp:37
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses. This is generally only useful for int...
Definition: VirtexE.cpp:155
friend class torc::bitstream::bitstream::VirtexEUnitTest
Definition: VirtexE.hpp:38