Merge branch 'master' of ssh://icarus.com/~steve-icarus/git/verilog

This commit is contained in:
Stephen Williams 2010-03-06 16:21:29 -08:00
commit dcc759d417
13 changed files with 318 additions and 155 deletions

View File

@ -258,11 +258,12 @@ const verireal& PEFNumber::value() const
} }
PEIdent::PEIdent(const pform_name_t&that) PEIdent::PEIdent(const pform_name_t&that)
: path_(that) : path_(that), no_implicit_sig_(false)
{ {
} }
PEIdent::PEIdent(perm_string s) PEIdent::PEIdent(perm_string s, bool no_implicit_sig)
: no_implicit_sig_(no_implicit_sig)
{ {
path_.push_back(name_component_t(s)); path_.push_back(name_component_t(s));
} }
@ -273,9 +274,13 @@ PEIdent::~PEIdent()
void PEIdent::declare_implicit_nets(LexicalScope*scope, NetNet::Type type) void PEIdent::declare_implicit_nets(LexicalScope*scope, NetNet::Type type)
{ {
/* We create an implicit wire if this is a simple identifier and /* We create an implicit wire if:
if an identifier of that name has not already been declared in - this is a simple identifier
any enclosing scope. */ - an identifier of that name has not already been declared in
any enclosing scope.
- this is not an implicit named port connection */
if (no_implicit_sig_)
return;
if ((path_.size() == 1) && (path_.front().index.size() == 0)) { if ((path_.size() == 1) && (path_.front().index.size() == 0)) {
perm_string name = path_.front().name; perm_string name = path_.front().name;
LexicalScope*ss = scope; LexicalScope*ss = scope;

View File

@ -255,7 +255,7 @@ class PEFNumber : public PExpr {
class PEIdent : public PExpr { class PEIdent : public PExpr {
public: public:
explicit PEIdent(perm_string); explicit PEIdent(perm_string, bool no_implicit_sig=false);
explicit PEIdent(const pform_name_t&); explicit PEIdent(const pform_name_t&);
~PEIdent(); ~PEIdent();
@ -298,6 +298,7 @@ class PEIdent : public PExpr {
private: private:
pform_name_t path_; pform_name_t path_;
bool no_implicit_sig_;
private: private:
// Common functions to calculate parts of part/bit // Common functions to calculate parts of part/bit

View File

@ -123,6 +123,7 @@ enum generation_t {
GN_VER2001_NOCONFIG = 2, GN_VER2001_NOCONFIG = 2,
GN_VER2001 = 3, GN_VER2001 = 3,
GN_VER2005 = 4, GN_VER2005 = 4,
GN_VER2009 = 5,
GN_DEFAULT = 4 GN_DEFAULT = 4
}; };
@ -141,9 +142,6 @@ extern bool gn_specify_blocks_flag;
/* If this flag is true, then support/elaborate Verilog-AMS. */ /* If this flag is true, then support/elaborate Verilog-AMS. */
extern bool gn_verilog_ams_flag; extern bool gn_verilog_ams_flag;
/* If this flag is true, then support/elaborate SystemVerilog. */
extern bool gn_system_verilog_flag;
/* If this flag is false a warning is printed when the port declaration /* If this flag is false a warning is printed when the port declaration
is scalar and the net/register definition is vectored. */ is scalar and the net/register definition is vectored. */
extern bool gn_io_range_error_flag; extern bool gn_io_range_error_flag;
@ -162,7 +160,7 @@ enum { GN_KEYWORDS_1364_1995 = 0x0001,
GN_KEYWORDS_1364_2001_CONFIG = 0x0004, GN_KEYWORDS_1364_2001_CONFIG = 0x0004,
GN_KEYWORDS_1364_2005 = 0x0008, GN_KEYWORDS_1364_2005 = 0x0008,
GN_KEYWORDS_VAMS_2_3 = 0x0010, GN_KEYWORDS_VAMS_2_3 = 0x0010,
GN_KEYWORDS_1800_2005 = 0x0020, GN_KEYWORDS_1800_2009 = 0x0020,
GN_KEYWORDS_ICARUS = 0x8000 GN_KEYWORDS_ICARUS = 0x8000
}; };
extern int lexor_keyword_mask; extern int lexor_keyword_mask;

View File

@ -6,7 +6,7 @@ iverilog - Icarus Verilog compiler
.B iverilog .B iverilog
[\-ESVv] [\-Bpath] [\-ccmdfile|\-fcmdfile] [\-Dmacro[=defn]] [\-ESVv] [\-Bpath] [\-ccmdfile|\-fcmdfile] [\-Dmacro[=defn]]
[\-Pparameter=value] [\-pflag=value] [\-Pparameter=value] [\-pflag=value]
[\-dname] [\-g1995|\-g2001|\-g2005|\-g<feature>] [\-dname] [\-g1995|\-g2001|\-g2005|-g2009|\-g<feature>]
[\-Iincludedir] [\-mmodule] [\-M[mode=]file] [\-Nfile] [\-ooutputfilename] [\-Iincludedir] [\-mmodule] [\-M[mode=]file] [\-Nfile] [\-ooutputfilename]
[\-stopmodule] [\-ttype] [\-Tmin/typ/max] [\-Wclass] [\-ypath] sourcefile [\-stopmodule] [\-ttype] [\-Tmin/typ/max] [\-Wclass] [\-ypath] sourcefile
@ -61,11 +61,11 @@ is the Verilog input, but with file inclusions and macro references
expanded and removed. This is useful, for example, to preprocess expanded and removed. This is useful, for example, to preprocess
Verilog source for use by other compilers. Verilog source for use by other compilers.
.TP 8 .TP 8
.B -g1995\fI|\fP-g2001\fI|\fP-g2001-noconfig\fI|\fP-g2005 .B -g1995\fI|\fP-g2001\fI|\fP-g2001-noconfig\fI|\fP-g2005\fI|\fP-g2009
Select the Verilog language \fIgeneration\fP to support in the Select the Verilog language \fIgeneration\fP to support in the
compiler. This selects between \fIIEEE1364\-1995\fP, compiler. This selects between \fIIEEE1364\-1995\fP,
\fIIEEE1364\-2001\fP, or \fIIEEE1364\-2005\fP. Normally, \fIIEEE1364\-2001\fP, \fIIEEE1364\-2005\fP, or \fIIEEE1800-2009\fP.
Icarus Verilog defaults to the latest known generation of the Normally, Icarus Verilog defaults to the latest known generation of the
language. This flag is most useful to restrict the language to a set language. This flag is most useful to restrict the language to a set
supported by tools of specific generations, for compatibility with supported by tools of specific generations, for compatibility with
other tools. other tools.
@ -74,10 +74,6 @@ other tools.
Enable or disable (default) support for Verilog\-AMS. Enable or disable (default) support for Verilog\-AMS.
Very little Verilog\-AMS specific functionality is currently supported. Very little Verilog\-AMS specific functionality is currently supported.
.TP 8 .TP 8
.B -gsystem-verilog\fI|\fP-gno-system-verilog
Enable or disable (default) support for SystemVerilog.
Very little SystemVerilog specific functionality is currently supported.
.TP 8
.B -gspecify\fI|\fP-gno-specify .B -gspecify\fI|\fP-gno-specify
Enable or disable (default) specify block support. When enabled, Enable or disable (default) specify block support. When enabled,
specify block code is elaborated. When disabled, specify blocks are specify block code is elaborated. When disabled, specify blocks are

View File

@ -39,7 +39,7 @@ const char NOTICE[] =
const char HELP[] = const char HELP[] =
"Usage: iverilog [-ESvV] [-B base] [-c cmdfile|-f cmdfile]\n" "Usage: iverilog [-ESvV] [-B base] [-c cmdfile|-f cmdfile]\n"
" [-g1995|-g2001|-g2005] [-g<feature>]\n" " [-g1995|-g2001|-g2005|-g2009] [-g<feature>]\n"
" [-D macro[=defn]] [-I includedir]\n" " [-D macro[=defn]] [-I includedir]\n"
" [-M [mode=]depfile] [-m module]\n" " [-M [mode=]depfile] [-m module]\n"
" [-N file] [-o filename] [-p flag=value]\n" " [-N file] [-o filename] [-p flag=value]\n"
@ -119,7 +119,6 @@ const char*gen_icarus = "icarus-misc";
const char*gen_io_range_error = "io-range-error"; const char*gen_io_range_error = "io-range-error";
const char*gen_strict_ca_eval = "no-strict-ca-eval"; const char*gen_strict_ca_eval = "no-strict-ca-eval";
const char*gen_verilog_ams = "no-verilog-ams"; const char*gen_verilog_ams = "no-verilog-ams";
const char*gen_system_verilog = "no-system-verilog";
/* Boolean: true means use a default include dir, false means don't */ /* Boolean: true means use a default include dir, false means don't */
int gen_std_include = 1; int gen_std_include = 1;
@ -620,6 +619,9 @@ int process_generation(const char*name)
else if (strcmp(name,"2005") == 0) else if (strcmp(name,"2005") == 0)
generation = "2005"; generation = "2005";
else if (strcmp(name,"2009") == 0)
generation = "2009";
else if (strcmp(name,"1") == 0) { /* Deprecated: use 1995 */ else if (strcmp(name,"1") == 0) { /* Deprecated: use 1995 */
generation = "1995"; generation = "1995";
gen_xtypes = "no-xtypes"; gen_xtypes = "no-xtypes";
@ -683,12 +685,6 @@ int process_generation(const char*name)
else if (strcmp(name,"no-verilog-ams") == 0) else if (strcmp(name,"no-verilog-ams") == 0)
gen_verilog_ams = "no-verilog-ams"; gen_verilog_ams = "no-verilog-ams";
else if (strcmp(name,"system-verilog") == 0)
gen_system_verilog = "system-verilog";
else if (strcmp(name,"no-system-verilog") == 0)
gen_verilog_ams = "no-system-verilog";
else { else {
fprintf(stderr, "Unknown/Unsupported Language generation " fprintf(stderr, "Unknown/Unsupported Language generation "
"%s\n\n", name); "%s\n\n", name);
@ -696,17 +692,17 @@ int process_generation(const char*name)
fprintf(stderr, " 1995 -- IEEE1364-1995\n" fprintf(stderr, " 1995 -- IEEE1364-1995\n"
" 2001 -- IEEE1364-2001\n" " 2001 -- IEEE1364-2001\n"
" 2005 -- IEEE1364-2005\n" " 2005 -- IEEE1364-2005\n"
" 2009 -- IEEE1800-2009\n"
"Other generation flags:\n" "Other generation flags:\n"
" specify | no-specify\n" " specify | no-specify\n"
" verilog-ams | no-verilog-ams\n" " verilog-ams | no-verilog-ams\n"
" system-verilog | no-system-verilog\n"
" std-include | no-std-include\n" " std-include | no-std-include\n"
" relative-include | no-relative-include\n" " relative-include | no-relative-include\n"
" xtypes | no-xtypes\n" " xtypes | no-xtypes\n"
" icarus-misc | no-icarus-misc\n" " icarus-misc | no-icarus-misc\n"
" io-range-error | no-io-range-error\n" " io-range-error | no-io-range-error\n"
" strict-ca-eval | no-strict-ca-eval\n" " strict-ca-eval | no-strict-ca-eval\n");
" system-verilog\n");
return 1; return 1;
} }
@ -1006,9 +1002,10 @@ int main(int argc, char **argv)
how to handle them. */ how to handle them. */
fprintf(iconfig_file, "sys_func:%s%csystem.sft\n", base, sep); fprintf(iconfig_file, "sys_func:%s%csystem.sft\n", base, sep);
/* If verilog-2005 is enabled or icarus-misc or verilog-ams, /* If verilog-2005/9 is enabled or icarus-misc or verilog-ams,
* then include the v2005_math library. */ * then include the v2005_math library. */
if (strcmp(generation, "2005") == 0 || if (strcmp(generation, "2005") == 0 ||
strcmp(generation, "2009") == 0 ||
strcmp(gen_icarus, "icarus-misc") == 0 || strcmp(gen_icarus, "icarus-misc") == 0 ||
strcmp(gen_verilog_ams, "verilog-ams") == 0) { strcmp(gen_verilog_ams, "verilog-ams") == 0) {
fprintf(iconfig_file, "sys_func:%s%cv2005_math.sft\n", base, sep); fprintf(iconfig_file, "sys_func:%s%cv2005_math.sft\n", base, sep);
@ -1030,7 +1027,6 @@ int main(int argc, char **argv)
fprintf(iconfig_file, "generation:%s\n", gen_strict_ca_eval); fprintf(iconfig_file, "generation:%s\n", gen_strict_ca_eval);
fprintf(iconfig_file, "generation:%s\n", gen_verilog_ams); fprintf(iconfig_file, "generation:%s\n", gen_verilog_ams);
fprintf(iconfig_file, "generation:%s\n", gen_icarus); fprintf(iconfig_file, "generation:%s\n", gen_icarus);
fprintf(iconfig_file, "generation:%s\n", gen_system_verilog);
fprintf(iconfig_file, "warnings:%s\n", warning_flags); fprintf(iconfig_file, "warnings:%s\n", warning_flags);
fprintf(iconfig_file, "out:%s\n", opath); fprintf(iconfig_file, "out:%s\n", opath);
if (depfile) { if (depfile) {

View File

@ -336,7 +336,7 @@ TU [munpf]
/* This rule handles scaled time values for SystemVerilog. */ /* This rule handles scaled time values for SystemVerilog. */
[0-9][0-9_]*(\.[0-9][0-9_]*)?{TU}?s { [0-9][0-9_]*(\.[0-9][0-9_]*)?{TU}?s {
if(gn_system_verilog_flag) { if(generation_flag & GN_VER2009) {
yylval.text = strdupnew(yytext); yylval.text = strdupnew(yytext);
return TIME_LITERAL; return TIME_LITERAL;
} else REJECT; } } else REJECT; }
@ -496,6 +496,12 @@ TU [munpf]
|GN_KEYWORDS_1364_2001 |GN_KEYWORDS_1364_2001
|GN_KEYWORDS_1364_2001_CONFIG |GN_KEYWORDS_1364_2001_CONFIG
|GN_KEYWORDS_1364_2005; |GN_KEYWORDS_1364_2005;
} else if (strcmp(word,"1800-2009") == 0) {
lexor_keyword_mask = GN_KEYWORDS_1364_1995
|GN_KEYWORDS_1364_2001
|GN_KEYWORDS_1364_2001_CONFIG
|GN_KEYWORDS_1364_2005
|GN_KEYWORDS_1800_2009;
} else if (strcmp(word,"VAMS-2.3") == 0) { } else if (strcmp(word,"VAMS-2.3") == 0) {
lexor_keyword_mask = GN_KEYWORDS_1364_1995 lexor_keyword_mask = GN_KEYWORDS_1364_1995
|GN_KEYWORDS_1364_2001 |GN_KEYWORDS_1364_2001

View File

@ -19,62 +19,62 @@ access, GN_KEYWORDS_VAMS_2_3, K_access
acos, GN_KEYWORDS_VAMS_2_3, K_acos acos, GN_KEYWORDS_VAMS_2_3, K_acos
acosh, GN_KEYWORDS_VAMS_2_3, K_acosh acosh, GN_KEYWORDS_VAMS_2_3, K_acosh
ac_stim, GN_KEYWORDS_VAMS_2_3, K_ac_stim ac_stim, GN_KEYWORDS_VAMS_2_3, K_ac_stim
alias, GN_KEYWORDS_1800_2005, K_alias alias, GN_KEYWORDS_1800_2009, K_alias
aliasparam, GN_KEYWORDS_VAMS_2_3, K_aliasparam aliasparam, GN_KEYWORDS_VAMS_2_3, K_aliasparam
always, GN_KEYWORDS_1364_1995, K_always always, GN_KEYWORDS_1364_1995, K_always
always_comb, GN_KEYWORDS_1800_2005, K_always_comb always_comb, GN_KEYWORDS_1800_2009, K_always_comb
always_ff, GN_KEYWORDS_1800_2005, K_always_ff always_ff, GN_KEYWORDS_1800_2009, K_always_ff
always_latch, GN_KEYWORDS_1800_2005, K_always_latch always_latch, GN_KEYWORDS_1800_2009, K_always_latch
analog, GN_KEYWORDS_VAMS_2_3, K_analog analog, GN_KEYWORDS_VAMS_2_3, K_analog
analysis, GN_KEYWORDS_VAMS_2_3, K_analysis analysis, GN_KEYWORDS_VAMS_2_3, K_analysis
and, GN_KEYWORDS_1364_1995, K_and and, GN_KEYWORDS_1364_1995, K_and
asin, GN_KEYWORDS_VAMS_2_3, K_asin asin, GN_KEYWORDS_VAMS_2_3, K_asin
asinh, GN_KEYWORDS_VAMS_2_3, K_asinh asinh, GN_KEYWORDS_VAMS_2_3, K_asinh
# This is defined by both SystemVerilog 1800-2005 and Verilog-AMS 2.3 # This is defined by both SystemVerilog 1800-2009 and Verilog-AMS 2.3
assert, GN_KEYWORDS_1800_2005|GN_KEYWORDS_VAMS_2_3, K_assert assert, GN_KEYWORDS_1800_2009|GN_KEYWORDS_VAMS_2_3, K_assert
assign, GN_KEYWORDS_1364_1995, K_assign assign, GN_KEYWORDS_1364_1995, K_assign
assume, GN_KEYWORDS_1800_2005, K_assume assume, GN_KEYWORDS_1800_2009, K_assume
atan, GN_KEYWORDS_VAMS_2_3, K_atan atan, GN_KEYWORDS_VAMS_2_3, K_atan
atan2, GN_KEYWORDS_VAMS_2_3, K_atan2 atan2, GN_KEYWORDS_VAMS_2_3, K_atan2
atanh, GN_KEYWORDS_VAMS_2_3, K_atanh atanh, GN_KEYWORDS_VAMS_2_3, K_atanh
automatic, GN_KEYWORDS_1364_2001, K_automatic automatic, GN_KEYWORDS_1364_2001, K_automatic
before, GN_KEYWORDS_1800_2005, K_before before, GN_KEYWORDS_1800_2009, K_before
begin, GN_KEYWORDS_1364_1995, K_begin begin, GN_KEYWORDS_1364_1995, K_begin
bind, GN_KEYWORDS_1800_2005, K_bind bind, GN_KEYWORDS_1800_2009, K_bind
bins, GN_KEYWORDS_1800_2005, K_bins bins, GN_KEYWORDS_1800_2009, K_bins
binsof, GN_KEYWORDS_1800_2005, K_binsof binsof, GN_KEYWORDS_1800_2009, K_binsof
bit, GN_KEYWORDS_1800_2005, K_bit bit, GN_KEYWORDS_1800_2009, K_bit
branch, GN_KEYWORDS_VAMS_2_3, K_branch branch, GN_KEYWORDS_VAMS_2_3, K_branch
break, GN_KEYWORDS_1800_2005, K_break break, GN_KEYWORDS_1800_2009, K_break
bool, GN_KEYWORDS_ICARUS, K_bool bool, GN_KEYWORDS_ICARUS, K_bool
buf, GN_KEYWORDS_1364_1995, K_buf buf, GN_KEYWORDS_1364_1995, K_buf
bufif0, GN_KEYWORDS_1364_1995, K_bufif0 bufif0, GN_KEYWORDS_1364_1995, K_bufif0
bufif1, GN_KEYWORDS_1364_1995, K_bufif1 bufif1, GN_KEYWORDS_1364_1995, K_bufif1
byte, GN_KEYWORDS_1800_2005, K_byte byte, GN_KEYWORDS_1800_2009, K_byte
case, GN_KEYWORDS_1364_1995, K_case case, GN_KEYWORDS_1364_1995, K_case
casex, GN_KEYWORDS_1364_1995, K_casex casex, GN_KEYWORDS_1364_1995, K_casex
casez, GN_KEYWORDS_1364_1995, K_casez casez, GN_KEYWORDS_1364_1995, K_casez
ceil, GN_KEYWORDS_VAMS_2_3, K_ceil ceil, GN_KEYWORDS_VAMS_2_3, K_ceil
cell, GN_KEYWORDS_1364_2001_CONFIG, K_cell cell, GN_KEYWORDS_1364_2001_CONFIG, K_cell
chandle, GN_KEYWORDS_1800_2005, K_chandle chandle, GN_KEYWORDS_1800_2009, K_chandle
class, GN_KEYWORDS_1800_2005, K_class class, GN_KEYWORDS_1800_2009, K_class
clocking, GN_KEYWORDS_1800_2005, K_clocking clocking, GN_KEYWORDS_1800_2009, K_clocking
cmos, GN_KEYWORDS_1364_1995, K_cmos cmos, GN_KEYWORDS_1364_1995, K_cmos
config, GN_KEYWORDS_1364_2001_CONFIG, K_config config, GN_KEYWORDS_1364_2001_CONFIG, K_config
connect, GN_KEYWORDS_VAMS_2_3, K_connect connect, GN_KEYWORDS_VAMS_2_3, K_connect
connectmodule, GN_KEYWORDS_VAMS_2_3, K_connectmodule connectmodule, GN_KEYWORDS_VAMS_2_3, K_connectmodule
connectrules, GN_KEYWORDS_VAMS_2_3, K_connectrules connectrules, GN_KEYWORDS_VAMS_2_3, K_connectrules
const, GN_KEYWORDS_1800_2005, K_const const, GN_KEYWORDS_1800_2009, K_const
constraint, GN_KEYWORDS_1800_2005, K_constraint constraint, GN_KEYWORDS_1800_2009, K_constraint
context, GN_KEYWORDS_1800_2005, K_context context, GN_KEYWORDS_1800_2009, K_context
continue, GN_KEYWORDS_1800_2005, K_continue continue, GN_KEYWORDS_1800_2009, K_continue
continuous, GN_KEYWORDS_VAMS_2_3, K_continuous continuous, GN_KEYWORDS_VAMS_2_3, K_continuous
cos, GN_KEYWORDS_VAMS_2_3, K_cos cos, GN_KEYWORDS_VAMS_2_3, K_cos
cosh, GN_KEYWORDS_VAMS_2_3, K_cosh cosh, GN_KEYWORDS_VAMS_2_3, K_cosh
cover, GN_KEYWORDS_1800_2005, K_cover cover, GN_KEYWORDS_1800_2009, K_cover
covergroup, GN_KEYWORDS_1800_2005, K_covergroup covergroup, GN_KEYWORDS_1800_2009, K_covergroup
coverpoint, GN_KEYWORDS_1800_2005, K_coverpoint coverpoint, GN_KEYWORDS_1800_2009, K_coverpoint
cross, GN_KEYWORDS_1800_2005, K_cross cross, GN_KEYWORDS_1800_2009, K_cross
ddt, GN_KEYWORDS_VAMS_2_3, K_ddt ddt, GN_KEYWORDS_VAMS_2_3, K_ddt
ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature
ddx, GN_KEYWORDS_VAMS_2_3, K_ddx ddx, GN_KEYWORDS_VAMS_2_3, K_ddx
@ -85,8 +85,8 @@ design, GN_KEYWORDS_1364_2001_CONFIG, K_design
disable, GN_KEYWORDS_1364_1995, K_disable disable, GN_KEYWORDS_1364_1995, K_disable
discipline, GN_KEYWORDS_VAMS_2_3, K_discipline discipline, GN_KEYWORDS_VAMS_2_3, K_discipline
discrete, GN_KEYWORDS_VAMS_2_3, K_discrete discrete, GN_KEYWORDS_VAMS_2_3, K_discrete
dist, GN_KEYWORDS_1800_2005, K_dist dist, GN_KEYWORDS_1800_2009, K_dist
do, GN_KEYWORDS_1800_2005, K_do do, GN_KEYWORDS_1800_2009, K_do
domain, GN_KEYWORDS_VAMS_2_3, K_domain domain, GN_KEYWORDS_VAMS_2_3, K_domain
driver_update, GN_KEYWORDS_VAMS_2_3, K_driver_update driver_update, GN_KEYWORDS_VAMS_2_3, K_driver_update
edge, GN_KEYWORDS_1364_1995, K_edge edge, GN_KEYWORDS_1364_1995, K_edge
@ -94,45 +94,45 @@ else, GN_KEYWORDS_1364_1995, K_else
end, GN_KEYWORDS_1364_1995, K_end end, GN_KEYWORDS_1364_1995, K_end
endcase, GN_KEYWORDS_1364_1995, K_endcase endcase, GN_KEYWORDS_1364_1995, K_endcase
endconfig, GN_KEYWORDS_1364_2001_CONFIG, K_endconfig endconfig, GN_KEYWORDS_1364_2001_CONFIG, K_endconfig
endclass, GN_KEYWORDS_1800_2005, K_endclass endclass, GN_KEYWORDS_1800_2009, K_endclass
endclocking, GN_KEYWORDS_1800_2005, K_endclocking endclocking, GN_KEYWORDS_1800_2009, K_endclocking
endconnectrules, GN_KEYWORDS_VAMS_2_3, K_endconnectrules endconnectrules, GN_KEYWORDS_VAMS_2_3, K_endconnectrules
enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline
endfunction, GN_KEYWORDS_1364_1995, K_endfunction endfunction, GN_KEYWORDS_1364_1995, K_endfunction
endgenerate, GN_KEYWORDS_1364_2001, K_endgenerate endgenerate, GN_KEYWORDS_1364_2001, K_endgenerate
endgroup, GN_KEYWORDS_1800_2005, K_endgroup endgroup, GN_KEYWORDS_1800_2009, K_endgroup
endinterface, GN_KEYWORDS_1800_2005, K_endinterface endinterface, GN_KEYWORDS_1800_2009, K_endinterface
endmodule, GN_KEYWORDS_1364_1995, K_endmodule endmodule, GN_KEYWORDS_1364_1995, K_endmodule
endnature, GN_KEYWORDS_VAMS_2_3, K_endnature endnature, GN_KEYWORDS_VAMS_2_3, K_endnature
endpackage, GN_KEYWORDS_1800_2005, K_endpackage endpackage, GN_KEYWORDS_1800_2009, K_endpackage
endparamset, GN_KEYWORDS_VAMS_2_3, K_endparamset endparamset, GN_KEYWORDS_VAMS_2_3, K_endparamset
endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive
endprogram, GN_KEYWORDS_1800_2005, K_endprogram endprogram, GN_KEYWORDS_1800_2009, K_endprogram
endproperty, GN_KEYWORDS_1800_2005, K_endproperty endproperty, GN_KEYWORDS_1800_2009, K_endproperty
endspecify, GN_KEYWORDS_1364_1995, K_endspecify endspecify, GN_KEYWORDS_1364_1995, K_endspecify
endsequence, GN_KEYWORDS_1800_2005, K_endsequence endsequence, GN_KEYWORDS_1800_2009, K_endsequence
endtable, GN_KEYWORDS_1364_1995, K_endtable endtable, GN_KEYWORDS_1364_1995, K_endtable
endtask, GN_KEYWORDS_1364_1995, K_endtask endtask, GN_KEYWORDS_1364_1995, K_endtask
enum, GN_KEYWORDS_1800_2005, K_enum enum, GN_KEYWORDS_1800_2009, K_enum
event, GN_KEYWORDS_1364_1995, K_event event, GN_KEYWORDS_1364_1995, K_event
exclude, GN_KEYWORDS_VAMS_2_3, K_exclude exclude, GN_KEYWORDS_VAMS_2_3, K_exclude
exp, GN_KEYWORDS_VAMS_2_3, K_exp exp, GN_KEYWORDS_VAMS_2_3, K_exp
expect, GN_KEYWORDS_1800_2005, K_expect expect, GN_KEYWORDS_1800_2009, K_expect
export, GN_KEYWORDS_1800_2005, K_export export, GN_KEYWORDS_1800_2009, K_export
extends, GN_KEYWORDS_1800_2005, K_extends extends, GN_KEYWORDS_1800_2009, K_extends
extern, GN_KEYWORDS_1800_2005, K_extern extern, GN_KEYWORDS_1800_2009, K_extern
final, GN_KEYWORDS_1800_2005, K_final final, GN_KEYWORDS_1800_2009, K_final
final_step, GN_KEYWORDS_VAMS_2_3, K_final_step final_step, GN_KEYWORDS_VAMS_2_3, K_final_step
first_match, GN_KEYWORDS_1800_2005, K_first_match first_match, GN_KEYWORDS_1800_2009, K_first_match
flicker_noise, GN_KEYWORDS_VAMS_2_3, K_flicker_noise flicker_noise, GN_KEYWORDS_VAMS_2_3, K_flicker_noise
floor, GN_KEYWORDS_VAMS_2_3, K_floor floor, GN_KEYWORDS_VAMS_2_3, K_floor
flow, GN_KEYWORDS_VAMS_2_3, K_flow flow, GN_KEYWORDS_VAMS_2_3, K_flow
for, GN_KEYWORDS_1364_1995, K_for for, GN_KEYWORDS_1364_1995, K_for
foreach, GN_KEYWORDS_1800_2005, K_foreach foreach, GN_KEYWORDS_1800_2009, K_foreach
force, GN_KEYWORDS_1364_1995, K_force force, GN_KEYWORDS_1364_1995, K_force
forever, GN_KEYWORDS_1364_1995, K_forever forever, GN_KEYWORDS_1364_1995, K_forever
fork, GN_KEYWORDS_1364_1995, K_fork fork, GN_KEYWORDS_1364_1995, K_fork
forkjoin, GN_KEYWORDS_1800_2005, K_forkjoin forkjoin, GN_KEYWORDS_1800_2009, K_forkjoin
from, GN_KEYWORDS_VAMS_2_3, K_from from, GN_KEYWORDS_VAMS_2_3, K_from
function, GN_KEYWORDS_1364_1995, K_function function, GN_KEYWORDS_1364_1995, K_function
generate, GN_KEYWORDS_1364_2001, K_generate generate, GN_KEYWORDS_1364_2001, K_generate
@ -145,11 +145,11 @@ idt, GN_KEYWORDS_VAMS_2_3, K_idt
idtmod, GN_KEYWORDS_VAMS_2_3, K_idtmod idtmod, GN_KEYWORDS_VAMS_2_3, K_idtmod
idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature
if, GN_KEYWORDS_1364_1995, K_if if, GN_KEYWORDS_1364_1995, K_if
iff, GN_KEYWORDS_1800_2005, K_iff iff, GN_KEYWORDS_1800_2009, K_iff
ifnone, GN_KEYWORDS_1364_1995, K_ifnone ifnone, GN_KEYWORDS_1364_1995, K_ifnone
ignore_bins, GN_KEYWORDS_1800_2005, K_ignore_bins ignore_bins, GN_KEYWORDS_1800_2009, K_ignore_bins
illegal_bins, GN_KEYWORDS_1800_2005, K_illegal_bins illegal_bins, GN_KEYWORDS_1800_2009, K_illegal_bins
import, GN_KEYWORDS_1800_2005, K_import import, GN_KEYWORDS_1800_2009, K_import
incdir, GN_KEYWORDS_1364_2001_CONFIG, K_incdir incdir, GN_KEYWORDS_1364_2001_CONFIG, K_incdir
include, GN_KEYWORDS_1364_2001_CONFIG, K_include include, GN_KEYWORDS_1364_2001_CONFIG, K_include
inf, GN_KEYWORDS_VAMS_2_3, K_inf inf, GN_KEYWORDS_VAMS_2_3, K_inf
@ -157,15 +157,15 @@ initial, GN_KEYWORDS_1364_1995, K_initial
initial_step, GN_KEYWORDS_VAMS_2_3, K_initial_step initial_step, GN_KEYWORDS_VAMS_2_3, K_initial_step
inout, GN_KEYWORDS_1364_1995, K_inout inout, GN_KEYWORDS_1364_1995, K_inout
input, GN_KEYWORDS_1364_1995, K_input input, GN_KEYWORDS_1364_1995, K_input
inside, GN_KEYWORDS_1800_2005, K_inside inside, GN_KEYWORDS_1800_2009, K_inside
instance, GN_KEYWORDS_1364_2001_CONFIG, K_instance instance, GN_KEYWORDS_1364_2001_CONFIG, K_instance
int, GN_KEYWORDS_1800_2005, K_int int, GN_KEYWORDS_1800_2009, K_int
integer, GN_KEYWORDS_1364_1995, K_integer integer, GN_KEYWORDS_1364_1995, K_integer
interface, GN_KEYWORDS_1800_2005, K_interface interface, GN_KEYWORDS_1800_2009, K_interface
intersect, GN_KEYWORDS_1800_2005, K_intersect intersect, GN_KEYWORDS_1800_2009, K_intersect
join, GN_KEYWORDS_1364_1995, K_join join, GN_KEYWORDS_1364_1995, K_join
join_any, GN_KEYWORDS_1800_2005, K_join_any join_any, GN_KEYWORDS_1800_2009, K_join_any
join_none, GN_KEYWORDS_1800_2005, K_join_none join_none, GN_KEYWORDS_1800_2009, K_join_none
laplace_nd, GN_KEYWORDS_VAMS_2_3, K_laplace_nd laplace_nd, GN_KEYWORDS_VAMS_2_3, K_laplace_nd
laplace_np, GN_KEYWORDS_VAMS_2_3, K_laplace_np laplace_np, GN_KEYWORDS_VAMS_2_3, K_laplace_np
laplace_zd, GN_KEYWORDS_VAMS_2_3, K_laplace_zd laplace_zd, GN_KEYWORDS_VAMS_2_3, K_laplace_zd
@ -176,25 +176,25 @@ liblist, GN_KEYWORDS_1364_2001_CONFIG, K_liblist
library, GN_KEYWORDS_1364_2001_CONFIG, K_library library, GN_KEYWORDS_1364_2001_CONFIG, K_library
limexp, GN_KEYWORDS_VAMS_2_3, K_limexp limexp, GN_KEYWORDS_VAMS_2_3, K_limexp
ln, GN_KEYWORDS_VAMS_2_3, K_ln ln, GN_KEYWORDS_VAMS_2_3, K_ln
local, GN_KEYWORDS_1800_2005, K_local local, GN_KEYWORDS_1800_2009, K_local
localparam, GN_KEYWORDS_1364_2001, K_localparam localparam, GN_KEYWORDS_1364_2001, K_localparam
log, GN_KEYWORDS_VAMS_2_3, K_log log, GN_KEYWORDS_VAMS_2_3, K_log
# This is defined by SystemVerilog 1800-2005 and as an Icarus extension. # This is defined by SystemVerilog 1800-2009 and as an Icarus extension.
logic, GN_KEYWORDS_1800_2005|GN_KEYWORDS_ICARUS, K_logic logic, GN_KEYWORDS_1800_2009|GN_KEYWORDS_ICARUS, K_logic
longint, GN_KEYWORDS_1800_2005, K_longint longint, GN_KEYWORDS_1800_2009, K_longint
macromodule, GN_KEYWORDS_1364_1995, K_macromodule macromodule, GN_KEYWORDS_1364_1995, K_macromodule
matches, GN_KEYWORDS_1800_2005, K_matches matches, GN_KEYWORDS_1800_2009, K_matches
max, GN_KEYWORDS_VAMS_2_3, K_max max, GN_KEYWORDS_VAMS_2_3, K_max
medium, GN_KEYWORDS_1364_1995, K_medium medium, GN_KEYWORDS_1364_1995, K_medium
merged, GN_KEYWORDS_VAMS_2_3, K_merged merged, GN_KEYWORDS_VAMS_2_3, K_merged
min, GN_KEYWORDS_VAMS_2_3, K_min min, GN_KEYWORDS_VAMS_2_3, K_min
modport, GN_KEYWORDS_1800_2005, K_modport modport, GN_KEYWORDS_1800_2009, K_modport
module, GN_KEYWORDS_1364_1995, K_module module, GN_KEYWORDS_1364_1995, K_module
nand, GN_KEYWORDS_1364_1995, K_nand nand, GN_KEYWORDS_1364_1995, K_nand
nature, GN_KEYWORDS_VAMS_2_3, K_nature nature, GN_KEYWORDS_VAMS_2_3, K_nature
negedge, GN_KEYWORDS_1364_1995, K_negedge negedge, GN_KEYWORDS_1364_1995, K_negedge
net_resolution, GN_KEYWORDS_VAMS_2_3, K_net_resolution net_resolution, GN_KEYWORDS_VAMS_2_3, K_net_resolution
new, GN_KEYWORDS_1800_2005, K_new new, GN_KEYWORDS_1800_2009, K_new
nmos, GN_KEYWORDS_1364_1995, K_nmos nmos, GN_KEYWORDS_1364_1995, K_nmos
noise_table, GN_KEYWORDS_VAMS_2_3, K_noise_table noise_table, GN_KEYWORDS_VAMS_2_3, K_noise_table
nor, GN_KEYWORDS_1364_1995, K_nor nor, GN_KEYWORDS_1364_1995, K_nor
@ -202,11 +202,11 @@ noshowcancelled, GN_KEYWORDS_1364_2001, K_noshowcancelled
not, GN_KEYWORDS_1364_1995, K_not not, GN_KEYWORDS_1364_1995, K_not
notif0, GN_KEYWORDS_1364_1995, K_notif0 notif0, GN_KEYWORDS_1364_1995, K_notif0
notif1, GN_KEYWORDS_1364_1995, K_notif1 notif1, GN_KEYWORDS_1364_1995, K_notif1
null, GN_KEYWORDS_1800_2005, K_null null, GN_KEYWORDS_1800_2009, K_null
or, GN_KEYWORDS_1364_1995, K_or or, GN_KEYWORDS_1364_1995, K_or
output, GN_KEYWORDS_1364_1995, K_output output, GN_KEYWORDS_1364_1995, K_output
package, GN_KEYWORDS_1800_2005, K_package package, GN_KEYWORDS_1800_2009, K_package
packed, GN_KEYWORDS_1800_2005, K_packed packed, GN_KEYWORDS_1800_2009, K_packed
parameter, GN_KEYWORDS_1364_1995, K_parameter parameter, GN_KEYWORDS_1364_1995, K_parameter
paramset, GN_KEYWORDS_VAMS_2_3, K_paramset paramset, GN_KEYWORDS_VAMS_2_3, K_paramset
pmos, GN_KEYWORDS_1364_1995, K_pmos pmos, GN_KEYWORDS_1364_1995, K_pmos
@ -214,70 +214,70 @@ posedge, GN_KEYWORDS_1364_1995, K_posedge
potential, GN_KEYWORDS_VAMS_2_3, K_potential potential, GN_KEYWORDS_VAMS_2_3, K_potential
pow, GN_KEYWORDS_VAMS_2_3, K_pow pow, GN_KEYWORDS_VAMS_2_3, K_pow
primitive, GN_KEYWORDS_1364_1995, K_primitive primitive, GN_KEYWORDS_1364_1995, K_primitive
priority, GN_KEYWORDS_1800_2005, K_priority priority, GN_KEYWORDS_1800_2009, K_priority
program, GN_KEYWORDS_1800_2005, K_program program, GN_KEYWORDS_1800_2009, K_program
property, GN_KEYWORDS_1800_2005, K_property property, GN_KEYWORDS_1800_2009, K_property
protected, GN_KEYWORDS_1800_2005, K_protected protected, GN_KEYWORDS_1800_2009, K_protected
pull0, GN_KEYWORDS_1364_1995, K_pull0 pull0, GN_KEYWORDS_1364_1995, K_pull0
pull1, GN_KEYWORDS_1364_1995, K_pull1 pull1, GN_KEYWORDS_1364_1995, K_pull1
pulldown, GN_KEYWORDS_1364_1995, K_pulldown pulldown, GN_KEYWORDS_1364_1995, K_pulldown
pullup, GN_KEYWORDS_1364_1995, K_pullup pullup, GN_KEYWORDS_1364_1995, K_pullup
pulsestyle_onevent, GN_KEYWORDS_1364_2001, K_pulsestyle_onevent pulsestyle_onevent, GN_KEYWORDS_1364_2001, K_pulsestyle_onevent
pulsestyle_ondetect, GN_KEYWORDS_1364_2001, K_pulsestyle_ondetect pulsestyle_ondetect, GN_KEYWORDS_1364_2001, K_pulsestyle_ondetect
pure, GN_KEYWORDS_1800_2005, K_pure pure, GN_KEYWORDS_1800_2009, K_pure
rand, GN_KEYWORDS_1800_2005, K_rand rand, GN_KEYWORDS_1800_2009, K_rand
randc, GN_KEYWORDS_1800_2005, K_randc randc, GN_KEYWORDS_1800_2009, K_randc
randcase, GN_KEYWORDS_1800_2005, K_randcase randcase, GN_KEYWORDS_1800_2009, K_randcase
randsequence, GN_KEYWORDS_1800_2005, K_randsequence randsequence, GN_KEYWORDS_1800_2009, K_randsequence
rcmos, GN_KEYWORDS_1364_1995, K_rcmos rcmos, GN_KEYWORDS_1364_1995, K_rcmos
real, GN_KEYWORDS_1364_1995, K_real real, GN_KEYWORDS_1364_1995, K_real
realtime, GN_KEYWORDS_1364_1995, K_realtime realtime, GN_KEYWORDS_1364_1995, K_realtime
ref, GN_KEYWORDS_1800_2005, K_ref ref, GN_KEYWORDS_1800_2009, K_ref
reg, GN_KEYWORDS_1364_1995, K_reg reg, GN_KEYWORDS_1364_1995, K_reg
release, GN_KEYWORDS_1364_1995, K_release release, GN_KEYWORDS_1364_1995, K_release
repeat, GN_KEYWORDS_1364_1995, K_repeat repeat, GN_KEYWORDS_1364_1995, K_repeat
resolveto, GN_KEYWORDS_VAMS_2_3, K_resolveto resolveto, GN_KEYWORDS_VAMS_2_3, K_resolveto
return, GN_KEYWORDS_1800_2005, K_return return, GN_KEYWORDS_1800_2009, K_return
rnmos, GN_KEYWORDS_1364_1995, K_rnmos rnmos, GN_KEYWORDS_1364_1995, K_rnmos
rpmos, GN_KEYWORDS_1364_1995, K_rpmos rpmos, GN_KEYWORDS_1364_1995, K_rpmos
rtran, GN_KEYWORDS_1364_1995, K_rtran rtran, GN_KEYWORDS_1364_1995, K_rtran
rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0 rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0
rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1 rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1
scalared, GN_KEYWORDS_1364_1995, K_scalared scalared, GN_KEYWORDS_1364_1995, K_scalared
sequence, GN_KEYWORDS_1800_2005, K_sequence sequence, GN_KEYWORDS_1800_2009, K_sequence
shortint, GN_KEYWORDS_1800_2005, K_shortint shortint, GN_KEYWORDS_1800_2009, K_shortint
shortreal, GN_KEYWORDS_1800_2005, K_shortreal shortreal, GN_KEYWORDS_1800_2009, K_shortreal
showcancelled, GN_KEYWORDS_1364_2001, K_showcancelled showcancelled, GN_KEYWORDS_1364_2001, K_showcancelled
signed, GN_KEYWORDS_1364_2001, K_signed signed, GN_KEYWORDS_1364_2001, K_signed
sin, GN_KEYWORDS_VAMS_2_3, K_sin sin, GN_KEYWORDS_VAMS_2_3, K_sin
sinh, GN_KEYWORDS_VAMS_2_3, K_sinh sinh, GN_KEYWORDS_VAMS_2_3, K_sinh
slew, GN_KEYWORDS_VAMS_2_3, K_slew slew, GN_KEYWORDS_VAMS_2_3, K_slew
small, GN_KEYWORDS_1364_1995, K_small small, GN_KEYWORDS_1364_1995, K_small
solve, GN_KEYWORDS_1800_2005, K_solve solve, GN_KEYWORDS_1800_2009, K_solve
specify, GN_KEYWORDS_1364_1995, K_specify specify, GN_KEYWORDS_1364_1995, K_specify
specparam, GN_KEYWORDS_1364_1995, K_specparam specparam, GN_KEYWORDS_1364_1995, K_specparam
split, GN_KEYWORDS_VAMS_2_3, K_split split, GN_KEYWORDS_VAMS_2_3, K_split
sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt
static, GN_KEYWORDS_1800_2005, K_static static, GN_KEYWORDS_1800_2009, K_static
# This is defined by both SystemVerilog 1800-2005 and Verilog-AMS 2.3 # This is defined by both SystemVerilog 1800-2009 and Verilog-AMS 2.3
string, GN_KEYWORDS_1800_2005|GN_KEYWORDS_VAMS_2_3, K_string string, GN_KEYWORDS_1800_2009|GN_KEYWORDS_VAMS_2_3, K_string
strong0, GN_KEYWORDS_1364_1995, K_strong0 strong0, GN_KEYWORDS_1364_1995, K_strong0
strong1, GN_KEYWORDS_1364_1995, K_strong1 strong1, GN_KEYWORDS_1364_1995, K_strong1
struct, GN_KEYWORDS_1800_2005, K_struct struct, GN_KEYWORDS_1800_2009, K_struct
super, GN_KEYWORDS_1800_2005, K_super super, GN_KEYWORDS_1800_2009, K_super
supply0, GN_KEYWORDS_1364_1995, K_supply0 supply0, GN_KEYWORDS_1364_1995, K_supply0
supply1, GN_KEYWORDS_1364_1995, K_supply1 supply1, GN_KEYWORDS_1364_1995, K_supply1
table, GN_KEYWORDS_1364_1995, K_table table, GN_KEYWORDS_1364_1995, K_table
tagged, GN_KEYWORDS_1800_2005, K_tagged tagged, GN_KEYWORDS_1800_2009, K_tagged
tan, GN_KEYWORDS_VAMS_2_3, K_tan tan, GN_KEYWORDS_VAMS_2_3, K_tan
tanh, GN_KEYWORDS_VAMS_2_3, K_tanh tanh, GN_KEYWORDS_VAMS_2_3, K_tanh
task, GN_KEYWORDS_1364_1995, K_task task, GN_KEYWORDS_1364_1995, K_task
this, GN_KEYWORDS_1800_2005, K_this this, GN_KEYWORDS_1800_2009, K_this
throughout, GN_KEYWORDS_1800_2005, K_throughout throughout, GN_KEYWORDS_1800_2009, K_throughout
time, GN_KEYWORDS_1364_1995, K_time time, GN_KEYWORDS_1364_1995, K_time
timeprecision, GN_KEYWORDS_1800_2005, K_timeprecision timeprecision, GN_KEYWORDS_1800_2009, K_timeprecision
timer, GN_KEYWORDS_VAMS_2_3, K_timer timer, GN_KEYWORDS_VAMS_2_3, K_timer
timeunit, GN_KEYWORDS_1800_2005, K_timeunit timeunit, GN_KEYWORDS_1800_2009, K_timeunit
tran, GN_KEYWORDS_1364_1995, K_tran tran, GN_KEYWORDS_1364_1995, K_tran
tranif0, GN_KEYWORDS_1364_1995, K_tranif0 tranif0, GN_KEYWORDS_1364_1995, K_tranif0
tranif1, GN_KEYWORDS_1364_1995, K_tranif1 tranif1, GN_KEYWORDS_1364_1995, K_tranif1
@ -288,30 +288,30 @@ tri1, GN_KEYWORDS_1364_1995, K_tri1
triand, GN_KEYWORDS_1364_1995, K_triand triand, GN_KEYWORDS_1364_1995, K_triand
trior, GN_KEYWORDS_1364_1995, K_trior trior, GN_KEYWORDS_1364_1995, K_trior
trireg, GN_KEYWORDS_1364_1995, K_trireg trireg, GN_KEYWORDS_1364_1995, K_trireg
type, GN_KEYWORDS_1800_2005, K_type type, GN_KEYWORDS_1800_2009, K_type
typedef, GN_KEYWORDS_1800_2005, K_typedef typedef, GN_KEYWORDS_1800_2009, K_typedef
union, GN_KEYWORDS_1800_2005, K_union union, GN_KEYWORDS_1800_2009, K_union
unique, GN_KEYWORDS_1800_2005, K_unique unique, GN_KEYWORDS_1800_2009, K_unique
units, GN_KEYWORDS_VAMS_2_3, K_units units, GN_KEYWORDS_VAMS_2_3, K_units
# Reserved for future use! # Reserved for future use!
unsigned, GN_KEYWORDS_1364_2001, K_unsigned unsigned, GN_KEYWORDS_1364_2001, K_unsigned
use, GN_KEYWORDS_1364_2001_CONFIG, K_use use, GN_KEYWORDS_1364_2001_CONFIG, K_use
uwire, GN_KEYWORDS_1364_2005, K_uwire uwire, GN_KEYWORDS_1364_2005, K_uwire
var, GN_KEYWORDS_1800_2005, K_var var, GN_KEYWORDS_1800_2009, K_var
vectored, GN_KEYWORDS_1364_1995, K_vectored vectored, GN_KEYWORDS_1364_1995, K_vectored
virtual, GN_KEYWORDS_1800_2005, K_virtual virtual, GN_KEYWORDS_1800_2009, K_virtual
void, GN_KEYWORDS_1800_2005, K_void void, GN_KEYWORDS_1800_2009, K_void
wait, GN_KEYWORDS_1364_1995, K_wait wait, GN_KEYWORDS_1364_1995, K_wait
wait_order, GN_KEYWORDS_1800_2005, K_wait_order wait_order, GN_KEYWORDS_1800_2009, K_wait_order
wand, GN_KEYWORDS_1364_1995, K_wand wand, GN_KEYWORDS_1364_1995, K_wand
weak0, GN_KEYWORDS_1364_1995, K_weak0 weak0, GN_KEYWORDS_1364_1995, K_weak0
weak1, GN_KEYWORDS_1364_1995, K_weak1 weak1, GN_KEYWORDS_1364_1995, K_weak1
while, GN_KEYWORDS_1364_1995, K_while while, GN_KEYWORDS_1364_1995, K_while
white_noise, GN_KEYWORDS_VAMS_2_3, K_white_noise white_noise, GN_KEYWORDS_VAMS_2_3, K_white_noise
wildcard, GN_KEYWORDS_1800_2005, K_wildcard wildcard, GN_KEYWORDS_1800_2009, K_wildcard
wire, GN_KEYWORDS_1364_1995, K_wire wire, GN_KEYWORDS_1364_1995, K_wire
with, GN_KEYWORDS_1800_2005, K_with with, GN_KEYWORDS_1800_2009, K_with
within, GN_KEYWORDS_1800_2005, K_within within, GN_KEYWORDS_1800_2009, K_within
# This is the name originally proposed for uwire and is deprecated! # This is the name originally proposed for uwire and is deprecated!
wone, GN_KEYWORDS_1364_2005, K_wone wone, GN_KEYWORDS_1364_2005, K_wone
wor, GN_KEYWORDS_1364_1995, K_wor wor, GN_KEYWORDS_1364_1995, K_wor

28
main.cc
View File

@ -106,7 +106,6 @@ bool gn_specify_blocks_flag = true;
bool gn_io_range_error_flag = true; bool gn_io_range_error_flag = true;
bool gn_strict_ca_eval_flag = false; bool gn_strict_ca_eval_flag = false;
bool gn_verilog_ams_flag = false; bool gn_verilog_ams_flag = false;
bool gn_system_verilog_flag = false;
map<string,const char*> flags; map<string,const char*> flags;
char*vpi_module_list = 0; char*vpi_module_list = 0;
@ -247,6 +246,9 @@ static void process_generation_flag(const char*gen)
} else if (strcmp(gen,"2005") == 0) { } else if (strcmp(gen,"2005") == 0) {
generation_flag = GN_VER2005; generation_flag = GN_VER2005;
} else if (strcmp(gen,"2009") == 0) {
generation_flag = GN_VER2009;
} else if (strcmp(gen,"icarus-misc") == 0) { } else if (strcmp(gen,"icarus-misc") == 0) {
gn_icarus_misc_flag = true; gn_icarus_misc_flag = true;
@ -283,9 +285,6 @@ static void process_generation_flag(const char*gen)
} else if (strcmp(gen,"no-strict-ca-eval") == 0) { } else if (strcmp(gen,"no-strict-ca-eval") == 0) {
gn_strict_ca_eval_flag = false; gn_strict_ca_eval_flag = false;
} else if (strcmp(gen,"system-verilog") == 0) {
gn_system_verilog_flag = true;
} else { } else {
} }
} }
@ -853,29 +852,21 @@ int main(int argc, char*argv[])
lexor_keyword_mask = 0; lexor_keyword_mask = 0;
switch (generation_flag) { switch (generation_flag) {
case GN_VER1995: case GN_VER2009:
lexor_keyword_mask |= GN_KEYWORDS_1364_1995; lexor_keyword_mask |= GN_KEYWORDS_1800_2009;
break; case GN_VER2005:
lexor_keyword_mask |= GN_KEYWORDS_1364_2005;
case GN_VER2001: case GN_VER2001:
lexor_keyword_mask |= GN_KEYWORDS_1364_2001_CONFIG; lexor_keyword_mask |= GN_KEYWORDS_1364_2001_CONFIG;
case GN_VER2001_NOCONFIG: case GN_VER2001_NOCONFIG:
lexor_keyword_mask |= GN_KEYWORDS_1364_1995;
lexor_keyword_mask |= GN_KEYWORDS_1364_2001; lexor_keyword_mask |= GN_KEYWORDS_1364_2001;
break; case GN_VER1995:
case GN_VER2005:
lexor_keyword_mask |= GN_KEYWORDS_1364_1995; lexor_keyword_mask |= GN_KEYWORDS_1364_1995;
lexor_keyword_mask |= GN_KEYWORDS_1364_2001;
lexor_keyword_mask |= GN_KEYWORDS_1364_2001_CONFIG;
lexor_keyword_mask |= GN_KEYWORDS_1364_2005;
break;
} }
if (gn_cadence_types_flag) if (gn_cadence_types_flag)
lexor_keyword_mask |= GN_KEYWORDS_ICARUS; lexor_keyword_mask |= GN_KEYWORDS_ICARUS;
if (gn_system_verilog_flag)
lexor_keyword_mask |= GN_KEYWORDS_1800_2005;
if (gn_verilog_ams_flag) if (gn_verilog_ams_flag)
lexor_keyword_mask |= GN_KEYWORDS_VAMS_2_3; lexor_keyword_mask |= GN_KEYWORDS_VAMS_2_3;
@ -897,6 +888,9 @@ int main(int argc, char*argv[])
case GN_VER2005: case GN_VER2005:
cout << "IEEE1364-2005"; cout << "IEEE1364-2005";
break; break;
case GN_VER2009:
cout << "IEEE1800-2009";
break;
} }
if (gn_verilog_ams_flag) if (gn_verilog_ams_flag)

10
parse.y
View File

@ -278,7 +278,7 @@ static PECallFunction*make_call_function(perm_string tn, PExpr*arg1, PExpr*arg2)
/* The new tokens from 1364-2005. */ /* The new tokens from 1364-2005. */
%token K_wone K_uwire %token K_wone K_uwire
/* The new tokens from 1800-2005. */ /* The new tokens from 1800-2009. */
%token K_alias K_always_comb K_always_ff K_always_latch K_assert %token K_alias K_always_comb K_always_ff K_always_latch K_assert
%token K_assume K_before K_bind K_bins K_binsof K_bit K_break K_byte %token K_assume K_before K_bind K_bins K_binsof K_bit K_break K_byte
%token K_chandle K_class K_clocking K_const K_constraint K_context %token K_chandle K_class K_clocking K_const K_constraint K_context
@ -3101,6 +3101,14 @@ port_name
delete[]$2; delete[]$2;
$$ = tmp; $$ = tmp;
} }
| '.' IDENTIFIER
{ named_pexpr_t*tmp = new named_pexpr_t;
tmp->name = lex_strings.make($2);
tmp->parm = new PEIdent(lex_strings.make($2), true);
FILE_NAME(tmp->parm, @1);
delete[]$2;
$$ = tmp;
}
; ;
port_name_list port_name_list

View File

@ -709,7 +709,7 @@ void pform_startmodule(const char*name, const char*file, unsigned lineno,
void pform_check_timeunit_prec() void pform_check_timeunit_prec()
{ {
assert(pform_cur_module); assert(pform_cur_module);
if (gn_system_verilog_flag && (pform_cur_module->time_unit < if ((generation_flag & GN_VER2009) && (pform_cur_module->time_unit <
pform_cur_module->time_precision)) { pform_cur_module->time_precision)) {
VLerror("error: a timeprecision is missing or is too " VLerror("error: a timeprecision is missing or is too "
"large!"); "large!");

View File

@ -5,7 +5,7 @@
%{ %{
/* /*
* Copyright (c) 2007-2009 Stephen Williams (steve@icarus.com) * Copyright (c) 2007-2010 Stephen Williams (steve@icarus.com)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
@ -73,6 +73,12 @@ static int yywrap(void)
<EDGE_ID>[pP][oO][sS][eE][dD][gG][eE] {return K_POSEDGE; } <EDGE_ID>[pP][oO][sS][eE][dD][gG][eE] {return K_POSEDGE; }
<EDGE_ID>[nN][eE][gG][eE][dD][gG][eE] {return K_NEGEDGE; } <EDGE_ID>[nN][eE][gG][eE][dD][gG][eE] {return K_NEGEDGE; }
/* Integer values */
[0-9]+ {
yylval.int_val = strtoul(yytext, 0, 10);
return INTEGER;
}
/* Real values */ /* Real values */
[0-9]+(\.[0-9]+)?([Ee][+-]?[0-9]+)? { [0-9]+(\.[0-9]+)?([Ee][+-]?[0-9]+)? {
yylval.real_val = strtod(yytext, 0); yylval.real_val = strtod(yytext, 0);

View File

@ -1,7 +1,7 @@
%{ %{
/* /*
* Copyright (c) 1998-2009 Stephen Williams (steve@icarus.com) * Copyright (c) 1998-2010 Stephen Williams (steve@icarus.com)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
@ -58,7 +58,7 @@ char sdf_use_hchar = '.';
%type <string_val> celltype %type <string_val> celltype
%type <string_val> cell_instance %type <string_val> cell_instance
%type <string_val> hierarchical_identifier %type <string_val> hierarchical_identifier
%type <string_val> port port_instance %type <string_val> port port_instance port_interconnect
%type <real_val> rtriple signed_real_number %type <real_val> rtriple signed_real_number
%type <delay> delval rvalue %type <delay> delval rvalue
@ -173,6 +173,11 @@ time_scale
sdf_parse_path, @2.first_line, $3, $4); sdf_parse_path, @2.first_line, $3, $4);
free($4); free($4);
} }
| '(' K_TIMESCALE INTEGER IDENTIFIER ')'
{ if (sdf_flag_inform) vpi_printf("%s:%d:SDF INFO: TIMESCALE : %lu%s\n",
sdf_parse_path, @2.first_line, $3, $4);
free($4);
}
; ;
cell_list cell_list
@ -254,7 +259,8 @@ del_def
| '(' K_IOPATH error ')' | '(' K_IOPATH error ')'
{ vpi_printf("%s:%d: SDF ERROR: Invalid/malformed IOPATH\n", { vpi_printf("%s:%d: SDF ERROR: Invalid/malformed IOPATH\n",
sdf_parse_path, @2.first_line); } sdf_parse_path, @2.first_line); }
| '(' K_INTERCONNECT port_instance port_instance delval_list ')' /* | '(' K_INTERCONNECT port_instance port_instance delval_list ')' */
| '(' K_INTERCONNECT port_interconnect port_interconnect delval_list ')'
{ if (sdf_flag_warning) vpi_printf("%s:%d: SDF WARNING: " { if (sdf_flag_warning) vpi_printf("%s:%d: SDF WARNING: "
"INTERCONNECT not supported.\n", "INTERCONNECT not supported.\n",
sdf_parse_path, @2.first_line); sdf_parse_path, @2.first_line);
@ -301,6 +307,14 @@ port
/* | hierarchical_identifier '[' INTEGER ']' */ /* | hierarchical_identifier '[' INTEGER ']' */
; ;
/* Since INTERCONNECT is ignored we can also ignore a vector bit. */
port_interconnect
: hierarchical_identifier
{ $$ = $1; }
| hierarchical_identifier '[' INTEGER ']'
{ $$ = $1;}
;
port_edge port_edge
: '(' {start_edge_id();} edge_identifier {stop_edge_id();} port_instance ')' : '(' {start_edge_id();} edge_identifier {stop_edge_id();} port_instance ')'
{ $$.vpi_edge = $3; $$.string_val = $5; } { $$.vpi_edge = $3; $$.string_val = $5; }
@ -384,6 +398,9 @@ signed_real_number
: REAL_NUMBER { $$ = $1; } : REAL_NUMBER { $$ = $1; }
| '+' REAL_NUMBER { $$ = $2; } | '+' REAL_NUMBER { $$ = $2; }
| '-' REAL_NUMBER { $$ = -$2; } | '-' REAL_NUMBER { $$ = -$2; }
| INTEGER { $$ = $1; }
| '+' INTEGER { $$ = $2; }
| '-' INTEGER { $$ = -$2; }
; ;
%% %%

View File

@ -1850,6 +1850,109 @@ static PLI_INT32 sys_printtimescale_calltf(PLI_BYTE8*xx)
return 0; return 0;
} }
static PLI_INT32 sys_fatal_compiletf(PLI_BYTE8*name)
{
vpiHandle callh = vpi_handle(vpiSysTfCall, 0);
vpiHandle argv = vpi_iterate(vpiArgument, callh);
if (argv) {
vpiHandle arg;
s_vpi_value val;
/* Check that finish_number is numeric */
arg = vpi_scan(argv);
if (! is_numeric_obj(arg)) {
vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh),
(int)vpi_get(vpiLineNo, callh));
vpi_printf("%s's first argument must be numeric\n", name);
vpi_control(vpiFinish, 1);
return 0;
}
/* Check that it is 0, 1, or 2 */
val.format = vpiIntVal;
vpi_get_value(arg, &val);
if ((val.value.integer < 0) || (val.value.integer > 2)) {
vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh),
(int)vpi_get(vpiLineNo, callh));
vpi_printf("%s's finish_number must be 0, 1, or 2\n", name);
vpi_control(vpiFinish, 1);
}
}
if (sys_check_args(callh, argv, name, 0, 0)) vpi_control(vpiFinish, 1);
return 0;
}
static PLI_INT32 sys_severity_calltf(PLI_BYTE8*name)
{
vpiHandle callh, argv, scope;
struct strobe_cb_info info;
struct t_vpi_time now;
PLI_UINT64 now64;
char *sstr, *t, *dstr;
unsigned int size, location=0;
s_vpi_value finish_number;
callh = vpi_handle(vpiSysTfCall, 0);
argv = vpi_iterate(vpiArgument, callh);
if (strncmp(name,"$fatal",6) == 0) {
vpiHandle arg = vpi_scan(argv);
finish_number.format = vpiIntVal;
vpi_get_value(arg, &finish_number);
}
/* convert name to upper and drop $ to get severity string */
sstr = strdup(name) + 1;
t = sstr;
while (*t) *t++ = toupper(*t);
scope = vpi_handle(vpiScope, callh);
assert(scope);
info.name = name;
info.filename = strdup(vpi_get_str(vpiFile, callh));
info.lineno = (int)vpi_get(vpiLineNo, callh);
info.default_format = vpiDecStrVal;
info.scope = scope;
array_from_iterator(&info, argv);
vpi_printf("%s: %s:%d: ", sstr, info.filename, info.lineno);
dstr = get_display(&size, &info);
while (location < size) {
if (dstr[location] == '\0') {
my_mcd_printf(1, "%c", '\0');
location += 1;
} else {
my_mcd_printf(1, "%s", &dstr[location]);
location += strlen(&dstr[location]);
}
}
/* Now blank sstr out for equivalent spacing */
t = sstr;
while (*t) *t++ = ' ';
now.type = vpiSimTime;
vpi_get_time(0, &now);
now64 = timerec_to_time64(&now);
vpi_printf("\n%s Time: %" PLI_UINT64_FMT " Scope: %s\n",
sstr, now64, vpi_get_str(vpiFullName, scope));
free(--sstr);
free(info.filename);
free(info.items);
free(dstr);
if (strncmp(name,"$fatal",6) == 0)
vpi_control(vpiFinish, finish_number.value.integer);
return 0;
}
static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data)
{ {
free(monitor_callbacks); free(monitor_callbacks);
@ -2175,6 +2278,39 @@ void sys_display_register()
tf_data.user_data = "$printtimescale"; tf_data.user_data = "$printtimescale";
vpi_register_systf(&tf_data); vpi_register_systf(&tf_data);
/*============================ severity tasks */
tf_data.type = vpiSysTask;
tf_data.tfname = "$fatal";
tf_data.calltf = sys_severity_calltf;
tf_data.compiletf = sys_fatal_compiletf;
tf_data.sizetf = 0;
tf_data.user_data = "$fatal";
vpi_register_systf(&tf_data);
tf_data.type = vpiSysTask;
tf_data.tfname = "$error";
tf_data.calltf = sys_severity_calltf;
tf_data.compiletf = sys_display_compiletf;
tf_data.sizetf = 0;
tf_data.user_data = "$error";
vpi_register_systf(&tf_data);
tf_data.type = vpiSysTask;
tf_data.tfname = "$warning";
tf_data.calltf = sys_severity_calltf;
tf_data.compiletf = sys_display_compiletf;
tf_data.sizetf = 0;
tf_data.user_data = "$warning";
vpi_register_systf(&tf_data);
tf_data.type = vpiSysTask;
tf_data.tfname = "$info";
tf_data.calltf = sys_severity_calltf;
tf_data.compiletf = sys_display_compiletf;
tf_data.sizetf = 0;
tf_data.user_data = "$info";
vpi_register_systf(&tf_data);
cb_data.reason = cbEndOfCompile; cb_data.reason = cbEndOfCompile;
cb_data.time = 0; cb_data.time = 0;
cb_data.cb_rtn = sys_end_of_compile; cb_data.cb_rtn = sys_end_of_compile;