Add support for explicit parameter types, including real.

Before this, the types of parameters were always logic, only the
width and signed-ness could be controlled. A parameter may take
on implicit real values if the expression were real.

With this patch, the type for the parameter can be explicitly set
to logic or real. This also means that the parameter real valued
expressions need to be more crefully treated, possibly with casting
integral expressions to real values, or real expressions to integral
values.
This commit is contained in:
Stephen Williams
2008-05-17 16:25:58 -07:00
parent f588656dd5
commit c76e88cad5
14 changed files with 675 additions and 510 deletions
+5 -1
View File
@@ -94,10 +94,14 @@ class Module : public PScope, public LineInfo {
module is elaborated. During parsing, I put the parameters
into this map. */
struct param_expr_t : public LineInfo {
PExpr*expr;
param_expr_t() : range(0) { }
// Type information
ivl_variable_type_t type;
PExpr*msb;
PExpr*lsb;
bool signed_flag;
// Value expression
PExpr*expr;
// If there are range constrants, list them here
range_t*range;
};