00001 // Torc - Copyright 2011 University of Southern California. All Rights Reserved. 00002 // $HeadURL: https://torc-isi.svn.sourceforge.net/svnroot/torc-isi/branches/staging/0.9/src/torc/physical/XilinxPhysicalTypes.hpp $ 00003 // $Id: XilinxPhysicalTypes.hpp 10 2011-10-12 18:40:16Z nsteiner $ 00004 00005 // This program is free software: you can redistribute it and/or modify it under the terms of the 00006 // GNU General Public License as published by the Free Software Foundation, either version 3 of the 00007 // License, or (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 00010 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 00011 // the GNU General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License along with this program. If 00014 // not, see <http://www.gnu.org/licenses/>. 00015 00016 /// \file 00017 /// \brief Header for Xilinx physical types. 00018 00019 #ifndef TORC_PHYSICAL_XILINXPHYSICALTYPES_HPP 00020 #define TORC_PHYSICAL_XILINXPHYSICALTYPES_HPP 00021 00022 #include <boost/cstdint.hpp> 00023 #include <string> 00024 00025 namespace torc { 00026 namespace physical { 00027 00028 // -------------------------------------------------------------------------------------------- 00029 // ------------------------------------------- Wires ------------------------------------------ 00030 // -------------------------------------------------------------------------------------------- 00031 00032 /// \brief Encapsulation of a wire name. 00033 class WireName : public std::string { 00034 /// \brief Basic constructor. 00035 public: WireName(const std::string& rhs) : std::string(rhs) {} 00036 }; 00037 00038 // -------------------------------------------------------------------------------------------- 00039 // ------------------------------------------- Tiles ------------------------------------------ 00040 // -------------------------------------------------------------------------------------------- 00041 00042 /// \brief Encapsulation of a tile name. 00043 class TileName : public std::string { 00044 /// \brief Basic constructor. 00045 public: TileName(const std::string& rhs) : std::string(rhs) {} 00046 }; 00047 00048 // -------------------------------------------------------------------------------------------- 00049 // ---------------------------------------- Tile types ---------------------------------------- 00050 // -------------------------------------------------------------------------------------------- 00051 00052 /// \brief Encapsulation of a tile type name. 00053 class TileTypeName : public std::string { 00054 /// \brief Basic constructor. 00055 public: TileTypeName(const std::string& rhs) : std::string(rhs) {} 00056 }; 00057 00058 // -------------------------------------------------------------------------------------------- 00059 // ----------------------------------------- Instances ---------------------------------------- 00060 // -------------------------------------------------------------------------------------------- 00061 00062 /// \brief Encapsulation of an instance name. 00063 class InstanceName : public std::string { 00064 /// \brief Basic constructor. 00065 public: InstanceName(const std::string& rhs) : std::string(rhs) {} 00066 }; 00067 00068 /// \brief Enumeration of pad bonding types. 00069 enum EInstanceBonding { 00070 eInstanceBondingUnbonded = 0, 00071 eInstanceBondingBonded, 00072 eInstanceBondingUnknown, 00073 eInstanceBondingCount 00074 }; 00075 00076 // -------------------------------------------------------------------------------------------- 00077 // ------------------------------------------- Sites ------------------------------------------ 00078 // -------------------------------------------------------------------------------------------- 00079 00080 /// \brief Encapsulation of a site name. 00081 class SiteName : public std::string { 00082 /// \brief Basic constructor. 00083 public: SiteName(const std::string& rhs) : std::string(rhs) {} 00084 }; 00085 00086 // -------------------------------------------------------------------------------------------- 00087 // ----------------------------------------- Site types --------------------------------------- 00088 // -------------------------------------------------------------------------------------------- 00089 00090 /// \brief Encapsulation of a site type name. 00091 class SiteTypeName : public std::string { 00092 /// \brief Basic constructor. 00093 public: SiteTypeName(const std::string& rhs) : std::string(rhs) {} 00094 }; 00095 00096 // -------------------------------------------------------------------------------------------- 00097 // ------------------------------------------- Pins ------------------------------------------- 00098 // -------------------------------------------------------------------------------------------- 00099 00100 /// \brief Encapsulation of a site pin name. 00101 class PinName : public std::string { 00102 /// \brief Basic constructor. 00103 public: PinName(const std::string& rhs) : std::string(rhs) {} 00104 }; 00105 00106 /// \brief Enumeration of instance pin directionality. 00107 enum EPinDirection { 00108 ePinDirectionInpin = 0, 00109 ePinDirectionOutpin, 00110 ePinDirectionUnknown, 00111 ePinDirectionCount 00112 }; 00113 00114 // -------------------------------------------------------------------------------------------- 00115 // ------------------------------------------- Pips ------------------------------------------- 00116 // -------------------------------------------------------------------------------------------- 00117 00118 /// \brief Enumeration of pip directionality. 00119 enum EPipDirection { 00120 ePipBidirectionalUnbuffered = 0, 00121 ePipBidirectionalUnidirectionallyBuffered, 00122 ePipBidirectionalBidirectionallyBuffered, 00123 ePipUnidirectionalBuffered, 00124 ePipDirectionCount 00125 }; 00126 00127 // -------------------------------------------------------------------------------------------- 00128 // ------------------------------------------- Nets ------------------------------------------- 00129 // -------------------------------------------------------------------------------------------- 00130 00131 /// \brief Enumeration of net power types. 00132 enum ENetType { 00133 eNetTypeNormal = 0, 00134 eNetTypePower, 00135 eNetTypeGround, 00136 eNetTypeCount 00137 }; 00138 00139 // -------------------------------------------------------------------------------------------- 00140 // ----------------------------------------- Sequences ---------------------------------------- 00141 // -------------------------------------------------------------------------------------------- 00142 00143 /// \brief Typedef for generic sequences. 00144 typedef boost::uint64_t SequenceIndex; 00145 /// \brief Enumeration of sequence indexes. 00146 /// \brief A sequence index is just a number, so we only need to capture the number to use when 00147 /// there is no sequence defined, and the number with which to begin actual sequences. 00148 /// Note that this should probably be pulled into a higher-level part of the code, since it 00149 /// may be used in multiple cases. 00150 enum ESequenceIndex { 00151 eSequenceIndexNone = 0, 00152 eSequenceIndexFirst 00153 }; 00154 00155 } // namespace physical 00156 } // namespace torc 00157 00158 #endif // TORC_PHYSICAL_XILINXPHYSICALTYPES_HPP