1" Vim syntax file 2" Language: Verilog-AMS 3" Maintainer: S. Myles Prather <[email protected]> 4" Last Update: Sun Aug 14 03:58:00 CST 2003 5 6" For version 5.x: Clear all syntax items 7" For version 6.x: Quit when a syntax file was already loaded 8if version < 600 9 syntax clear 10elseif exists("b:current_syntax") 11 finish 12endif 13 14" Set the local value of the 'iskeyword' option 15if version >= 600 16 setlocal iskeyword=@,48-57,_,192-255 17else 18 set iskeyword=@,48-57,_,192-255 19endif 20 21" Annex B.1 'All keywords' 22syn keyword verilogamsStatement above abs absdelay acos acosh ac_stim 23syn keyword verilogamsStatement always analog analysis and asin 24syn keyword verilogamsStatement asinh assign atan atan2 atanh branch 25syn keyword verilogamsStatement buf bufif1 ceil cmos 26syn keyword verilogamsStatement connectrules cos cosh cross ddt ddx deassign 27syn keyword verilogamsStatement defparam disable discipline 28syn keyword verilogamsStatement driver_update edge enddiscipline 29syn keyword verilogamsStatement endconnectrules endmodule endfunction 30syn keyword verilogamsStatement endnature endparamset endprimitive endspecify 31syn keyword verilogamsStatement endtable endtask event exp final_step 32syn keyword verilogamsStatement flicker_noise floor flow force fork 33syn keyword verilogamsStatement function generate genvar highz0 34syn keyword verilogamsStatement highz1 hypot idt idtmod if ifnone initial 35syn keyword verilogamsStatement initial_step inout input join 36syn keyword verilogamsStatement laplace_nd laplace_np laplace_zd laplace_zp 37syn keyword verilogamsStatement large last_crossing limexp ln localparam log 38syn keyword verilogamsStatement macromodule max medium min module nand nature 39syn keyword verilogamsStatement negedge net_resolution nmos noise_table nor not 40syn keyword verilogamsStatement notif0 notif1 or output paramset pmos 41syn keyword verilogamsType parameter real integer electrical input output 42syn keyword verilogamsType inout reg tri tri0 tri1 triand trior trireg 43syn keyword verilogamsType string from exclude aliasparam ground 44syn keyword verilogamsStatement posedge potential pow primitive pull0 pull1 45syn keyword verilogamsStatement pullup pulldown rcmos release 46syn keyword verilogamsStatement rnmos rpmos rtran rtranif0 rtranif1 47syn keyword verilogamsStatement scalared sin sinh slew small specify specparam 48syn keyword verilogamsStatement sqrt strong0 strong1 supply0 supply1 49syn keyword verilogamsStatement table tan tanh task time timer tran tranif0 50syn keyword verilogamsStatement tranif1 transition 51syn keyword verilogamsStatement vectored wait wand weak0 weak1 52syn keyword verilogamsStatement white_noise wire wor wreal xnor xor zi_nd 53syn keyword verilogamsStatement zi_np zi_zd 54syn keyword verilogamsRepeat forever repeat while for 55syn keyword verilogamsLabel begin end 56syn keyword verilogamsConditional if else case casex casez default endcase 57syn match verilogamsConstant ":inf"lc=1 58syn match verilogamsConstant "-inf"lc=1 59" Annex B.2 Discipline/nature 60syn keyword verilogamsStatement abstol access continuous ddt_nature discrete 61syn keyword verilogamsStatement domain idt_nature units 62" Annex B.3 Connect Rules 63syn keyword verilogamsStatement connect merged resolveto split 64 65syn match verilogamsOperator "[&|~><!)(*#%@+/=?:;}{,.\^\-\[\]]" 66syn match verilogamsOperator "<+" 67syn match verilogamsStatement "[vV]("me=e-1 68syn match verilogamsStatement "[iI]("me=e-1 69 70syn keyword verilogamsTodo contained TODO 71syn region verilogamsComment start="/\*" end="\*/" contains=verilogamsTodo 72syn match verilogamsComment "//.*" contains=verilogamsTodo 73 74syn match verilogamsGlobal "`celldefine" 75syn match verilogamsGlobal "`default_nettype" 76syn match verilogamsGlobal "`define" 77syn match verilogamsGlobal "`else" 78syn match verilogamsGlobal "`elsif" 79syn match verilogamsGlobal "`endcelldefine" 80syn match verilogamsGlobal "`endif" 81syn match verilogamsGlobal "`ifdef" 82syn match verilogamsGlobal "`ifndef" 83syn match verilogamsGlobal "`include" 84syn match verilogamsGlobal "`line" 85syn match verilogamsGlobal "`nounconnected_drive" 86syn match verilogamsGlobal "`resetall" 87syn match verilogamsGlobal "`timescale" 88syn match verilogamsGlobal "`unconnected_drive" 89syn match verilogamsGlobal "`undef" 90syn match verilogamsSystask "$[a-zA-Z0-9_]\+\>" 91 92syn match verilogamsConstant "\<[A-Z][A-Z0-9_]\+\>" 93 94syn match verilogamsNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" 95syn match verilogamsNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" 96syn match verilogamsNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" 97syn match verilogamsNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" 98syn match verilogamsNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" 99 100syn region verilogamsString start=+"+ skip=+\\"+ end=+"+ contains=verilogamsEscape 101syn match verilogamsEscape +\\[nt"\\]+ contained 102syn match verilogamsEscape "\\\o\o\=\o\=" contained 103 104"Modify the following as needed. The trade-off is performance versus 105"functionality. 106syn sync lines=50 107 108" Define the default highlighting. 109" For version 5.7 and earlier: only when not done already 110" For version 5.8 and later: only when an item doesn't have highlighting yet 111if version >= 508 || !exists("did_verilogams_syn_inits") 112 if version < 508 113 let did_verilogams_syn_inits = 1 114 command -nargs=+ HiLink hi link <args> 115 else 116 command -nargs=+ HiLink hi def link <args> 117 endif 118 119 " The default highlighting. 120 HiLink verilogamsCharacter Character 121 HiLink verilogamsConditional Conditional 122 HiLink verilogamsRepeat Repeat 123 HiLink verilogamsString String 124 HiLink verilogamsTodo Todo 125 HiLink verilogamsComment Comment 126 HiLink verilogamsConstant Constant 127 HiLink verilogamsLabel Label 128 HiLink verilogamsNumber Number 129 HiLink verilogamsOperator Special 130 HiLink verilogamsStatement Statement 131 HiLink verilogamsGlobal Define 132 HiLink verilogamsDirective SpecialComment 133 HiLink verilogamsEscape Special 134 HiLink verilogamsType Type 135 HiLink verilogamsSystask Function 136 137 delcommand HiLink 138endif 139 140let b:current_syntax = "verilogams" 141 142" vim: ts=8 143