OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_processor/] [aeMB/] [sw/] [aemb/] [heap.hh] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 17 alirezamon
/* $Id: heap.hh,v 1.6 2008-04-28 20:29:15 sybreon Exp $
2
**
3
** AEMB2 HI-PERFORMANCE CPU
4
** Copyright (C) 2004-2007 Shawn Tan Ser Ngiap 
5
**
6
** This file is part of AEMB.
7
**
8
** AEMB is free software: you can redistribute it and/or modify it
9
** under the terms of the GNU General Public License as published by
10
** the Free Software Foundation, either version 3 of the License, or
11
** (at your option) any later version.
12
**
13
** AEMB is distributed in the hope that it will be useful, but WITHOUT
14
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
** or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16
** License for more details.
17
**
18
** You should have received a copy of the GNU General Public License
19
** along with AEMB.  If not, see .
20
*/
21
 
22
/**
23
   Basic heap related functions
24
   @file heap.hh
25
 */
26
 
27
#ifndef _AEMB_HEAP_HH
28
#define _AEMB_HEAP_HH
29
 
30
#ifdef __cplusplus
31
extern "C" {
32
#endif
33
 
34
  /**
35
  Extracts the heap size from the linker
36
  @return heap size
37
  */
38
 
39 48 alirezamon
  static inline int aembGetHeapSize()
40 17 alirezamon
  {
41
    int tmp;
42
    asm ("la %0, r0, _HEAP_SIZE":"=r"(tmp));
43
    return tmp;
44
  }
45
 
46
  /**
47
  Extracts the heap end from the linker
48
  @return heap end
49
  */
50
 
51 48 alirezamon
  static inline int aembGetHeapEnd()
52 17 alirezamon
  {
53
    int tmp;
54
    asm ("la %0, r0, _heap_end":"=r"(tmp));
55
    return tmp;
56
  }
57
 
58
  /**
59
  Extracts the heap top from the linker
60
  @return heap top
61
  */
62
 
63 48 alirezamon
  static inline int aembGetHeapTop()
64 17 alirezamon
  {
65
    int tmp;
66
    asm ("la %0, r0, _heap":"=r"(tmp));
67
    return tmp;
68
  }
69
 
70
#ifdef __cplusplus
71
}
72
#endif
73
 
74
#endif
75
 
76
/*
77
  $Log: not supported by cvs2svn $
78
  Revision 1.5  2008/04/27 16:33:42  sybreon
79
  License change to GPL3.
80
 
81
  Revision 1.4  2008/04/26 19:31:35  sybreon
82
  Made headers C compatible.
83
 
84
  Revision 1.3  2008/04/26 18:05:22  sybreon
85
  Minor cosmetic changes.
86
 
87
  Revision 1.2  2008/04/20 16:35:53  sybreon
88
  Added C/C++ compatible #ifdef statements
89
 
90
  Revision 1.1  2008/04/09 19:48:37  sybreon
91
  Added new C++ files
92
 
93
*/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.