Fix some keywords, add -g2001-noconfig and fix up uwire/wone.

This patch adds -g2001-noconfig command line flag. The compiler
already supported this with `begin_keywords. Document this in
the manual page and fix a few other issues.

Fix endgenerate to be a 2001 keyword and add a few missing
keywords at the appropriate standard level e.g.(unsigned).

Add uwire and deprecate wone. wone used to just convert without
a warning to a wire. uwire will display a warning that it is
being converted to a wire without a check. wone is converted to
a uwire with a warning and then prints the uwire message. The
uwire message will be replaced with a real check fairly soon.
This commit is contained in:
Cary R 2009-06-01 17:19:56 -07:00 committed by Stephen Williams
parent c842cdbdc4
commit ca7e64afaf
9 changed files with 264 additions and 206 deletions

View File

@ -113,9 +113,10 @@ extern int build_library_index(const char*path, bool key_case_sensitive);
specific language features. */ specific language features. */
enum generation_t { enum generation_t {
GN_VER1995 = 1, GN_VER1995 = 1,
GN_VER2001 = 2, GN_VER2001_NOCONFIG = 2,
GN_VER2005 = 3, GN_VER2001 = 3,
GN_DEFAULT = 3 GN_VER2005 = 4,
GN_DEFAULT = 4
}; };
extern generation_t generation_flag; extern generation_t generation_flag;

View File

@ -1,4 +1,4 @@
.TH iverilog 1 "April 17th, 2009" "" "Version 0.10.devel" .TH iverilog 1 "May 28th, 2009" "" "Version 0.10.devel"
.SH NAME .SH NAME
iverilog - Icarus Verilog compiler iverilog - Icarus Verilog compiler
@ -55,20 +55,20 @@ 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-g2005 .B -g1995\fI|\fP-g2001\fI|\fP-g2001-noconfig\fI|\fP-g2005
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(2), or \fIIEEE1364-2005\fP. Normally, \fIIEEE1364-2001\fP, or \fIIEEE1364-2005\fP. Normally,
Icarus Verilog defaults to the latest known generation of the 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.
.TP 8 .TP 8
.B -gverilog-ams\fI|-fP-gno-verilog-ams .B -gverilog-ams\fI|\fP-gno-verilog-ams
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 .B -gsystem-verilog\fI|\fP-gno-system-verilog
Enable or disable (default) support for SystemVerilog. Enable or disable (default) support for SystemVerilog.
Very little SystemVerilog specific functionality is currently supported. Very little SystemVerilog specific functionality is currently supported.
.TP 8 .TP 8
@ -115,9 +115,9 @@ expression changes value, the entire expression is re-evaluated. By
default, parts of the expression that do not depend on the changed default, parts of the expression that do not depend on the changed
input value(s) are not re-evaluated. If an expression contains a call input value(s) are not re-evaluated. If an expression contains a call
to a function that doesn't depend solely on its input values or that to a function that doesn't depend solely on its input values or that
has side effects, the resulting behaviour will differ from that has side effects, the resulting behavior will differ from that
required by the standard. Using \fI-gstrict-ca-eval\fP will force required by the standard. Using \fI-gstrict-ca-eval\fP will force
standard compliant behaviour (with some loss in performance). standard compliant behavior (with some loss in performance).
.TP 8 .TP 8
.B -I\fIincludedir\fP .B -I\fIincludedir\fP
Append directory \fIincludedir\fP to list of directories searched Append directory \fIincludedir\fP to list of directories searched
@ -203,6 +203,11 @@ all the requested classes.
Append the directory to the library module search path. When the Append the directory to the library module search path. When the
compiler finds an undefined module, it looks in these directories for compiler finds an undefined module, it looks in these directories for
files with the right name. files with the right name.
.TP 8
.B -Y\fIsuffix\fP
Add suffix to the list of accepted file name suffixes used when
searching a library for cells. The list defaults to the single
entry \fI.v\fP.
.SH MODULE LIBRARIES .SH MODULE LIBRARIES
@ -448,7 +453,7 @@ Tips on using, debugging, and developing the compiler can be found at
.SH COPYRIGHT .SH COPYRIGHT
.nf .nf
Copyright \(co 2002-2008 Stephen Williams Copyright \(co 2002-2009 Stephen Williams
This document can be freely redistributed according to the terms of the This document can be freely redistributed according to the terms of the
GNU General Public License version 2.0 GNU General Public License version 2.0

View File

@ -557,6 +557,9 @@ int process_generation(const char*name)
else if (strcmp(name,"2001") == 0) else if (strcmp(name,"2001") == 0)
generation = "2001"; generation = "2001";
else if (strcmp(name,"2001-noconfig") == 0)
generation = "2001-noconfig";
else if (strcmp(name,"2005") == 0) else if (strcmp(name,"2005") == 0)
generation = "2005"; generation = "2005";

View File

@ -11,165 +11,183 @@
%} %}
struct lexor_keyword { const char*name; int mask; int tokenType; }; struct lexor_keyword { const char*name; int mask; int tokenType; };
%% %%
abs, GN_KEYWORDS_VAMS_2_3, K_abs abs, GN_KEYWORDS_VAMS_2_3, K_abs
abstol, GN_KEYWORDS_VAMS_2_3, K_abstol abstol, GN_KEYWORDS_VAMS_2_3, K_abstol
access, GN_KEYWORDS_VAMS_2_3, K_access 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
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_2005, K_always_comb
always_ff, GN_KEYWORDS_1800_2005, K_always_ff always_ff, GN_KEYWORDS_1800_2005, K_always_ff
always_latch, GN_KEYWORDS_1800_2005, K_always_latch always_latch, GN_KEYWORDS_1800_2005, K_always_latch
analog, GN_KEYWORDS_VAMS_2_3, K_analog analog, GN_KEYWORDS_VAMS_2_3, K_analog
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
assert, GN_KEYWORDS_1800_2005, K_assert assert, GN_KEYWORDS_1800_2005, K_assert
assign, GN_KEYWORDS_1364_1995, K_assign assign, GN_KEYWORDS_1364_1995, K_assign
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
begin, GN_KEYWORDS_1364_1995, K_begin begin, GN_KEYWORDS_1364_1995, K_begin
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
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
cmos, GN_KEYWORDS_1364_1995, K_cmos cell, GN_KEYWORDS_1364_2001_CONFIG, K_cell
continuous, GN_KEYWORDS_VAMS_2_3, K_continuous cmos, GN_KEYWORDS_1364_1995, K_cmos
cos, GN_KEYWORDS_VAMS_2_3, K_cos config, GN_KEYWORDS_1364_2001_CONFIG, K_config
cosh, GN_KEYWORDS_VAMS_2_3, K_cosh continuous, GN_KEYWORDS_VAMS_2_3, K_continuous
ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature cos, GN_KEYWORDS_VAMS_2_3, K_cos
deassign, GN_KEYWORDS_1364_1995, K_deassign cosh, GN_KEYWORDS_VAMS_2_3, K_cosh
default, GN_KEYWORDS_1364_1995, K_default ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature
defparam, GN_KEYWORDS_1364_1995, K_defparam deassign, GN_KEYWORDS_1364_1995, K_deassign
disable, GN_KEYWORDS_1364_1995, K_disable default, GN_KEYWORDS_1364_1995, K_default
discipline, GN_KEYWORDS_VAMS_2_3, K_discipline defparam, GN_KEYWORDS_1364_1995, K_defparam
discrete, GN_KEYWORDS_VAMS_2_3, K_discrete design, GN_KEYWORDS_1364_2001_CONFIG, K_design
domain, GN_KEYWORDS_VAMS_2_3, K_domain disable, GN_KEYWORDS_1364_1995, K_disable
edge, GN_KEYWORDS_1364_1995, K_edge discipline, GN_KEYWORDS_VAMS_2_3, K_discipline
else, GN_KEYWORDS_1364_1995, K_else discrete, GN_KEYWORDS_VAMS_2_3, K_discrete
end, GN_KEYWORDS_1364_1995, K_end domain, GN_KEYWORDS_VAMS_2_3, K_domain
endcase, GN_KEYWORDS_1364_1995, K_endcase edge, GN_KEYWORDS_1364_1995, K_edge
enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline else, GN_KEYWORDS_1364_1995, K_else
endfunction, GN_KEYWORDS_1364_1995, K_endfunction end, GN_KEYWORDS_1364_1995, K_end
endgenerate, GN_KEYWORDS_1364_1995, K_endgenerate endcase, GN_KEYWORDS_1364_1995, K_endcase
endmodule, GN_KEYWORDS_1364_1995, K_endmodule endconfig, GN_KEYWORDS_1364_2001_CONFIG, K_endconfig
endnature, GN_KEYWORDS_VAMS_2_3, K_endnature enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline
endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive endfunction, GN_KEYWORDS_1364_1995, K_endfunction
endspecify, GN_KEYWORDS_1364_1995, K_endspecify endgenerate, GN_KEYWORDS_1364_2001, K_endgenerate
endtable, GN_KEYWORDS_1364_1995, K_endtable endmodule, GN_KEYWORDS_1364_1995, K_endmodule
endtask, GN_KEYWORDS_1364_1995, K_endtask endnature, GN_KEYWORDS_VAMS_2_3, K_endnature
event, GN_KEYWORDS_1364_1995, K_event endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive
exclude, GN_KEYWORDS_VAMS_2_3, K_exclude endspecify, GN_KEYWORDS_1364_1995, K_endspecify
exp, GN_KEYWORDS_VAMS_2_3, K_exp endtable, GN_KEYWORDS_1364_1995, K_endtable
floor, GN_KEYWORDS_VAMS_2_3, K_floor endtask, GN_KEYWORDS_1364_1995, K_endtask
flow, GN_KEYWORDS_VAMS_2_3, K_flow event, GN_KEYWORDS_1364_1995, K_event
for, GN_KEYWORDS_1364_1995, K_for exclude, GN_KEYWORDS_VAMS_2_3, K_exclude
force, GN_KEYWORDS_1364_1995, K_force exp, GN_KEYWORDS_VAMS_2_3, K_exp
forever, GN_KEYWORDS_1364_1995, K_forever floor, GN_KEYWORDS_VAMS_2_3, K_floor
fork, GN_KEYWORDS_1364_1995, K_fork flow, GN_KEYWORDS_VAMS_2_3, K_flow
from, GN_KEYWORDS_VAMS_2_3, K_from for, GN_KEYWORDS_1364_1995, K_for
function, GN_KEYWORDS_1364_1995, K_function force, GN_KEYWORDS_1364_1995, K_force
generate, GN_KEYWORDS_1364_2001, K_generate forever, GN_KEYWORDS_1364_1995, K_forever
genvar, GN_KEYWORDS_1364_2001, K_genvar fork, GN_KEYWORDS_1364_1995, K_fork
ground, GN_KEYWORDS_VAMS_2_3, K_ground from, GN_KEYWORDS_VAMS_2_3, K_from
highz0, GN_KEYWORDS_1364_1995, K_highz0 function, GN_KEYWORDS_1364_1995, K_function
highz1, GN_KEYWORDS_1364_1995, K_highz1 generate, GN_KEYWORDS_1364_2001, K_generate
hypot, GN_KEYWORDS_VAMS_2_3, K_hypot genvar, GN_KEYWORDS_1364_2001, K_genvar
idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature ground, GN_KEYWORDS_VAMS_2_3, K_ground
if, GN_KEYWORDS_1364_1995, K_if highz0, GN_KEYWORDS_1364_1995, K_highz0
ifnone, GN_KEYWORDS_1364_1995, K_ifnone highz1, GN_KEYWORDS_1364_1995, K_highz1
inf, GN_KEYWORDS_VAMS_2_3, K_inf hypot, GN_KEYWORDS_VAMS_2_3, K_hypot
initial, GN_KEYWORDS_1364_1995, K_initial idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature
inout, GN_KEYWORDS_1364_1995, K_inout if, GN_KEYWORDS_1364_1995, K_if
input, GN_KEYWORDS_1364_1995, K_input ifnone, GN_KEYWORDS_1364_1995, K_ifnone
integer, GN_KEYWORDS_1364_1995, K_integer incdir, GN_KEYWORDS_1364_2001_CONFIG, K_incdir
join, GN_KEYWORDS_1364_1995, K_join include, GN_KEYWORDS_1364_2001_CONFIG, K_include
large, GN_KEYWORDS_1364_1995, K_large inf, GN_KEYWORDS_VAMS_2_3, K_inf
ln, GN_KEYWORDS_VAMS_2_3, K_ln initial, GN_KEYWORDS_1364_1995, K_initial
localparam, GN_KEYWORDS_1364_2001, K_localparam inout, GN_KEYWORDS_1364_1995, K_inout
log, GN_KEYWORDS_VAMS_2_3, K_log input, GN_KEYWORDS_1364_1995, K_input
logic, GN_KEYWORDS_ICARUS, K_logic instance, GN_KEYWORDS_1364_2001_CONFIG, K_instance
macromodule, GN_KEYWORDS_1364_1995, K_macromodule integer, GN_KEYWORDS_1364_1995, K_integer
max, GN_KEYWORDS_VAMS_2_3, K_max join, GN_KEYWORDS_1364_1995, K_join
medium, GN_KEYWORDS_1364_1995, K_medium large, GN_KEYWORDS_1364_1995, K_large
min, GN_KEYWORDS_VAMS_2_3, K_min liblist, GN_KEYWORDS_1364_2001_CONFIG, K_liblist
module, GN_KEYWORDS_1364_1995, K_module library, GN_KEYWORDS_1364_2001_CONFIG, K_library
nand, GN_KEYWORDS_1364_1995, K_nand ln, GN_KEYWORDS_VAMS_2_3, K_ln
nature, GN_KEYWORDS_VAMS_2_3, K_nature localparam, GN_KEYWORDS_1364_2001, K_localparam
negedge, GN_KEYWORDS_1364_1995, K_negedge log, GN_KEYWORDS_VAMS_2_3, K_log
nmos, GN_KEYWORDS_1364_1995, K_nmos logic, GN_KEYWORDS_ICARUS, K_logic
nor, GN_KEYWORDS_1364_1995, K_nor macromodule, GN_KEYWORDS_1364_1995, K_macromodule
not, GN_KEYWORDS_1364_1995, K_not max, GN_KEYWORDS_VAMS_2_3, K_max
notif0, GN_KEYWORDS_1364_1995, K_notif0 medium, GN_KEYWORDS_1364_1995, K_medium
notif1, GN_KEYWORDS_1364_1995, K_notif1 min, GN_KEYWORDS_VAMS_2_3, K_min
or, GN_KEYWORDS_1364_1995, K_or module, GN_KEYWORDS_1364_1995, K_module
output, GN_KEYWORDS_1364_1995, K_output nand, GN_KEYWORDS_1364_1995, K_nand
parameter, GN_KEYWORDS_1364_1995, K_parameter nature, GN_KEYWORDS_VAMS_2_3, K_nature
pmos, GN_KEYWORDS_1364_1995, K_pmos negedge, GN_KEYWORDS_1364_1995, K_negedge
posedge, GN_KEYWORDS_1364_1995, K_posedge nmos, GN_KEYWORDS_1364_1995, K_nmos
potential, GN_KEYWORDS_VAMS_2_3, K_potential nor, GN_KEYWORDS_1364_1995, K_nor
pow, GN_KEYWORDS_VAMS_2_3, K_pow noshowcancelled, GN_KEYWORDS_1364_2001, K_noshowcancelled
primitive, GN_KEYWORDS_1364_1995, K_primitive not, GN_KEYWORDS_1364_1995, K_not
pull0, GN_KEYWORDS_1364_1995, K_pull0 notif0, GN_KEYWORDS_1364_1995, K_notif0
pull1, GN_KEYWORDS_1364_1995, K_pull1 notif1, GN_KEYWORDS_1364_1995, K_notif1
pulldown, GN_KEYWORDS_1364_1995, K_pulldown or, GN_KEYWORDS_1364_1995, K_or
pullup, GN_KEYWORDS_1364_1995, K_pullup output, GN_KEYWORDS_1364_1995, K_output
rcmos, GN_KEYWORDS_1364_1995, K_rcmos parameter, GN_KEYWORDS_1364_1995, K_parameter
real, GN_KEYWORDS_1364_1995, K_real pmos, GN_KEYWORDS_1364_1995, K_pmos
realtime, GN_KEYWORDS_1364_1995, K_realtime posedge, GN_KEYWORDS_1364_1995, K_posedge
reg, GN_KEYWORDS_1364_1995, K_reg potential, GN_KEYWORDS_VAMS_2_3, K_potential
release, GN_KEYWORDS_1364_1995, K_release pow, GN_KEYWORDS_VAMS_2_3, K_pow
repeat, GN_KEYWORDS_1364_1995, K_repeat primitive, GN_KEYWORDS_1364_1995, K_primitive
rnmos, GN_KEYWORDS_1364_1995, K_rnmos pull0, GN_KEYWORDS_1364_1995, K_pull0
rpmos, GN_KEYWORDS_1364_1995, K_rpmos pull1, GN_KEYWORDS_1364_1995, K_pull1
rtran, GN_KEYWORDS_1364_1995, K_rtran pulldown, GN_KEYWORDS_1364_1995, K_pulldown
rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0 pullup, GN_KEYWORDS_1364_1995, K_pullup
rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1 pulsestyle_onevent, GN_KEYWORDS_1364_2001, K_pulsestyle_onevent
scalared, GN_KEYWORDS_1364_1995, K_scalared pulsestyle_ondetect, GN_KEYWORDS_1364_2001, K_pulsestyle_ondetect
signed, GN_KEYWORDS_1364_2001, K_signed rcmos, GN_KEYWORDS_1364_1995, K_rcmos
sin, GN_KEYWORDS_VAMS_2_3, K_sin real, GN_KEYWORDS_1364_1995, K_real
sinh, GN_KEYWORDS_VAMS_2_3, K_sinh realtime, GN_KEYWORDS_1364_1995, K_realtime
small, GN_KEYWORDS_1364_1995, K_small reg, GN_KEYWORDS_1364_1995, K_reg
specify, GN_KEYWORDS_1364_1995, K_specify release, GN_KEYWORDS_1364_1995, K_release
specparam, GN_KEYWORDS_1364_1995, K_specparam repeat, GN_KEYWORDS_1364_1995, K_repeat
sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt rnmos, GN_KEYWORDS_1364_1995, K_rnmos
string, GN_KEYWORDS_VAMS_2_3, K_string rpmos, GN_KEYWORDS_1364_1995, K_rpmos
strong0, GN_KEYWORDS_1364_1995, K_strong0 rtran, GN_KEYWORDS_1364_1995, K_rtran
strong1, GN_KEYWORDS_1364_1995, K_strong1 rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0
supply0, GN_KEYWORDS_1364_1995, K_supply0 rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1
supply1, GN_KEYWORDS_1364_1995, K_supply1 scalared, GN_KEYWORDS_1364_1995, K_scalared
table, GN_KEYWORDS_1364_1995, K_table showcancelled, GN_KEYWORDS_1364_2001, K_showcancelled
tan, GN_KEYWORDS_VAMS_2_3, K_tan signed, GN_KEYWORDS_1364_2001, K_signed
tanh, GN_KEYWORDS_VAMS_2_3, K_tanh sin, GN_KEYWORDS_VAMS_2_3, K_sin
task, GN_KEYWORDS_1364_1995, K_task sinh, GN_KEYWORDS_VAMS_2_3, K_sinh
time, GN_KEYWORDS_1364_1995, K_time small, GN_KEYWORDS_1364_1995, K_small
tran, GN_KEYWORDS_1364_1995, K_tran specify, GN_KEYWORDS_1364_1995, K_specify
tranif0, GN_KEYWORDS_1364_1995, K_tranif0 specparam, GN_KEYWORDS_1364_1995, K_specparam
tranif1, GN_KEYWORDS_1364_1995, K_tranif1 sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt
tri, GN_KEYWORDS_1364_1995, K_tri string, GN_KEYWORDS_VAMS_2_3, K_string
tri0, GN_KEYWORDS_1364_1995, K_tri0 strong0, GN_KEYWORDS_1364_1995, K_strong0
tri1, GN_KEYWORDS_1364_1995, K_tri1 strong1, GN_KEYWORDS_1364_1995, K_strong1
triand, GN_KEYWORDS_1364_1995, K_triand supply0, GN_KEYWORDS_1364_1995, K_supply0
trior, GN_KEYWORDS_1364_1995, K_trior supply1, GN_KEYWORDS_1364_1995, K_supply1
trireg, GN_KEYWORDS_1364_1995, K_trireg table, GN_KEYWORDS_1364_1995, K_table
units, GN_KEYWORDS_VAMS_2_3, K_units tan, GN_KEYWORDS_VAMS_2_3, K_tan
vectored, GN_KEYWORDS_1364_1995, K_vectored tanh, GN_KEYWORDS_VAMS_2_3, K_tanh
wait, GN_KEYWORDS_1364_1995, K_wait task, GN_KEYWORDS_1364_1995, K_task
wand, GN_KEYWORDS_1364_1995, K_wand time, GN_KEYWORDS_1364_1995, K_time
weak0, GN_KEYWORDS_1364_1995, K_weak0 tran, GN_KEYWORDS_1364_1995, K_tran
weak1, GN_KEYWORDS_1364_1995, K_weak1 tranif0, GN_KEYWORDS_1364_1995, K_tranif0
while, GN_KEYWORDS_1364_1995, K_while tranif1, GN_KEYWORDS_1364_1995, K_tranif1
wire, GN_KEYWORDS_1364_1995, K_wire tri, GN_KEYWORDS_1364_1995, K_tri
wone, GN_KEYWORDS_1364_1995, K_wone tri0, GN_KEYWORDS_1364_1995, K_tri0
wor, GN_KEYWORDS_1364_1995, K_wor tri1, GN_KEYWORDS_1364_1995, K_tri1
xnor, GN_KEYWORDS_1364_1995, K_xnor triand, GN_KEYWORDS_1364_1995, K_triand
xor, GN_KEYWORDS_1364_1995, K_xor trior, GN_KEYWORDS_1364_1995, K_trior
trireg, GN_KEYWORDS_1364_1995, K_trireg
units, GN_KEYWORDS_VAMS_2_3, K_units
# Reserved for future use!
unsigned, GN_KEYWORDS_1364_2001, K_unsigned
use, GN_KEYWORDS_1364_2001_CONFIG, K_use
uwire, GN_KEYWORDS_1364_2005, K_uwire
vectored, GN_KEYWORDS_1364_1995, K_vectored
wait, GN_KEYWORDS_1364_1995, K_wait
wand, GN_KEYWORDS_1364_1995, K_wand
weak0, GN_KEYWORDS_1364_1995, K_weak0
weak1, GN_KEYWORDS_1364_1995, K_weak1
while, GN_KEYWORDS_1364_1995, K_while
wire, GN_KEYWORDS_1364_1995, K_wire
# This is the name originally proposed for uwire and is deprecated!
wone, GN_KEYWORDS_1364_2005, K_wone
wor, GN_KEYWORDS_1364_1995, K_wor
xnor, GN_KEYWORDS_1364_1995, K_xnor
xor, GN_KEYWORDS_1364_1995, K_xor
%% %%
int lexor_keyword_mask = 0; int lexor_keyword_mask = 0;

View File

@ -224,6 +224,9 @@ static void process_generation_flag(const char*gen)
} else if (strcmp(gen,"2001") == 0) { } else if (strcmp(gen,"2001") == 0) {
generation_flag = GN_VER2001; generation_flag = GN_VER2001;
} else if (strcmp(gen,"2001-noconfig") == 0) {
generation_flag = GN_VER2001_NOCONFIG;
} else if (strcmp(gen,"2005") == 0) { } else if (strcmp(gen,"2005") == 0) {
generation_flag = GN_VER2005; generation_flag = GN_VER2005;
@ -660,9 +663,10 @@ int main(int argc, char*argv[])
lexor_keyword_mask |= GN_KEYWORDS_1364_1995; lexor_keyword_mask |= GN_KEYWORDS_1364_1995;
break; break;
case GN_VER2001: case GN_VER2001:
lexor_keyword_mask |= GN_KEYWORDS_1364_2001_CONFIG;
case GN_VER2001_NOCONFIG:
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;
lexor_keyword_mask |= GN_KEYWORDS_1364_2001_CONFIG;
break; break;
case GN_VER2005: case GN_VER2005:
lexor_keyword_mask |= GN_KEYWORDS_1364_1995; lexor_keyword_mask |= GN_KEYWORDS_1364_1995;
@ -690,6 +694,9 @@ int main(int argc, char*argv[])
case GN_VER1995: case GN_VER1995:
cout << "IEEE1364-1995"; cout << "IEEE1364-1995";
break; break;
case GN_VER2001_NOCONFIG:
cout << "IEEE1364-2001-noconfig";
break;
case GN_VER2001: case GN_VER2001:
cout << "IEEE1364-2001"; cout << "IEEE1364-2001";
break; break;

View File

@ -78,8 +78,8 @@ ostream& operator<< (ostream&o, NetNet::Type t)
case NetNet::WIRE: case NetNet::WIRE:
o << "wire"; o << "wire";
break; break;
case NetNet::WONE: case NetNet::UWIRE:
o << "wone"; o << "uwire";
} }
return o; return o;
} }

View File

@ -542,7 +542,7 @@ class NetNet : public NetObj {
public: public:
enum Type { NONE, IMPLICIT, IMPLICIT_REG, INTEGER, WIRE, TRI, TRI1, enum Type { NONE, IMPLICIT, IMPLICIT_REG, INTEGER, WIRE, TRI, TRI1,
SUPPLY0, SUPPLY1, WAND, TRIAND, TRI0, WOR, TRIOR, REG, SUPPLY0, SUPPLY1, WAND, TRIAND, TRI0, WOR, TRIOR, REG,
WONE }; UWIRE };
enum PortType { NOT_A_PORT, PIMPLICIT, PINPUT, POUTPUT, PINOUT }; enum PortType { NOT_A_PORT, PIMPLICIT, PINPUT, POUTPUT, PINOUT };

84
parse.y
View File

@ -229,40 +229,55 @@ static PECallFunction*make_call_function(perm_string tn, PExpr*arg1, PExpr*arg2)
%token K_PO_POS K_PO_NEG K_POW %token K_PO_POS K_PO_NEG K_POW
%token K_PSTAR K_STARP %token K_PSTAR K_STARP
%token K_LOR K_LAND K_NAND K_NOR K_NXOR K_TRIGGER %token K_LOR K_LAND K_NAND K_NOR K_NXOR K_TRIGGER
%token K_abs K_abstol K_access K_acos K_acosh K_asin K_analog K_asinh %token K_edge_descriptor
%token K_atan K_atanh K_atan2 K_automatic
%token K_always K_and K_assign K_begin K_bool K_buf K_bufif0 K_bufif1 K_case
%token K_casex K_casez K_ceil K_cmos K_continuous K_cos K_cosh
%token K_ddt_nature K_deassign K_default K_defparam K_disable K_discrete
%token K_domain K_edge K_edge_descriptor K_discipline
%token K_else K_end K_endcase K_enddiscipline K_endfunction K_endgenerate
%token K_endmodule K_endnature
%token K_endprimitive K_endspecify K_endtable K_endtask K_event
%token K_exclude K_exp K_floor K_flow K_from
%token K_for K_force K_forever K_fork K_function K_generate K_genvar
%token K_ground K_highz0 K_highz1 K_hypot K_idt_nature K_if K_ifnone K_inf
%token K_initial K_inout K_input K_integer K_join K_large K_ln K_localparam
%token K_log K_logic K_macromodule K_max
%token K_medium K_min K_module K_nand K_nature K_negedge
%token K_nmos K_nor K_not K_notif0
%token K_notif1 K_or K_output K_parameter K_pmos K_posedge K_potential
%token K_pow K_primitive
%token K_pull0 K_pull1 K_pulldown K_pullup K_rcmos K_real K_realtime
%token K_reg K_release K_repeat
%token K_rnmos K_rpmos K_rtran K_rtranif0 K_rtranif1 K_scalared
%token K_signed K_sin K_sinh K_small K_specify
%token K_specparam K_sqrt K_string K_strong0 K_strong1 K_supply0 K_supply1
%token K_table
%token K_tan K_tanh K_task
%token K_time K_tran K_tranif0 K_tranif1 K_tri K_tri0 K_tri1 K_triand
%token K_trior K_trireg K_units K_vectored K_wait K_wand K_weak0 K_weak1
%token K_while K_wire
%token K_wone K_wor K_xnor K_xor
%token K_Shold K_Speriod K_Srecovery K_Srecrem K_Ssetup K_Swidth K_Ssetuphold
/* The base tokens from 1364-1995. */
%token K_always K_and K_assign K_begin K_buf K_bufif0 K_bufif1 K_case
%token K_casex K_casez K_cmos K_deassign K_default K_defparam K_disable
%token K_edge K_else K_end K_endcase K_endfunction K_endmodule
%token K_endprimitive K_endspecify K_endtable K_endtask K_event K_for
%token K_force K_forever K_fork K_function K_highz0 K_highz1 K_if
%token K_ifnone K_initial K_inout K_input K_integer K_join K_large
%token K_macromodule K_medium K_module K_nand K_negedge K_nmos K_nor
%token K_not K_notif0 K_notif1 K_or K_output K_parameter K_pmos K_posedge
%token K_primitive K_pull0 K_pull1 K_pulldown K_pullup K_rcmos K_real
%token K_realtime K_reg K_release K_repeat K_rnmos K_rpmos K_rtran
%token K_rtranif0 K_rtranif1 K_scalared K_small K_specify K_specparam
%token K_strong0 K_strong1 K_supply0 K_supply1 K_table K_task K_time
%token K_tran K_tranif0 K_tranif1 K_tri K_tri0 K_tri1 K_triand K_trior
%token K_trireg K_vectored K_wait K_wand K_weak0 K_weak1 K_while K_wire
%token K_wor K_xnor K_xor
%token K_Shold K_Speriod K_Srecovery K_Ssetup K_Swidth K_Ssetuphold
/* Icarus specific tokens. */
%token KK_attribute K_bool K_logic
/* The new tokens from 1364-2001. */
%token K_automatic K_endgenerate K_generate K_genvar K_localparam
%token K_noshowcancelled K_pulsestyle_onevent K_pulsestyle_ondetect
%token K_showcancelled K_signed K_unsigned
%token K_Srecrem
/* The 1364-2001 configuration tokens. */
%token K_cell K_config K_design K_endconfig K_incdir K_include K_instance
%token K_liblist K_library K_use
/* The new tokens from 1364-2005. */
%token K_wone K_uwire
/* The new tokens from 1800-2005. */
%token K_always_comb K_always_ff K_always_latch K_assert %token K_always_comb K_always_ff K_always_latch K_assert
%token KK_attribute /* The new tokens for Verilog-AMS 2.3. */
%token K_abs K_abstol K_access K_acos K_acosh K_analog K_asin K_asinh
%token K_atan K_atan2 K_atanh K_ceil K_continuous K_cos K_cosh
%token K_ddt_nature K_discipline K_discrete K_domain K_enddiscipline
%token K_endnature K_exclude K_exp K_floor K_flow K_from K_ground
%token K_hypot K_idt_nature K_inf K_ln K_log K_max K_min K_nature
%token K_potential K_pow K_sin K_sinh K_sqrt K_string K_tan K_tanh
%token K_units
%type <flag> from_exclude %type <flag> from_exclude
%type <number> number %type <number> number
@ -2494,7 +2509,12 @@ net_type
| K_supply1 { $$ = NetNet::SUPPLY1; } | K_supply1 { $$ = NetNet::SUPPLY1; }
| K_wor { $$ = NetNet::WOR; } | K_wor { $$ = NetNet::WOR; }
| K_trior { $$ = NetNet::TRIOR; } | K_trior { $$ = NetNet::TRIOR; }
| K_wone { $$ = NetNet::WONE; } | K_wone { $$ = NetNet::UWIRE;
cerr << @1.text << ":" << @1.first_line << ": warning: "
"'wone' is deprecated, please use 'uwire' "
"instead." << endl;
}
| K_uwire { $$ = NetNet::UWIRE; }
; ;
var_type var_type

View File

@ -2511,6 +2511,10 @@ void dll_target::signal(const NetNet*net)
assert(0); assert(0);
break; break;
case NetNet::UWIRE:
cerr << net->get_fileline()
<< ": warning: uwire is not currently supported, converting "
"it to a wire!" << endl;
case NetNet::TRI: case NetNet::TRI:
case NetNet::WIRE: case NetNet::WIRE:
case NetNet::IMPLICIT: case NetNet::IMPLICIT: