params.h
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
#ifndef _PARAMS_H_
#define _PARAMS_H_
#if defined(FLASH) && !defined(CONST_GLOBALS)
extern "C" {
#endif
#include "tcl_init.h"
#include "simtypes.h"
#define PARAM_INT TCL_LINK_INT
#define PARAM_DOUBLE TCL_LINK_DOUBLE
#define PARAM_BOOLEAN TCL_LINK_BOOLEAN
#define PARAM_STRING TCL_LINK_STRING
/* RPB -- hack for now */
#define PARAM_LL 5
extern void ParamGrabbedAtStartup(char *varName);
extern void SetAdditionalParams(Tcl_Interp *interp);
extern void ParamRegister(char *varName, char *addr, int type);
extern int ParamLookup(void *valptr, char *name, int type);
extern char *ParamAccess(ClientData, Tcl_Interp *, char *, char *, int);
#ifdef FLASH
/* Provide a means for setting defaults for PARAM vars from C */
#define ParamDefault(NAME,VAL) { \
Tcl_SetVar2(TCLInterp, "PARAM", NAME, VAL, TCL_GLOBAL_ONLY); \
ParamAccess(NULL, TCLInterp, "PARAM", NAME, TCL_TRACE_WRITES); \
}
#endif
#ifndef FLASH
void InitCPUModel(CPUType cmdLineCPU);
#endif
#if defined(FLASH) && !defined(CONST_GLOBALS)
}
#endif
/*
* Type used to determine the current scope when parsing machine tcl blocks
*/
typedef enum { MACHINE_TOP, MACHINE_BLOCK, MACHINE_VAL } MachineScopeType;
extern char *MemFileDir;
extern char *DevFileDir;
#endif