Files
iverilog/pform.h
T

550 lines
19 KiB
C++
Raw Permalink Normal View History

#ifndef IVL_pform_H
#define IVL_pform_H
1998-11-03 23:28:49 +00:00
/*
* Copyright (c) 1998-2015 Stephen Williams ([email protected])
1998-11-03 23:28:49 +00:00
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form 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
2012-08-28 18:41:23 -07:00
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1998-11-03 23:28:49 +00:00
*/
# include "netlist.h"
# include "HName.h"
2000-01-09 05:50:48 +00:00
# include "named.h"
1998-11-03 23:28:49 +00:00
# include "Module.h"
# include "Statement.h"
# include "AStatement.h"
1998-11-03 23:28:49 +00:00
# include "PGate.h"
# include "PExpr.h"
1999-07-03 02:12:51 +00:00
# include "PTask.h"
1998-11-25 02:35:53 +00:00
# include "PUdp.h"
1998-11-03 23:28:49 +00:00
# include "PWire.h"
# include "verinum.h"
2008-05-11 18:52:27 -07:00
# include "discipline.h"
2002-06-06 18:57:18 +00:00
# include <iostream>
1998-11-03 23:28:49 +00:00
# include <string>
# include <list>
2010-10-24 11:21:17 -07:00
# include <memory>
# include <cstdio>
1998-11-03 23:28:49 +00:00
/*
* These classes implement the parsed form (P-form for short) of the
2008-01-29 12:19:59 -08:00
* original Verilog source. the parser generates the pform for the
1998-11-03 23:28:49 +00:00
* convenience of later processing steps.
*/
/*
* Wire objects represent the named wires (of various flavor) declared
* in the source.
*
* Gate objects are the functional modules that are connected together
* by wires.
*
* Wires and gates, connected by joints, represent a netlist. The
* netlist is therefore a representation of the desired circuit.
*/
class PGate;
class PExpr;
2013-03-31 15:46:36 -07:00
class PPackage;
2006-09-23 04:57:19 +00:00
class PSpecPath;
2012-03-11 13:18:24 -07:00
class PClass;
class PPackage;
1999-06-02 15:38:46 +00:00
struct vlltype;
1998-11-03 23:28:49 +00:00
2000-07-29 17:58:20 +00:00
/*
* The min:typ:max expression s selected at parse time using the
2003-01-30 16:23:07 +00:00
* enumeration. When the compiler makes a choice, it also prints a
2000-07-29 17:58:20 +00:00
* warning if min_typ_max_warn > 0.
*/
extern enum MIN_TYP_MAX { MIN, TYP, MAX } min_typ_max_flag;
extern unsigned min_typ_max_warn;
PExpr* pform_select_mtm_expr(PExpr*min, PExpr*typ, PExpr*max);
2007-04-19 02:52:53 +00:00
/*
* This flag is true if the lexor thinks we are in a library source
* file.
*/
extern bool pform_library_flag;
1998-11-03 23:28:49 +00:00
/*
* These type are lexical types -- that is, types that are used as
* lexical values to decorate the parse tree during parsing. They are
* not in any way preserved once parsing is done.
*/
1999-05-29 02:36:17 +00:00
/* This is information about port name information for named port
connections. */
2000-01-09 05:50:48 +00:00
struct parmvalue_t {
2010-10-25 19:36:44 -07:00
list<PExpr*>*by_order;
list<named_pexpr_t>*by_name;
1999-05-29 02:36:17 +00:00
};
struct str_pair_t { ivl_drive_t str0, str1; };
2000-05-06 15:41:56 +00:00
2010-10-24 11:21:17 -07:00
struct net_decl_assign_t {
2008-02-24 19:40:54 -08:00
perm_string name;
PExpr*expr;
struct net_decl_assign_t*next;
};
1999-05-29 02:36:17 +00:00
/* The lgate is gate instantiation information. */
1998-11-03 23:28:49 +00:00
struct lgate {
inline lgate(int =0)
2010-07-23 15:58:00 -07:00
: parms(0), parms_by_name(0), file(NULL), lineno(0)
{ }
1998-11-03 23:28:49 +00:00
string name;
2010-10-25 19:36:44 -07:00
list<PExpr*>*parms;
list<named_pexpr_t>*parms_by_name;
2012-04-10 14:29:28 -07:00
pform_range_t range;
1999-02-15 02:06:15 +00:00
2000-11-30 17:31:42 +00:00
const char* file;
unsigned lineno;
1998-11-03 23:28:49 +00:00
};
2012-04-10 14:29:28 -07:00
extern std::list<pform_range_t>* make_range_from_width(uint64_t wid);
extern std::list<pform_range_t>* copy_range(std::list<pform_range_t>* orig);
2012-02-19 10:29:50 -08:00
/* Use this function to transform the parted form of the attribute
list to the attribute map that is used later. */
extern void pform_bind_attributes(map<perm_string,PExpr*>&attributes,
list<named_pexpr_t>*attr,
bool keep_attr =false);
/* The lexor calls this function to change the default nettype. */
extern void pform_set_default_nettype(NetNet::Type net,
const char*file,
unsigned lineno);
/* Return true if currently processing a program block. This can be
used to reject statements that cannot exist in program blocks. */
extern bool pform_in_program_block(void);
/* Return true if currently processing an interface. This can be
used to reject statements that cannot exist in interfaces. */
extern bool pform_in_interface(void);
2008-05-11 17:30:33 -07:00
/*
* Look for the given wire in the current lexical scope. If the wire
* (including variables of any type) cannot be found in the current
* scope, then return 0.
*/
extern PWire* pform_get_wire_in_scope(perm_string name);
2011-12-03 17:16:01 -08:00
extern PWire* pform_get_make_wire_in_scope(perm_string name, NetNet::Type net_type, NetNet::PortType port_type, ivl_variable_type_t vt_type);
1998-11-03 23:28:49 +00:00
/*
* The parser uses startmodule and endmodule together to build up a
* module as it parses it. The startmodule tells the pform code that a
* module has been noticed in the source file and the following events
* are to apply to the scope of that module. The endmodule causes the
* pform to close up and finish the named module.
2012-04-30 21:12:59 -07:00
*
* The program_block flag indicates that the module is actually a program
* block. The is_interface flag indicates that the module is actually
* an interface. These flags have implications during parse and during
2012-04-30 21:12:59 -07:00
* elaboration/code generation.
1998-11-03 23:28:49 +00:00
*/
2012-04-30 21:12:59 -07:00
extern void pform_startmodule(const struct vlltype&loc, const char*name,
bool program_block, bool is_interface,
list<named_pexpr_t>*attr);
extern void pform_check_timeunit_prec();
2008-11-02 20:08:38 -08:00
extern void pform_module_set_ports(vector<Module::port_t*>*);
/* This function is used to support the port definition in a
port_definition_list. In this case, we have everything needed to
define the port, all in one place. */
extern void pform_module_define_port(const struct vlltype&li,
2008-02-24 19:40:54 -08:00
perm_string name,
NetNet::PortType,
NetNet::Type type,
data_type_t*vtype,
list<named_pexpr_t>*attr);
2008-02-24 19:40:54 -08:00
extern Module::port_t* pform_module_port_reference(perm_string name,
const char*file,
unsigned lineno);
extern void pform_endmodule(const char*, bool inside_celldefine,
Module::UCDriveType uc_drive_def);
1998-11-03 23:28:49 +00:00
2012-03-11 13:18:24 -07:00
extern void pform_start_class_declaration(const struct vlltype&loc,
2013-10-30 18:35:00 -07:00
class_type_t*type,
2013-11-10 08:21:22 -08:00
data_type_t*base_type,
std::list<PExpr*>*base_exprs);
extern void pform_class_property(const struct vlltype&loc,
property_qualifier_t pq,
data_type_t*data_type,
std::list<decl_assignment_t*>*decls);
2013-03-14 20:08:32 -07:00
extern void pform_set_this_class(const struct vlltype&loc, PTaskFunc*net);
extern void pform_set_constructor_return(PFunction*net);
2013-06-16 18:14:50 -04:00
extern void pform_end_class_declaration(const struct vlltype&loc);
2012-03-11 13:18:24 -07:00
2008-02-24 19:40:54 -08:00
extern void pform_make_udp(perm_string name, list<perm_string>*parms,
2013-02-24 18:06:12 -08:00
std::vector<PWire*>*decl, list<string>*table,
Statement*init,
const char*file, unsigned lineno);
1998-11-25 02:35:53 +00:00
extern void pform_make_udp(perm_string name,
bool sync_flag, perm_string out_name,
PExpr*sync_init,
list<perm_string>*parms,
list<string>*table,
const char*file, unsigned lineno);
2013-02-14 17:53:47 -08:00
/*
* Package related functions.
*/
extern void pform_start_package_declaration(const struct vlltype&loc,
const char*type);
extern void pform_end_package_declaration(const struct vlltype&loc);
extern void pform_package_import(const struct vlltype&loc,
2013-03-31 15:46:36 -07:00
PPackage*pkg, const char*ident);
2013-02-17 14:42:07 -08:00
extern PExpr* pform_package_ident(const struct vlltype&loc,
2013-04-07 16:38:48 -07:00
PPackage*pkg, pform_name_t*ident);
2013-02-17 14:42:07 -08:00
/*
* Interface related functions.
*/
extern void pform_start_modport_item(const struct vlltype&loc, const char*name);
extern void pform_end_modport_item(const struct vlltype&loc);
extern void pform_add_modport_port(const struct vlltype&loc,
NetNet::PortType port_type,
2015-01-15 17:46:54 -08:00
perm_string name, PExpr*expr);
2013-02-17 16:22:24 -08:00
/*
* This creates an identifier aware of names that may have been
* imported from other packages.
*/
extern PEIdent* pform_new_ident(const pform_name_t&name);
/*
* Enter/exit name scopes. The push_scope function pushes the scope
* name string onto the scope hierarchy. The pop pulls it off and
* deletes it. Thus, the string pushed must be allocated.
*/
extern void pform_pop_scope();
2013-02-14 17:53:47 -08:00
/*
* Peek at the current (most recently active) scope.
*/
extern LexicalScope* pform_peek_scope();
2012-03-11 13:18:24 -07:00
extern PClass* pform_push_class_scope(const struct vlltype&loc, perm_string name);
extern PFunction*pform_push_constructor_scope(const struct vlltype&loc);
extern PPackage* pform_push_package_scope(const struct vlltype&loc, perm_string name);
2009-04-24 19:07:48 -07:00
extern PTask*pform_push_task_scope(const struct vlltype&loc, char*name,
bool is_auto);
extern PFunction*pform_push_function_scope(const struct vlltype&loc, const char*name,
2009-04-24 19:07:48 -07:00
bool is_auto);
extern PBlock*pform_push_block_scope(char*name, PBlock::BL_TYPE tt);
extern void pform_put_behavior_in_scope(AProcess*proc);
2003-04-14 03:37:47 +00:00
extern verinum* pform_verinum_with_size(verinum*s, verinum*val,
const char*file, unsigned lineno);
2003-04-14 03:37:47 +00:00
/*
* This function takes the list of names as new genvars to declare in
2009-08-22 13:57:40 +01:00
* the current module or generate scope.
*/
extern void pform_genvars(const struct vlltype&li, list<perm_string>*names);
extern void pform_start_generate_for(const struct vlltype&li,
char*ident1,
PExpr*init,
PExpr*test,
char*ident2,
PExpr*next);
extern void pform_start_generate_if(const struct vlltype&li, PExpr*test);
extern void pform_start_generate_else(const struct vlltype&li);
2008-02-09 22:19:42 -08:00
extern void pform_start_generate_case(const struct vlltype&lp, PExpr*test);
extern void pform_start_generate_nblock(const struct vlltype&lp, char*name);
2010-10-25 19:36:44 -07:00
extern void pform_generate_case_item(const struct vlltype&lp, list<PExpr*>*test);
extern void pform_generate_block_name(char*name);
extern void pform_endgenerate();
/*
* This function returns the lexically containing generate scheme, if
* there is one. The parser may use this to check if we are within a
* generate scheme.
*/
extern PGenerate* pform_parent_generate(void);
2014-12-15 11:25:35 +01:00
extern void pform_set_typedef(perm_string name, data_type_t*data_type,
std::list<pform_range_t>*unp_ranges);
2013-03-31 15:46:36 -07:00
/*
* This function makes a PECallFunction of the named function. Decide
* if this function is in the scope or is imported from a package.
*/
extern PECallFunction* pform_make_call_function(const struct vlltype&loc,
const pform_name_t&name,
2013-04-08 18:12:54 -07:00
const std::list<PExpr*>&parms);
extern PCallTask* pform_make_call_task(const struct vlltype&loc,
const pform_name_t&name,
const std::list<PExpr*>&parms);
extern void pform_make_foreach_declarations(const struct vlltype&loc,
std::list<perm_string>*loop_vars);
extern PForeach* pform_make_foreach(const struct vlltype&loc,
char*ident,
std::list<perm_string>*loop_vars,
Statement*stmt);
2013-03-31 15:46:36 -07:00
1998-11-03 23:28:49 +00:00
/*
* The makewire functions announce to the pform code new wires. These
* go into a module that is currently opened.
*/
2008-02-24 19:40:54 -08:00
extern void pform_makewire(const struct vlltype&li, perm_string name,
2005-07-07 16:22:49 +00:00
NetNet::Type type,
NetNet::PortType pt,
ivl_variable_type_t,
list<named_pexpr_t>*attr);
2005-07-07 16:22:49 +00:00
/* This form handles simple declarations */
2000-10-31 17:00:04 +00:00
extern void pform_makewire(const struct vlltype&li,
2012-04-10 14:29:28 -07:00
list<pform_range_t>*range,
2003-02-02 19:02:39 +00:00
bool signed_flag,
2004-05-25 19:21:06 +00:00
list<perm_string>*names,
2002-05-24 04:36:23 +00:00
NetNet::Type type,
2003-04-28 17:50:57 +00:00
NetNet::PortType,
2005-07-07 16:22:49 +00:00
ivl_variable_type_t,
list<named_pexpr_t>*attr,
PWSRType rt = SR_NET);
2005-07-07 16:22:49 +00:00
/* This form handles assignment declarations. */
extern void pform_makewire(const struct vlltype&li,
2010-10-25 19:36:44 -07:00
list<PExpr*>*delay,
2002-01-12 04:03:39 +00:00
str_pair_t str,
net_decl_assign_t*assign_list,
2005-07-07 16:22:49 +00:00
NetNet::Type type,
2012-09-03 09:13:52 -07:00
data_type_t*data_type);
2005-07-07 16:22:49 +00:00
2013-04-07 16:38:48 -07:00
extern void pform_makewire(const struct vlltype&li,
std::list<PExpr*>*delay,
str_pair_t str,
std::list<decl_assignment_t*>*assign_list,
NetNet::Type type,
data_type_t*data_type);
2011-12-18 12:00:18 -08:00
/* This form handles nets declared as structures. (See pform_struct_type.cc) */
extern void pform_makewire(const struct vlltype&li,
struct_type_t*struct_type,
NetNet::PortType,
list<perm_string>*names,
list<named_pexpr_t>*attr);
1999-12-30 19:06:14 +00:00
extern void pform_make_reginit(const struct vlltype&li,
2008-02-24 19:40:54 -08:00
perm_string name, PExpr*expr);
/* Look up the names of the wires, and set the port type,
i.e. input, output or inout. If the wire does not exist, create
it. The second form takes a single name. */
2001-11-10 02:08:49 +00:00
extern void pform_set_port_type(const struct vlltype&li,
2004-05-25 19:21:06 +00:00
list<perm_string>*names,
2012-04-10 14:29:28 -07:00
list<pform_range_t>*range,
2003-02-02 19:02:39 +00:00
bool signed_flag,
NetNet::PortType,
list<named_pexpr_t>*attr);
2012-03-09 18:54:05 -08:00
2012-05-25 15:58:29 -07:00
extern void pform_set_reg_idx(perm_string name,
std::list<pform_range_t>*indices);
2012-09-03 09:13:52 -07:00
extern void pform_set_data_type(const struct vlltype&li, data_type_t*, list<perm_string>*names, NetNet::Type net_type, list<named_pexpr_t>*attr);
2010-10-24 11:21:17 -07:00
2012-09-03 09:13:52 -07:00
extern void pform_set_struct_type(struct_type_t*struct_type, std::list<perm_string>*names, NetNet::Type net_type, std::list<named_pexpr_t>*attr);
2012-06-17 18:22:50 -07:00
extern void pform_set_string_type(const string_type_t*string_type, std::list<perm_string>*names, NetNet::Type net_type, std::list<named_pexpr_t>*attr);
2011-12-03 17:16:01 -08:00
2012-11-11 17:42:31 -08:00
extern void pform_set_class_type(class_type_t*class_type, std::list<perm_string>*names, NetNet::Type net_type, std::list<named_pexpr_t>*addr);
/* pform_set_attrib and pform_set_type_attrib exist to support the
$attribute syntax, which can only set string values to
attributes. The functions keep the value strings that are
passed in. */
2004-02-20 18:53:33 +00:00
extern void pform_set_attrib(perm_string name, perm_string key,
char*value);
2004-02-18 17:11:54 +00:00
extern void pform_set_type_attrib(perm_string name, const string&key,
char*value);
extern LexicalScope::range_t* pform_parameter_value_range(bool exclude_flag,
2008-05-12 21:26:38 -07:00
bool low_open, PExpr*low_expr,
bool hig_open, PExpr*hig_expr);
extern void pform_set_parameter(const struct vlltype&loc,
perm_string name,
ivl_variable_type_t type,
bool signed_flag,
2012-04-10 14:29:28 -07:00
list<pform_range_t>*range,
PExpr*expr, LexicalScope::range_t*value_range);
2008-05-12 21:26:38 -07:00
extern void pform_set_localparam(const struct vlltype&loc,
perm_string name,
ivl_variable_type_t type,
bool signed_flag,
2012-04-10 14:29:28 -07:00
list<pform_range_t>*range,
2008-05-12 21:26:38 -07:00
PExpr*expr);
extern void pform_set_specparam(const struct vlltype&loc,
perm_string name,
list<pform_range_t>*range,
PExpr*expr);
extern void pform_set_defparam(const pform_name_t&name, PExpr*expr);
2003-02-27 06:45:11 +00:00
/*
* Functions related to specify blocks.
*/
2006-09-23 04:57:19 +00:00
extern PSpecPath*pform_make_specify_path(const struct vlltype&li,
list<perm_string>*src, char pol,
bool full_flag, list<perm_string>*dst);
2007-02-12 01:52:21 +00:00
extern PSpecPath*pform_make_specify_edge_path(const struct vlltype&li,
int edge_flag, /*posedge==true */
2007-02-12 01:52:21 +00:00
list<perm_string>*src, char pol,
bool full_flag, list<perm_string>*dst,
PExpr*data_source_expression);
2010-10-25 19:36:44 -07:00
extern PSpecPath*pform_assign_path_delay(PSpecPath*obj, list<PExpr*>*delays);
2007-02-12 01:52:21 +00:00
2006-09-23 04:57:19 +00:00
extern void pform_module_specify_path(PSpecPath*obj);
2003-02-27 06:45:11 +00:00
/*
* pform_make_behavior creates processes that are declared with always
* or initial items.
*/
extern PProcess* pform_make_behavior(ivl_process_type_t, Statement*,
list<named_pexpr_t>*attr);
extern void pform_mc_translate_on(bool flag);
1998-11-03 23:28:49 +00:00
2013-02-24 18:06:12 -08:00
extern std::vector<PWire*>* pform_make_udp_input_ports(list<perm_string>*);
1998-11-25 02:35:53 +00:00
2004-05-25 19:21:06 +00:00
extern void pform_make_events(list<perm_string>*names,
2000-11-30 17:31:42 +00:00
const char*file, unsigned lineno);
/*
* Make real datum objects.
*/
2004-05-25 19:21:06 +00:00
extern void pform_make_reals(list<perm_string>*names,
const char*file, unsigned lineno);
2000-04-01 19:31:57 +00:00
1998-11-03 23:28:49 +00:00
/*
* The makegate function creates a new gate (which need not have a
* name) and connects it to the specified wires.
*/
2012-05-14 19:13:57 -07:00
extern void pform_makegates(const struct vlltype&loc,
PGBuiltin::Type type,
struct str_pair_t str,
2010-10-25 19:36:44 -07:00
list<PExpr*>*delay,
svector<lgate>*gates,
list<named_pexpr_t>*attr);
1998-11-03 23:28:49 +00:00
2012-05-14 19:13:57 -07:00
extern void pform_make_modgates(const struct vlltype&loc,
perm_string type,
2000-01-09 05:50:48 +00:00
struct parmvalue_t*overrides,
svector<lgate>*gates);
1998-11-03 23:28:49 +00:00
/* Make a continuous assignment node, with optional bit- or part- select. */
2010-10-25 19:36:44 -07:00
extern void pform_make_pgassign_list(list<PExpr*>*alist,
list<PExpr*>*del,
2000-05-06 15:41:56 +00:00
struct str_pair_t str,
2000-11-30 17:31:42 +00:00
const char* fn, unsigned lineno);
1999-07-24 02:11:19 +00:00
/* Given a port type and a list of names, make a list of wires that
can be used as task port information. */
extern std::vector<pform_tf_port_t>*pform_make_task_ports(const struct vlltype&loc,
NetNet::PortType pt,
2006-03-30 05:22:34 +00:00
ivl_variable_type_t vtype,
2003-06-13 00:27:09 +00:00
bool signed_flag,
2012-04-10 14:29:28 -07:00
list<pform_range_t>*range,
2004-05-25 19:21:06 +00:00
list<perm_string>*names,
bool isint = false);
1999-07-24 02:11:19 +00:00
extern std::vector<pform_tf_port_t>*pform_make_task_ports(const struct vlltype&loc,
2012-02-19 10:29:50 -08:00
NetNet::PortType pt,
data_type_t*vtype,
list<perm_string>*names);
2012-02-19 18:54:58 -08:00
/*
* The parser uses this function to convert a unary
2012-04-06 16:38:38 -07:00
* increment/decrement expression to the equivalent compressed
2012-02-19 18:54:58 -08:00
* assignment statement.
*/
extern PAssign* pform_compressed_assign_from_inc_dec(const struct vlltype&loc,
PExpr*exp);
1999-07-24 02:11:19 +00:00
1998-11-03 23:28:49 +00:00
/*
* These are functions that the outside-the-parser code uses the do
2008-01-29 12:19:59 -08:00
* interesting things to the Verilog. The parse function reads and
1998-11-03 23:28:49 +00:00
* parses the source file and places all the modules it finds into the
* mod list. The dump function dumps a module to the output stream.
*/
extern void pform_dump(ostream&out, Module*mod);
/* ** pform_discipline.cc
* Functions for handling the parse of natures and disciplines. These
* functions are in pform_disciplines.cc
*/
2008-05-11 18:52:27 -07:00
extern void pform_start_nature(const char*name);
extern void pform_end_nature(const struct vlltype&loc);
extern void pform_nature_access(const struct vlltype&loc, const char*name);
extern void pform_start_discipline(const char*name);
extern void pform_end_discipline(const struct vlltype&loc);
extern void pform_discipline_domain(const struct vlltype&loc, ivl_dis_domain_t use_domain);
2008-05-11 18:52:27 -07:00
extern void pform_discipline_potential(const struct vlltype&loc, const char*name);
extern void pform_discipline_flow(const struct vlltype&loc, const char*name);
extern void pform_attach_discipline(const struct vlltype&loc,
ivl_discipline_t discipline, list<perm_string>*names);
extern void pform_dump(ostream&out, const ivl_nature_s*);
extern void pform_dump(ostream&out, const ivl_discipline_s*);
/* ** pform_analog.cc
*/
extern void pform_make_analog_behavior(const struct vlltype&loc,
ivl_process_type_t type, Statement*st);
extern AContrib*pform_contribution_statement(const struct vlltype&loc,
PExpr*lval, PExpr*rval);
extern PExpr* pform_make_branch_probe_expression(const struct vlltype&loc,
char*name, char*n1, char*n2);
extern PExpr* pform_make_branch_probe_expression(const struct vlltype&loc,
char*name, char*branch);
2010-10-02 11:02:27 -07:00
/*
* Parse configuration file with format <key>=<value>, where key
* is the hierarchical name of a valid parameter name and value
* is the value user wants to assign to. The value should be constant.
*/
extern void parm_to_defparam_list(const string&param);
/*
* Tasks to set the timeunit or timeprecision for SystemVerilog.
*/
extern bool get_time_unit(const char*cp, int &unit);
extern int pform_get_timeunit();
extern void pform_set_timeunit(const char*txt, bool in_module, bool only_check);
extern void pform_set_timeprecision(const char*txt, bool in_module,
bool only_check);
#endif /* IVL_pform_H */