MatchLib
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
Functions
Files
File List
File Members
All
Macros
•
All
Classes
Namespaces
Files
Functions
Modules
Pages
Loading...
Searching...
No Matches
cmod
include
axi
AxiManagerGate
ReorderBufWBeats.h
1
/*
2
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License")
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef __REORDERBUFWBEATS_H__
18
#define __REORDERBUFWBEATS_H__
19
20
#include <ReorderBuf.h>
21
30
template
<
typename
Data,
unsigned
int
Depth,
unsigned
int
InFlight>
31
class
ReorderBufWBeats
:
public
ReorderBuf
<Data, Depth, InFlight> {
32
33
public
:
34
ReorderBufWBeats
() :
ReorderBuf<Data, Depth, InFlight>
() {}
35
36
bool
canReceiveBeats()
37
{
38
// Beats do not have a guaranteed space in storage
39
// since storage corresponds to vbits fifo,
40
// we can just check that vfifo is not full
41
return
(!
ReorderBuf<Data, Depth, InFlight>::vbits
.isFull());
42
}
43
44
void
addBeat(
const
Data& data) {
45
typename
ReorderBuf<Data, Depth, InFlight>::EntryNum entryNum =
46
ReorderBuf<Data, Depth, InFlight>::vbits
.get_tail();
47
ReorderBuf<Data, Depth, InFlight>::storage
.write(entryNum, 0, data);
48
// so that response can be read out later
49
ReorderBuf<Data, Depth, InFlight>::vbits
.push(
true
);
50
}
51
};
31
class
ReorderBufWBeats
:
public
ReorderBuf
<Data, Depth, InFlight> {
…
};
52
53
#endif
ReorderBuf
Reorder Buffer that allows out-of-order writes to queue and in-order reads.
Definition
ReorderBuf.h:68
ReorderBufWBeats
An extension of ReorderBuf that allows one entry to contain multiple beats of data.
Definition
ReorderBufWBeats.h:31
Generated on Thu Apr 24 2025 16:48:01 for MatchLib by
1.9.8