torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Virtex5PrimitiveStructure.cpp
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 Source for the Virtex5PrimitiveStructure class.
18 
20 #include <iostream>
21 #include <map>
22 
23 namespace torc {
24 namespace packer {
25 
26  using namespace torc::architecture;
27  /// \brief The type name of slice primitives
28  const std::string cSliceLTypeName = "SLICEL";
29  const std::string cSliceMTypeName = "SLICEM";
30 
32  if(mPrimitiveDefPtr->getName() == cSliceLTypeName
33  || mPrimitiveDefPtr->getName() == cSliceMTypeName) {
34 
35  const PrimitiveElementArray& elements = mPrimitiveDefPtr->getElements();
38  while(ep < ee) {
39  const PrimitiveElement& element = *ep++;
40  const PrimitiveElement* elementPtr = &element;
41  if(element.getName() == "SYNC_ATTR"){
42  mPrincipalsToOrphans["AFF"].push_back(elementPtr);
43  mPrincipalsToOrphans["BFF"].push_back(elementPtr);
44  mPrincipalsToOrphans["CFF"].push_back(elementPtr);
45  mPrincipalsToOrphans["DFF"].push_back(elementPtr);
46  } else if(element.getName() == "AFFSR"){
47  mPrincipalsToOrphans["AFF"].push_back(elementPtr);
48  } else if(element.getName() == "BFFSR"){
49  mPrincipalsToOrphans["BFF"].push_back(elementPtr);
50  } else if(element.getName() == "CFFSR"){
51  mPrincipalsToOrphans["CFF"].push_back(elementPtr);
52  } else if(element.getName() == "DFFSR"){
53  mPrincipalsToOrphans["DFF"].push_back(elementPtr);
54  } else if(element.getName() == "AFFINIT"){
55  mPrincipalsToOrphans["AFF"].push_back(elementPtr);
56  } else if(element.getName() == "BFFINIT"){
57  mPrincipalsToOrphans["BFF"].push_back(elementPtr);
58  } else if(element.getName() == "CFFINIT"){
59  mPrincipalsToOrphans["CFF"].push_back(elementPtr);
60  } else if(element.getName() == "DFFINIT"){
61  mPrincipalsToOrphans["DFF"].push_back(elementPtr);
62  } else if(element.getName() == "A5RAMMODE"){
63  mPrincipalsToOrphans["A5LUT"].push_back(elementPtr);
64  } else if(element.getName() == "B5RAMMODE"){
65  mPrincipalsToOrphans["B5LUT"].push_back(elementPtr);
66  } else if(element.getName() == "C5RAMMODE"){
67  mPrincipalsToOrphans["C5LUT"].push_back(elementPtr);
68  } else if(element.getName() == "D5RAMMODE"){
69  mPrincipalsToOrphans["D5LUT"].push_back(elementPtr);
70  } else if(element.getName() == "A6RAMMODE"){
71  mPrincipalsToOrphans["A6LUT"].push_back(elementPtr);
72  } else if(element.getName() == "B6RAMMODE"){
73  mPrincipalsToOrphans["B6LUT"].push_back(elementPtr);
74  } else if(element.getName() == "C6RAMMODE"){
75  mPrincipalsToOrphans["C6LUT"].push_back(elementPtr);
76  } else if(element.getName() == "D6RAMMODE"){
77  mPrincipalsToOrphans["D6LUT"].push_back(elementPtr);
78  }
79  }
80  }
81  }
82 
83 } // namespace architecture
84 } // namespace torc
const const PrimitiveElement * const_iterator
Constant T iterator type.
Definition: Array.hpp:83
const std::string cSliceLTypeName
The type name of slice primitives.
Header for the Virtex5PrimitiveStructure class.
T * end(void)
Returns the non-constant end iterator.
Definition: Array.hpp:97
virtual void initialize(void)
Initialize this object based on the PrimitiveDef information.
const std::string cSliceMTypeName
std::string string
const string & getName(void) const
Returns the name of the element.
Encapsulation of a primitive site element. Primitive elements are subcomponents of logic primitive s...
T * begin(void)
Returns the non-constant begin iterator.
Definition: Array.hpp:95