mirror of
https://github.com/verilator/verilator.git
synced 2026-10-04 17:13:40 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eeeb72dd5 | ||
|
|
adefa45fb4 | ||
|
|
cfc06ab2a7 | ||
|
|
f3a4752799 | ||
|
|
3d788b4b93 | ||
|
|
5d2675e38a | ||
|
|
288d7bd9dc | ||
|
|
3e8cf26c1a | ||
|
|
ce212722ad | ||
|
|
5c127daeb4 | ||
|
|
e49fc945df | ||
|
|
384807ebbd | ||
|
|
ac619ef3d8 | ||
|
|
a348bd3458 | ||
|
|
bcc7045fc9 | ||
|
|
3b1929259a | ||
|
|
cdd6ea8e60 | ||
|
|
4b8927af75 | ||
|
|
0fba25c1b3 | ||
|
|
f19ba9d54d | ||
|
|
8e9a0121ac | ||
|
|
bd6e8d808c | ||
|
|
11b9a631d4 | ||
|
|
f197dd29cb |
@@ -3,6 +3,36 @@ Revision history for Verilator
|
||||
The contributors that suggested a given feature are shown in []. [by ...]
|
||||
indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
* Verilator 3.681 2008/11/12
|
||||
|
||||
*** Add SystemVerilog unique and priority case.
|
||||
|
||||
**** Include Verilog file's directory name in coverage reports.
|
||||
|
||||
**** Fix 'for' under 'generate-for' causing error; bug38. [Rafael Shirakawa]
|
||||
|
||||
**** Fix coverage hierarchy being backwards with inlining. [Vasu Arasanipalai]
|
||||
|
||||
**** Fix GCC 4.3 compile error; bug35. [Lane Brooks]
|
||||
|
||||
**** Fix MSVC compile error; bug42. [John Stroebel]
|
||||
|
||||
* Verilator 3.680 2008/10/08
|
||||
|
||||
** Support negative bit indexes. [Stephane Laurent]
|
||||
Tracing negative indexes requires latest Verilog-Perl and SystemPerl.
|
||||
|
||||
*** Suppress width warnings between constant strings and wider vectors.
|
||||
[Rodney Sinclair]
|
||||
|
||||
**** Ignore SystemVerilog timeunit and timeprecision.
|
||||
|
||||
**** Expand environment variables in -f input files. [Lawrence Butcher]
|
||||
|
||||
**** Report error if port declaration is missing; bug32. [Guy-Armand Kamendje]
|
||||
|
||||
**** Fix genvars causing link error when using --public. [Chris Candler]
|
||||
|
||||
* Verilator 3.671 2008/09/19
|
||||
|
||||
** SystemC uint64_t pins are now the default instead of sc_bv<64>.
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ DISTFILES_INC = $(INFOS) .gitignore COPYING *.in *.ac \
|
||||
include/.*ignore \
|
||||
.*attributes */.*attributes */*/.*attributes \
|
||||
src/.*ignore src/*.in src/*.cpp src/*.[chly] src/astgen src/bisonpre src/*fix \
|
||||
src/*.pl \
|
||||
src/*.pl src/*.pod \
|
||||
test_*/.*ignore test_*/Makefile* test_*/*.cpp \
|
||||
test_*/*.pl test_*/*.v test_*/*.vc test_*/vlint \
|
||||
test_verilated/vgen*.pl \
|
||||
|
||||
+40
-10
@@ -974,11 +974,10 @@ Verilator will convert the top level module to a SC_MODULE. This module
|
||||
will plug directly into a SystemC netlist.
|
||||
|
||||
The SC_MODULE gets the same pinout as the Verilog module, with the
|
||||
following type conversions: Pins of a single bit become bool, unless they
|
||||
are marked with `systemc_clock, in which case they become sc_clock's (for
|
||||
SystemC 1.2, not needed in SystemC 2.0). Pins 2-32 bits wide become
|
||||
uint32_t's. Pins 33-64 bits wide become sc_bv's or uint64_t's depending on
|
||||
the --no-pins64 switch. Wider pins become sc_bv's.
|
||||
following type conversions: Pins of a single bit become bool. Pins 2-32
|
||||
bits wide become uint32_t's. Pins 33-64 bits wide become sc_bv's or
|
||||
uint64_t's depending on the --no-pins64 switch. Wider pins become sc_bv's.
|
||||
(Uints simulate the fastest so are used where possible.)
|
||||
|
||||
Lower modules are not pure SystemC code. This is a feature, as using the
|
||||
SystemC pin interconnect scheme everywhere would reduce performance by an
|
||||
@@ -1039,7 +1038,8 @@ including function call-like preprocessor defines.
|
||||
|
||||
Verilator supports ==? and !=? operators, $bits, $countones, $error,
|
||||
$fatal, $info, $isunknown, $onehot, $onehot0, $warning, always_comb,
|
||||
always_ff, always_latch, do-while, and final.
|
||||
always_ff, always_latch, do-while, final, priority case/if, and unique
|
||||
case/if.
|
||||
|
||||
It also supports .name and .* interconnection.
|
||||
|
||||
@@ -1085,6 +1085,10 @@ formally prove the directive to be true, or failing that, will insert the
|
||||
appropriate code to detect failing cases at runtime and print an "Assertion
|
||||
failed" error message.
|
||||
|
||||
Verilator likewise also asserts any "unique" or "priority" SystemVerilog
|
||||
keywords on case statements. However, "unique if" and "priority if" are
|
||||
currently simply ignored.
|
||||
|
||||
=head1 LANGUAGE EXTENSIONS
|
||||
|
||||
The following additional constructs are the extensions Verilator supports
|
||||
@@ -1341,7 +1345,9 @@ using the --public switch.
|
||||
=item /*verilator sc_clock*/
|
||||
|
||||
Used after a input declaration to indicate the signal should be declared in
|
||||
SystemC as a sc_clock instead of a bool.
|
||||
SystemC as a sc_clock instead of a bool. This was needed in SystemC 1.1
|
||||
and 1.2 only; versions 2.0 and later do not require clock pins to be
|
||||
sc_clocks and this is no longer needed.
|
||||
|
||||
=item /*verilator tracing_off*/
|
||||
|
||||
@@ -1544,10 +1550,19 @@ while, wire, xnor, xor
|
||||
|
||||
Generally supported.
|
||||
|
||||
=item priority if, unique if
|
||||
|
||||
Priority and unique if's are treated as normal ifs and not asserted to be
|
||||
full nor unique.
|
||||
|
||||
=item specify specparam
|
||||
|
||||
All specify blocks and timing checks are ignored.
|
||||
|
||||
=item timeunit, timeprecision
|
||||
|
||||
All timing control statements are ignored.
|
||||
|
||||
=item uwire
|
||||
|
||||
Verilator does not perform warning checking on uwires, it treats the uwire
|
||||
@@ -2019,9 +2034,9 @@ Visual C++ Version 7 or newer, but this is not tested by the author.
|
||||
|
||||
=item Can you provide binaries?
|
||||
|
||||
Verilator is available as a RPM for SuSE and perhaps other systems; this is
|
||||
done by porters and may slightly lag the primary distribution. If there
|
||||
isn't a binary build for your distribution, how about you set one up?
|
||||
Verilator is available as a RPM for SuSE, Redhat and perhaps other systems;
|
||||
this is done by porters and may slightly lag the primary distribution. If
|
||||
there isn't a binary build for your distribution, how about you set one up?
|
||||
Please contact the authors for assistance.
|
||||
|
||||
Note people sometimes request binaries when they are having problems with
|
||||
@@ -2096,6 +2111,21 @@ Verilator makes standard VCD (Value Change Dump) files. They are viewable
|
||||
with the public domain Dinotrace or GtkWave programs, or any of the many
|
||||
commercial offerings.
|
||||
|
||||
=item How do I reduce the size of large waveform (trace) files?
|
||||
|
||||
First, instead of calling SpTraceVcdCFile->open at the beginning of time,
|
||||
delay calling it until the time stamp where you want to tracing to begin.
|
||||
Likewise you can also call SpTraceVcdCFile->open before the end of time
|
||||
(perhaps a short period after you detect a verification error.)
|
||||
|
||||
Next, add /*verilator tracing_off*/ to any very low level modules you never
|
||||
want to trace (such as perhaps library cells). Finally, use the
|
||||
--trace-depth option to limit the depth of tracing, for example
|
||||
--trace-depth 1 to see only the top level signals.
|
||||
|
||||
Also be sure you write your trace files to a local disk, instead of to a
|
||||
network disk. Network disks are generally far slower.
|
||||
|
||||
=item How do I do coverage analysis?
|
||||
|
||||
Verilator supports both block (line) coverage and user inserted functional
|
||||
|
||||
@@ -539,7 +539,11 @@ IData VL_FGETS_IXQ(int obits, void* destp, QData fpq) {
|
||||
// any read data. This means we can't know in what location the first
|
||||
// character will finally live, so we need to copy. Yuk.
|
||||
IData bytes = VL_BYTES_I(obits);
|
||||
char buffer[bytes];
|
||||
char buffer[VL_TO_STRING_MAX_WORDS*VL_WORDSIZE+1];
|
||||
// V3Emit has static check that bytes < VL_TO_STRING_MAX_WORDS, but be safe
|
||||
if (VL_UNLIKELY(bytes > VL_TO_STRING_MAX_WORDS*VL_WORDSIZE)) {
|
||||
vl_fatal(__FILE__,__LINE__,"","Internal: fgets buffer overrun");
|
||||
}
|
||||
|
||||
// We don't use fgets, as we must read \0s.
|
||||
IData got = 0;
|
||||
|
||||
@@ -86,10 +86,10 @@ typedef long vlsint32_t; ///< 32-bit signed type
|
||||
typedef unsigned long vluint32_t; ///< 32-bit unsigned type
|
||||
typedef long long vlsint64_t; ///< 64-bit signed type
|
||||
typedef unsigned long long vluint64_t; ///< 64-bit unsigned type
|
||||
#elif defined(_WIN32) && !defined(__MINGW32__)
|
||||
#elif defined(_WIN32) && defined(_MSC_VER)
|
||||
typedef unsigned char uint8_t; ///< 8-bit unsigned type (backward compatibility)
|
||||
typedef unsigned short int uint16_t; ///< 16-bit unsigned type (backward compatibility)
|
||||
typedef unsigned long uint32_t; ///< 32-bit unsigned type (backward compatibility)
|
||||
typedef unsigned int uint32_t; ///< 32-bit unsigned type (backward compatibility)
|
||||
typedef unsigned char vluint8_t; ///< 8-bit unsigned type
|
||||
typedef unsigned short int vluint16_t; ///< 16-bit unsigned type
|
||||
typedef int vlsint32_t; ///< 32-bit signed type
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Verilator Source Code Notes
|
||||
|
||||
=head1 INTRODUCTION
|
||||
|
||||
See also the Verilator internals presentation at http://www.veripool.org.
|
||||
|
||||
=head1 VISITOR FUNCTIONS
|
||||
|
||||
=head2 Passing Variables
|
||||
|
||||
There's three ways data is passed between visitor functions.
|
||||
|
||||
1. A visitor-class member variable. This is generally for passing "parent"
|
||||
information down to children. m_modp is a common example. It's set to
|
||||
NULL in the constructor, where that node (AstModule visitor) sets it, then
|
||||
the children are iterated, then it's cleared. Children under an AstModule
|
||||
will see it set, while nodes elsewhere will see it clear. If there can be
|
||||
nested items (for example an AstFor under an AstFor) the variable needs to
|
||||
be save-set-restored in the AstFor visitor, otherwise exiting the lower for
|
||||
will loose the upper for's setting.
|
||||
|
||||
2. User() attributes. Each node has 4 ->user() number or ->userp() pointer
|
||||
utility values (a common technique lifted from graph traversal packages).
|
||||
A visitor first clears the one it wants to use by calling
|
||||
AstNode::user#ClearTree(), then it can mark any node's user() with whatever
|
||||
data it wants. Readers just call nodep->user(), but may need to cast
|
||||
appropriately, so you'll often see nodep->userp()->castSOMETYPE(). At the
|
||||
top of each visitor are comments describing how the user() stuff applies to
|
||||
that visitor class. For example:
|
||||
|
||||
// NODE STATE
|
||||
// Cleared entire netlist
|
||||
// AstModule::userp() // bool. True to inline this module
|
||||
|
||||
This says that at the AstNetlist userClearTree() is called. Each
|
||||
AstModule's is user() is used to indicate if we're going to inline it.
|
||||
|
||||
These comments are important to make sure a user#() on a given AstNode type
|
||||
is never being used for two different purposes.
|
||||
|
||||
Note that calling user#ClearTree is fast, it doesn't walk the tree, so it's
|
||||
ok to call fairly often. For example, it's commonly called on every
|
||||
module.
|
||||
|
||||
3. Parameters can be passed between the visitors in close to the "normal"
|
||||
function caller to callee way. This is the second "vup" parameter that is
|
||||
ignored on most of the visitor functions. V3Width does this, but it proved
|
||||
more messy than the above and is deprecated. (V3Width was nearly the first
|
||||
module written. Someday this scheme may be removed, as it slows the
|
||||
program down to have to pass vup everywhere.)
|
||||
|
||||
=head1 DISTRIBUTION
|
||||
|
||||
Copyright 2008-2008 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
General Public License or the Perl Artistic License.
|
||||
+1
-1
@@ -115,7 +115,7 @@ private:
|
||||
} else {
|
||||
// V3Coverage assigned us a bucket to increment.
|
||||
AstCoverInc* covincp = snodep->coverincp()->castCoverInc();
|
||||
if (!covincp) snodep->v3fatalSrc("Missing coverage in PSL");
|
||||
if (!covincp) snodep->v3fatalSrc("Missing AstCoverInc under assertion");
|
||||
covincp->unlinkFrBack();
|
||||
if (message!="") covincp->declp()->comment(message);
|
||||
bodysp = covincp;
|
||||
|
||||
@@ -111,6 +111,14 @@ string AstNode::encodeName(const string& namein) {
|
||||
return out;
|
||||
}
|
||||
|
||||
string AstNode::encodeNumber(vlsint64_t num) {
|
||||
if (num < 0) {
|
||||
return "__2D"+cvtToStr(-num); // 2D=-
|
||||
} else {
|
||||
return cvtToStr(num);
|
||||
}
|
||||
}
|
||||
|
||||
string AstNode::shortName() const {
|
||||
string pretty = name();
|
||||
string::size_type pos;
|
||||
|
||||
@@ -579,6 +579,7 @@ public:
|
||||
static string dedotName(const string& namein); // Name with dots removed
|
||||
static string prettyName(const string& namein); // Name for printing out to the user
|
||||
static string encodeName(const string& namein); // Encode user name into internal C representation
|
||||
static string encodeNumber(vlsint64_t numin); // Encode number into internal C representation
|
||||
string prettyName() const { return prettyName(name()); }
|
||||
FileLine* fileline() const { return m_fileline; }
|
||||
int width() const { return m_width; }
|
||||
|
||||
+2
-2
@@ -43,11 +43,11 @@ void AstNodeVarRef::cloneRelink() {
|
||||
}
|
||||
|
||||
int AstNodeSel::bitConst() const {
|
||||
AstConst* constp=bitp()->castConst(); return (constp?constp->asInt():0);
|
||||
AstConst* constp=bitp()->castConst(); return (constp?constp->toSInt():0);
|
||||
}
|
||||
|
||||
bool AstVar::isSigPublic() const {
|
||||
return (m_sigPublic || (v3Global.opt.allPublic() && !isTemp()));
|
||||
return (m_sigPublic || (v3Global.opt.allPublic() && !isTemp() && !isGenVar()));
|
||||
}
|
||||
|
||||
bool AstVar::isScQuad() const {
|
||||
|
||||
+15
-14
@@ -50,8 +50,8 @@ public:
|
||||
virtual void accept(AstNVisitor& v, AstNUser* vup=NULL) { v.visit(this,vup); }
|
||||
virtual string name() const { return num().ascii(); } // * = Value
|
||||
virtual const V3Number& num() const { return m_num; } // * = Value
|
||||
uint32_t asInt() const { return num().asInt(); } // Old, should be removed
|
||||
uint32_t toUInt() const { return num().toUInt(); }
|
||||
vlsint32_t toSInt() const { return num().toSInt(); }
|
||||
vluint64_t toUQuad() const { return num().toUQuad(); }
|
||||
virtual string emitVerilog() { V3ERROR_NA; return ""; } // Implemented specially
|
||||
virtual string emitC() { V3ERROR_NA; return ""; }
|
||||
@@ -79,8 +79,8 @@ struct AstRange : public AstNode {
|
||||
AstRange* cloneTree(bool cloneNextLink) { return AstNode::cloneTree(cloneNextLink)->castRange(); }
|
||||
AstNode* msbp() const { return op2p()->castNode(); } // op2 = Msb expression
|
||||
AstNode* lsbp() const { return op3p()->castNode(); } // op3 = Lsb expression
|
||||
int msbConst() const { AstConst* constp=msbp()->castConst(); return (constp?constp->asInt():0); }
|
||||
int lsbConst() const { AstConst* constp=lsbp()->castConst(); return (constp?constp->asInt():0); }
|
||||
int msbConst() const { AstConst* constp=msbp()->castConst(); return (constp?constp->toSInt():0); }
|
||||
int lsbConst() const { AstConst* constp=lsbp()->castConst(); return (constp?constp->toSInt():0); }
|
||||
int elementsConst() const { return msbConst()-lsbConst()+1; }
|
||||
virtual string emitC() { V3ERROR_NA; return ""; }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
@@ -193,7 +193,7 @@ struct AstSel : public AstNodeTriop {
|
||||
// Children: varref|arraysel, math, constant math
|
||||
AstSel(FileLine* fl, AstNode* fromp, AstNode* lsbp, AstNode* widthp)
|
||||
:AstNodeTriop(fl, fromp, lsbp, widthp) {
|
||||
if (widthp->castConst()) width(widthp->castConst()->asInt(), widthp->castConst()->asInt());
|
||||
if (widthp->castConst()) width(widthp->castConst()->toUInt(), widthp->castConst()->toUInt());
|
||||
}
|
||||
AstSel(FileLine* fl, AstNode* fromp, int lsbp, int bitwidth)
|
||||
:AstNodeTriop(fl, fromp,
|
||||
@@ -205,7 +205,7 @@ struct AstSel : public AstNodeTriop {
|
||||
virtual AstNode* clone() { return new AstSel(*this); }
|
||||
virtual void accept(AstNVisitor& v, AstNUser* vup=NULL) { v.visit(this,vup); }
|
||||
virtual void numberOperate(V3Number& out, const V3Number& from, const V3Number& bit, const V3Number& width) {
|
||||
out.opRange(from, bit.asInt()+width.asInt()-1, bit.asInt()); }
|
||||
out.opRange(from, bit.toUInt()+width.toUInt()-1, bit.toUInt()); }
|
||||
virtual string emitVerilog() { V3ERROR_NA; return ""; } // Implemented specially
|
||||
virtual string emitC() {
|
||||
return this->widthp()->isOne()
|
||||
@@ -222,9 +222,9 @@ struct AstSel : public AstNodeTriop {
|
||||
AstNode* fromp() const { return op1p()->castNode(); } // op1 = Extracting what (NULL=TBD during parsing)
|
||||
AstNode* lsbp() const { return op2p()->castNode(); } // op2 = Msb selection expression
|
||||
AstNode* widthp() const { return op3p()->castNode(); } // op3 = Width
|
||||
uint32_t lsbConst() const { return lsbp()->castConst()->asInt(); }
|
||||
uint32_t widthConst() const { return widthp()->castConst()->toUInt(); }
|
||||
uint32_t msbConst() const { return lsbConst()+widthConst()-1; }
|
||||
int widthConst() const { return widthp()->castConst()->toSInt(); }
|
||||
int lsbConst() const { return lsbp()->castConst()->toSInt(); }
|
||||
int msbConst() const { return lsbConst()+widthConst()-1; }
|
||||
};
|
||||
|
||||
struct AstVar : public AstNode {
|
||||
@@ -363,8 +363,9 @@ public:
|
||||
bool attrIsolateAssign() const { return m_attrIsolateAssign; }
|
||||
int widthAlignBytes() const; // Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
||||
int widthTotalBytes() const; // Width in bytes rounding up 1,2,4,8,12,...
|
||||
uint32_t msb() const { if (!rangep()) return 0; return rangep()->msbConst(); }
|
||||
uint32_t lsb() const { if (!rangep()) return 0; return rangep()->lsbConst(); }
|
||||
int msb() const { if (!rangep()) return 0; return rangep()->msbConst(); }
|
||||
int lsb() const { if (!rangep()) return 0; return rangep()->lsbConst(); }
|
||||
int msbMaxSelect() const { return (lsb()<0 ? msb()-lsb() : msb()); } // Maximum value a [] select may index
|
||||
uint32_t arrayElements() const; // 1, or total multiplication of all dimensions
|
||||
virtual string verilogKwd() const;
|
||||
void propagateAttrFrom(AstVar* fromp) {
|
||||
@@ -1694,8 +1695,8 @@ struct AstTraceDecl : public AstNodeStmt {
|
||||
private:
|
||||
string m_showname; // Name of variable
|
||||
uint32_t m_code; // Trace identifier code; converted to ASCII by trace routines
|
||||
uint32_t m_lsb; // Property of var the trace details
|
||||
uint32_t m_msb; // Property of var the trace details
|
||||
int m_lsb; // Property of var the trace details
|
||||
int m_msb; // Property of var the trace details
|
||||
uint32_t m_arrayLsb; // Property of var the trace details
|
||||
uint32_t m_arrayMsb; // Property of var the trace details
|
||||
uint32_t m_codeInc; // Code increment
|
||||
@@ -1723,8 +1724,8 @@ public:
|
||||
uint32_t code() const { return m_code; }
|
||||
void code(uint32_t code) { m_code=code; }
|
||||
uint32_t codeInc() const { return m_codeInc; }
|
||||
uint32_t msb() const { return m_msb; }
|
||||
uint32_t lsb() const { return m_lsb; }
|
||||
int msb() const { return m_msb; }
|
||||
int lsb() const { return m_lsb; }
|
||||
uint32_t arrayMsb() const { return m_arrayMsb; }
|
||||
uint32_t arrayLsb() const { return m_arrayLsb; }
|
||||
uint32_t arrayWidth() const { if (!arrayMsb()) return 0; return arrayMsb()-arrayLsb()+1; }
|
||||
|
||||
+5
-1
@@ -31,7 +31,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
@@ -143,6 +142,11 @@ private:
|
||||
}
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
virtual void visit(AstCoverDecl* nodep, AstNUser*) {
|
||||
// Don't need to fix path in coverage statements, they're not under
|
||||
// any BEGINs, but V3Coverage adds them all under the module itself.
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ private:
|
||||
virtual void visit(AstModule* nodep, AstNUser*) {
|
||||
m_modp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstNodeUniop* nodep, AstNUser*) {
|
||||
nodep->iterateChildren(*this);
|
||||
|
||||
@@ -245,6 +245,7 @@ private:
|
||||
m_modp = nodep;
|
||||
m_stableNum = 0;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp= NULL;
|
||||
}
|
||||
virtual void visit(AstScope* nodep, AstNUser*) {
|
||||
//UINFO(4," SCOPE "<<nodep<<endl);
|
||||
|
||||
@@ -407,6 +407,7 @@ private:
|
||||
nodep->iterateChildren(*this);
|
||||
m_state = STATE_IDLE;
|
||||
}
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCFunc* nodep, AstNUser*) {
|
||||
m_funcp = nodep;
|
||||
|
||||
+17
-14
@@ -134,11 +134,11 @@ private:
|
||||
}
|
||||
bool operandHugeShiftL(AstNodeBiop* nodep) {
|
||||
return (nodep->rhsp()->castConst()
|
||||
&& nodep->rhsp()->castConst()->asInt() >= (uint32_t)(nodep->width()));
|
||||
&& nodep->rhsp()->castConst()->toUInt() >= (uint32_t)(nodep->width()));
|
||||
}
|
||||
bool operandHugeShiftR(AstNodeBiop* nodep) {
|
||||
return (nodep->rhsp()->castConst()
|
||||
&& nodep->rhsp()->castConst()->asInt() >= (uint32_t)(nodep->lhsp()->width()));
|
||||
&& nodep->rhsp()->castConst()->toUInt() >= (uint32_t)(nodep->lhsp()->width()));
|
||||
}
|
||||
bool operandIsTwo(AstNode* nodep) {
|
||||
return (nodep->castConst()
|
||||
@@ -215,15 +215,18 @@ private:
|
||||
bool warnSelect(AstSel* nodep) {
|
||||
AstNode* basefromp = AstArraySel::baseFromp(nodep->fromp());
|
||||
if (AstNodeVarRef* varrefp = basefromp->castNodeVarRef()) {
|
||||
AstVar* varp = varrefp->varp();
|
||||
if (m_warn
|
||||
&& nodep->lsbp()->castConst()
|
||||
&& nodep->widthp()->castConst()
|
||||
&& (!varrefp->varp()->rangep() || varrefp->varp()->msb()) // else it's non-resolvable parameterized
|
||||
&& ( ( (nodep->msbConst() > varrefp->varp()->msb())
|
||||
|| (nodep->lsbConst() > varrefp->varp()->msb())))) {
|
||||
&& (!varp->rangep() || varp->msb()) // else it's non-resolvable parameterized
|
||||
&& ( ( (nodep->msbConst() > varp->msbMaxSelect())
|
||||
|| (nodep->lsbConst() > varp->msbMaxSelect())))) {
|
||||
nodep->v3error("Selection index out of range: "
|
||||
<<nodep->msbConst()<<":"<<nodep->lsbConst()
|
||||
<<" outside "<<varrefp->varp()->msb()<<":0");
|
||||
<<" outside "<<varp->msbMaxSelect()<<":0"
|
||||
<<(varp->lsb()>=0 ? ""
|
||||
:" (adjusted +"+cvtToStr(-varp->lsb())+" to account for negative lsb)"));
|
||||
}
|
||||
}
|
||||
return false; // Not a transform, so NOP
|
||||
@@ -432,8 +435,8 @@ private:
|
||||
nodep->accept(*this); // Further reduce, either node may have more reductions.
|
||||
} else {
|
||||
// We know shift amounts are constant, but might be a mixed left/right shift
|
||||
int shift1 = shift1p->castConst()->asInt(); if (lhsp->castShiftR()) shift1=-shift1;
|
||||
int shift2 = shift2p->castConst()->asInt(); if (nodep->castShiftR()) shift2=-shift2;
|
||||
int shift1 = shift1p->castConst()->toUInt(); if (lhsp->castShiftR()) shift1=-shift1;
|
||||
int shift2 = shift2p->castConst()->toUInt(); if (nodep->castShiftR()) shift2=-shift2;
|
||||
int newshift = shift1+shift2;
|
||||
shift1p->deleteTree(); shift1p=NULL;
|
||||
shift2p->deleteTree(); shift1p=NULL;
|
||||
@@ -490,9 +493,9 @@ private:
|
||||
if (!varNotReferenced(nodep->rhsp(), varref1p->varp())) return false;
|
||||
if (!varNotReferenced(nextp->rhsp(), varref2p->varp())) return false;
|
||||
// Swap?
|
||||
if (( con1p->asInt() != con2p->asInt() + sel2p->width())
|
||||
&&(con2p->asInt() != con1p->asInt() + sel1p->width())) return false;
|
||||
bool lsbFirstAssign = (con1p->asInt() < con2p->asInt());
|
||||
if (( con1p->toSInt() != con2p->toSInt() + sel2p->width())
|
||||
&&(con2p->toSInt() != con1p->toSInt() + sel1p->width())) return false;
|
||||
bool lsbFirstAssign = (con1p->toUInt() < con2p->toUInt());
|
||||
// If the user already has nice 32-bit divisions, keep them to aid later subdivision
|
||||
//if (VL_BITBIT_I(con1p->toUInt()) == 0) return false;
|
||||
UINFO(4,"replaceAssignMultiSel "<<nodep<<endl);
|
||||
@@ -648,7 +651,7 @@ private:
|
||||
if (!nodep->castAnd()->rhsp()->castShiftR()) return false;
|
||||
AstShiftR* shiftp = nodep->castAnd()->rhsp()->castShiftR();
|
||||
if (!shiftp->rhsp()->castConst()) return false;
|
||||
if ((uint32_t)(nodep->width()) <= shiftp->rhsp()->castConst()->asInt()) return false;
|
||||
if ((uint32_t)(nodep->width()) <= shiftp->rhsp()->castConst()->toUInt()) return false;
|
||||
return true;
|
||||
}
|
||||
void replaceBoolShift(AstNode* nodep) {
|
||||
@@ -784,7 +787,7 @@ private:
|
||||
AstNode* newlsbp;
|
||||
if (lsb1p->castConst() && lsb2p->castConst()) {
|
||||
newlsbp = new AstConst(lsb1p->fileline(),
|
||||
lsb1p->castConst()->asInt() + lsb2p->castConst()->asInt());
|
||||
lsb1p->castConst()->toUInt() + lsb2p->castConst()->toUInt());
|
||||
lsb1p->deleteTree(); lsb1p=NULL;
|
||||
lsb2p->deleteTree(); lsb2p=NULL;
|
||||
} else {
|
||||
@@ -851,7 +854,7 @@ private:
|
||||
AstNode* widthp = nodep->widthp()->unlinkFrBack();
|
||||
AstSel* newp = new AstSel(nodep->fileline(),
|
||||
fromp,
|
||||
new AstConst(lsbp->fileline(), lsbp->asInt() % fromp->width()),
|
||||
new AstConst(lsbp->fileline(), lsbp->toUInt() % fromp->width()),
|
||||
widthp);
|
||||
newp->widthSignedFrom(nodep);
|
||||
nodep->replaceWith(newp); nodep->deleteTree(); nodep=NULL;
|
||||
|
||||
+29
-7
@@ -52,11 +52,13 @@ private:
|
||||
bool m_checkBlock; // Should this block get covered?
|
||||
AstModule* m_modp; // Current module to add statement to
|
||||
FileMap m_fileps; // Column counts for each fileline
|
||||
string m_beginHier; // AstBegin hier name for user coverage points
|
||||
|
||||
//int debug() { return 9; }
|
||||
|
||||
// METHODS
|
||||
AstCoverInc* newCoverInc(FileLine* fl, const string& type, const string& comment) {
|
||||
AstCoverInc* newCoverInc(FileLine* fl, const string& hier,
|
||||
const string& type, const string& comment) {
|
||||
int column = 0;
|
||||
FileMap::iterator it = m_fileps.find(fl);
|
||||
if (it == m_fileps.end()) {
|
||||
@@ -66,6 +68,7 @@ private:
|
||||
}
|
||||
|
||||
AstCoverDecl* declp = new AstCoverDecl(fl, column, type, comment);
|
||||
declp->hier(hier);
|
||||
m_modp->addStmtp(declp);
|
||||
|
||||
return new AstCoverInc(fl, declp);
|
||||
@@ -86,7 +89,7 @@ private:
|
||||
if (!nodep->backp()->castIf()
|
||||
|| nodep->backp()->castIf()->elsesp()!=nodep) { // Ignore if else; did earlier
|
||||
UINFO(4," COVER: "<<nodep<<endl);
|
||||
nodep->addIfsp(newCoverInc(nodep->fileline(), "block", "if"));
|
||||
nodep->addIfsp(newCoverInc(nodep->fileline(), "", "block", "if"));
|
||||
}
|
||||
}
|
||||
// Don't do empty else's, only empty if/case's
|
||||
@@ -96,9 +99,9 @@ private:
|
||||
if (m_checkBlock && v3Global.opt.coverageLine()) { // if a "else" branch didn't disable it
|
||||
UINFO(4," COVER: "<<nodep<<endl);
|
||||
if (nodep->elsesp()->castIf()) {
|
||||
nodep->addElsesp(newCoverInc(nodep->elsesp()->fileline(), "block", "elsif"));
|
||||
nodep->addElsesp(newCoverInc(nodep->elsesp()->fileline(), "", "block", "elsif"));
|
||||
} else {
|
||||
nodep->addElsesp(newCoverInc(nodep->elsesp()->fileline(), "block", "else"));
|
||||
nodep->addElsesp(newCoverInc(nodep->elsesp()->fileline(), "", "block", "else"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,18 +114,20 @@ private:
|
||||
nodep->bodysp()->iterateAndNext(*this);
|
||||
if (m_checkBlock) { // if the case body didn't disable it
|
||||
UINFO(4," COVER: "<<nodep<<endl);
|
||||
nodep->addBodysp(newCoverInc(nodep->fileline(), "block", "case"));
|
||||
nodep->addBodysp(newCoverInc(nodep->fileline(), "", "block", "case"));
|
||||
}
|
||||
m_checkBlock = true; // Reset as a child may have cleared it
|
||||
}
|
||||
}
|
||||
virtual void visit(AstPslCover* nodep, AstNUser*) {
|
||||
UINFO(4," PSLCOVER: "<<nodep<<endl);
|
||||
m_checkBlock = true; // Always do cover blocks, even if there's a $stop
|
||||
nodep->iterateChildren(*this);
|
||||
if (!nodep->coverincp()) {
|
||||
// Note the name may be overridden by V3Assert processing
|
||||
nodep->coverincp(newCoverInc(nodep->fileline(), "psl_cover", "cover"));
|
||||
nodep->coverincp(newCoverInc(nodep->fileline(), m_beginHier, "psl_cover", "cover"));
|
||||
}
|
||||
m_checkBlock = true; // Reset as a child may have cleared it
|
||||
}
|
||||
virtual void visit(AstStop* nodep, AstNUser*) {
|
||||
UINFO(4," STOP: "<<nodep<<endl);
|
||||
@@ -134,8 +139,24 @@ private:
|
||||
UINFO(4," OFF: "<<nodep<<endl);
|
||||
m_checkBlock = false;
|
||||
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
||||
} else {
|
||||
if (m_checkBlock) nodep->iterateChildren(*this);
|
||||
}
|
||||
if (m_checkBlock) nodep->iterateChildren(*this);
|
||||
}
|
||||
virtual void visit(AstBegin* nodep, AstNUser*) {
|
||||
// Record the hiearchy of any named begins, so we can apply to user
|
||||
// coverage points. This is because there may be cov points inside
|
||||
// generate blocks; each point should get separate consideration.
|
||||
// (Currently ignored for line coverage, since any generate iteration
|
||||
// covers the code in that line.)
|
||||
string oldHier = m_beginHier;
|
||||
{
|
||||
if (nodep->name()!="") {
|
||||
m_beginHier = m_beginHier + (m_beginHier!=""?".":"") + nodep->name();
|
||||
}
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
m_beginHier = oldHier;
|
||||
}
|
||||
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||
// Default: Just iterate
|
||||
@@ -150,6 +171,7 @@ public:
|
||||
CoverageVisitor(AstNetlist* rootp) {
|
||||
// Operate on all modules
|
||||
m_checkBlock = true;
|
||||
m_beginHier = "";
|
||||
rootp->iterateChildren(*this);
|
||||
}
|
||||
virtual ~CoverageVisitor() {}
|
||||
|
||||
@@ -85,6 +85,7 @@ private:
|
||||
m_modp = nodep;
|
||||
m_funcp = NULL;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCFunc* nodep, AstNUser*) {
|
||||
m_funcp = nodep;
|
||||
|
||||
@@ -77,6 +77,7 @@ private:
|
||||
m_modp = nodep;
|
||||
m_deepNum = 0;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCFunc* nodep, AstNUser*) {
|
||||
// We recurse into this.
|
||||
|
||||
@@ -177,6 +177,7 @@ private:
|
||||
m_modFuncs.clear();
|
||||
nodep->iterateChildren(*this);
|
||||
makePublicFuncWrappers();
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstScope* nodep, AstNUser*) {
|
||||
m_scopep = nodep;
|
||||
|
||||
+6
-2
@@ -214,10 +214,10 @@ public:
|
||||
puts("__vlCoverInsert("); // As Declared in emitCoverageDecl
|
||||
puts("&__Vcoverage[");
|
||||
puts(cvtToStr(m_coverIds.remap(nodep))); puts("]");
|
||||
puts(", \""); puts(nodep->fileline()->filebasename()); puts("\"");
|
||||
puts(", \""); puts(nodep->fileline()->filename()); puts("\"");
|
||||
puts(", "); puts(cvtToStr(nodep->fileline()->lineno()));
|
||||
puts(", "); puts(cvtToStr(nodep->column()));
|
||||
puts(", \""); puts(nodep->hier()); puts("\"");
|
||||
puts(", \""); puts((nodep->hier()!=""?".":"")+nodep->hier()); puts("\"");
|
||||
puts(", \""); puts(nodep->typeText()); puts("\"");
|
||||
puts(", \""); puts(nodep->comment()); puts("\"");
|
||||
puts(");\n");
|
||||
@@ -242,6 +242,10 @@ public:
|
||||
virtual void visit(AstSScanF* nodep, AstNUser*) {
|
||||
displayNode(nodep, nodep->text(), nodep->exprsp(), true);
|
||||
}
|
||||
virtual void visit(AstFGetS* nodep, AstNUser*) {
|
||||
checkMaxWords(nodep);
|
||||
emitOpName(nodep, nodep->emitC(), nodep->lhsp(), nodep->rhsp(), NULL);
|
||||
}
|
||||
|
||||
void checkMaxWords(AstNode* nodep) {
|
||||
if (nodep->widthWords() > VL_TO_STRING_MAX_WORDS) {
|
||||
|
||||
@@ -78,6 +78,7 @@ class EmitCSyms : EmitCBaseVisitor {
|
||||
nameCheck(nodep);
|
||||
m_modp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstScope* nodep, AstNUser*) {
|
||||
nameCheck(nodep);
|
||||
|
||||
+4
-3
@@ -53,6 +53,7 @@ public:
|
||||
putbs("module "+modClassName(nodep)+";\n");
|
||||
nodep->iterateChildren(*this);
|
||||
puts("endmodule\n");
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstNodeFTask* nodep, AstNUser*) {
|
||||
putbs(nodep->castTask() ? "task ":"function ");
|
||||
@@ -362,11 +363,11 @@ public:
|
||||
if (nodep->widthp()->isOne()) {
|
||||
nodep->lsbp()->iterateAndNext(*this);
|
||||
} else {
|
||||
puts(cvtToStr(nodep->lsbp()->castConst()->asInt()
|
||||
+nodep->widthp()->castConst()->asInt()
|
||||
puts(cvtToStr(nodep->lsbp()->castConst()->toSInt()
|
||||
+nodep->widthp()->castConst()->toSInt()
|
||||
-1));
|
||||
puts(":");
|
||||
nodep->lsbp()->iterateAndNext(*this);
|
||||
puts(cvtToStr(nodep->lsbp()->castConst()->toSInt()));
|
||||
}
|
||||
} else {
|
||||
nodep->lsbp()->iterateAndNext(*this); puts("+:");
|
||||
|
||||
+2
-2
@@ -172,7 +172,7 @@ private:
|
||||
// Return equation to get the VL_BITWORD of a constant or non-constant
|
||||
if (lsbp->castConst()) {
|
||||
return new AstConst (lsbp->fileline(),
|
||||
wordAdder + VL_BITWORD_I(lsbp->castConst()->asInt()));
|
||||
wordAdder + VL_BITWORD_I(lsbp->castConst()->toUInt()));
|
||||
} else {
|
||||
AstNode* shiftp = new AstShiftR (lsbp->fileline(),
|
||||
lsbp->cloneTree(true),
|
||||
@@ -203,7 +203,7 @@ private:
|
||||
// Return equation to get the VL_BITBIT of a constant or non-constant
|
||||
if (lsbp->castConst()) {
|
||||
return new AstConst (lsbp->fileline(),
|
||||
VL_BITBIT_I(lsbp->castConst()->asInt()));
|
||||
VL_BITBIT_I(lsbp->castConst()->toUInt()));
|
||||
} else {
|
||||
return new AstAnd (lsbp->fileline(),
|
||||
new AstConst(lsbp->fileline(), VL_WORDSIZE-1),
|
||||
|
||||
@@ -316,6 +316,7 @@ private:
|
||||
m_modp = nodep;
|
||||
m_activeReducible = true;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstScope* nodep, AstNUser*) {
|
||||
UINFO(4," SCOPE "<<nodep<<endl);
|
||||
|
||||
+3
-1
@@ -249,7 +249,9 @@ private:
|
||||
virtual void visit(AstCoverDecl* nodep, AstNUser*) {
|
||||
// Fix path in coverage statements
|
||||
if (m_cellp) {
|
||||
nodep->hier(nodep->hier()+"."+m_cellp->prettyName());
|
||||
nodep->hier(m_cellp->prettyName()
|
||||
+ (nodep->hier()!="" ? ".":"")
|
||||
+ nodep->hier());
|
||||
}
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ private:
|
||||
//if (nodep->name() == "t_chg") m_debug = 9; else m_debug=0;
|
||||
m_modp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCell* nodep, AstNUser*) {
|
||||
UINFO(4," CELL "<<nodep<<endl);
|
||||
|
||||
@@ -50,6 +50,7 @@ private:
|
||||
// AstNodeFTask::userp() // V3SymTable* Local Symbol table
|
||||
// AstBegin::userp() // V3SymTable* Local Symbol table
|
||||
// AstVar::userp() // V3SymTable* Table used to create this variable
|
||||
// AstVar::user2p() // bool True if port set for this variable
|
||||
|
||||
// ENUMS
|
||||
enum IdState { // Which loop through the tree
|
||||
@@ -60,6 +61,7 @@ private:
|
||||
// STATE
|
||||
// Below state needs to be preserved between each module call.
|
||||
AstModule* m_modp; // Current module
|
||||
AstNodeFTask* m_ftaskp; // Current function/task
|
||||
IdState m_idState; // Id linking mode (find or resolve)
|
||||
int m_paramNum; // Parameter number, for position based connection
|
||||
V3SymTable* m_curVarsp; // Symbol table of variables and tasks under table we're inserting into
|
||||
@@ -106,6 +108,7 @@ private:
|
||||
// VISITs
|
||||
virtual void visit(AstNetlist* nodep, AstNUser*) {
|
||||
AstNode::userClearTree();
|
||||
AstNode::user2ClearTree();
|
||||
// Look at all modules, and store pointers to all module names
|
||||
for (AstModule* modp = v3Global.rootp()->modulesp(); modp; modp=modp->nextp()->castModule()) {
|
||||
V3SymTable* symp = new V3SymTable(NULL);
|
||||
@@ -189,6 +192,11 @@ private:
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_idState==ID_RESOLVE) {
|
||||
if (nodep->isIO() && !m_ftaskp && !nodep->user2()) {
|
||||
nodep->v3error("Input/output/inout does not appear in port list: "<<nodep->prettyName());
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual void visit(AstVarRef* nodep, AstNUser*) {
|
||||
// VarRef: Resolve its reference
|
||||
@@ -236,7 +244,9 @@ private:
|
||||
m_curVarsp->insert(newvarp->name(), newvarp);
|
||||
}
|
||||
}
|
||||
m_ftaskp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_ftaskp = NULL;
|
||||
}
|
||||
m_curVarsp = upperVarsp;
|
||||
if (m_idState==ID_FIND) {
|
||||
@@ -336,6 +346,7 @@ private:
|
||||
nodep->v3error("Pin is not a in/out/inout: "<<nodep->prettyName());
|
||||
} else {
|
||||
m_curVarsp->insert("__pinNumber"+cvtToStr(nodep->pinNum()), refp);
|
||||
refp->user2(true);
|
||||
}
|
||||
// Ports not needed any more
|
||||
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
||||
@@ -422,6 +433,7 @@ public:
|
||||
m_curVarsp = NULL;
|
||||
m_cellVarsp = NULL;
|
||||
m_modp = NULL;
|
||||
m_ftaskp = NULL;
|
||||
m_paramNum = 0;
|
||||
m_beginNum = 0;
|
||||
//
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "verilatedos.h"
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -47,6 +47,7 @@ private:
|
||||
virtual void visit(AstModule* nodep, AstNUser*) {
|
||||
m_modp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCell* nodep, AstNUser*) {
|
||||
// Track module depths, so can sort list from parent down to children
|
||||
|
||||
+2
-1
@@ -160,7 +160,8 @@ private:
|
||||
m_dotText = "";
|
||||
nodep->lhsp()->iterateAndNext(*this);
|
||||
if (AstConst* constp = nodep->rhsp()->castConst()) {
|
||||
m_dotText = m_dotText+"__BRA__"+cvtToStr(constp->asInt())+"__KET__";
|
||||
string index = AstNode::encodeNumber(constp->toSInt());
|
||||
m_dotText = m_dotText+"__BRA__"+index+"__KET__";
|
||||
} else {
|
||||
nodep->v3error("Unsupported: Non-constant inside []'s in the cell part of a dotted reference");
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ private:
|
||||
AstNode* widthp;
|
||||
if (msbp->castConst() && lsbp->castConst()) {
|
||||
// Quite common, save V3Const some effort
|
||||
V3Number widnum (msbp->fileline(),32,msbp->castConst()->asInt() +1-lsbp->castConst()->asInt());
|
||||
V3Number widnum (msbp->fileline(),32,msbp->castConst()->toSInt() +1-lsbp->castConst()->toSInt());
|
||||
widnum.width(32,false); // Unsized so width from user
|
||||
widthp = new AstConst (msbp->fileline(), widnum);
|
||||
pushDeletep(msbp);
|
||||
|
||||
+13
-6
@@ -18,12 +18,11 @@
|
||||
//
|
||||
//*************************************************************************
|
||||
|
||||
#include <config_build.h>
|
||||
#include "config_build.h"
|
||||
#include "verilatedos.h"
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include "V3Number.h"
|
||||
|
||||
@@ -45,6 +44,7 @@ void V3Number::init (FileLine* fileline, int swidth) {
|
||||
m_fileline = fileline;
|
||||
m_signed = false;
|
||||
m_autoExtend = false;
|
||||
m_fromString = false;
|
||||
width(swidth);
|
||||
for (int i=0; i<words(); i++) m_value[i]=m_valueX[i] = 0;
|
||||
}
|
||||
@@ -52,6 +52,7 @@ void V3Number::init (FileLine* fileline, int swidth) {
|
||||
V3Number::V3Number(VerilogString, FileLine* fileline, const string& str) {
|
||||
// Create a number using a verilog string as the value, thus 8 bits per character.
|
||||
init(fileline, str.length()*8);
|
||||
m_fromString = true;
|
||||
for (unsigned pos=0; pos<str.length(); ++pos) {
|
||||
int topos = str.length()-1-pos;
|
||||
for (int bit=0; bit<8; ++bit) {
|
||||
@@ -468,10 +469,16 @@ uint32_t V3Number::toUInt() const {
|
||||
}
|
||||
|
||||
vlsint32_t V3Number::toSInt() const {
|
||||
uint32_t v = toUInt();
|
||||
uint32_t signExtend = (-(v & (1UL<<(width()-1))));
|
||||
uint32_t extended = v | signExtend;
|
||||
return (vlsint32_t)(extended);
|
||||
if (isSigned()) {
|
||||
uint32_t v = toUInt();
|
||||
uint32_t signExtend = (-(v & (1UL<<(width()-1))));
|
||||
uint32_t extended = v | signExtend;
|
||||
return (vlsint32_t)(extended);
|
||||
} else {
|
||||
// Where we use this (widths, etc) and care about signedness,
|
||||
// we can reasonably assume the MSB isn't set on unsigned numbers.
|
||||
return (vlsint32_t)toUInt();
|
||||
}
|
||||
}
|
||||
|
||||
vluint64_t V3Number::toUQuad() const {
|
||||
|
||||
+2
-1
@@ -34,6 +34,7 @@ class V3Number {
|
||||
int m_width; // Width as specified/calculated.
|
||||
bool m_sized:1; // True if the user specified the width, else we track it.
|
||||
bool m_signed:1; // True if signed value
|
||||
bool m_fromString:1; // True if from string
|
||||
bool m_autoExtend:1; // True if SystemVerilog extend-to-any-width
|
||||
FileLine* m_fileline;
|
||||
vector<uint32_t> m_value; // The Value, with bit 0 being in bit 0 of this vector (unless X/Z)
|
||||
@@ -124,6 +125,7 @@ public:
|
||||
int minWidth() const; // Minimum width that can represent this number (~== log2(num)+1)
|
||||
bool sized() const { return m_sized; }
|
||||
bool autoExtend() const { return m_autoExtend; }
|
||||
bool isFromString() const { return m_fromString; }
|
||||
bool isSigned() const { return m_signed; } // Only correct for parsing of numbers from strings, otherwise not used (use AstConst::isSigned())
|
||||
bool isNegative() const { return bitIs1(width()-1); }
|
||||
bool isFourState() const { for (int i=0;i<words();i++) {if (m_valueX[i]) return true;} return false; }
|
||||
@@ -135,7 +137,6 @@ public:
|
||||
void width(int width, bool sized=true);
|
||||
void isSigned(bool ssigned) { m_signed=ssigned; }
|
||||
bool isUnknown() const;
|
||||
uint32_t asInt() const { return toUInt(); } // Deprecated, use toUInt/toSInt
|
||||
uint32_t toUInt() const;
|
||||
vlsint32_t toSInt() const;
|
||||
vluint64_t toUQuad() const;
|
||||
|
||||
+47
-24
@@ -24,7 +24,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <set>
|
||||
@@ -132,7 +131,7 @@ string V3Options::allArgsString() {
|
||||
|
||||
V3LangCode::V3LangCode (const char* textp) {
|
||||
// Return code for given string, or ERROR, which is a bad code
|
||||
for (int codei=V3LangCode::ERROR; codei<V3LangCode::MAX; codei++) {
|
||||
for (int codei=V3LangCode::ERROR; codei<V3LangCode::MAX; ++codei) {
|
||||
V3LangCode code = (V3LangCode)codei;
|
||||
if (0==strcasecmp(textp,code.ascii())) {
|
||||
m_e = code; return;
|
||||
@@ -177,6 +176,30 @@ string V3Options::filenameNonExt (const string& filename) {
|
||||
return base;
|
||||
}
|
||||
|
||||
string V3Options::filenameSubstitute (const string& filename) {
|
||||
string out;
|
||||
for (string::size_type pos = 0; pos < filename.length(); ++pos) {
|
||||
if (filename[pos] == '$') {
|
||||
string::size_type endpos = pos+1;
|
||||
while ((endpos+1) < filename.length()
|
||||
&& (isalnum(filename[endpos+1]) || filename[endpos+1]=='_'))
|
||||
++endpos;
|
||||
string envvar = filename.substr(pos+1,endpos-pos);
|
||||
const char* envvalue = NULL;
|
||||
if (envvar != "") envvalue = getenv(envvar.c_str());
|
||||
if (envvalue) {
|
||||
out += envvalue;
|
||||
pos = endpos;
|
||||
} else {
|
||||
out += filename[pos]; // *pos == '$'
|
||||
}
|
||||
} else {
|
||||
out += filename[pos];
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
bool V3Options::fileStatDir(const string& filename) {
|
||||
struct stat m_stat; // Stat information
|
||||
int err = stat(filename.c_str(), &m_stat);
|
||||
@@ -281,12 +304,12 @@ void V3Options::unlinkRegexp(const string& dir, const string& regexp) {
|
||||
// Environment
|
||||
|
||||
string V3Options::getenvStr(const char* envvar, const char* defaultValue) {
|
||||
if (const char* envvalue = getenv(envvar)) {
|
||||
return envvalue;
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
if (const char* envvalue = getenv(envvar)) {
|
||||
return envvalue;
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
string V3Options::getenvSYSTEMC() {
|
||||
string var = getenvStr("SYSTEMC","");
|
||||
if (var == "" && string(DEFENV_SYSTEMC) != "") {
|
||||
@@ -406,7 +429,7 @@ bool V3Options::wildmatch(const char* s, const char* p) {
|
||||
|
||||
string V3Options::downcase(const string& str) {
|
||||
string out = str;
|
||||
for (string::iterator pos = out.begin(); pos != out.end(); pos++) {
|
||||
for (string::iterator pos = out.begin(); pos != out.end(); ++pos) {
|
||||
*pos = tolower(*pos);
|
||||
}
|
||||
return out;
|
||||
@@ -430,7 +453,7 @@ string V3Options::version() {
|
||||
string V3Options::argString (int argc, char** argv) {
|
||||
// Return list of arguments as simple string
|
||||
string opts;
|
||||
for (int i=0; i<argc; i++) {
|
||||
for (int i=0; i<argc; ++i) {
|
||||
if (i!=0) opts += " ";
|
||||
opts += string(argv[i]);
|
||||
}
|
||||
@@ -478,7 +501,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
// Parse parameters
|
||||
// Note argc and argv DO NOT INCLUDE the filename in [0]!!!
|
||||
// May be called recursively when there are -f files.
|
||||
for (int i=0; i<argc; i++) {
|
||||
for (int i=0; i<argc; ++i) {
|
||||
addArg(argv[i]); // -f's really should be inserted in the middle, but this is for debug
|
||||
}
|
||||
#define shift { ++i; }
|
||||
@@ -490,7 +513,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
addDefine (string (sw+strlen("+define+")));
|
||||
}
|
||||
else if ( !strncmp (sw, "+incdir+", 8)) {
|
||||
addIncDir (string (sw+strlen("+incdir+")));
|
||||
addIncDir (filenameSubstitute(string (sw+strlen("+incdir+"))));
|
||||
}
|
||||
else if ( !strncmp (sw, "+libext+", 8)) {
|
||||
string exts = string(sw+strlen("+libext+"));
|
||||
@@ -512,7 +535,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
char *sw = argv[i];
|
||||
bool flag = true;
|
||||
// Allow gnu -- switches
|
||||
if (sw[0]=='-' && sw[1]=='-') sw++;
|
||||
if (sw[0]=='-' && sw[1]=='-') ++sw;
|
||||
// Switch tests
|
||||
if ( !strcmp (sw, "-debug") ) {
|
||||
setDebugMode(3);
|
||||
@@ -560,7 +583,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
}
|
||||
else if ( !strcmp (sw, "-v") ) {
|
||||
shift;
|
||||
V3Options::addLibraryFile(argv[i]);
|
||||
V3Options::addLibraryFile(filenameSubstitute(argv[i]));
|
||||
}
|
||||
else if ( !strcmp (sw, "-version") ) {
|
||||
cout <<version();
|
||||
@@ -599,7 +622,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
else if ( onoff (sw, "-underline-zero", flag/*ref*/) ) { m_underlineZero = flag; }
|
||||
// Optimization
|
||||
else if ( !strncmp (sw, "-O", 2) ) {
|
||||
for (char* cp=sw+strlen("-O"); *cp; cp++) {
|
||||
for (char* cp=sw+strlen("-O"); *cp; ++cp) {
|
||||
flag = isupper(*cp);
|
||||
switch (tolower(*cp)) {
|
||||
case '0': optimize(0); break; // 0=all off
|
||||
@@ -694,7 +717,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
}
|
||||
else if ( !strcmp (sw, "-f") && (i+1)<argc ) {
|
||||
shift;
|
||||
parseOptsFile(fl, argv[i]);
|
||||
parseOptsFile(fl, filenameSubstitute(argv[i]));
|
||||
}
|
||||
else if ( !strcmp (sw, "-gdb") && (i+1)<argc ) {
|
||||
shift; // Used only in perl shell
|
||||
@@ -729,14 +752,14 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
|
||||
} // - options
|
||||
else {
|
||||
// Filename
|
||||
string filename = argv[i];
|
||||
string filename = filenameSubstitute(argv[i]);
|
||||
if (filename.find(".cpp") != string::npos
|
||||
|| filename.find(".cxx") != string::npos
|
||||
|| filename.find(".cc") != string::npos
|
||||
|| filename.find(".sp") != string::npos) {
|
||||
V3Options::addCppFile(argv[i]);
|
||||
V3Options::addCppFile(filename);
|
||||
} else {
|
||||
V3Options::addVFile(argv[i]);
|
||||
V3Options::addVFile(filename);
|
||||
}
|
||||
shift;
|
||||
}
|
||||
@@ -764,17 +787,17 @@ void V3Options::parseOptsFile(FileLine* fl, const string& filename) {
|
||||
getline(*ifp, line);
|
||||
// Strip simple comments
|
||||
string oline;
|
||||
for (string::const_iterator pos = line.begin(); pos != line.end(); pos++) {
|
||||
for (string::const_iterator pos = line.begin(); pos != line.end(); ++pos) {
|
||||
if (inCmt) {
|
||||
if (*pos=='*' && *(pos+1)=='/') {
|
||||
inCmt = false;
|
||||
pos++;
|
||||
++pos;
|
||||
}
|
||||
} else if (*pos=='/' && *(pos+1)=='/') {
|
||||
break; // Ignore to EOL
|
||||
} else if (*pos=='/' && *(pos+1)=='*') {
|
||||
inCmt = true;
|
||||
pos++;
|
||||
++pos;
|
||||
} else {
|
||||
oline += *pos;
|
||||
}
|
||||
@@ -797,9 +820,9 @@ void V3Options::parseOptsFile(FileLine* fl, const string& filename) {
|
||||
vector<string> args;
|
||||
string::size_type startpos = 0;
|
||||
while (startpos < whole_file.length()) {
|
||||
while (isspace(whole_file[startpos])) startpos++;
|
||||
while (isspace(whole_file[startpos])) ++startpos;
|
||||
string::size_type endpos = startpos;
|
||||
while (endpos < whole_file.length() && !isspace(whole_file[endpos])) endpos++;
|
||||
while (endpos < whole_file.length() && !isspace(whole_file[endpos])) ++endpos;
|
||||
if (startpos != endpos) {
|
||||
string arg (whole_file, startpos, endpos-startpos);
|
||||
args.reserve(args.size()+1);
|
||||
@@ -810,7 +833,7 @@ void V3Options::parseOptsFile(FileLine* fl, const string& filename) {
|
||||
|
||||
// Convert to argv style arg list and parse them
|
||||
char* argv [args.size()+1];
|
||||
for (unsigned i=0; i<args.size(); i++) {
|
||||
for (unsigned i=0; i<args.size(); ++i) {
|
||||
argv[i] = (char*)args[i].c_str();
|
||||
}
|
||||
parseOptsList(fl, args.size(), argv);
|
||||
|
||||
@@ -266,6 +266,7 @@ class V3Options {
|
||||
static string filenameNonExt (const string& filename); ///< Return non-extensioned (no .) part of filename
|
||||
static string filenameNonDirExt (const string& filename) { return filenameNonExt(filenameNonDir(filename)); } ///< Return basename of filename
|
||||
static string filenameDir (const string& filename); ///< Return directory part of filename
|
||||
static string filenameSubstitute (const string& filename); ///< Return filename with env vars removed
|
||||
static void unlinkRegexp(const string& dir, const string& regexp);
|
||||
|
||||
// METHODS (environment)
|
||||
|
||||
@@ -461,6 +461,7 @@ private:
|
||||
virtual void visit(AstModule* nodep, AstNUser*) {
|
||||
m_modp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstScope* nodep, AstNUser*) {
|
||||
UINFO(4," SCOPE "<<nodep<<endl);
|
||||
|
||||
@@ -142,6 +142,7 @@ private:
|
||||
m_modp = nodep;
|
||||
m_funcp = NULL;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCFunc* nodep, AstNUser*) {
|
||||
m_funcp = nodep;
|
||||
|
||||
@@ -31,6 +31,11 @@ class V3Lexer;
|
||||
class V3Number;
|
||||
class AstNode;
|
||||
|
||||
//======================================================================
|
||||
// Types (between parser & lexer)
|
||||
|
||||
typedef enum { uniq_NONE, uniq_UNIQUE, uniq_PRIORITY } V3UniqState;
|
||||
|
||||
//============================================================================
|
||||
|
||||
class V3Read {
|
||||
|
||||
@@ -70,6 +70,7 @@ private:
|
||||
m_modp = nodep;
|
||||
m_constXCvt = true;
|
||||
nodep->iterateChildren(*this);
|
||||
m_modp = NULL;
|
||||
}
|
||||
virtual void visit(AstCaseItem* nodep, AstNUser*) {
|
||||
m_constXCvt = false; // Avoid loosing the X's in casex
|
||||
|
||||
+19
-9
@@ -76,6 +76,11 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
int unrollCount() {
|
||||
return m_generate ? v3Global.opt.unrollCount()*16
|
||||
: v3Global.opt.unrollCount();
|
||||
}
|
||||
|
||||
bool forUnrollCheck(AstNode* nodep,
|
||||
AstNode* initp, // Maybe under nodep (no nextp), or standalone (ignore nextp)
|
||||
AstNode* precondsp, AstNode* condp,
|
||||
@@ -158,16 +163,16 @@ private:
|
||||
|| constStopp->width()>32 || constStopp->num().isFourState()
|
||||
|| constIncp->width()>32 || constIncp->num().isFourState())
|
||||
return cantUnroll(nodep, "init/final/increment too large or four state");
|
||||
vlsint32_t valInit = constInitp->num().toUInt(); // Extract as unsigned, then make signed
|
||||
vlsint32_t valStop = constStopp->num().toUInt(); // Extract as unsigned, then make signed
|
||||
vlsint32_t valInit = constInitp->num().toSInt();
|
||||
vlsint32_t valStop = constStopp->num().toSInt();
|
||||
if (lte) valStop++; if (gte) valStop--;
|
||||
vlsint32_t valInc = constIncp->num().toSInt();
|
||||
if (subtract) valInc = -valInc;
|
||||
UINFO(8," In Numbers: for (v="<<valInit<<"; v<"<<valStop<<"; v=v+"<<valInc<<")\n");
|
||||
//
|
||||
if (!m_generate) {
|
||||
UINFO(8, " ~Iters: "<<((valStop - valInit)/valInc)<<" c="<<v3Global.opt.unrollCount()<<endl);
|
||||
if (((valStop - valInit)/valInc) > v3Global.opt.unrollCount())
|
||||
UINFO(8, " ~Iters: "<<((valStop - valInit)/valInc)<<" c="<<unrollCount()<<endl);
|
||||
if (((valStop - valInit)/valInc) > unrollCount())
|
||||
return cantUnroll(nodep, "too many iterations");
|
||||
|
||||
// Less than 10 statements in the body?
|
||||
@@ -253,8 +258,8 @@ private:
|
||||
else newbodysp = oneloopp;
|
||||
|
||||
m_statIters++;
|
||||
if (++times > v3Global.opt.unrollCount()*3) {
|
||||
nodep->v3error("Loop unrolling took too long; probably this is an infinite loop.");
|
||||
if (++times > unrollCount()*3) {
|
||||
nodep->v3error("Loop unrolling took too long; probably this is an infinite loop, or set --unroll-count above "<<unrollCount());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -331,7 +336,11 @@ private:
|
||||
}
|
||||
}
|
||||
virtual void visit(AstNodeFor* nodep, AstNUser*) {
|
||||
nodep->v3error("V3Task should have removed standard FORs");
|
||||
if (m_generate) { // Ignore for's when expanding genfor's
|
||||
nodep->iterateChildren(*this);
|
||||
} else {
|
||||
nodep->v3error("V3Task should have removed standard FORs");
|
||||
}
|
||||
}
|
||||
|
||||
virtual void visit(AstBegin* nodep, AstNUser*) {
|
||||
@@ -347,9 +356,10 @@ private:
|
||||
) {
|
||||
// Rename it, as otherwise we may get a conflict
|
||||
// V3Begin sees these DOTs and makes CellInlines for us.
|
||||
string nname = (string)"genfor"+cvtToStr(m_varValuep->asInt())+"__DOT__"+nodep->name();
|
||||
string index = AstNode::encodeNumber(m_varValuep->toSInt());
|
||||
string nname = (string)"genfor"+index+"__DOT__"+nodep->name();
|
||||
// Verilog seems to drop the for loop name and tack on [#]
|
||||
nname = nodep->name() + "__BRA__" + cvtToStr(m_varValuep->asInt()) + "__KET__";
|
||||
nname = nodep->name() + "__BRA__" + index + "__KET__";
|
||||
//UINFO(8," Rename begin "<<nname<<" "<<nodep<<endl);
|
||||
nodep->name(nname);
|
||||
}
|
||||
|
||||
+13
-4
@@ -238,9 +238,9 @@ private:
|
||||
if (!lsbConstp) nodep->v3error("LSB of bit range isn't a constant");
|
||||
nodep->width(1,1); return;
|
||||
}
|
||||
uint32_t msb = msbConstp->asInt();
|
||||
uint32_t lsb = lsbConstp->asInt();
|
||||
if (msb > (1UL<<28)) nodep->v3error("MSB of bit range is huge; vector of over 1billion bits: 0x"<<hex<<msb);
|
||||
int msb = msbConstp->toSInt();
|
||||
int lsb = lsbConstp->toSInt();
|
||||
if (msb > (1<<28)) nodep->v3error("MSB of bit range is huge; vector of over 1billion bits: 0x"<<hex<<msb);
|
||||
if (msb<lsb) {
|
||||
// If it's a array, ok to have either ordering, we'll just correct
|
||||
// So, see if we're sitting under a variable's arrayp.
|
||||
@@ -296,7 +296,7 @@ private:
|
||||
int fromlsb = 0;
|
||||
AstNodeVarRef* varrp = nodep->fromp()->castNodeVarRef();
|
||||
if (varrp && varrp->varp()->rangep()) { // Selecting a bit from a multibit register
|
||||
frommsb = varrp->varp()->msb();
|
||||
frommsb = varrp->varp()->msbMaxSelect(); // Corrected for negative lsb
|
||||
fromlsb = varrp->varp()->lsb();
|
||||
}
|
||||
int selwidth = V3Number::log2b(frommsb+1-1)+1; // Width to address a bit
|
||||
@@ -332,6 +332,8 @@ private:
|
||||
frommsb = varrp->varp()->arrayp(dimension)->msbConst();
|
||||
fromlsb = varrp->varp()->arrayp(dimension)->lsbConst();
|
||||
if (fromlsb>frommsb) {int t=frommsb; frommsb=fromlsb; fromlsb=t; }
|
||||
// However, if the lsb<0 we may go negative, so need more bits!
|
||||
if (fromlsb < 0) frommsb += -fromlsb;
|
||||
nodep->width(outwidth,outwidth); // Width out = width of array
|
||||
}
|
||||
int selwidth = V3Number::log2b(frommsb+1-1)+1; // Width to address a bit
|
||||
@@ -911,6 +913,13 @@ void WidthVisitor::widthCheck (AstNode* nodep, const char* side,
|
||||
if (expWidthMin==0) expWidthMin = expWidth;
|
||||
bool bad = widthBad(underp,expWidth,expWidthMin);
|
||||
if (bad && fixAutoExtend(underp/*ref*/,expWidth)) bad=false; // Changes underp
|
||||
if (underp->castConst() && underp->castConst()->num().isFromString()
|
||||
&& expWidth > underp->width()
|
||||
&& (((expWidth - underp->width()) % 8) == 0)) { // At least it's character sized
|
||||
// reg [31:0] == "foo" we'll consider probably fine.
|
||||
// Maybe this should be a special warning? Not for now.
|
||||
ignoreWarn = true;
|
||||
}
|
||||
if (bad && !ignoreWarn) {
|
||||
if (debug()>4) nodep->backp()->dumpTree(cout," back: ");
|
||||
nodep->v3warn(WIDTH,"Operator "<<nodep->typeName()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//**********************************************************************
|
||||
//**** Version and host name
|
||||
|
||||
#define DTVERSION "Verilator 3.671 2008/07/23"
|
||||
#define DTVERSION "Verilator 3.681 2008/11/12"
|
||||
|
||||
//**********************************************************************
|
||||
//**** Functions
|
||||
@@ -84,6 +84,7 @@
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
+5
-5
@@ -355,7 +355,11 @@ escid \\[^ \t\f\r\n]+
|
||||
"endproperty" {yylval.fileline = CRELINE(); return yENDPROPERTY;}
|
||||
"final" {yylval.fileline = CRELINE(); return yFINAL;}
|
||||
"iff" {yylval.fileline = CRELINE(); return yIFF;}
|
||||
"priority" {yylval.fileline = CRELINE(); return yPRIORITY;}
|
||||
"static" {yylval.fileline = CRELINE(); return ySTATIC;}
|
||||
"timeprecision" {yylval.fileline = CRELINE(); return yTIMEPRECISION;}
|
||||
"timeunit" {yylval.fileline = CRELINE(); return yTIMEUNIT;}
|
||||
"unique" {yylval.fileline = CRELINE(); return yUNIQUE;}
|
||||
/* Generic unsupported warnings */
|
||||
/* Note assert_strobe was in SystemVerilog 3.1, but removed for SystemVerilog 2005 */
|
||||
"alias" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
@@ -406,7 +410,6 @@ escid \\[^ \t\f\r\n]+
|
||||
"null" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"package" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"packed" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"priority" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"program" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"protected" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"pure" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
@@ -425,11 +428,8 @@ escid \\[^ \t\f\r\n]+
|
||||
"tagged" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"this" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"throughout" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"timeprecision" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"timeunit" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"type" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"typedef" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"unique" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"var" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"virtual" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
"void" {yyerrorf("Unsupported: SystemVerilog 2005 reserved word not implemented: %s",yytext);}
|
||||
@@ -694,7 +694,7 @@ escid \\[^ \t\f\r\n]+
|
||||
}
|
||||
[0-9][_0-9]*(\.[_0-9]+)?(fs|ps|ns|us|ms|s|step) {
|
||||
yylval.cdouble = 0; /* Only for times, not used yet */
|
||||
return yaFLOATNUM;
|
||||
return yaTIMENUM;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+39
-7
@@ -57,6 +57,7 @@ public:
|
||||
static string s_instModule; // Name of module referenced for instantiations
|
||||
static AstPin* s_instParamp; // Parameters for instantiations
|
||||
static bool s_trace; // Tracing is turned on
|
||||
static int s_uniqueAttr; // Bitmask of unique/priority keywords
|
||||
|
||||
static AstVar* createVariable(FileLine* fileline, string name, AstRange* arrayp);
|
||||
static AstNode* createSupplyExpr(FileLine* fileline, string name, int value);
|
||||
@@ -107,6 +108,7 @@ class AstSenTree;
|
||||
string* strp;
|
||||
int cint;
|
||||
double cdouble;
|
||||
V3UniqState uniqstate;
|
||||
|
||||
AstNode* nodep;
|
||||
|
||||
@@ -139,6 +141,8 @@ class AstSenTree;
|
||||
|
||||
// IEEE: integral_number
|
||||
%token<nump> yaINTNUM "INTEGER NUMBER"
|
||||
// IEEE: time_literal + time_unit
|
||||
%token<cdouble> yaTIMENUM "TIME NUMBER"
|
||||
// IEEE: string_literal
|
||||
%token<strp> yaSTRING "STRING"
|
||||
%token<fileline> yaTIMINGSPEC "TIMING SPEC ELEMENT"
|
||||
@@ -201,6 +205,7 @@ class AstSenTree;
|
||||
%token<fileline> yOUTPUT "output"
|
||||
%token<fileline> yPARAMETER "parameter"
|
||||
%token<fileline> yPOSEDGE "posedge"
|
||||
%token<fileline> yPRIORITY "priority"
|
||||
%token<fileline> yPROPERTY "property"
|
||||
%token<fileline> yREG "reg"
|
||||
%token<fileline> ySCALARED "scalared"
|
||||
@@ -210,8 +215,11 @@ class AstSenTree;
|
||||
%token<fileline> ySUPPLY0 "supply0"
|
||||
%token<fileline> ySUPPLY1 "supply1"
|
||||
%token<fileline> yTASK "task"
|
||||
%token<fileline> yTIMEPRECISION "timeprecision"
|
||||
%token<fileline> yTIMEUNIT "timeunit"
|
||||
%token<fileline> yTRI "tri"
|
||||
%token<fileline> yTRUE "true"
|
||||
%token<fileline> yUNIQUE "unique"
|
||||
%token<fileline> yUNSIGNED "unsigned"
|
||||
%token<fileline> yVECTORED "vectored"
|
||||
%token<fileline> yWHILE "while"
|
||||
@@ -425,7 +433,7 @@ statePop: /* empty */ { V3Read::statePop(); }
|
||||
// Files
|
||||
|
||||
fileE: /* empty */ { }
|
||||
| file { }
|
||||
| timeunitsDeclE file { }
|
||||
;
|
||||
|
||||
file: description { }
|
||||
@@ -436,13 +444,26 @@ file: description { }
|
||||
description: moduleDecl { }
|
||||
;
|
||||
|
||||
// IEEE: timeunits_declaration + empty
|
||||
timeunitsDeclE: /*empty*/ { }
|
||||
| yTIMEUNIT yaTIMENUM ';' { }
|
||||
| yTIMEPRECISION yaTIMENUM ';' { }
|
||||
| yTIMEUNIT yaTIMENUM ';' yTIMEPRECISION yaTIMENUM ';' { }
|
||||
| yTIMEPRECISION yaTIMENUM ';' yTIMEUNIT yaTIMENUM ';' { }
|
||||
;
|
||||
|
||||
//**********************************************************************
|
||||
// Module headers
|
||||
|
||||
// IEEE: module_declaration:
|
||||
moduleDecl: modHdr modParE modPortsE ';' modItemListE yENDMODULE endLabelE
|
||||
moduleDecl: modHeader timeunitsDeclE modItemListE yENDMODULE endLabelE
|
||||
{ if ($3) $1->addStmtp($3); }
|
||||
;
|
||||
|
||||
modHeader<modulep>:
|
||||
modHdr modParE modPortsE ';'
|
||||
{ $1->modTrace(V3Parse::s_trace); // Stash for implicit wires, etc
|
||||
if ($2) $1->addStmtp($2); if ($3) $1->addStmtp($3); if ($5) $1->addStmtp($5); }
|
||||
if ($2) $1->addStmtp($2); if ($3) $1->addStmtp($3); }
|
||||
;
|
||||
|
||||
modHdr<modulep>:
|
||||
@@ -719,6 +740,7 @@ dlyTerm<nodep>:
|
||||
yaID { $$ = NULL; }
|
||||
| yaINTNUM { $$ = NULL; }
|
||||
| yaFLOATNUM { $$ = NULL; }
|
||||
| yaTIMENUM { $$ = NULL; }
|
||||
;
|
||||
|
||||
// IEEE: mintypmax_expression and constant_mintypmax_expression
|
||||
@@ -982,10 +1004,20 @@ stmt<nodep>:
|
||||
//************************************************
|
||||
// Case/If
|
||||
|
||||
unique_priorityE<uniqstate>:
|
||||
/*empty*/ { $$ = uniq_NONE; }
|
||||
| yPRIORITY { $$ = uniq_PRIORITY; }
|
||||
| yUNIQUE { $$ = uniq_UNIQUE; }
|
||||
;
|
||||
|
||||
stateCaseForIf<nodep>:
|
||||
caseStmt caseAttrE caseListE yENDCASE { $$ = $1; if ($3) $1->addItemsp($3); }
|
||||
| yIF '(' expr ')' stmtBlock %prec prLOWER_THAN_ELSE { $$ = new AstIf($1,$3,$5,NULL); }
|
||||
| yIF '(' expr ')' stmtBlock yELSE stmtBlock { $$ = new AstIf($1,$3,$5,$7); }
|
||||
unique_priorityE caseStmt caseAttrE caseListE yENDCASE { $$ = $2; if ($4) $2->addItemsp($4);
|
||||
if ($1 == uniq_UNIQUE) $2->parallelPragma(true);
|
||||
if ($1 == uniq_PRIORITY) $2->fullPragma(true); }
|
||||
| unique_priorityE yIF '(' expr ')' stmtBlock %prec prLOWER_THAN_ELSE
|
||||
{ $$ = new AstIf($2,$4,$6,NULL); }
|
||||
| unique_priorityE yIF '(' expr ')' stmtBlock yELSE stmtBlock
|
||||
{ $$ = new AstIf($2,$4,$6,$8); }
|
||||
| yFOR '(' varRefBase '=' expr ';' expr ';' varRefBase '=' expr ')' stmtBlock
|
||||
{ $$ = new AstFor($1, new AstAssign($4,$3,$5)
|
||||
,$7, new AstAssign($10,$9,$11)
|
||||
@@ -1486,7 +1518,7 @@ pslDirOne<nodep>:
|
||||
;
|
||||
|
||||
pslDecl<nodep>:
|
||||
yDEFAULT yPSL_CLOCK '=' senitemEdge ';' { $$ = new AstPslDefClock($3, $4); UINFO(0,"CRE "<<$$<<endl)}
|
||||
yDEFAULT yPSL_CLOCK '=' senitemEdge ';' { $$ = new AstPslDefClock($3, $4); }
|
||||
| yDEFAULT yPSL_CLOCK '=' '(' senitemEdge ')' ';' { $$ = new AstPslDefClock($3, $5); }
|
||||
;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ endif
|
||||
PRODUCTS += --v3
|
||||
|
||||
ifeq ($(VERILATOR_AUTHOR_SITE),1)
|
||||
DRIVER_FLAGS += -j 4
|
||||
DRIVER_FLAGS += -j 0
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
|
||||
+44
-13
@@ -28,6 +28,7 @@ use Pod::Usage;
|
||||
use Data::Dumper;
|
||||
use strict;
|
||||
use vars qw ($Debug %Vars $Driver $Fork);
|
||||
use POSIX qw(strftime);
|
||||
|
||||
$::Driver = 1;
|
||||
|
||||
@@ -74,6 +75,9 @@ if (! GetOptions (
|
||||
)) {
|
||||
usage();
|
||||
}
|
||||
|
||||
$opt_jobs = calc_jobs() if defined $opt_jobs && $opt_jobs==0;
|
||||
|
||||
$Fork->max_proc($opt_jobs);
|
||||
|
||||
if (!$opt_vcs && !$opt_nc && !$opt_v3) {
|
||||
@@ -81,7 +85,7 @@ if (!$opt_vcs && !$opt_nc && !$opt_v3) {
|
||||
}
|
||||
|
||||
if ($#opt_tests<0) {
|
||||
push @opt_tests, glob ("t/*.pl");
|
||||
push @opt_tests, glob ("t/t_*.pl");
|
||||
}
|
||||
|
||||
mkdir "obj_dir";
|
||||
@@ -125,8 +129,8 @@ sub one_test {
|
||||
$test->oprint("FAILED: ","*"x60,"\n");
|
||||
push @fails, "\t#".$test->soprint("%Error: $test->{errors}\n");
|
||||
my $j = ($opt_jobs>1?" -j 2":"");
|
||||
push @fails, "\t\tmake$j && ( cd test_regress ; "
|
||||
.$test->{pl_filename}." ".join(' ',@Orig_ARGV_Sw)." )\n";
|
||||
push @fails, "\t\tmake$j && test_regress/"
|
||||
.$test->{pl_filename}." ".join(' ',@Orig_ARGV_Sw)."\n";
|
||||
$failcnt++;
|
||||
if ($opt_stop) { die "%Error: --stop and errors found\n"; }
|
||||
}
|
||||
@@ -134,14 +138,9 @@ sub one_test {
|
||||
)->ready();
|
||||
}
|
||||
|
||||
print "\n";
|
||||
print "="x70,"\n";
|
||||
print "TESTS Passed $okcnt Failed $failcnt\n";
|
||||
foreach my $f (@fails) {
|
||||
chomp $f;
|
||||
print "$f\n";
|
||||
}
|
||||
print "TESTS Passed $okcnt Failed $failcnt\n";
|
||||
report(\@fails, undef);
|
||||
report(\@fails, "obj_dir/driver_".strftime("%Y%m%d_%H%M%S.log", localtime));
|
||||
|
||||
exit(10) if $failcnt;
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -164,6 +163,35 @@ sub parameter {
|
||||
}
|
||||
}
|
||||
|
||||
sub calc_jobs {
|
||||
my $ok = eval "
|
||||
use Unix::Processors;
|
||||
return Unix::Processors->new->max_online;
|
||||
";
|
||||
$ok && !$@ or die "%Error: Can't use -j: $@\n";
|
||||
print "driver.pl: Found $ok cores, using -j ",$ok+1,"\n";
|
||||
return $ok + 1;
|
||||
}
|
||||
|
||||
sub report {
|
||||
my $fails = shift;
|
||||
my $filename = shift;
|
||||
|
||||
my $fh = \*STDOUT;
|
||||
if ($filename) {
|
||||
$fh = IO::File->new(">$filename") or die "%Error: $! writing $filename,";
|
||||
}
|
||||
|
||||
$fh->print("\n");
|
||||
$fh->print("="x70,"\n");
|
||||
$fh->print("TESTS Passed $okcnt Failed $failcnt\n");
|
||||
foreach my $f (@$fails) {
|
||||
chomp $f;
|
||||
$fh->print("$f\n");
|
||||
}
|
||||
$fh->print("TESTS Passed $okcnt Failed $failcnt\n");
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
#######################################################################
|
||||
#######################################################################
|
||||
@@ -453,7 +481,9 @@ sub _run {
|
||||
my %param = (tee=>1,
|
||||
@_);
|
||||
my $command = join(' ',@{$param{cmd}});
|
||||
print "\t$command\n";
|
||||
print "\t$command";
|
||||
print " > $param{logfile}" if $param{logfile};
|
||||
print "\n";
|
||||
|
||||
if ($param{logfile}) {
|
||||
open(SAVEOUT, ">&STDOUT") or die "%Error: Can't dup stdout";
|
||||
@@ -896,7 +926,8 @@ Displays this message and program version and exits.
|
||||
|
||||
=item --j #
|
||||
|
||||
Run number of parallel tests. Requires Parallel::Forker project.
|
||||
Run number of parallel tests, or 0 to determine the count based on the
|
||||
number of cores installed. Requires Parallel::Forker project.
|
||||
|
||||
=item --optimize
|
||||
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/perl
|
||||
# DESCRIPTION: Verilator: Verilog Test driver bootstrapper
|
||||
#
|
||||
# Copyright 2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
# This is exec'ed by every test that is run standalone (called from the
|
||||
# shell as ./t_test_name.pl)
|
||||
|
||||
use FindBin;
|
||||
use Cwd qw(chdir);
|
||||
|
||||
my @args = @ARGV;
|
||||
chdir("$FindBin::Bin/..");
|
||||
|
||||
@args = map { s!.*test_regress/!!; $_; } @args;
|
||||
|
||||
print "cd $ENV{PWD} && $FindBin::Bin/bootstrap.pl ",join(' ',@args),"\n";
|
||||
exec("./driver.pl", @args);
|
||||
die;
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2004 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
@@ -23,8 +23,8 @@ if ($Last_Self->{nc}) {
|
||||
{
|
||||
my $fh = IO::File->new(">$cf") or die "%Error: $! writing $cf,";
|
||||
$fh->printf("report_summary -module *\n");
|
||||
$fh->printf("report_detail -both -module *\n");
|
||||
$fh->printf("report_html -both -module * > obj_dir/${name}__nccover.html\n");
|
||||
$fh->printf("report_detail -both -instance *\n");
|
||||
$fh->printf("report_html -both -instance * > obj_dir/${name}__nccover.html\n");
|
||||
$fh->close;
|
||||
}
|
||||
$Last_Self->_run (logfile=>"obj_dir/${name}__nccover.log",
|
||||
@@ -36,7 +36,9 @@ if ($Last_Self->{nc}) {
|
||||
file_grep ("obj_dir/$Last_Self->{name}_simx.log", qr/COVER: Cyc==4/);
|
||||
file_grep ("obj_dir/$Last_Self->{name}_simx.log", qr/COVER: Cyc==5/);
|
||||
file_grep ("obj_dir/$Last_Self->{name}_simx.log", qr/COVER: Cyc==6/);
|
||||
file_grep ($Last_Self->{coverage_filename}, qr/cyc_eq_5.*,c=>[^0]/);
|
||||
|
||||
# Allow old Perl format dump, or new binary dump
|
||||
file_grep ($Last_Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
||||
@@ -64,7 +64,22 @@ module Test
|
||||
cover property (@(posedge clk) disable iff (!toggle) cyc==8)
|
||||
$stop;
|
||||
|
||||
//============================================================
|
||||
// Using a macro and generate
|
||||
wire reset = (cyc < 2);
|
||||
|
||||
`define covclk(eqn) cover property (@(posedge clk) disable iff (reset) (eqn))
|
||||
|
||||
genvar i;
|
||||
generate
|
||||
for (i=0; i<32; i=i+1)
|
||||
begin: cycval
|
||||
CycCover_i: `covclk( cyc[i] );
|
||||
end
|
||||
endgenerate
|
||||
|
||||
`ifndef verilator // Unsupported
|
||||
//============================================================
|
||||
// Using a more complicated property
|
||||
property C1;
|
||||
@(posedge clk)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@ module t (/*AUTOARG*/
|
||||
2'b1_0: ;
|
||||
// Note no default
|
||||
endcase
|
||||
priority case ({a,b_fc})
|
||||
2'b0_0: ;
|
||||
2'b0_1: ;
|
||||
2'b1_0: ;
|
||||
// Note no default
|
||||
endcase
|
||||
end
|
||||
|
||||
always @* begin
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2004 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
|
||||
compile (
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
||||
# Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user