OpenASIP
2.2
Loading...
Searching...
No Matches
src
bintools
BlocksTranslator
BlocksIMM.cc
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 BlocksIMM.cc
26
*
27
* Implementation of BlocksIMM Class.
28
*
29
* @author Maarten Molendijk 2020 (m.j.molendijk@tue.nl)
30
* @author Kanishkan Vadivel 2021 (k.vadivel@tue.nl)
31
*/
32
33
#include "
BlocksIMM.hh
"
34
35
using namespace
TTAMachine
;
36
37
/**
38
* BlocksIMM with default instructions
39
*
40
* @param mach The TTA machine where the IU needs to be added.
41
* @param name The name of the IU.
42
* @param sources A list of sources that are attached to this unit's input.
43
*/
44
BlocksIMM::BlocksIMM
(
45
Machine
& mach,
const
std::string& name, std::list<std::string> sources) {
46
// IU property constants
47
unsigned
int
size = 1;
48
unsigned
int
width = 32;
49
unsigned
int
maxReads = 1;
50
unsigned
int
guardLatency = 1;
51
Machine::Extension
ext = Machine::Extension::ZERO;
52
53
// Create object
54
iu
=
new
ImmediateUnit
(name, size, width, maxReads, guardLatency, ext);
55
this->sources =
sources
;
56
out0
=
new
RFPort
(
"out0"
, *
iu
);
57
mach.
addImmediateUnit
(*
iu
);
58
59
// Create sockets
60
out0sock
=
new
Socket
(name +
"_out0"
);
61
mach.
addSocket
(*
out0sock
);
62
out0
->
attachSocket
(*
out0sock
);
63
}
BlocksIMM.hh
BlocksIMM::iu
TTAMachine::ImmediateUnit * iu
Definition
BlocksIMM.hh:41
BlocksIMM::out0
TTAMachine::RFPort * out0
Definition
BlocksIMM.hh:45
BlocksIMM::sources
std::list< std::string > sources
Definition
BlocksIMM.hh:47
BlocksIMM::BlocksIMM
BlocksIMM(TTAMachine::Machine &mach, const std::string &name, std::list< std::string > sources)
Definition
BlocksIMM.cc:44
BlocksIMM::out0sock
TTAMachine::Socket * out0sock
Definition
BlocksIMM.hh:46
TTAMachine::ImmediateUnit
Definition
ImmediateUnit.hh:50
TTAMachine::Machine
Definition
Machine.hh:73
TTAMachine::Machine::Extension
Extension
Definition
Machine.hh:80
TTAMachine::Machine::addImmediateUnit
virtual void addImmediateUnit(ImmediateUnit &unit)
Definition
Machine.cc:224
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition
Machine.cc:157
TTAMachine::Port::attachSocket
virtual void attachSocket(Socket &socket)
Definition
Port.cc:191
TTAMachine::RFPort
Definition
RFPort.hh:45
TTAMachine::Socket
Definition
Socket.hh:53
TTAMachine
Definition
Assembler.hh:48
Generated by
1.9.8