OpenASIP  2.0
CentralizedControlICGenerator.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file CentralizedControlICGenerator.hh
26  *
27  * Declaration of CentralizedControlICGenerator class.
28  *
29  * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_CENTRALIZED_CONTROL_IC_GENERATOR_HH
34 #define TTA_CENTRALIZED_CONTROL_IC_GENERATOR_HH
35 
36 #include <string>
37 #include <map>
38 
39 #include "Exception.hh"
40 
41 namespace ProGe {
42  class NetlistPort;
43 }
44 
45 namespace TTAMachine {
46  class Socket;
47  class Bus;
48  class Port;
49  class Segment;
50 }
51 
53 public:
56 
57  ProGe::NetlistPort& simmDataPort(const std::string& busName) const;
58  ProGe::NetlistPort& simmCntrlPort(const std::string& busName) const;
60  const std::string& socketName) const;
62  const std::string& socketName) const;
63  bool hasGlockPort() const;
65 
67  const TTAMachine::Socket& socket,
68  const TTAMachine::Segment& segment) const = 0;
69 
70  virtual int outputSocketDataControlValue(
71  const TTAMachine::Socket& socket,
72  const TTAMachine::Port& port) const = 0;
73 
74  virtual int inputSocketControlValue(
75  const TTAMachine::Socket& socket,
76  const TTAMachine::Segment& segment) const = 0;
77 
78 protected:
79  void mapSImmDataPort(const std::string& busName, ProGe::NetlistPort& port);
80  void mapSImmCntrlPort(const std::string& busName, ProGe::NetlistPort& port);
82  const std::string& socketName,
83  ProGe::NetlistPort& port);
85  const std::string& socketName,
86  ProGe::NetlistPort& port);
88 
89 private:
90  typedef std::map<std::string, ProGe::NetlistPort*> NetlistPortMap;
91 
92  /// Maps the short immediate data ports for buses.
94  /// Maps the short immediate control ports for buses.
96  /// Maps the data ports of sockets.
98  /// Maps the bus control ports of sockets.
100  /// Maps the data control ports of sockets.
102  /// (optional) Glock port
104 };
105 
106 #endif
CentralizedControlICGenerator::busCntrlPortOfSocket
ProGe::NetlistPort & busCntrlPortOfSocket(const std::string &socketName) const
Definition: CentralizedControlICGenerator.cc:98
CentralizedControlICGenerator::simmCntrlPortMap_
NetlistPortMap simmCntrlPortMap_
Maps the short immediate control ports for buses.
Definition: CentralizedControlICGenerator.hh:95
CentralizedControlICGenerator::simmDataPortMap_
NetlistPortMap simmDataPortMap_
Maps the short immediate data ports for buses.
Definition: CentralizedControlICGenerator.hh:93
CentralizedControlICGenerator::glockPort_
ProGe::NetlistPort * glockPort_
(optional) Glock port
Definition: CentralizedControlICGenerator.hh:103
Exception.hh
CentralizedControlICGenerator::CentralizedControlICGenerator
CentralizedControlICGenerator()
Definition: CentralizedControlICGenerator.cc:44
CentralizedControlICGenerator::NetlistPortMap
std::map< std::string, ProGe::NetlistPort * > NetlistPortMap
Definition: CentralizedControlICGenerator.hh:90
TTAMachine::Segment
Definition: Segment.hh:54
CentralizedControlICGenerator::simmCntrlPort
ProGe::NetlistPort & simmCntrlPort(const std::string &busName) const
Definition: CentralizedControlICGenerator.cc:81
CentralizedControlICGenerator::mapDataCntrlPortOfSocket
void mapDataCntrlPortOfSocket(const std::string &socketName, ProGe::NetlistPort &port)
Definition: CentralizedControlICGenerator.cc:208
CentralizedControlICGenerator::socketDataPortMap_
NetlistPortMap socketDataPortMap_
Maps the data ports of sockets.
Definition: CentralizedControlICGenerator.hh:97
CentralizedControlICGenerator::~CentralizedControlICGenerator
virtual ~CentralizedControlICGenerator()
Definition: CentralizedControlICGenerator.cc:52
CentralizedControlICGenerator
Definition: CentralizedControlICGenerator.hh:52
CentralizedControlICGenerator::simmDataPort
ProGe::NetlistPort & simmDataPort(const std::string &busName) const
Definition: CentralizedControlICGenerator.cc:64
CentralizedControlICGenerator::mapBusCntrlPortOfSocket
void mapBusCntrlPortOfSocket(const std::string &socketName, ProGe::NetlistPort &port)
Definition: CentralizedControlICGenerator.cc:191
CentralizedControlICGenerator::dataCntrlPortMap_
NetlistPortMap dataCntrlPortMap_
Maps the data control ports of sockets.
Definition: CentralizedControlICGenerator.hh:101
TTAMachine::Port
Definition: Port.hh:54
CentralizedControlICGenerator::outputSocketDataControlValue
virtual int outputSocketDataControlValue(const TTAMachine::Socket &socket, const TTAMachine::Port &port) const =0
TTAMachine::Socket
Definition: Socket.hh:53
CentralizedControlICGenerator::outputSocketCntrlPinForSegment
virtual int outputSocketCntrlPinForSegment(const TTAMachine::Socket &socket, const TTAMachine::Segment &segment) const =0
CentralizedControlICGenerator::busCntrlPortMap_
NetlistPortMap busCntrlPortMap_
Maps the bus control ports of sockets.
Definition: CentralizedControlICGenerator.hh:99
CentralizedControlICGenerator::setGlockPort
void setGlockPort(ProGe::NetlistPort &glockPort)
Definition: CentralizedControlICGenerator.cc:224
CentralizedControlICGenerator::mapSImmDataPort
void mapSImmDataPort(const std::string &busName, ProGe::NetlistPort &port)
Definition: CentralizedControlICGenerator.cc:156
ProGe
Definition: FUGen.hh:54
CentralizedControlICGenerator::glockPort
ProGe::NetlistPort & glockPort() const
Definition: CentralizedControlICGenerator.cc:139
ProGe::NetlistPort
Definition: NetlistPort.hh:70
CentralizedControlICGenerator::mapSImmCntrlPort
void mapSImmCntrlPort(const std::string &busName, ProGe::NetlistPort &port)
Definition: CentralizedControlICGenerator.cc:174
TTAMachine
Definition: Assembler.hh:48
CentralizedControlICGenerator::hasGlockPort
bool hasGlockPort() const
Definition: CentralizedControlICGenerator.cc:128
CentralizedControlICGenerator::dataCntrlPortOfSocket
ProGe::NetlistPort & dataCntrlPortOfSocket(const std::string &socketName) const
Definition: CentralizedControlICGenerator.cc:115
CentralizedControlICGenerator::inputSocketControlValue
virtual int inputSocketControlValue(const TTAMachine::Socket &socket, const TTAMachine::Segment &segment) const =0