Commit Graph

10116 Commits

Author SHA1 Message Date
Maciej Suminski 3710d35dd1 Added missing brackets 2016-09-19 12:53:06 -07:00
Maciej Suminski aaf0a9e623 vhdlpp: Accept uppercase letters in based literals 2016-09-19 12:46:24 -07:00
Martin Whitaker 080dd0323d Fix for GitHub issue #127 - coerce output ports to inout when necessary. 2016-09-17 19:20:48 +01:00
Cary R 5853e32f82 Fix some cppcheck warning issues 2016-09-13 23:45:25 -07:00
Cary R c706c5dd90 The array properties can be available in a constant context
For most arrays the various properties are available as constant
values and can be evaluated in the compiler.
2016-09-11 14:25:00 -07:00
Martin Whitaker 3c9b39846c Use gn_system_verilog() where appropriate.
Replace explicit comparisons against generation_flag with calls to
the gn_system_verilog helper function, both for code clarity and
to fix a couple of bugs. Also simplify the implementation of the
function, as we already rely on the generation_flag enumeration
being an ordered list.
2016-09-08 23:00:48 +01:00
Daniel Andrade fb2cd4775f Added missing compilation instruction on README 2016-09-04 00:51:57 -03:00
Stephen Williams 301e85a8ca Merge pull request #122 from orsonmmz/resize_fix
vhdlpp update
2016-09-02 10:01:02 -07:00
Maciej Suminski 5dd2e6a7c8 vhdlpp: Corrected standard library function headers 2016-09-01 12:08:44 +02:00
Maciej Suminski 8ba3d62071 vhdlpp: Better resize() implementation.
Previous version did not work well with signed expressions or expressions that
were temporarily resized (e.g. a + 32'd42, where a is a[7:0]).
2016-09-01 12:08:44 +02:00
Maciej Suminski bab39dae19 vhdlpp: Some of the standard library functions are imported only on request
Previously they have been always enabled, now it is required to put a
'use' directive.
2016-09-01 12:08:44 +02:00
Maciej Suminski 089dd037d6 vhdlpp: Use the wider variable size for arith operations on (un)signed 2016-09-01 12:08:44 +02:00
Maciej Suminski 25f4a54852 vhdlpp: Subprograms are matched once. ExpFunc::probe_type() return exact type 2016-09-01 12:08:44 +02:00
Maciej Suminski 8f86004100 vhdlpp: Clearer error messages 2016-09-01 12:08:44 +02:00
Maciej Suminski 07543315cf vhdlpp: Stricter array type matching
Arrays type match if they have a common parent, instead of the
element type. Now (un)signed & std_logic_vector types do not match,
as it should be in VHDL.
2016-09-01 12:08:43 +02:00
Maciej Suminski fe77b0ac87 vhdlpp: VTypeArray::dimensions() returns std::vector<range_t> 2016-09-01 12:08:43 +02:00
Maciej Suminski 643a3f2f2c vhdlpp: Do not evaluate generics.
They might change depending on the instance, so they cannot be evaluated using the default value.
2016-09-01 12:08:43 +02:00
Maciej Suminski ed3e67926f vhdlpp: Evaluate conditional signal assignments upon simulation start. 2016-09-01 12:08:43 +02:00
Maciej Suminski 798adc9863 vhdlpp: Support for unary sign operator. 2016-09-01 12:08:43 +02:00
Maciej Suminski 9e95ae5859 vhdlpp: Moved Exp*::dump() methods from debug.cc to expression_debug.cc. 2016-09-01 12:08:39 +02:00
Stephen Williams d44c814bab Remove .alias records from vvp generated code.
Net arrays can be handled by nets directly, instead of creating
.alias records.
2016-08-31 14:05:09 -07:00
Martin Whitaker 41075a45e6 Fix for GitHub issue #121 - correctly determine ivl_root.
Pull request #116 added the ability for the iverilog driver to determine
ivl_root from the location of the iverilog executable (this is needed to
support relocation at the time iverilog is installed). However, the code
did not support the possible variations in the library path name.
2016-08-24 00:00:24 +01:00
Cary R a2fbdeff78 Add some pass by reference to vvp 2016-08-14 22:26:16 -07:00
Cary R ad5a7f7ca3 Update cppcheck vvp suppression file 2016-08-14 21:18:55 -07:00
Cary R d0e0776910 Make the base class match the derived classes regarding passing by reference 2016-08-14 21:18:44 -07:00
Cary R 255701a787 Fix space issue 2016-08-14 20:55:55 -07:00
Cary R 5f1e63604c Update cppcheck vpi suppression file 2016-08-14 20:53:57 -07:00
Cary R 9cf23b4c3b Make getting ivl_root more robust 2016-08-14 19:41:35 -07:00
Cary R 446e825ed3 Fix space issues 2016-08-14 19:37:40 -07:00
Cary R 1d4230472a Fix getting timeunit outside of module to use a defined check value 2016-08-14 17:26:23 -07:00
Cary R 13189f7431 Update fstapi.c to latest from GTKWave 2016-08-14 12:46:48 -07:00
Martin Whitaker b51e58fa9d Fix for br1007 - out-of-range constant bit select should be a warning.
An out-of-range constant bit select on the LHS of an assignment was being
treated as an error, whereas an out-of range constant part select would
only result in a warning. In any other context, either case would result
in a warning, so convert the error to a warning.

In addition, all warnings for out-of-range or undefined constant bit/part
selects should be controlled by -Wselect-range.
2016-08-08 22:10:16 +01:00
Martin Whitaker 8461e1d9c4 Fix vlog95 target to handle hierarchical references in root-level tasks. 2016-07-26 22:01:22 +01:00
Martin Whitaker 2bc42fc6e2 Fix for GitHub issue #104 - assigning hierarchical signal from top level task.
When emitting a design, all scopes must be emitted before emitting any
top level task/function/method definitions, otherwise hierarchical
references can't always be resolved.
2016-07-26 22:01:22 +01:00
Martin Whitaker 7d5f6c551a Fix unused variable warning and assumed buffer size from last merge. 2016-07-23 12:01:58 +01:00
Martin Whitaker 191811f78f Merge branch 'conda-fix' of https://github.com/tfors/iverilog 2016-07-23 11:40:09 +01:00
Martin Whitaker b1b91f49c8 Update vlog95 target to handle timescales for root scope tasks/functions. 2016-07-23 00:10:01 +01:00
Martin Whitaker 27213f2af8 Fix for GitHub issue #115 - synthesis aborts on case with max guard of 0.
The calculation of the required multiplexer width was incorrect for
the corner case of a single guard value of zero.
2016-07-22 23:09:36 +01:00
Martin Whitaker 7bed181f68 Support timescales in design units that aren't inside a module.
SystemVerilog allows tasks, functions, and classes to be defined at the
root level or inside packages, so we can't rely on an enclosing module
being present to provide the timescale.
2016-07-22 22:48:20 +01:00
Martin Whitaker e316cc708b Fix assignment of outputs from class methods.
As for inputs, skip over the implicit 'this' parameter.
2016-07-21 19:06:21 +01:00
Martin Whitaker b8f9ed27c5 Fix for br1003 - prevent segfault when delays are used outside a module. 2016-07-21 08:40:45 +01:00
Thomas Fors cada40ebd1 Updated comments 2016-07-18 08:10:41 -05:00
Thomas Fors 3afbb903d6 Use /proc/self/exe on linux, if it exists, to find ivl_root 2016-07-18 08:05:16 -05:00
Yury Gribov 43cd693fe0 Put start events to proper queue. 2016-07-17 09:47:08 -07:00
Stephen Williams c37d6ac3ac Merge branch 'master' of github.com:steveicarus/iverilog
Conflicts:
	vhdlpp/parse_misc.cc
	vhdlpp/vtype.cc
2016-07-17 09:36:34 -07:00
Martin Whitaker ad1101cc80 Fix for br1005 - segfault when SV queue is declared inside a class.
For now, output a "sorry" message to indicate this is not yet
supported.
2016-07-11 20:04:24 +01:00
Martin Whitaker ad87704809 Partial fix for br1006 - allow part selects in path declarations.
This just enables the compiler to parse path declarations that
contain part selects. As for bit selects, the part select is
discarded, and if elaboration of specify blocks is enabled,
the path declaration will be applied to the entire vector. If
elaboration is enabled, a warning message will now be output
when a bit or part select is discarded.
2016-07-10 20:00:39 +01:00
Martin Whitaker 7f612270b3 Improved fix for GitHub issue #112.
This does a better job of setting the intermediate expression types
and widths when calculating the canonical index into a packed array.
It still doesn't properly handle out-of-bound indices (br953).
2016-07-10 13:30:58 +01:00
Martin Whitaker 1448210f28 Fix for GitHub issue 112 - index calculation for >2D packed arrays. 2016-07-09 23:33:33 +01:00
Martin Whitaker d496b095ff Fix vector width calculation for multi-dimensional packed arrays. 2016-07-09 17:10:22 +01:00