OpenASIP 2.2
Loading...
Searching...
No Matches
BlocksLSU.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 BlocksLSU.hh
26 *
27 * Declaration of BlocksLSU Class.
28 * This class resembles a single output in the Blocks architecture.
29 *
30 * @author Maarten Molendijk 2020 (m.j.molendijk@tue.nl)
31 * @author Kanishkan Vadivel 2021 (k.vadivel@tue.nl)
32 */
33
34#ifndef BLOCKS_LSU_HH
35#define BLOCKS_LSU_HH
36
37#include <memory>
38
39#include "BlocksFU.hh"
40
41class BlocksLSU : public BlocksFU {
42public:
45 TTAMachine::Machine& mach, const std::string& name,
46 std::list<std::string> sources, TTAMachine::AddressSpace& asData,
47 std::shared_ptr<TTAMachine::Socket> in1sock,
48 std::shared_ptr<TTAMachine::Socket> in2sock);
50 while (!ops.empty()) {
51 delete ops.back();
52 ops.pop_back();
53 }
54 }
55
56private:
58 TTAMachine::ExecutionPipeline* pipeline, bool isLoadOp);
59 void BindPorts(TTAMachine::HWOperation* hwOp, bool isLoadOp);
60 TTAMachine::HWOperation* CreateHWLoadOp(const std::string& name);
61 TTAMachine::HWOperation* CreateHWStoreOp(const std::string& name);
62};
63
64/* Declaration of BlocksLSUPair Class. This class is a wrapper for BlocksLSU
65 * class to group two units both representing a different output of the same
66 * Blocks Unit.
67 */
69public:
70 // Smart pointers for automated memory management
71 std::unique_ptr<BlocksLSU> lsu0;
72 std::unique_ptr<BlocksLSU> lsu1;
73 std::shared_ptr<TTAMachine::Socket> in1sock;
74 std::shared_ptr<TTAMachine::Socket> in2sock;
75 std::list<std::string> sources;
76
78 TTAMachine::Machine& mach, const std::string& name,
79 std::list<std::string> sources, TTAMachine::AddressSpace& asData,
80 bool usesOut0, bool usesOut1);
81
82private:
83};
84#endif
std::shared_ptr< TTAMachine::Socket > in2sock
Definition BlocksFU.hh:65
std::shared_ptr< TTAMachine::Socket > in1sock
Definition BlocksFU.hh:64
std::string name
Definition BlocksFU.hh:68
std::vector< TTAMachine::HWOperation * > ops
Definition BlocksFU.hh:59
std::list< std::string > sources
Definition BlocksFU.hh:67
std::shared_ptr< TTAMachine::Socket > in2sock
Definition BlocksLSU.hh:74
std::unique_ptr< BlocksLSU > lsu0
Definition BlocksLSU.hh:71
std::shared_ptr< TTAMachine::Socket > in1sock
Definition BlocksLSU.hh:73
std::unique_ptr< BlocksLSU > lsu1
Definition BlocksLSU.hh:72
std::list< std::string > sources
Definition BlocksLSU.hh:75
TTAMachine::FunctionUnit * lsu
Definition BlocksLSU.hh:43
void ConfigurePipeline(TTAMachine::ExecutionPipeline *pipeline, bool isLoadOp)
Definition BlocksLSU.cc:151
TTAMachine::HWOperation * CreateHWStoreOp(const std::string &name)
Definition BlocksLSU.cc:116
TTAMachine::HWOperation * CreateHWLoadOp(const std::string &name)
Definition BlocksLSU.cc:103
void BindPorts(TTAMachine::HWOperation *hwOp, bool isLoadOp)
Definition BlocksLSU.cc:132