Commit Graph

39 Commits

Author SHA1 Message Date
Stephen Williams f0bf64271b SystemVerilog has more lax rules for function declarations.
Allow empty parameter lists
Allow lists of statements instead of simple statements.
2011-09-17 12:10:05 -07:00
Stephen Williams cced1e771b Remove some uses of the svector template.
I'm adding more uses of the make_range_from_width function, so
it seems like time to get rid of its use of the svector template.
This thread led to a lot of other uses of svector that had to
also be removed.
2010-10-25 19:36:44 -07:00
Martin Whitaker b4f070e60b Rework of lexical scope handling in parser.
This patch modifies the parser to use a single stack to track lexical
scopes, rather than starting a new stack for each generate construct.
2010-01-12 10:41:43 -08:00
Martin Whitaker 04377151bc Checks for illegal use of automatically allocated variables.
This patch adds a number of compile and run-time checks for illegal
uses of variables declared in automatic tasks and functions. It
also adds a check for event expressions in automatic tasks that use
features not yet supported in VVP.
2008-11-11 20:45:19 -08:00
Larry Doolittle 3adcbb5611 Shadow reduction part 2
Continue cleaning up shadowed variables, flagged by turning on -Wshadow.
No intended change in functionality.  Patch looks right, and is tested
to compile and run on my machine.  No regressions in test suite.
2008-10-13 20:12:47 -07:00
Martin Whitaker 082e06edb0 Remove checks for constant expressions from the parser.
This patch removes all the checks for constant expressions performed
during the parsing phase, as these checks are (mostly) repeated during
elaboration. It adds the missing check in the elaboration phase (the
RHS of a register initialisation), and improves the error reporting
and error recovery in other checks.

This patch fixes pr2132552, which was caused by a fault in the parser
constant expression checking.
2008-10-09 11:11:32 -07:00
Cary R 7beb059d90 Add blocking repeat event control, make repeat sign aware
This patch adds blocking repeat event controls and also makes the
base repeat statement sign aware. If the argument to repeat is
negative (it must be a signed variable) then this is treated just
like an argument of 0 (there is no looping). Doing this allows us
to model the repeat event control as follows.

  lhs = repeat(count) @(event) rhs;

is translated to:

  begin
    temp = rhs;
    repeat (count) @(event);
    lhs = temp;
  end

This patch also pushes the non-blocking event control
information to the elaboration phase where it will report they
are not currently supported.
2008-09-03 19:35:54 -07:00
Stephen Williams 15481a9520 Elaborate block scopes burried in generate schemes.
Named begin/end blocks burried within generate schemes need to be
elaborated. Handle this by remembering to elaborate_scope on the
statements within the generate scheme.

In the process, clean up/regularize some of the member names and
methods.
2008-06-17 21:45:37 -07:00
Stephen Williams b0e4a6884a Objects of lexical scope use PScope base class.
All the pform objects that represent lexical scope now are derived
from the PScope class, and are kept in a lexical_scope table so that
the scope can be managed.
2008-02-15 21:20:24 -08:00
steve ddd36ecb6c Rework the heirarchical identifier parse syntax and pform
to handle more general combinations of heirarch and bit selects.
2007-05-24 04:07:11 +00:00
steve 27af95d402 Use perm_strings for named langiage items. 2004-02-18 17:11:54 +00:00
steve 52bf4e613f conditional ident string using autoconfig. 2002-08-12 01:34:58 +00:00
steve 5882c6a481 Redo handling of assignment internal delays.
Leave it possible for them to be calculated
 at run time.
2002-04-21 22:31:02 +00:00
steve b094bbdcf4 Add support for conbinational events by finding
the inputs to expressions and some statements.
 Get case and assignment statements working.
2002-04-21 04:59:07 +00:00
steve ab6c8cb4b8 Parser and pform use hierarchical names as hname_t
objects instead of encoded strings.
2001-12-03 04:47:14 +00:00
steve 82831ea9a5 Use NetScope instead of string for scope path. 2001-11-22 06:20:59 +00:00
steve b825f8d2b2 Create a config.h.in file to hold all the config
junk, and support gcc 3.0. (Stephan Boettcher)
2001-07-25 03:10:48 +00:00
steve 739365abe5 Parse disable statements to pform. 2000-07-26 05:08:07 +00:00
steve 367db72c99 Add support for procedural continuous assignment. 2000-05-11 23:37:26 +00:00
steve 44838f8973 Add support for force assignment. 2000-04-22 04:20:19 +00:00
steve b1fd927acb Named events really should be expressed with PEIdent
objects in the pform,

 Handle named events within the mix of net events
 and edges. As a unified lot they get caught together.
 wait statements are broken into more complex statements
 that include a conditional.

 Do not generate NetPEvent or NetNEvent objects in
 elaboration. NetEvent, NetEvWait and NetEvProbe
 take over those functions in the netlist.
2000-04-12 04:23:57 +00:00
steve 2dd010dc04 Named events as far as the pform. 2000-04-01 19:31:57 +00:00
steve b734ecf02f Macintosh compilers do not support ident. 2000-02-23 02:56:53 +00:00
steve a64a33e65a Full case support 1999-09-29 18:36:02 +00:00
steve da4a7ea80a assignment with blocking event delay. 1999-09-22 02:00:48 +00:00
steve 8f68a07476 Add support for delayed non-blocking assignments. 1999-09-04 19:11:45 +00:00
steve 6fb7120158 Parse non-blocking assignment delays. 1999-09-02 01:59:27 +00:00
steve 6852a62e5a procedural blocking assignment delays. 1999-07-12 00:59:36 +00:00
steve 11b2b1740a Handle expression widths for EEE and NEE operators,
add named blocks and scope handling,
 add registers declared in named blocks.
1999-06-24 04:24:18 +00:00
steve 853ad247a1 Elaborate and supprort to vvm the forever
and repeat statements.
1999-06-19 21:06:16 +00:00
steve fabb146342 Support case expression lists. 1999-06-15 05:38:39 +00:00
steve 740c63291a l-value part select for procedural assignments. 1999-06-13 23:51:16 +00:00
steve 7605a7b1f0 Add parse and elaboration of non-blocking assignments,
Replace list<PCase::Item*> with an svector version,
 Add integer support.
1999-06-06 20:45:38 +00:00
steve 5de9b7c9f1 Parse and elaborate the concatenate operator
in structural contexts, Replace vector<PExpr*>
 and list<PExpr*> with svector<PExpr*>, evaluate
 constant expressions with parameters, handle
 memories as lvalues.

 Parse task declarations, integer types.
1999-05-10 00:16:57 +00:00
steve 8bdd381cdf Parse and elaborate the Verilog CASE statement. 1999-02-03 04:20:11 +00:00
steve fb439c78b9 Add the LineInfo class to carry the source file
location of things. PGate, Statement and PProcess.

 elaborate handles module parameter mismatches,
 missing or incorrect lvalues for procedural
 assignment, and errors are propogated to the
 top of the elaboration call tree.

 Attach line numbers to processes, gates and
 assignment statements.
1999-01-25 05:45:56 +00:00
steve 6b2fa19429 Handle while loops. 1998-11-11 03:13:04 +00:00
steve b118634189 Handle procedural conditional, and some
of the conditional expressions.

 Elaborate signals and identifiers differently,
 allowing the netlist to hold signal information.
1998-11-07 17:05:05 +00:00
steve 3fb7a053be Introduce verilog to CVS. 1998-11-03 23:28:49 +00:00