OpenCores
URL https://opencores.org/ocsvn/jtag_stapl_player/jtag_stapl_player/trunk

Subversion Repositories jtag_stapl_player

[/] [jtag_stapl_player/] [trunk/] [jamheap.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sukhanov
/****************************************************************************/
2
/*                                                                                                                                                      */
3
/*      Module:                 jamheap.h                                                                                               */
4
/*                                                                                                                                                      */
5
/*                                      Copyright (C) Altera Corporation 1997                                   */
6
/*                                                                                                                                                      */
7
/*      Description:    Prototypes for heap management functions                                */
8
/*                                                                                                                                                      */
9
/*      Revisions:              1.1     added jam_free_heap() and jam_free_temp_workspace()     */
10
/*                                                                                                                                                      */
11
/****************************************************************************/
12
 
13
/****************************************************************************/
14
/*                                                                                                                                                      */
15
/*      Actel version 1.1             May 2003                                                                  */
16
/*                                                                                                                                                      */
17
/****************************************************************************/
18
 
19
#ifndef INC_JAMHEAP_H
20
#define INC_JAMHEAP_H
21
 
22
/****************************************************************************/
23
/*                                                                                                                                                      */
24
/*      Type definitions                                                                                                                */
25
/*                                                                                                                                                      */
26
/****************************************************************************/
27
 
28
/* types of stack records */
29
typedef enum
30
{
31
        JAM_ILLEGAL_HEAP_TYPE = 0,
32
        JAM_HEAP_INTEGER_ARRAY,
33
        JAM_HEAP_BOOLEAN_ARRAY,
34
        JAM_HEAP_BOOLEAN_ARRAY_CACHE,
35
        JAM_HEAP_MAX
36
 
37
} JAME_HEAP_RECORD_TYPE;
38
 
39
/* codes for Boolean data representation schemes */
40
typedef enum
41
{
42
        JAM_ILLEGAL_REP,
43
        JAM_BOOL_COMMA_SEP,
44
        JAM_BOOL_BINARY,
45
        JAM_BOOL_HEX,
46
        JAM_BOOL_RUN_LENGTH,
47
        JAM_BOOL_COMPRESSED
48
 
49
} JAME_BOOLEAN_REP;
50
 
51
/* heap record structure */
52
typedef struct JAMS_HEAP_STRUCT
53
{
54
        struct JAMS_HEAP_STRUCT *next;
55
        JAMS_SYMBOL_RECORD *symbol_record;
56
        JAME_BOOLEAN_REP rep;   /* data representation format */
57
        BOOL cached;            /* TRUE if array data is cached */
58
        long dimension;         /* number of elements in array */
59
        long position;          /* position in file of initialization data */
60
        long data[1];           /* first word of data (or cache buffer) */
61
 
62
} JAMS_HEAP_RECORD;
63
 
64
/****************************************************************************/
65
/*                                                                                                                                                      */
66
/*      Global variables                                                                                                                */
67
/*                                                                                                                                                      */
68
/****************************************************************************/
69
 
70
extern JAMS_HEAP_RECORD *jam_heap;
71
 
72
extern void *jam_heap_top;
73
 
74
/****************************************************************************/
75
/*                                                                                                                                                      */
76
/*      Function prototypes                                                                                                             */
77
/*                                                                                                                                                      */
78
/****************************************************************************/
79
 
80
JAM_RETURN_TYPE jam_init_heap
81
(
82
        void
83
);
84
 
85
void jam_free_heap
86
(
87
        void
88
);
89
 
90
JAM_RETURN_TYPE jam_add_heap_record
91
(
92
        JAMS_SYMBOL_RECORD *symbol_record,
93
        JAMS_HEAP_RECORD **heap_record,
94
        long dimension
95
);
96
 
97
void *jam_get_temp_workspace
98
(
99
        long size
100
);
101
 
102
void jam_free_temp_workspace
103
(
104
        void *ptr
105
);
106
 
107
#endif /* INC_JAMHEAP_H */

powered by: WebSVN 2.1.0

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