Commit Graph

7149 Commits

Author SHA1 Message Date
Cary R 589bb59268 Implement %disable/fork in run time. 2013-10-18 17:22:10 -07:00
Cary R e12d2b2f36 Explicitly instantiate coerce_to_width() for vvp_vector4_t 2013-10-18 14:38:38 -07:00
Cary R c64b8900ca Add support for disable fork to the compiler. 2013-10-17 19:34:57 -07:00
Cary R 1cd72d375c Fix the label count for the join_any and join_none cases 2013-10-17 15:43:01 -07:00
Cary R aa9a7435dd Start of support for %disable/fork opcode. 2013-10-17 15:10:58 -07:00
Cary R 12c588fc35 Mostly fix a portability problem in $rtoi (run time) 2013-10-11 17:32:58 -07:00
Cary R 8f0687adb7 Fix white space issue. 2013-10-11 11:27:46 -07:00
Cary R 281556e93d Fix another real to vpiIntVal conversion in the run time 2013-10-11 11:26:17 -07:00
Cary R a196af8e15 Rework constant system function code and add $rtoi and $itor 2013-10-11 10:52:02 -07:00
Cary R 7b07fca285 Fix $rtoi to correctly convert NaN and +/- infinity 2013-10-11 10:49:45 -07:00
Cary R 095cedb305 Fix real to vpiIntVal conversion in run time 2013-10-11 10:49:28 -07:00
Cary R d5823b3e55 update a copyright and fix the define order. 2013-10-07 16:51:48 -07:00
Jared Casper 51ca2d1243 Fix using array elements in expressions with an array element lval.
When you have an expression like this (extreme example):

a[idx[1]][idx[2]*4 +: 4] <= #(idx[3]) 4'ha;

where a is a reg array and idx is a reg or net array.  The retrieval
of idx[2] was clobbering index register 3, which was set before
evaluating the part offset expression, then used in the %set/av of the
array value.  (likewise for idx[1] and idx[3]])

To avoid this issue, this patch adds and uses a new instruction
%ix/mov which simply copies one indexed register to another.  When
necessary, expressions are first evaluated into temporary registers to
avoid clobbering, then moved in to place before the %*/av instruction.
2013-10-07 16:47:50 -07:00
Jared Casper ec8081f983 Handle `", `\`", and `` in macro definitions.
Implements page 644 of IEEE 1800-2012.

`` is now overloaded with the Icarus-specific "stringify" expansions.
It is now used as indicated in 1800-2012 when appearing inside a macro
definition, and the Icarus way when not.  To do so, it uses the fact
that istack->file is NULL iff we are processing expanded macro text,
which is a bit of hack but works as is.

`" and `\`" on the other hand are treated the same inside and outside
of macro definitions.
2013-10-07 16:16:00 -07:00
Martin Whitaker 34643d9628 Fix for br937.
When writing a string value, vpi_put_value cannot assume the target vector
is a multiple of 8 bits wide.
2013-09-28 17:17:38 +01:00
Cary R 68db6c5a65 The seed passed to $random() should not change the implicit seed. 2013-09-23 17:44:13 -07:00
Cary R d564e054e5 vlog95: translate most do/while loops 2013-09-23 17:31:39 -07:00
Cary R 8616e3d6fa Fix space/tab problem. 2013-09-23 10:32:54 -07:00
Cary R 2c2ab24c8f Fix problem when compiling with valgrind support 2013-09-23 10:29:45 -07:00
Stephen Williams d025c8aa93 Non-method tasks/functions support default arguments. 2013-09-20 20:44:57 -07:00
Stephen Williams 7534abe325 Allow void functions to be called in functions. 2013-09-20 20:44:57 -07:00
Stephen Williams 7bc94d7810 Support functions that return void. 2013-09-20 20:44:57 -07:00
Stephen Williams a9a1c50268 Support "this" for calling task methods. 2013-09-20 20:44:57 -07:00
Stephen Williams 5084a23417 Sorry messages for calls to superclass constructor. 2013-09-20 20:44:57 -07:00
Stephen Williams 46f551073e Handle default expressions anywhere in port expression list. 2013-09-20 20:44:57 -07:00
Stephen Williams d9e1bcf3d0 Handle task arguments with default expressions. 2013-09-20 20:44:57 -07:00
Stephen Williams 13bb927d8a Handle strings as arguments to automatic functions. 2013-09-20 20:44:56 -07:00
Stephen Williams 16414f921f Handle default arguments in class new functions. 2013-09-20 20:44:56 -07:00
Stephen Williams 9a116498a2 Handle task/function default expressions in parsing/pform.
This gets it to (but not through) the elaborator.
2013-09-20 20:44:56 -07:00
Cary R d8f945be23 Add support for SV do/while 2013-09-16 20:02:09 -07:00
Stephen Williams 8412d0d55f Automatic scope are OK in detached threads
...assuming certain conditions that should by definition be
true. So this patch amounts to improving an assert condition.
2013-09-09 19:47:22 -07:00
Cary R 07cc18284c Fix print token/argument mismatches and other cppcheck fixes 2013-09-09 13:34:38 -07:00
Stephen Williams 7d6d93e4e2 Handle synthesis l-values that are part selects. 2013-09-08 18:18:31 -07:00
Stephen Williams 64b2345cf2 eval_as_long takes in const NetExpr arguments.
It is not the same as eval_tree, in particular it doesn't
rewrite the expression tree. So the NetExpr argument can
be constant.
2013-08-31 18:48:32 -07:00
Stephen Williams 9b3987bf3c blif target supports wide LPM_PART_VP devices. 2013-08-31 16:43:37 -07:00
Stephen Williams 15cda5fef2 Fix subtle issues related to fork/join of tasks.
When a fork/join contains a task, the task completion may become
confused with the completion of another thread if any of the
threads are embedded in the main thread. So always create threads
for all the fork paths, and joins to match.
2013-08-29 20:31:26 -07:00
Stephen Williams a10e07908e Precompile vhdlpp/lexor_keyword.gperf in autoconf.sh 2013-08-28 14:53:29 -07:00
Stephen Williams c2c9e09a49 snapshot 20130827 2013-08-27 19:55:20 -07:00
Stephen Williams 1b79df810f Handle DFF with clock-enable in blif code generator
In the ASIC universe, it is (probably) OK to replace a DFF CE
with a mux of the D input with the Q output. The idea is that
if the CE is true, the DFF latches D, but if CE is false, the DFF
re-latches the current output.
2013-08-25 12:27:57 -07:00
Stephen Williams 9dde4b705d Detect and synthesize FF clock enables.
Too bad BLIF doesn't support 'em.
2013-08-25 12:27:57 -07:00
Stephen Williams 1abf4f1aa1 Rework synchronous statement synthesis.
This changes the flow of the NetProc::synth_sync method, and
implements the NetBlock::synth_sync better.
2013-08-25 12:27:57 -07:00
Stephen Williams a47447610f Replace svector with vector in synth_sync methods. 2013-08-25 12:27:56 -07:00
Stephen Williams d209d8ee39 blif support for IVL_LPM_FF devices. 2013-08-25 12:27:56 -07:00
Stephen Williams 8117f4b383 NetCase synth async measure width from map, not output.
Make sure the NetMux device has an output that is a net.
2013-08-25 12:27:56 -07:00
Stephen Williams 6b5ae5e4db Force calculation of blif_nex_data_t width for lib_mux_s1 devices. 2013-08-25 12:27:56 -07:00
Stephen Williams a40c8f6bca Cleanup/simplify mux synthesis
Do not create useless NetNet objects for the inputs to the mux.
The synthesizer should already be creating these objects.
2013-08-25 12:27:56 -07:00
Stephen Williams a6fb6be8b5 blif code generator support for arbitrary MUX devices. 2013-08-25 12:27:56 -07:00
Stephen Williams ec99faff05 synthesis support for case statements with default cases. 2013-08-25 12:27:56 -07:00
Stephen Williams 1352abfc98 Fix up NetCondit synthesis to handle complex if/else clauses. 2013-08-25 12:27:56 -07:00
Stephen Williams 687d0a928b Initial support for NetCondit synth_async. 2013-08-25 12:27:56 -07:00