OpenASIP  2.0
BlocksGCU.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2021 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 BlocksGCU.hh
26  *
27  * This class describes the GCU unit of the Blocks (ABU of the TTA).
28  *
29  * @author Maarten Molendijk 2020 (m.j.molendijk@tue.nl)
30  * @author Kanishkan Vadivel 2021 (k.vadivel@tue.nl)
31  */
32 
33 #ifndef BLOCKS_GCU_HH
34 #define BLOCKS_GCU_HH
35 
36 #include "ControlUnit.hh"
37 #include "ExecutionPipeline.hh"
38 #include "FUPort.hh"
39 #include "Guard.hh"
40 #include "HWOperation.hh"
41 #include "Machine.hh"
42 #include "Segment.hh"
43 #include "Socket.hh"
44 #include "SpecialRegisterPort.hh"
45 
46 class BlocksGCU {
47 public:
49  BlocksGCU(
50  TTAMachine::Machine& mach, const std::string& name,
51  TTAMachine::AddressSpace& asInstr);
60  std::list<std::string> sources;
62  delete pc;
63  delete val;
64  delete ra;
65  while (!ops.empty()) {
66  delete ops.back();
67  ops.pop_back();
68  }
69  delete raIn;
70  delete raOut;
71  delete valIn;
72  delete pcIn;
73  delete gcu;
74  }
75 
76 private:
77  std::vector<TTAMachine::HWOperation*> ops;
78  void ConfigurePipeline(
79  TTAMachine::ExecutionPipeline* pipeline, int numOfOperands);
80  void BindPorts(TTAMachine::HWOperation* hwOp, int numOfOperands);
82  const std::string& name, int numOfOperands);
83 };
84 #endif
BlocksGCU::gcu
TTAMachine::ControlUnit * gcu
Definition: BlocksGCU.hh:48
BlocksGCU::ops
std::vector< TTAMachine::HWOperation * > ops
Definition: BlocksGCU.hh:77
BlocksGCU::raIn
TTAMachine::Socket * raIn
Definition: BlocksGCU.hh:55
TTAMachine::HWOperation
Definition: HWOperation.hh:52
TTAMachine::AddressSpace
Definition: AddressSpace.hh:51
ExecutionPipeline.hh
TTAMachine::Bus
Definition: Bus.hh:53
BlocksGCU::valIn
TTAMachine::Socket * valIn
Definition: BlocksGCU.hh:58
BlocksGCU::raOut
TTAMachine::Socket * raOut
Definition: BlocksGCU.hh:56
BlocksGCU::BlocksGCU
BlocksGCU(TTAMachine::Machine &mach, const std::string &name, TTAMachine::AddressSpace &asInstr)
Definition: BlocksGCU.cc:44
BlocksGCU::val
TTAMachine::FUPort * val
Definition: BlocksGCU.hh:53
BlocksGCU::ConfigurePipeline
void ConfigurePipeline(TTAMachine::ExecutionPipeline *pipeline, int numOfOperands)
Definition: BlocksGCU.cc:102
Socket.hh
BlocksGCU::sources
std::list< std::string > sources
Definition: BlocksGCU.hh:60
TTAMachine::FUPort
Definition: FUPort.hh:46
Segment.hh
HWOperation.hh
TTAMachine::SpecialRegisterPort
Definition: SpecialRegisterPort.hh:48
TTAMachine::ControlUnit
Definition: ControlUnit.hh:50
BlocksGCU::raBus
TTAMachine::Bus * raBus
Definition: BlocksGCU.hh:59
TTAMachine::Socket
Definition: Socket.hh:53
Guard.hh
Machine.hh
BlocksGCU
Definition: BlocksGCU.hh:46
BlocksGCU::ra
TTAMachine::SpecialRegisterPort * ra
Definition: BlocksGCU.hh:54
BlocksGCU::pcIn
TTAMachine::Socket * pcIn
Definition: BlocksGCU.hh:57
FUPort.hh
ControlUnit.hh
SpecialRegisterPort.hh
BlocksGCU::~BlocksGCU
~BlocksGCU()
Definition: BlocksGCU.hh:61
TTAMachine::ExecutionPipeline
Definition: ExecutionPipeline.hh:55
BlocksGCU::BindPorts
void BindPorts(TTAMachine::HWOperation *hwOp, int numOfOperands)
Definition: BlocksGCU.cc:127
BlocksGCU::CreateHWOp
TTAMachine::HWOperation * CreateHWOp(const std::string &name, int numOfOperands)
Definition: BlocksGCU.cc:146
BlocksGCU::pc
TTAMachine::FUPort * pc
Definition: BlocksGCU.hh:52
TTAMachine::Machine
Definition: Machine.hh:73