diff --git a/compiler.h b/compiler.h index e604e4da2..5ced0b0b0 100644 --- a/compiler.h +++ b/compiler.h @@ -113,9 +113,10 @@ extern int build_library_index(const char*path, bool key_case_sensitive); specific language features. */ enum generation_t { GN_VER1995 = 1, - GN_VER2001 = 2, - GN_VER2005 = 3, - GN_DEFAULT = 3 + GN_VER2001_NOCONFIG = 2, + GN_VER2001 = 3, + GN_VER2005 = 4, + GN_DEFAULT = 4 }; extern generation_t generation_flag; diff --git a/driver/iverilog.man b/driver/iverilog.man index a7a4f743e..e739aed2f 100644 --- a/driver/iverilog.man +++ b/driver/iverilog.man @@ -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 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 Verilog source for use by other compilers. .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 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 language. This flag is most useful to restrict the language to a set supported by tools of specific generations, for compatibility with other tools. .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. Very little Verilog-AMS specific functionality is currently supported. .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. Very little SystemVerilog specific functionality is currently supported. .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 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 -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 -standard compliant behaviour (with some loss in performance). +standard compliant behavior (with some loss in performance). .TP 8 .B -I\fIincludedir\fP 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 compiler finds an undefined module, it looks in these directories for 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 @@ -448,7 +453,7 @@ Tips on using, debugging, and developing the compiler can be found at .SH COPYRIGHT .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 GNU General Public License version 2.0 diff --git a/driver/main.c b/driver/main.c index 66e451397..bf322d77d 100644 --- a/driver/main.c +++ b/driver/main.c @@ -557,6 +557,9 @@ int process_generation(const char*name) else if (strcmp(name,"2001") == 0) generation = "2001"; + else if (strcmp(name,"2001-noconfig") == 0) + generation = "2001-noconfig"; + else if (strcmp(name,"2005") == 0) generation = "2005"; diff --git a/lexor_keyword.gperf b/lexor_keyword.gperf index c58be638f..5ba577a71 100644 --- a/lexor_keyword.gperf +++ b/lexor_keyword.gperf @@ -11,165 +11,183 @@ %} struct lexor_keyword { const char*name; int mask; int tokenType; }; %% -abs, GN_KEYWORDS_VAMS_2_3, K_abs -abstol, GN_KEYWORDS_VAMS_2_3, K_abstol -access, GN_KEYWORDS_VAMS_2_3, K_access -acos, GN_KEYWORDS_VAMS_2_3, K_acos -acosh, GN_KEYWORDS_VAMS_2_3, K_acosh -always, GN_KEYWORDS_1364_1995, K_always -always_comb, GN_KEYWORDS_1800_2005, K_always_comb -always_ff, GN_KEYWORDS_1800_2005, K_always_ff -always_latch, GN_KEYWORDS_1800_2005, K_always_latch -analog, GN_KEYWORDS_VAMS_2_3, K_analog -and, GN_KEYWORDS_1364_1995, K_and -asin, GN_KEYWORDS_VAMS_2_3, K_asin -asinh, GN_KEYWORDS_VAMS_2_3, K_asinh -assert, GN_KEYWORDS_1800_2005, K_assert -assign, GN_KEYWORDS_1364_1995, K_assign -atan, GN_KEYWORDS_VAMS_2_3, K_atan -atan2, GN_KEYWORDS_VAMS_2_3, K_atan2 -atanh, GN_KEYWORDS_VAMS_2_3, K_atanh -automatic, GN_KEYWORDS_1364_2001, K_automatic -begin, GN_KEYWORDS_1364_1995, K_begin -bool, GN_KEYWORDS_ICARUS, K_bool -buf, GN_KEYWORDS_1364_1995, K_buf -bufif0, GN_KEYWORDS_1364_1995, K_bufif0 -bufif1, GN_KEYWORDS_1364_1995, K_bufif1 -case, GN_KEYWORDS_1364_1995, K_case -casex, GN_KEYWORDS_1364_1995, K_casex -casez, GN_KEYWORDS_1364_1995, K_casez -ceil, GN_KEYWORDS_VAMS_2_3, K_ceil -cmos, GN_KEYWORDS_1364_1995, K_cmos -continuous, GN_KEYWORDS_VAMS_2_3, K_continuous -cos, GN_KEYWORDS_VAMS_2_3, K_cos -cosh, GN_KEYWORDS_VAMS_2_3, K_cosh -ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature -deassign, GN_KEYWORDS_1364_1995, K_deassign -default, GN_KEYWORDS_1364_1995, K_default -defparam, GN_KEYWORDS_1364_1995, K_defparam -disable, GN_KEYWORDS_1364_1995, K_disable -discipline, GN_KEYWORDS_VAMS_2_3, K_discipline -discrete, GN_KEYWORDS_VAMS_2_3, K_discrete -domain, GN_KEYWORDS_VAMS_2_3, K_domain -edge, GN_KEYWORDS_1364_1995, K_edge -else, GN_KEYWORDS_1364_1995, K_else -end, GN_KEYWORDS_1364_1995, K_end -endcase, GN_KEYWORDS_1364_1995, K_endcase -enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline -endfunction, GN_KEYWORDS_1364_1995, K_endfunction -endgenerate, GN_KEYWORDS_1364_1995, K_endgenerate -endmodule, GN_KEYWORDS_1364_1995, K_endmodule -endnature, GN_KEYWORDS_VAMS_2_3, K_endnature -endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive -endspecify, GN_KEYWORDS_1364_1995, K_endspecify -endtable, GN_KEYWORDS_1364_1995, K_endtable -endtask, GN_KEYWORDS_1364_1995, K_endtask -event, GN_KEYWORDS_1364_1995, K_event -exclude, GN_KEYWORDS_VAMS_2_3, K_exclude -exp, GN_KEYWORDS_VAMS_2_3, K_exp -floor, GN_KEYWORDS_VAMS_2_3, K_floor -flow, GN_KEYWORDS_VAMS_2_3, K_flow -for, GN_KEYWORDS_1364_1995, K_for -force, GN_KEYWORDS_1364_1995, K_force -forever, GN_KEYWORDS_1364_1995, K_forever -fork, GN_KEYWORDS_1364_1995, K_fork -from, GN_KEYWORDS_VAMS_2_3, K_from -function, GN_KEYWORDS_1364_1995, K_function -generate, GN_KEYWORDS_1364_2001, K_generate -genvar, GN_KEYWORDS_1364_2001, K_genvar -ground, GN_KEYWORDS_VAMS_2_3, K_ground -highz0, GN_KEYWORDS_1364_1995, K_highz0 -highz1, GN_KEYWORDS_1364_1995, K_highz1 -hypot, GN_KEYWORDS_VAMS_2_3, K_hypot -idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature -if, GN_KEYWORDS_1364_1995, K_if -ifnone, GN_KEYWORDS_1364_1995, K_ifnone -inf, GN_KEYWORDS_VAMS_2_3, K_inf -initial, GN_KEYWORDS_1364_1995, K_initial -inout, GN_KEYWORDS_1364_1995, K_inout -input, GN_KEYWORDS_1364_1995, K_input -integer, GN_KEYWORDS_1364_1995, K_integer -join, GN_KEYWORDS_1364_1995, K_join -large, GN_KEYWORDS_1364_1995, K_large -ln, GN_KEYWORDS_VAMS_2_3, K_ln -localparam, GN_KEYWORDS_1364_2001, K_localparam -log, GN_KEYWORDS_VAMS_2_3, K_log -logic, GN_KEYWORDS_ICARUS, K_logic -macromodule, GN_KEYWORDS_1364_1995, K_macromodule -max, GN_KEYWORDS_VAMS_2_3, K_max -medium, GN_KEYWORDS_1364_1995, K_medium -min, GN_KEYWORDS_VAMS_2_3, K_min -module, GN_KEYWORDS_1364_1995, K_module -nand, GN_KEYWORDS_1364_1995, K_nand -nature, GN_KEYWORDS_VAMS_2_3, K_nature -negedge, GN_KEYWORDS_1364_1995, K_negedge -nmos, GN_KEYWORDS_1364_1995, K_nmos -nor, GN_KEYWORDS_1364_1995, K_nor -not, GN_KEYWORDS_1364_1995, K_not -notif0, GN_KEYWORDS_1364_1995, K_notif0 -notif1, GN_KEYWORDS_1364_1995, K_notif1 -or, GN_KEYWORDS_1364_1995, K_or -output, GN_KEYWORDS_1364_1995, K_output -parameter, GN_KEYWORDS_1364_1995, K_parameter -pmos, GN_KEYWORDS_1364_1995, K_pmos -posedge, GN_KEYWORDS_1364_1995, K_posedge -potential, GN_KEYWORDS_VAMS_2_3, K_potential -pow, GN_KEYWORDS_VAMS_2_3, K_pow -primitive, GN_KEYWORDS_1364_1995, K_primitive -pull0, GN_KEYWORDS_1364_1995, K_pull0 -pull1, GN_KEYWORDS_1364_1995, K_pull1 -pulldown, GN_KEYWORDS_1364_1995, K_pulldown -pullup, GN_KEYWORDS_1364_1995, K_pullup -rcmos, GN_KEYWORDS_1364_1995, K_rcmos -real, GN_KEYWORDS_1364_1995, K_real -realtime, GN_KEYWORDS_1364_1995, K_realtime -reg, GN_KEYWORDS_1364_1995, K_reg -release, GN_KEYWORDS_1364_1995, K_release -repeat, GN_KEYWORDS_1364_1995, K_repeat -rnmos, GN_KEYWORDS_1364_1995, K_rnmos -rpmos, GN_KEYWORDS_1364_1995, K_rpmos -rtran, GN_KEYWORDS_1364_1995, K_rtran -rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0 -rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1 -scalared, GN_KEYWORDS_1364_1995, K_scalared -signed, GN_KEYWORDS_1364_2001, K_signed -sin, GN_KEYWORDS_VAMS_2_3, K_sin -sinh, GN_KEYWORDS_VAMS_2_3, K_sinh -small, GN_KEYWORDS_1364_1995, K_small -specify, GN_KEYWORDS_1364_1995, K_specify -specparam, GN_KEYWORDS_1364_1995, K_specparam -sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt -string, GN_KEYWORDS_VAMS_2_3, K_string -strong0, GN_KEYWORDS_1364_1995, K_strong0 -strong1, GN_KEYWORDS_1364_1995, K_strong1 -supply0, GN_KEYWORDS_1364_1995, K_supply0 -supply1, GN_KEYWORDS_1364_1995, K_supply1 -table, GN_KEYWORDS_1364_1995, K_table -tan, GN_KEYWORDS_VAMS_2_3, K_tan -tanh, GN_KEYWORDS_VAMS_2_3, K_tanh -task, GN_KEYWORDS_1364_1995, K_task -time, GN_KEYWORDS_1364_1995, K_time -tran, GN_KEYWORDS_1364_1995, K_tran -tranif0, GN_KEYWORDS_1364_1995, K_tranif0 -tranif1, GN_KEYWORDS_1364_1995, K_tranif1 -tri, GN_KEYWORDS_1364_1995, K_tri -tri0, GN_KEYWORDS_1364_1995, K_tri0 -tri1, GN_KEYWORDS_1364_1995, K_tri1 -triand, GN_KEYWORDS_1364_1995, K_triand -trior, GN_KEYWORDS_1364_1995, K_trior -trireg, GN_KEYWORDS_1364_1995, K_trireg -units, GN_KEYWORDS_VAMS_2_3, K_units -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 -wone, GN_KEYWORDS_1364_1995, K_wone -wor, GN_KEYWORDS_1364_1995, K_wor -xnor, GN_KEYWORDS_1364_1995, K_xnor -xor, GN_KEYWORDS_1364_1995, K_xor +abs, GN_KEYWORDS_VAMS_2_3, K_abs +abstol, GN_KEYWORDS_VAMS_2_3, K_abstol +access, GN_KEYWORDS_VAMS_2_3, K_access +acos, GN_KEYWORDS_VAMS_2_3, K_acos +acosh, GN_KEYWORDS_VAMS_2_3, K_acosh +always, GN_KEYWORDS_1364_1995, K_always +always_comb, GN_KEYWORDS_1800_2005, K_always_comb +always_ff, GN_KEYWORDS_1800_2005, K_always_ff +always_latch, GN_KEYWORDS_1800_2005, K_always_latch +analog, GN_KEYWORDS_VAMS_2_3, K_analog +and, GN_KEYWORDS_1364_1995, K_and +asin, GN_KEYWORDS_VAMS_2_3, K_asin +asinh, GN_KEYWORDS_VAMS_2_3, K_asinh +assert, GN_KEYWORDS_1800_2005, K_assert +assign, GN_KEYWORDS_1364_1995, K_assign +atan, GN_KEYWORDS_VAMS_2_3, K_atan +atan2, GN_KEYWORDS_VAMS_2_3, K_atan2 +atanh, GN_KEYWORDS_VAMS_2_3, K_atanh +automatic, GN_KEYWORDS_1364_2001, K_automatic +begin, GN_KEYWORDS_1364_1995, K_begin +bool, GN_KEYWORDS_ICARUS, K_bool +buf, GN_KEYWORDS_1364_1995, K_buf +bufif0, GN_KEYWORDS_1364_1995, K_bufif0 +bufif1, GN_KEYWORDS_1364_1995, K_bufif1 +case, GN_KEYWORDS_1364_1995, K_case +casex, GN_KEYWORDS_1364_1995, K_casex +casez, GN_KEYWORDS_1364_1995, K_casez +ceil, GN_KEYWORDS_VAMS_2_3, K_ceil +cell, GN_KEYWORDS_1364_2001_CONFIG, K_cell +cmos, GN_KEYWORDS_1364_1995, K_cmos +config, GN_KEYWORDS_1364_2001_CONFIG, K_config +continuous, GN_KEYWORDS_VAMS_2_3, K_continuous +cos, GN_KEYWORDS_VAMS_2_3, K_cos +cosh, GN_KEYWORDS_VAMS_2_3, K_cosh +ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature +deassign, GN_KEYWORDS_1364_1995, K_deassign +default, GN_KEYWORDS_1364_1995, K_default +defparam, GN_KEYWORDS_1364_1995, K_defparam +design, GN_KEYWORDS_1364_2001_CONFIG, K_design +disable, GN_KEYWORDS_1364_1995, K_disable +discipline, GN_KEYWORDS_VAMS_2_3, K_discipline +discrete, GN_KEYWORDS_VAMS_2_3, K_discrete +domain, GN_KEYWORDS_VAMS_2_3, K_domain +edge, GN_KEYWORDS_1364_1995, K_edge +else, GN_KEYWORDS_1364_1995, K_else +end, GN_KEYWORDS_1364_1995, K_end +endcase, GN_KEYWORDS_1364_1995, K_endcase +endconfig, GN_KEYWORDS_1364_2001_CONFIG, K_endconfig +enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline +endfunction, GN_KEYWORDS_1364_1995, K_endfunction +endgenerate, GN_KEYWORDS_1364_2001, K_endgenerate +endmodule, GN_KEYWORDS_1364_1995, K_endmodule +endnature, GN_KEYWORDS_VAMS_2_3, K_endnature +endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive +endspecify, GN_KEYWORDS_1364_1995, K_endspecify +endtable, GN_KEYWORDS_1364_1995, K_endtable +endtask, GN_KEYWORDS_1364_1995, K_endtask +event, GN_KEYWORDS_1364_1995, K_event +exclude, GN_KEYWORDS_VAMS_2_3, K_exclude +exp, GN_KEYWORDS_VAMS_2_3, K_exp +floor, GN_KEYWORDS_VAMS_2_3, K_floor +flow, GN_KEYWORDS_VAMS_2_3, K_flow +for, GN_KEYWORDS_1364_1995, K_for +force, GN_KEYWORDS_1364_1995, K_force +forever, GN_KEYWORDS_1364_1995, K_forever +fork, GN_KEYWORDS_1364_1995, K_fork +from, GN_KEYWORDS_VAMS_2_3, K_from +function, GN_KEYWORDS_1364_1995, K_function +generate, GN_KEYWORDS_1364_2001, K_generate +genvar, GN_KEYWORDS_1364_2001, K_genvar +ground, GN_KEYWORDS_VAMS_2_3, K_ground +highz0, GN_KEYWORDS_1364_1995, K_highz0 +highz1, GN_KEYWORDS_1364_1995, K_highz1 +hypot, GN_KEYWORDS_VAMS_2_3, K_hypot +idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature +if, GN_KEYWORDS_1364_1995, K_if +ifnone, GN_KEYWORDS_1364_1995, K_ifnone +incdir, GN_KEYWORDS_1364_2001_CONFIG, K_incdir +include, GN_KEYWORDS_1364_2001_CONFIG, K_include +inf, GN_KEYWORDS_VAMS_2_3, K_inf +initial, GN_KEYWORDS_1364_1995, K_initial +inout, GN_KEYWORDS_1364_1995, K_inout +input, GN_KEYWORDS_1364_1995, K_input +instance, GN_KEYWORDS_1364_2001_CONFIG, K_instance +integer, GN_KEYWORDS_1364_1995, K_integer +join, GN_KEYWORDS_1364_1995, K_join +large, GN_KEYWORDS_1364_1995, K_large +liblist, GN_KEYWORDS_1364_2001_CONFIG, K_liblist +library, GN_KEYWORDS_1364_2001_CONFIG, K_library +ln, GN_KEYWORDS_VAMS_2_3, K_ln +localparam, GN_KEYWORDS_1364_2001, K_localparam +log, GN_KEYWORDS_VAMS_2_3, K_log +logic, GN_KEYWORDS_ICARUS, K_logic +macromodule, GN_KEYWORDS_1364_1995, K_macromodule +max, GN_KEYWORDS_VAMS_2_3, K_max +medium, GN_KEYWORDS_1364_1995, K_medium +min, GN_KEYWORDS_VAMS_2_3, K_min +module, GN_KEYWORDS_1364_1995, K_module +nand, GN_KEYWORDS_1364_1995, K_nand +nature, GN_KEYWORDS_VAMS_2_3, K_nature +negedge, GN_KEYWORDS_1364_1995, K_negedge +nmos, GN_KEYWORDS_1364_1995, K_nmos +nor, GN_KEYWORDS_1364_1995, K_nor +noshowcancelled, GN_KEYWORDS_1364_2001, K_noshowcancelled +not, GN_KEYWORDS_1364_1995, K_not +notif0, GN_KEYWORDS_1364_1995, K_notif0 +notif1, GN_KEYWORDS_1364_1995, K_notif1 +or, GN_KEYWORDS_1364_1995, K_or +output, GN_KEYWORDS_1364_1995, K_output +parameter, GN_KEYWORDS_1364_1995, K_parameter +pmos, GN_KEYWORDS_1364_1995, K_pmos +posedge, GN_KEYWORDS_1364_1995, K_posedge +potential, GN_KEYWORDS_VAMS_2_3, K_potential +pow, GN_KEYWORDS_VAMS_2_3, K_pow +primitive, GN_KEYWORDS_1364_1995, K_primitive +pull0, GN_KEYWORDS_1364_1995, K_pull0 +pull1, GN_KEYWORDS_1364_1995, K_pull1 +pulldown, GN_KEYWORDS_1364_1995, K_pulldown +pullup, GN_KEYWORDS_1364_1995, K_pullup +pulsestyle_onevent, GN_KEYWORDS_1364_2001, K_pulsestyle_onevent +pulsestyle_ondetect, GN_KEYWORDS_1364_2001, K_pulsestyle_ondetect +rcmos, GN_KEYWORDS_1364_1995, K_rcmos +real, GN_KEYWORDS_1364_1995, K_real +realtime, GN_KEYWORDS_1364_1995, K_realtime +reg, GN_KEYWORDS_1364_1995, K_reg +release, GN_KEYWORDS_1364_1995, K_release +repeat, GN_KEYWORDS_1364_1995, K_repeat +rnmos, GN_KEYWORDS_1364_1995, K_rnmos +rpmos, GN_KEYWORDS_1364_1995, K_rpmos +rtran, GN_KEYWORDS_1364_1995, K_rtran +rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0 +rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1 +scalared, GN_KEYWORDS_1364_1995, K_scalared +showcancelled, GN_KEYWORDS_1364_2001, K_showcancelled +signed, GN_KEYWORDS_1364_2001, K_signed +sin, GN_KEYWORDS_VAMS_2_3, K_sin +sinh, GN_KEYWORDS_VAMS_2_3, K_sinh +small, GN_KEYWORDS_1364_1995, K_small +specify, GN_KEYWORDS_1364_1995, K_specify +specparam, GN_KEYWORDS_1364_1995, K_specparam +sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt +string, GN_KEYWORDS_VAMS_2_3, K_string +strong0, GN_KEYWORDS_1364_1995, K_strong0 +strong1, GN_KEYWORDS_1364_1995, K_strong1 +supply0, GN_KEYWORDS_1364_1995, K_supply0 +supply1, GN_KEYWORDS_1364_1995, K_supply1 +table, GN_KEYWORDS_1364_1995, K_table +tan, GN_KEYWORDS_VAMS_2_3, K_tan +tanh, GN_KEYWORDS_VAMS_2_3, K_tanh +task, GN_KEYWORDS_1364_1995, K_task +time, GN_KEYWORDS_1364_1995, K_time +tran, GN_KEYWORDS_1364_1995, K_tran +tranif0, GN_KEYWORDS_1364_1995, K_tranif0 +tranif1, GN_KEYWORDS_1364_1995, K_tranif1 +tri, GN_KEYWORDS_1364_1995, K_tri +tri0, GN_KEYWORDS_1364_1995, K_tri0 +tri1, GN_KEYWORDS_1364_1995, K_tri1 +triand, GN_KEYWORDS_1364_1995, K_triand +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; diff --git a/main.cc b/main.cc index b3f1201c0..ad4de617a 100644 --- a/main.cc +++ b/main.cc @@ -224,6 +224,9 @@ static void process_generation_flag(const char*gen) } else if (strcmp(gen,"2001") == 0) { generation_flag = GN_VER2001; + } else if (strcmp(gen,"2001-noconfig") == 0) { + generation_flag = GN_VER2001_NOCONFIG; + } else if (strcmp(gen,"2005") == 0) { generation_flag = GN_VER2005; @@ -660,9 +663,10 @@ int main(int argc, char*argv[]) lexor_keyword_mask |= GN_KEYWORDS_1364_1995; break; 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_2001; - lexor_keyword_mask |= GN_KEYWORDS_1364_2001_CONFIG; break; case GN_VER2005: lexor_keyword_mask |= GN_KEYWORDS_1364_1995; @@ -690,6 +694,9 @@ int main(int argc, char*argv[]) case GN_VER1995: cout << "IEEE1364-1995"; break; + case GN_VER2001_NOCONFIG: + cout << "IEEE1364-2001-noconfig"; + break; case GN_VER2001: cout << "IEEE1364-2001"; break; diff --git a/netlist.cc b/netlist.cc index 4a69c5e80..8f2940316 100644 --- a/netlist.cc +++ b/netlist.cc @@ -78,8 +78,8 @@ ostream& operator<< (ostream&o, NetNet::Type t) case NetNet::WIRE: o << "wire"; break; - case NetNet::WONE: - o << "wone"; + case NetNet::UWIRE: + o << "uwire"; } return o; } diff --git a/netlist.h b/netlist.h index 387adffc8..05c57ebfd 100644 --- a/netlist.h +++ b/netlist.h @@ -542,7 +542,7 @@ class NetNet : public NetObj { public: enum Type { NONE, IMPLICIT, IMPLICIT_REG, INTEGER, WIRE, TRI, TRI1, SUPPLY0, SUPPLY1, WAND, TRIAND, TRI0, WOR, TRIOR, REG, - WONE }; + UWIRE }; enum PortType { NOT_A_PORT, PIMPLICIT, PINPUT, POUTPUT, PINOUT }; diff --git a/parse.y b/parse.y index ce7f66a70..c533b03ac 100644 --- a/parse.y +++ b/parse.y @@ -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_PSTAR K_STARP %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_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 +%token K_edge_descriptor + /* 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 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 from_exclude %type number @@ -2494,7 +2509,12 @@ net_type | K_supply1 { $$ = NetNet::SUPPLY1; } | K_wor { $$ = NetNet::WOR; } | 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 diff --git a/t-dll.cc b/t-dll.cc index f1b18f857..1e9a28602 100644 --- a/t-dll.cc +++ b/t-dll.cc @@ -2511,6 +2511,10 @@ void dll_target::signal(const NetNet*net) assert(0); 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::WIRE: case NetNet::IMPLICIT: