OpenASIP
2.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
Functions
a
b
c
d
f
g
i
l
m
n
o
p
s
Variables
Typedefs
a
b
c
d
e
f
i
n
p
r
s
t
Enumerations
Enumerator
b
c
f
g
h
i
l
m
o
r
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
z
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
x
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
f
i
j
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
applibs
Simulator
AssignmentQueue.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 AssignmentQueue.hh
26
*
27
* Declaration of AssignmentQueue class.
28
*
29
* @author Viljami Korhonen 2007 (viljami.korhonen-no.spam-tut.fi)
30
* @note rating: red
31
*/
32
33
#ifndef ASSIGNMENT_QUEUE_HH
34
#define ASSIGNMENT_QUEUE_HH
35
36
#include <string>
37
#include <deque>
38
#include <boost/shared_ptr.hpp>
39
#include "
SimValue.hh
"
40
41
/**
42
* This class is used for delayed assignments of SimValues to given targets.
43
*
44
* The implementation uses std::vector for a simple ring buffer
45
* Buffer size is directly the maximum possible latency
46
*
47
*/
48
class
AssignmentQueue
{
49
public
:
50
AssignmentQueue
(
int
maxLatency);
51
~AssignmentQueue
();
52
53
void
inline
addAssignment
(
const
SimValue
& assignValue,
54
SimValue
* assignTarget,
55
int
latency);
56
57
void
inline
advanceClock
();
58
59
private
:
60
/// Copying not allowed.
61
AssignmentQueue
(
const
AssignmentQueue
&);
62
/// Assignment not allowed.
63
AssignmentQueue
&
operator=
(
const
AssignmentQueue
&);
64
65
/// Type for the assignment: source value -> destination pointer
66
typedef
std::pair< SimValue, SimValue*>
Assignment
;
67
68
/// Type for the stored assignments
69
typedef
std::deque< std::deque< Assignment > >
Assignments
;
70
71
/// Our assignment queue
72
Assignments
assignmentQueue_
;
73
74
/// Position in the ring buffer
75
int
position_
;
76
77
/// Maximum possible latency
78
int
maxLatency_
;
79
};
80
81
#include "
AssignmentQueue.icc
"
82
83
#endif
AssignmentQueue::AssignmentQueue
AssignmentQueue(int maxLatency)
Definition:
AssignmentQueue.cc:40
AssignmentQueue::~AssignmentQueue
~AssignmentQueue()
Definition:
AssignmentQueue.cc:48
AssignmentQueue
Definition:
AssignmentQueue.hh:48
SimValue
Definition:
SimValue.hh:96
AssignmentQueue::position_
int position_
Position in the ring buffer.
Definition:
AssignmentQueue.hh:75
AssignmentQueue::Assignments
std::deque< std::deque< Assignment > > Assignments
Type for the stored assignments.
Definition:
AssignmentQueue.hh:69
AssignmentQueue::Assignment
std::pair< SimValue, SimValue * > Assignment
Type for the assignment: source value -> destination pointer.
Definition:
AssignmentQueue.hh:66
AssignmentQueue::addAssignment
void addAssignment(const SimValue &assignValue, SimValue *assignTarget, int latency)
SimValue.hh
AssignmentQueue::maxLatency_
int maxLatency_
Maximum possible latency.
Definition:
AssignmentQueue.hh:78
AssignmentQueue.icc
AssignmentQueue::assignmentQueue_
Assignments assignmentQueue_
Our assignment queue.
Definition:
AssignmentQueue.hh:72
AssignmentQueue::operator=
AssignmentQueue & operator=(const AssignmentQueue &)
Assignment not allowed.
AssignmentQueue::advanceClock
void advanceClock()
Generated by
1.8.17