Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / model / verilog / niu / sparse_mem_model / loadpli / veriuser.c
CommitLineData
86530b38
AT
1
2#ifdef WIN32
3# define Dll_Export __declspec(dllexport)
4#else
5# define Dll_Export
6#endif
7
8
9#include "veriuser.h"
10#include "acc_user.h"
11
12#ifndef accVersionLatest
13#include "vxl_acc_user.h"
14#include "vxl_veriuser.h"
15#endif
16
17#include "sparse_mem_model_funext.h"
18
19
20Dll_Export char *veriuser_version_str =
21 "=== OpenSparc T2 sparse_mem_model loadpli ===\n";
22
23
24Dll_Export bool err_intercept(level,facility,code)
25int level;
26char *facility;
27char *code;
28{
29return(true);
30}
31
32Dll_Export static s_tfcell sparse_mem_model_veriusertfs[] =
33{
34 /*** Template for an entry:
35 * { usertask|userfunction, data,
36 * checktf(), sizetf(), calltf(), misctff(),
37 * "$tfname", forwref?, Vtool?, ErrMsg?
38 * },
39 * Example:
40 * { usertask, 0, my_check, 0, my_func, my_misctf, "$my_task"
41 * },
42 * ***/
43
44# include "sparse_mem_model_fundef.c"
45
46/*** add user entries here ***/
47
48{0} /*** final entry must be 0 ***/
49
50};
51Dll_Export p_tfcell sparse_mem_model_pli_boot()
52{
53io_printf("*** Registering OpenSparc T2 sparse_mem_model system tasks...\n");
54return sparse_mem_model_veriusertfs;
55}
56
57#ifdef MTI
58# ifdef linux
59# include <malloc.h>
60# endif
61
62Dll_Export void init_usertfs()
63{
64 p_tfcell usertf;
65
66# ifdef linux
67 mallopt(M_MMAP_MAX, (sizeof(void*) > 4) ? 4096*1024 : 65536);
68# endif
69
70 for (usertf = veriusertfs; usertf; usertf++){
71 if (usertf->type == 0)
72 return;
73 mti_RegisterUserTF(usertf);
74 }
75}
76#endif
77
78Dll_Export int (*endofcompile_routines[])() =
79{
80/*** my_eoc_routine, ***/
810 /*** final entry must be 0 ***/
82};