OpenASIP  2.0
LoopBufferBlock.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2015 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 LoopBufferBlock.hh
26  *
27  * Declaration of LoopBufferBlock class.
28  *
29  * Created on: 3.12.2015
30  * @author Henry Linjam�ki 2015 (henry.linjamaki-no.spam-tut.fi)
31  * @note rating: red
32  */
33 
34 #ifndef LOOPBUFFERBLOCK_HH_
35 #define LOOPBUFFERBLOCK_HH_
36 
37 #include <string>
38 
39 #include "BaseNetlistBlock.hh"
40 
41 #include "NetlistPort.hh"
42 #include "ProGeContext.hh"
43 
44 #include "Exception.hh"
45 
46 namespace ProGe {
47 
48 /*
49  * Block that represents loop buffer unit.
50  */
52 public:
53  LoopBufferBlock() = delete;
55  const ProGeContext& context, BaseNetlistBlock* parent = nullptr);
56  virtual ~LoopBufferBlock();
57 
58  void setBlockWidthParameter(const std::string value);
59  void setBufferSizeParameter(const std::string value);
60  void setIterationPortWidthParameter(const std::string value);
61  void setCoreIdParameter(const std::string value);
62  void setUsageTracingParameter(bool setting);
63 
64  const NetlistPort& lockReqPortIn() const;
65  const NetlistPort& lockReqPortOut() const;
66  const NetlistPort& lockPortIn() const;
67  const NetlistPort& lockPortOut() const;
68  const NetlistPort& instructionPortIn() const;
69  const NetlistPort& instructionPortOut() const;
70  const NetlistPort& startPortIn() const;
71  const NetlistPort* stopPortIn() const;
72  const NetlistPort& loopBodySizePortIn() const;
73  const NetlistPort* loopIterationPortIn() const;
74  const NetlistPort& lenCntrPortOut() const;
75  const NetlistPort& loopFromImemPortOut() const;
76 
77  virtual void write(
78  const Path& targetBaseDir, HDL targetLang = VHDL) const override;
79 
80 private:
81 
94 
95  std::string implmenetationFile_ = "";
96  std::string entityStr_ = "tta0";
97 };
98 
99 } /* namespace ProGe */
100 
101 #endif /* LOOPBUFFERBLOCK_HH_ */
ProGe::LoopBufferBlock::lockReqPortIn_
NetlistPort * lockReqPortIn_
Definition: LoopBufferBlock.hh:82
ProGe::LoopBufferBlock::entityStr_
std::string entityStr_
Definition: LoopBufferBlock.hh:96
ProGe::BaseNetlistBlock
Definition: BaseNetlistBlock.hh:59
Path
Definition: FileSystem.hh:197
ProGe::LoopBufferBlock::lenCntrPortOut
const NetlistPort & lenCntrPortOut() const
Definition: LoopBufferBlock.cc:321
ProGe::LoopBufferBlock::lockReqPortOut
const NetlistPort & lockReqPortOut() const
Definition: LoopBufferBlock.cc:236
ProGe::LoopBufferBlock::stopPortIn_
NetlistPort * stopPortIn_
Definition: LoopBufferBlock.hh:89
Exception.hh
ProGeContext.hh
ProGe::LoopBufferBlock::loopFromImemPortOut
const NetlistPort & loopFromImemPortOut() const
Definition: LoopBufferBlock.cc:331
ProGe::LoopBufferBlock::setBufferSizeParameter
void setBufferSizeParameter(const std::string value)
Definition: LoopBufferBlock.cc:178
ProGe::LoopBufferBlock::setCoreIdParameter
void setCoreIdParameter(const std::string value)
Definition: LoopBufferBlock.cc:203
ProGe::LoopBufferBlock::loopIterationPortIn_
NetlistPort * loopIterationPortIn_
Definition: LoopBufferBlock.hh:91
ProGe::LoopBufferBlock::instructionPortIn_
NetlistPort * instructionPortIn_
Definition: LoopBufferBlock.hh:86
ProGe::LoopBufferBlock::lockPortOut_
NetlistPort * lockPortOut_
Definition: LoopBufferBlock.hh:85
ProGe::LoopBufferBlock::instructionPortOut
const NetlistPort & instructionPortOut() const
Definition: LoopBufferBlock.cc:272
ProGe::LoopBufferBlock::instructionPortIn
const NetlistPort & instructionPortIn() const
Definition: LoopBufferBlock.cc:263
ProGe::LoopBufferBlock::loopIterationPortIn
const NetlistPort * loopIterationPortIn() const
Definition: LoopBufferBlock.cc:313
ProGe::LoopBufferBlock::startPortIn_
NetlistPort * startPortIn_
Definition: LoopBufferBlock.hh:88
ProGe::LoopBufferBlock::loopBodySizePortIn_
NetlistPort * loopBodySizePortIn_
Definition: LoopBufferBlock.hh:90
ProGe::VHDL
@ VHDL
VHDL.
Definition: ProGeTypes.hh:41
ProGe::LoopBufferBlock::LoopBufferBlock
LoopBufferBlock()=delete
ProGe::LoopBufferBlock::lockPortOut
const NetlistPort & lockPortOut() const
Definition: LoopBufferBlock.cc:254
NetlistPort.hh
ProGe::LoopBufferBlock::lockReqPortOut_
NetlistPort * lockReqPortOut_
Definition: LoopBufferBlock.hh:83
ProGe::LoopBufferBlock::lockPortIn
const NetlistPort & lockPortIn() const
Definition: LoopBufferBlock.cc:245
ProGe::LoopBufferBlock::setUsageTracingParameter
void setUsageTracingParameter(bool setting)
Definition: LoopBufferBlock.cc:217
ProGe::LoopBufferBlock::lenCntrPortOut_
NetlistPort * lenCntrPortOut_
Definition: LoopBufferBlock.hh:92
ProGe::LoopBufferBlock::lockReqPortIn
const NetlistPort & lockReqPortIn() const
Definition: LoopBufferBlock.cc:227
ProGe::LoopBufferBlock::loopBodySizePortIn
const NetlistPort & loopBodySizePortIn() const
Definition: LoopBufferBlock.cc:301
ProGe::LoopBufferBlock::loopFromImemPortOut_
NetlistPort * loopFromImemPortOut_
Definition: LoopBufferBlock.hh:93
ProGe::LoopBufferBlock::lockPortIn_
NetlistPort * lockPortIn_
Definition: LoopBufferBlock.hh:84
ProGe::LoopBufferBlock::stopPortIn
const NetlistPort * stopPortIn() const
Definition: LoopBufferBlock.cc:293
ProGe::LoopBufferBlock::setIterationPortWidthParameter
void setIterationPortWidthParameter(const std::string value)
Definition: LoopBufferBlock.cc:190
ProGe::LoopBufferBlock::~LoopBufferBlock
virtual ~LoopBufferBlock()
Definition: LoopBufferBlock.cc:159
ProGe::LoopBufferBlock::implmenetationFile_
std::string implmenetationFile_
Definition: LoopBufferBlock.hh:95
ProGe
Definition: FUGen.hh:54
BaseNetlistBlock.hh
ProGe::LoopBufferBlock::instructionPortOut_
NetlistPort * instructionPortOut_
Definition: LoopBufferBlock.hh:87
ProGe::HDL
HDL
HDLs supported by ProGe.
Definition: ProGeTypes.hh:40
ProGe::NetlistPort
Definition: NetlistPort.hh:70
ProGe::ProGeContext
Definition: ProGeContext.hh:60
ProGe::LoopBufferBlock::setBlockWidthParameter
void setBlockWidthParameter(const std::string value)
Definition: LoopBufferBlock.cc:167
ProGe::LoopBufferBlock::startPortIn
const NetlistPort & startPortIn() const
Definition: LoopBufferBlock.cc:281
ProGe::LoopBufferBlock::write
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
Definition: LoopBufferBlock.cc:337
ProGe::LoopBufferBlock
Definition: LoopBufferBlock.hh:51