File: param.h

package info (click to toggle)
covered 0.7.10-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,040 kB
  • sloc: ansic: 48,809; yacc: 11,650; xml: 8,838; tcl: 7,698; sh: 3,925; lex: 2,240; makefile: 362; perl: 329
file content (86 lines) | stat: -rw-r--r-- 2,970 bytes parent folder | download | duplicates (7)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef __PARAM_H__
#define __PARAM_H__

/*
 Copyright (c) 2006-2010 Trevor Williams

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by the Free Software
 Foundation; either version 2 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 See the GNU General Public License for more details.

 You should have received a copy of the GNU General Public License along with this program;
 if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/*!
 \file     param.h
 \author   Trevor Williams  (phase1geo@gmail.com)
 \date     8/22/2002
 \brief    Contains functions and structures necessary to handle parameters.
*/

#include <stdio.h>

#include "defines.h"


/*! \brief Searches specified module parameter list for matching parameter. */
mod_parm* mod_parm_find(
  const char* name,
  mod_parm* parm
);

/*! \brief Creates new module parameter and adds it to the specified list. */
mod_parm* mod_parm_add(
  char*        scope,
  static_expr* msb,
  static_expr* lsb,
  bool         is_signed,
  expression*  expr,
  int          type,
  func_unit*   funit,
  char*        inst_name
);

/*! \brief Outputs contents of module parameter list to standard output. */
void mod_parm_display( mod_parm* mparm );

/*! \brief Creates a new instance parameter for a generate variable */
void inst_parm_add_genvar( vsignal* sig, funit_inst* inst );

/*! \brief Performs bind of signal and expressions for the given instance parameter. */
void inst_parm_bind( inst_parm* iparm );

/*! \brief Adds parameter override to defparam list. */
void defparam_add( const char* scope, vector* expr );

/*! \brief Deallocates all memory associated with defparam storage from command-line */
void defparam_dealloc();

/*! \brief Sets the specified signal size according to the specified instance parameter */
void param_set_sig_size( vsignal* sig, inst_parm* icurr );

/*! \brief Evaluates parameter expression for the given instance. */
void param_expr_eval( expression* expr, funit_inst* inst );

/*! \brief Resolves all parameters for the specified instance. */
void param_resolve_inst( funit_inst* inst );

/*! \brief Resolves all parameters for the specified instance tree. */
void param_resolve( funit_inst* inst );

/*! \brief Outputs specified instance parameter to specified output stream. */
void param_db_write( inst_parm* iparm, FILE* file );

/*! \brief Deallocates specified module parameter and possibly entire module parameter list. */
void mod_parm_dealloc( mod_parm* parm, bool recursive );

/*! \brief Deallocates specified instance parameter and possibly entire instance parameter list. */
void inst_parm_dealloc( inst_parm* parm, bool recursive );

#endif