SystemC
Recoding Infrastructure for SystemC v0.6.0 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
Main Page
Namespaces
Classes
Files
File List
File Members
sysc
communication
sc_semaphore_if.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
The following code is derived, directly or indirectly, from the SystemC
4
source code Copyright (c) 1996-2014 by all Contributors.
5
All Rights reserved.
6
7
The contents of this file are subject to the restrictions and limitations
8
set forth in the SystemC Open Source License (the "License");
9
You may not use this file except in compliance with such restrictions and
10
limitations. You may obtain instructions on how to receive a copy of the
11
License at http://www.accellera.org/. Software distributed by Contributors
12
under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13
ANY KIND, either express or implied. See the License for the specific
14
language governing rights and limitations under the License.
15
16
*****************************************************************************/
17
18
/*****************************************************************************
19
20
sc_semaphore_if.h -- The sc_semaphore_if interface class.
21
22
Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21
23
24
CHANGE LOG IS AT THE END OF THE FILE
25
*****************************************************************************/
26
27
#ifndef SC_SEMAPHORE_IF_H
28
#define SC_SEMAPHORE_IF_H
29
30
#include "
sysc/communication/sc_interface.h
"
31
32
namespace
sc_core {
33
34
/**************************************************************************/
40
class
sc_semaphore_if
41
:
virtual
public
sc_interface
42
{
43
public
:
44
45
// the classical operations: wait(), trywait(), and post()
46
47
// lock (take) the semaphore, block if not available
48
53
// 08/19/2015 GL: modified for the OoO simulation
54
virtual
int
wait
(
int
) = 0;
55
56
// lock (take) the semaphore, return -1 if not available
57
virtual
int
trywait
() = 0;
58
59
// unlock (give) the semaphore
60
virtual
int
post
() = 0;
61
62
// get the value of the semphore
63
virtual
int
get_value
()
const
= 0;
64
65
protected
:
66
67
// constructor
68
69
sc_semaphore_if
()
70
{}
71
72
private
:
73
74
// disabled
75
sc_semaphore_if
(
const
sc_semaphore_if
& );
76
sc_semaphore_if
& operator = (
const
sc_semaphore_if
& );
77
};
78
79
}
// namespace sc_core
80
81
//$Log: sc_semaphore_if.h,v $
82
//Revision 1.3 2011/08/26 20:45:42 acg
83
// Andy Goodrich: moved the modification log to the end of the file to
84
// eliminate source line number skew when check-ins are done.
85
//
86
//Revision 1.2 2011/02/18 20:23:45 acg
87
// Andy Goodrich: Copyright update.
88
//
89
//Revision 1.1.1.1 2006/12/15 20:20:04 acg
90
//SystemC 2.3
91
//
92
//Revision 1.2 2006/01/03 23:18:26 acg
93
//Changed copyright to include 2006.
94
//
95
//Revision 1.1.1.1 2005/12/19 23:16:43 acg
96
//First check in of SystemC 2.1 into its own archive.
97
//
98
//Revision 1.8 2005/06/10 22:43:55 acg
99
//Added CVS change log annotation.
100
//
101
102
#endif
103
104
// Taf!
sc_core::sc_semaphore_if::post
virtual int post()=0
sc_core::sc_semaphore_if::wait
virtual int wait(int)=0
A new parameter segment ID is added for the out-of-order simulation.
sc_core::sc_semaphore_if::get_value
virtual int get_value() const =0
sc_core::sc_semaphore_if::sc_semaphore_if
sc_semaphore_if()
Definition:
sc_semaphore_if.h:69
sc_core::sc_semaphore_if
The sc_semaphore_if interface class.
Definition:
sc_semaphore_if.h:40
sc_core::sc_semaphore_if::trywait
virtual int trywait()=0
sc_core::sc_interface
Abstract base class of all interface classes.
Definition:
sc_interface.h:44
sc_interface.h
Generated on Mon Sep 30 2019 13:16:43 for SystemC by
1.8.5