KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

systemverilog.php 13KB

11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <?php
  2. /************************************************************************************
  3. * systemverilog.php
  4. * -------
  5. * Author: Sean O'Boyle
  6. * Copyright: (C) 2008 IntelligentDV
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2008/06/25
  9. *
  10. * SystemVerilog IEEE 1800-2009(draft8) language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/06/25 (1.0.0)
  15. * - First Release
  16. *
  17. * TODO (updated 2008/06/25)
  18. * -------------------------
  19. *
  20. *************************************************************************************
  21. *
  22. * This file is part of GeSHi.
  23. *
  24. * GeSHi is free software: you can redistribute it and/or modify
  25. * it under the terms of the GNU General Public License as published by
  26. * the Free Software Foundation, either version 3 of the License, or
  27. * (at your option) any later version.
  28. *
  29. * This program is distributed in the hope that it will be useful,
  30. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. * GNU General Public License for more details.
  33. *
  34. * You should have received a copy of the GNU General Public License
  35. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  36. *
  37. ************************************************************************
  38. * Title: SystemVerilog Language Keywords File for GeSHi
  39. * Description: This file contains the SV keywords defined in the
  40. * IEEE1800-2009 Draft Standard in the format expected by
  41. * GeSHi.
  42. *
  43. * Original Author: Sean O'Boyle
  44. * Contact: seanoboyle@intelligentdv.com
  45. * Company: Intelligent Design Verification
  46. * Company URL: http://intelligentdv.com
  47. *
  48. * Download the most recent version here:
  49. * http://intelligentdv.com/downloads
  50. *
  51. * File Bugs Here: http://bugs.intelligentdv.com
  52. * Project: SyntaxFiles
  53. *
  54. * File: systemverilog.php
  55. * $LastChangedBy: benbe $
  56. * $LastChangedDate: 2012-08-18 01:56:20 +0200 (Sa, 18. Aug 2012) $
  57. * $LastChangedRevision: 2542 $
  58. *
  59. ************************************************************************/
  60. $language_data = array (
  61. 'LANG_NAME' => 'SystemVerilog',
  62. 'COMMENT_SINGLE' => array(1 => '//'),
  63. 'COMMENT_MULTI' => array('/*' => '*/'),
  64. 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
  65. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  66. 'QUOTEMARKS' => array('"'),
  67. 'ESCAPE_CHAR' => '\\',
  68. 'KEYWORDS' => array(
  69. // system tasks
  70. 1 => array(
  71. 'acos','acosh','asin','asinh','assertfailoff','assertfailon',
  72. 'assertkill','assertnonvacuouson','assertoff','asserton',
  73. 'assertpassoff','assertpasson','assertvacuousoff','async$and$array',
  74. 'async$and$plane','async$nand$array','async$nand$plane',
  75. 'async$nor$array','async$nor$plane','async$or$array',
  76. 'async$or$plane','atan','atan2','atanh','bits','bitstoreal',
  77. 'bitstoshortreal','cast','ceil','changed','changed_gclk',
  78. 'changing_gclk','clog2','cos','cosh','countones','coverage_control',
  79. 'coverage_get','coverage_get_max','coverage_merge','coverage_save',
  80. 'dimensions','display','displayb','displayh','displayo',
  81. 'dist_chi_square','dist_erlang','dist_exponential','dist_normal',
  82. 'dist_poisson','dist_t','dist_uniform','dumpall','dumpfile',
  83. 'dumpflush','dumplimit','dumpoff','dumpon','dumpports',
  84. 'dumpportsall','dumpportsflush','dumpportslimit','dumpportsoff',
  85. 'dumpportson','dumpvars','error','exit','exp','falling_gclk',
  86. 'fclose','fdisplay','fdisplayb','fdisplayh','fdisplayo','fell',
  87. 'fell_gclk','feof','ferror','fflush','fgetc','fgets','finish',
  88. 'floor','fmonitor','fmonitorb','fmonitorh','fmonitoro','fopen',
  89. 'fread','fscanf','fseek','fstrobe','fstrobeb','fstrobeh','fstrobeo',
  90. 'ftell','future_gclk','fwrite','fwriteb','fwriteh','fwriteo',
  91. 'get_coverage','high','hypot','increment','info','isunbounded',
  92. 'isunknown','itor','left','ln','load_coverage_db','log10','low',
  93. 'monitor','monitorb','monitorh','monitoro','monitoroff','monitoron',
  94. 'onehot','onehot0','past','past_gclk','pow','printtimescale',
  95. 'q_add','q_exam','q_full','q_initialize','q_remove','random',
  96. 'readmemb','readmemh','realtime','realtobits','rewind','right',
  97. 'rising_gclk','rose','rose_gclk','rtoi','sampled',
  98. 'set_coverage_db_name','sformat','sformatf','shortrealtobits',
  99. 'signed','sin','sinh','size','sqrt','sscanf','stable','stable_gclk',
  100. 'steady_gclk','stime','stop','strobe','strobeb','strobeh','strobeo',
  101. 'swrite','swriteb','swriteh','swriteo','sync$and$array',
  102. 'sync$and$plane','sync$nand$array','sync$nand$plane',
  103. 'sync$nor$array','sync$nor$plane','sync$or$array','sync$or$plane',
  104. 'system','tan','tanh','test$plusargs','time','timeformat',
  105. 'typename','ungetc','unpacked_dimensions','unsigned',
  106. 'value$plusargs','warning','write','writeb','writeh','writememb',
  107. 'writememh','writeo',
  108. ),
  109. // compiler directives
  110. 2 => array(
  111. '`__FILE__', '`__LINE__', '`begin_keywords', '`case', '`celldefine',
  112. '`endcelldefine', '`default_nettype', '`define', '`default', '`else',
  113. '`elsif', '`end_keywords', '`endfor', '`endif',
  114. '`endprotect', '`endswitch', '`endwhile', '`for', '`format',
  115. '`if', '`ifdef', '`ifndef', '`include', '`let',
  116. '`line', '`nounconnected_drive', '`pragma', '`protect', '`resetall',
  117. '`switch', '`timescale', '`unconnected_drive', '`undef', '`undefineall',
  118. '`while'
  119. ),
  120. // keywords
  121. 3 => array(
  122. 'assert', 'assume', 'cover', 'expect', 'disable',
  123. 'iff', 'binsof', 'intersect', 'first_match', 'throughout',
  124. 'within', 'coverpoint', 'cross', 'wildcard', 'bins',
  125. 'ignore_bins', 'illegal_bins', 'genvar', 'if', 'else',
  126. 'unique', 'priority', 'matches', 'default', 'forever',
  127. 'repeat', 'while', 'for', 'do', 'foreach',
  128. 'break', 'continue', 'return', 'pulsestyle_onevent', 'pulsestyle_ondetect',
  129. 'noshowcancelled', 'showcancelled', 'ifnone', 'posedge', 'negedge',
  130. 'edge', 'wait', 'wait_order', 'timeunit', 'timeprecision',
  131. 's', 'ms', 'us', 'ns',
  132. 'ps', 'fs', 'step', 'new', 'extends',
  133. 'this', 'super', 'protected', 'local', 'rand',
  134. 'randc', 'bind', 'constraint', 'solve', 'before',
  135. 'dist', 'inside', 'with', 'virtual', 'extern',
  136. 'pure', 'forkjoin', 'design', 'instance', 'cell',
  137. 'liblist', 'use', 'library', 'incdir', 'include',
  138. 'modport', 'sync_accept_on', 'reject_on', 'accept_on',
  139. 'sync_reject_on', 'restrict', 'let', 'until', 'until_with',
  140. 'unique0', 'eventually', 's_until', 's_always', 's_eventually',
  141. 's_nexttime', 's_until_with', 'global', 'untyped', 'implies',
  142. 'weak', 'strong', 'nexttime'
  143. ),
  144. // block keywords
  145. 4 => array(
  146. 'begin', 'end', 'package', 'endpackage', 'macromodule',
  147. 'module', 'endmodule', 'generate', 'endgenerate', 'program',
  148. 'endprogram', 'class', 'endclass', 'function', 'endfunction',
  149. 'case', 'casex', 'casez', 'randcase', 'endcase',
  150. 'interface', 'endinterface', 'clocking', 'endclocking', 'task',
  151. 'endtask', 'primitive', 'endprimitive', 'fork', 'join',
  152. 'join_any', 'join_none', 'covergroup', 'endgroup', 'checker',
  153. 'endchecker', 'property', 'endproperty', 'randsequence', 'sequence',
  154. 'endsequence', 'specify', 'endspecify', 'config', 'endconfig',
  155. 'table', 'endtable', 'initial', 'final', 'always',
  156. 'always_comb', 'always_ff', 'always_latch', 'alias', 'assign',
  157. 'force', 'release'
  158. ),
  159. // types
  160. 5 => array(
  161. 'parameter', 'localparam', 'specparam', 'input', 'output',
  162. 'inout', 'ref', 'byte', 'shortint', 'int',
  163. 'integer', 'longint', 'time', 'bit', 'logic',
  164. 'reg', 'supply0', 'supply1', 'tri', 'triand',
  165. 'trior', 'trireg', 'tri0', 'tri1', 'wire',
  166. 'uwire', 'wand', 'wor', 'signed', 'unsigned',
  167. 'shortreal', 'real', 'realtime', 'type', 'void',
  168. 'struct', 'union', 'tagged', 'const', 'var',
  169. 'automatic', 'static', 'packed', 'vectored', 'scalared',
  170. 'typedef', 'enum', 'string', 'chandle', 'event',
  171. 'null', 'pullup', 'pulldown', 'cmos', 'rcmos',
  172. 'nmos', 'pmos', 'rnmos', 'rpmos', 'and',
  173. 'nand', 'or', 'nor', 'xor', 'xnor',
  174. 'not', 'buf', 'tran', 'rtran', 'tranif0',
  175. 'tranif1', 'rtranif0', 'rtranif1', 'bufif0', 'bufif1',
  176. 'notif0', 'notif1', 'strong0', 'strong1', 'pull0',
  177. 'pull1', 'weak0', 'weak1', 'highz0', 'highz1',
  178. 'small', 'medium', 'large'
  179. ),
  180. // DPI
  181. 6 => array(
  182. 'DPI', 'DPI-C', 'import', 'export', 'context'
  183. ),
  184. // stdlib
  185. 7 => array(
  186. 'randomize', 'mailbox', 'semaphore', 'put', 'get',
  187. 'try_put', 'try_get', 'peek', 'try_peek', 'process',
  188. 'state', 'self', 'status', 'kill', 'await',
  189. 'suspend', 'resume', 'size', 'delete', 'insert',
  190. 'num', 'first', 'last', 'next', 'prev',
  191. 'pop_front', 'pop_back', 'push_front', 'push_back', 'find',
  192. 'find_index', 'find_first', 'find_last', 'find_last_index', 'min',
  193. 'max', 'unique_index', 'reverse', 'sort', 'rsort',
  194. 'shuffle', 'sum', 'product', 'List', 'List_Iterator',
  195. 'neq', 'eq', 'data', 'empty', 'front',
  196. 'back', 'start', 'finish', 'insert_range', 'erase',
  197. 'erase_range', 'set', 'swap', 'clear', 'purge'
  198. ),
  199. // key_deprecated
  200. 8 => array(
  201. 'defparam', 'deassign', 'TODO'
  202. ),
  203. ),
  204. 'SYMBOLS' => array(
  205. '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%',
  206. '^', '&', '|', '~',
  207. '?', ':',
  208. '#', '<<', '<<<',
  209. '>', '<', '>=', '<=',
  210. '@', ';', ','
  211. ),
  212. 'CASE_SENSITIVE' => array(
  213. GESHI_COMMENTS => false,
  214. 1 => true,
  215. 2 => true,
  216. 3 => true,
  217. 4 => true,
  218. 5 => true,
  219. 6 => true,
  220. 7 => true,
  221. 8 => true
  222. ),
  223. 'STYLES' => array(
  224. 'KEYWORDS' => array(
  225. 1 => 'color: #996666; font-weight: bold;',
  226. 2 => 'color: #336600; font-weight: bold;',
  227. 3 => 'color: #996600; font-weight: bold;',
  228. 4 => 'color: #000033; font-weight: bold;',
  229. 5 => 'color: #330033; font-weight: bold;',
  230. 6 => 'color: #996600; font-weight: bold;',
  231. 7 => 'color: #CC9900; font-weight: bold;',
  232. 8 => 'color: #990000; font-weight: bold;'
  233. ),
  234. 'COMMENTS' => array(
  235. 1 => 'color: #00008B; font-style: italic;',
  236. 'MULTI' => 'color: #00008B; font-style: italic;'
  237. ),
  238. 'ESCAPE_CHAR' => array(
  239. 0 => 'color: #9F79EE'
  240. ),
  241. 'BRACKETS' => array(
  242. 0 => 'color: #9F79EE;'
  243. ),
  244. 'STRINGS' => array(
  245. 0 => 'color: #FF00FF;'
  246. ),
  247. 'NUMBERS' => array(
  248. 0 => 'color: #ff0055;'
  249. ),
  250. 'METHODS' => array(
  251. 1 => 'color: #202020;',
  252. 2 => 'color: #202020;'
  253. ),
  254. 'SYMBOLS' => array(
  255. 0 => 'color: #5D478B;'
  256. ),
  257. 'REGEXPS' => array(
  258. 0 => 'color: #ff0055;',
  259. 1 => 'color: #ff0055;',
  260. 2 => 'color: #ff0055;',
  261. 3 => 'color: #ff0055;'
  262. ),
  263. 'SCRIPT' => array(
  264. 0 => '',
  265. 1 => '',
  266. 2 => '',
  267. 3 => ''
  268. )
  269. ),
  270. 'URLS' => array(
  271. 1 => '',
  272. 2 => '',
  273. 3 => '',
  274. 4 => '',
  275. 5 => '',
  276. 6 => '',
  277. 7 => '',
  278. 8 => ''
  279. ),
  280. 'OOLANG' => false,
  281. 'OBJECT_SPLITTERS' => array(
  282. 1 => ''
  283. ),
  284. 'REGEXPS' => array(
  285. // integer
  286. 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+",
  287. // realtime
  288. 1 => "\d*\.\d+[munpf]?s",
  289. // time s, ms, us, ns, ps, of fs
  290. 2 => "\d+[munpf]?s",
  291. // real
  292. 3 => "\d*\.\d+"
  293. ),
  294. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  295. 'SCRIPT_DELIMITERS' => array(
  296. 0 => ''
  297. ),
  298. 'HIGHLIGHT_STRICT_BLOCK' => array(
  299. 0 => true
  300. ),
  301. 'TAB_WIDTH' => 3,
  302. 'PARSER_CONTROL' => array(
  303. 'KEYWORDS' => array(
  304. 1 => array(
  305. 'DISALLOWED_BEFORE' => '(?<=$)'
  306. )
  307. )
  308. )
  309. );
  310. ?>