ruby-vpi 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) hide show
  1. data/HISTORY +398 -0
  2. data/LICENSE +340 -0
  3. data/MEMO +38 -0
  4. data/README +9 -0
  5. data/Rakefile +271 -0
  6. data/bin/generate_test.rb +258 -0
  7. data/bin/generate_test_tpl/bench.rb +31 -0
  8. data/bin/generate_test_tpl/bench.v +54 -0
  9. data/bin/generate_test_tpl/design.rb +26 -0
  10. data/bin/generate_test_tpl/proto.rb +8 -0
  11. data/bin/generate_test_tpl/runner.rake +28 -0
  12. data/bin/generate_test_tpl/spec.rb +46 -0
  13. data/bin/header_to_ruby.rb +70 -0
  14. data/doc/Rakefile +55 -0
  15. data/doc/src/LICENSE +397 -0
  16. data/doc/src/figures/organization.png +0 -0
  17. data/doc/src/figures/organization_detailed.png +0 -0
  18. data/doc/src/figures/ruby_init.png +0 -0
  19. data/doc/src/figures/ruby_relay.png +0 -0
  20. data/doc/src/figures.dia +0 -0
  21. data/doc/src/images/COPYING +67 -0
  22. data/doc/src/images/ChangeLog +27 -0
  23. data/doc/src/images/blank.png +0 -0
  24. data/doc/src/images/callouts/1.png +0 -0
  25. data/doc/src/images/callouts/10.png +0 -0
  26. data/doc/src/images/callouts/11.png +0 -0
  27. data/doc/src/images/callouts/12.png +0 -0
  28. data/doc/src/images/callouts/13.png +0 -0
  29. data/doc/src/images/callouts/14.png +0 -0
  30. data/doc/src/images/callouts/15.png +0 -0
  31. data/doc/src/images/callouts/2.png +0 -0
  32. data/doc/src/images/callouts/3.png +0 -0
  33. data/doc/src/images/callouts/4.png +0 -0
  34. data/doc/src/images/callouts/5.png +0 -0
  35. data/doc/src/images/callouts/6.png +0 -0
  36. data/doc/src/images/callouts/7.png +0 -0
  37. data/doc/src/images/callouts/8.png +0 -0
  38. data/doc/src/images/callouts/9.png +0 -0
  39. data/doc/src/images/callouts/ChangeLog +15 -0
  40. data/doc/src/images/caution.png +0 -0
  41. data/doc/src/images/caution.svg +290 -0
  42. data/doc/src/images/copyright +55 -0
  43. data/doc/src/images/draft.png +0 -0
  44. data/doc/src/images/home.png +0 -0
  45. data/doc/src/images/home.svg +386 -0
  46. data/doc/src/images/important.png +0 -0
  47. data/doc/src/images/important.svg +163 -0
  48. data/doc/src/images/next.png +0 -0
  49. data/doc/src/images/next.svg +191 -0
  50. data/doc/src/images/note.png +0 -0
  51. data/doc/src/images/note.svg +483 -0
  52. data/doc/src/images/prev.png +0 -0
  53. data/doc/src/images/prev.svg +852 -0
  54. data/doc/src/images/tip.png +0 -0
  55. data/doc/src/images/tip.svg +1145 -0
  56. data/doc/src/images/toc-blank.png +0 -0
  57. data/doc/src/images/toc-minus.png +0 -0
  58. data/doc/src/images/toc-plus.png +0 -0
  59. data/doc/src/images/up.png +0 -0
  60. data/doc/src/images/up.svg +195 -0
  61. data/doc/src/images/warning.png +0 -0
  62. data/doc/src/images/warning.svg +334 -0
  63. data/doc/src/license.xml +446 -0
  64. data/doc/src/manual.xml +1582 -0
  65. data/doc/src/manual.xsl +23 -0
  66. data/doc/src/shared.dtd +63 -0
  67. data/doc/src/styles/manual.css +87 -0
  68. data/doc/txt/manual.txt +1657 -0
  69. data/doc/xhtml/background.html +3 -0
  70. data/doc/xhtml/background.methodology.html +3 -0
  71. data/doc/xhtml/background.organization.html +10 -0
  72. data/doc/xhtml/background.running-tests.html +3 -0
  73. data/doc/xhtml/background.terminology.html +3 -0
  74. data/doc/xhtml/figures/organization.png +0 -0
  75. data/doc/xhtml/figures/organization_detailed.png +0 -0
  76. data/doc/xhtml/figures/ruby_init.png +0 -0
  77. data/doc/xhtml/figures/ruby_relay.png +0 -0
  78. data/doc/xhtml/gfdl-0.html +18 -0
  79. data/doc/xhtml/gfdl-1.html +70 -0
  80. data/doc/xhtml/gfdl-10.html +15 -0
  81. data/doc/xhtml/gfdl-2.html +13 -0
  82. data/doc/xhtml/gfdl-3.html +31 -0
  83. data/doc/xhtml/gfdl-4.html +75 -0
  84. data/doc/xhtml/gfdl-5.html +20 -0
  85. data/doc/xhtml/gfdl-6.html +12 -0
  86. data/doc/xhtml/gfdl-7.html +16 -0
  87. data/doc/xhtml/gfdl-8.html +17 -0
  88. data/doc/xhtml/gfdl-9.html +9 -0
  89. data/doc/xhtml/gfdl-addendum.html +25 -0
  90. data/doc/xhtml/gfdl.html +11 -0
  91. data/doc/xhtml/glossary.html +3 -0
  92. data/doc/xhtml/images/COPYING +67 -0
  93. data/doc/xhtml/images/ChangeLog +27 -0
  94. data/doc/xhtml/images/blank.png +0 -0
  95. data/doc/xhtml/images/callouts/1.png +0 -0
  96. data/doc/xhtml/images/callouts/10.png +0 -0
  97. data/doc/xhtml/images/callouts/11.png +0 -0
  98. data/doc/xhtml/images/callouts/12.png +0 -0
  99. data/doc/xhtml/images/callouts/13.png +0 -0
  100. data/doc/xhtml/images/callouts/14.png +0 -0
  101. data/doc/xhtml/images/callouts/15.png +0 -0
  102. data/doc/xhtml/images/callouts/2.png +0 -0
  103. data/doc/xhtml/images/callouts/3.png +0 -0
  104. data/doc/xhtml/images/callouts/4.png +0 -0
  105. data/doc/xhtml/images/callouts/5.png +0 -0
  106. data/doc/xhtml/images/callouts/6.png +0 -0
  107. data/doc/xhtml/images/callouts/7.png +0 -0
  108. data/doc/xhtml/images/callouts/8.png +0 -0
  109. data/doc/xhtml/images/callouts/9.png +0 -0
  110. data/doc/xhtml/images/callouts/ChangeLog +15 -0
  111. data/doc/xhtml/images/caution.png +0 -0
  112. data/doc/xhtml/images/caution.svg +290 -0
  113. data/doc/xhtml/images/copyright +55 -0
  114. data/doc/xhtml/images/draft.png +0 -0
  115. data/doc/xhtml/images/home.png +0 -0
  116. data/doc/xhtml/images/home.svg +386 -0
  117. data/doc/xhtml/images/important.png +0 -0
  118. data/doc/xhtml/images/important.svg +163 -0
  119. data/doc/xhtml/images/next.png +0 -0
  120. data/doc/xhtml/images/next.svg +191 -0
  121. data/doc/xhtml/images/note.png +0 -0
  122. data/doc/xhtml/images/note.svg +483 -0
  123. data/doc/xhtml/images/prev.png +0 -0
  124. data/doc/xhtml/images/prev.svg +852 -0
  125. data/doc/xhtml/images/tip.png +0 -0
  126. data/doc/xhtml/images/tip.svg +1145 -0
  127. data/doc/xhtml/images/toc-blank.png +0 -0
  128. data/doc/xhtml/images/toc-minus.png +0 -0
  129. data/doc/xhtml/images/toc-plus.png +0 -0
  130. data/doc/xhtml/images/up.png +0 -0
  131. data/doc/xhtml/images/up.svg +195 -0
  132. data/doc/xhtml/images/warning.png +0 -0
  133. data/doc/xhtml/images/warning.svg +334 -0
  134. data/doc/xhtml/index.html +4 -0
  135. data/doc/xhtml/introduction.html +3 -0
  136. data/doc/xhtml/introduction.license.html +3 -0
  137. data/doc/xhtml/introduction.manifest.html +3 -0
  138. data/doc/xhtml/introduction.related-works.html +3 -0
  139. data/doc/xhtml/introduction.resources.html +3 -0
  140. data/doc/xhtml/problem.ivl.html +18 -0
  141. data/doc/xhtml/problems.html +3 -0
  142. data/doc/xhtml/problems.ruby.html +3 -0
  143. data/doc/xhtml/problems.vsim.html +3 -0
  144. data/doc/xhtml/styles/manual.css +87 -0
  145. data/doc/xhtml/usage.examples.html +3 -0
  146. data/doc/xhtml/usage.html +3 -0
  147. data/doc/xhtml/usage.installation.html +3 -0
  148. data/doc/xhtml/usage.requirements.html +3 -0
  149. data/doc/xhtml/usage.tools.html +3 -0
  150. data/doc/xhtml/usage.tutorial.html +199 -0
  151. data/ext/Doxyfile +272 -0
  152. data/ext/README +124 -0
  153. data/ext/Rakefile +65 -0
  154. data/ext/common.h +56 -0
  155. data/ext/extconf.rb +4 -0
  156. data/ext/relay.cin +146 -0
  157. data/ext/relay.hin +48 -0
  158. data/ext/ruby-vpi.c +36 -0
  159. data/ext/swig.cin +38 -0
  160. data/ext/swig.hin +39 -0
  161. data/ext/swig_vpi.h +924 -0
  162. data/ext/swig_vpi.i +8 -0
  163. data/ext/swig_wrap.cin +4613 -0
  164. data/ext/verilog.h +59 -0
  165. data/ext/vlog.cin +92 -0
  166. data/ext/vlog.hin +57 -0
  167. data/ext/vpi_user.h +924 -0
  168. data/gem_extconf.rb +8 -0
  169. data/history.html +809 -0
  170. data/lib/ruby-vpi/erb.rb +41 -0
  171. data/lib/ruby-vpi/rake.rb +35 -0
  172. data/lib/ruby-vpi/rdoc.rb +51 -0
  173. data/lib/ruby-vpi/rspec.rb +32 -0
  174. data/lib/ruby-vpi/runner.rb +22 -0
  175. data/lib/ruby-vpi/vpi_util.rb +310 -0
  176. data/lib/ruby-vpi.rb +58 -0
  177. data/memo.html +86 -0
  178. data/readme.html +19 -0
  179. data/ref/c/annotated.html +36 -0
  180. data/ref/c/common_8h.html +178 -0
  181. data/ref/c/doxygen.css +310 -0
  182. data/ref/c/doxygen.png +0 -0
  183. data/ref/c/files.html +35 -0
  184. data/ref/c/functions.html +135 -0
  185. data/ref/c/functions_vars.html +135 -0
  186. data/ref/c/globals.html +55 -0
  187. data/ref/c/globals_0x63.html +86 -0
  188. data/ref/c/globals_0x65.html +55 -0
  189. data/ref/c/globals_0x66.html +55 -0
  190. data/ref/c/globals_0x70.html +71 -0
  191. data/ref/c/globals_0x72.html +62 -0
  192. data/ref/c/globals_0x73.html +65 -0
  193. data/ref/c/globals_0x74.html +55 -0
  194. data/ref/c/globals_0x76.html +472 -0
  195. data/ref/c/globals_0x78.html +55 -0
  196. data/ref/c/globals_defs.html +81 -0
  197. data/ref/c/globals_defs_0x65.html +50 -0
  198. data/ref/c/globals_defs_0x70.html +51 -0
  199. data/ref/c/globals_defs_0x76.html +463 -0
  200. data/ref/c/globals_defs_0x78.html +50 -0
  201. data/ref/c/globals_enum.html +39 -0
  202. data/ref/c/globals_eval.html +40 -0
  203. data/ref/c/globals_func.html +49 -0
  204. data/ref/c/globals_type.html +63 -0
  205. data/ref/c/globals_vars.html +42 -0
  206. data/ref/c/hierarchy.html +36 -0
  207. data/ref/c/index.html +20 -0
  208. data/ref/c/relay_8cin.html +268 -0
  209. data/ref/c/relay_8hin.html +161 -0
  210. data/ref/c/ruby-vpi_8c.html +34 -0
  211. data/ref/c/structrelay____RubyOptions____def.html +84 -0
  212. data/ref/c/structt__cb__data.html +208 -0
  213. data/ref/c/structt__vpi__delay.html +183 -0
  214. data/ref/c/structt__vpi__error__info.html +208 -0
  215. data/ref/c/structt__vpi__strengthval.html +108 -0
  216. data/ref/c/structt__vpi__systf__data.html +208 -0
  217. data/ref/c/structt__vpi__time.html +133 -0
  218. data/ref/c/structt__vpi__value.html +285 -0
  219. data/ref/c/structt__vpi__vecval.html +83 -0
  220. data/ref/c/structt__vpi__vlog__info.html +133 -0
  221. data/ref/c/swig_8cin.html +91 -0
  222. data/ref/c/swig_8hin.html +99 -0
  223. data/ref/c/tab_b.gif +0 -0
  224. data/ref/c/tab_l.gif +0 -0
  225. data/ref/c/tab_r.gif +0 -0
  226. data/ref/c/tabs.css +102 -0
  227. data/ref/c/verilog_8h.html +149 -0
  228. data/ref/c/vlog_8cin.html +199 -0
  229. data/ref/c/vlog_8hin.html +152 -0
  230. data/ref/c/vpi__user_8h.html +12747 -0
  231. data/ref/ruby/classes/Counter.html +258 -0
  232. data/ref/ruby/classes/Counter.src/M000037.html +20 -0
  233. data/ref/ruby/classes/Counter.src/M000038.html +22 -0
  234. data/ref/ruby/classes/Counter.src/M000039.html +20 -0
  235. data/ref/ruby/classes/Counter.src/M000040.html +22 -0
  236. data/ref/ruby/classes/CounterProto.html +164 -0
  237. data/ref/ruby/classes/CounterProto.src/M000004.html +22 -0
  238. data/ref/ruby/classes/CounterProto.src/M000005.html +22 -0
  239. data/ref/ruby/classes/ERB.html +158 -0
  240. data/ref/ruby/classes/ERB.src/M000034.html +29 -0
  241. data/ref/ruby/classes/FileUtils.html +165 -0
  242. data/ref/ruby/classes/FileUtils.src/M000047.html +18 -0
  243. data/ref/ruby/classes/FileUtils.src/M000048.html +18 -0
  244. data/ref/ruby/classes/Hw5UnitModel/Operation.html +216 -0
  245. data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000011.html +25 -0
  246. data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000012.html +33 -0
  247. data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000013.html +18 -0
  248. data/ref/ruby/classes/Hw5UnitModel.html +256 -0
  249. data/ref/ruby/classes/Hw5UnitModel.src/M000006.html +24 -0
  250. data/ref/ruby/classes/Hw5UnitModel.src/M000008.html +20 -0
  251. data/ref/ruby/classes/Hw5UnitModel.src/M000009.html +38 -0
  252. data/ref/ruby/classes/Hw5UnitModel.src/M000010.html +22 -0
  253. data/ref/ruby/classes/Hw5_unit.html +196 -0
  254. data/ref/ruby/classes/Hw5_unit.src/M000003.html +27 -0
  255. data/ref/ruby/classes/Hw5_unit_spec.html +237 -0
  256. data/ref/ruby/classes/Hw5_unit_spec.src/M000023.html +21 -0
  257. data/ref/ruby/classes/Hw5_unit_spec.src/M000024.html +21 -0
  258. data/ref/ruby/classes/Hw5_unit_spec.src/M000025.html +67 -0
  259. data/ref/ruby/classes/InputGenerator.html +260 -0
  260. data/ref/ruby/classes/InputGenerator.src/M000027.html +18 -0
  261. data/ref/ruby/classes/InputGenerator.src/M000028.html +18 -0
  262. data/ref/ruby/classes/InputGenerator.src/M000029.html +19 -0
  263. data/ref/ruby/classes/InputGenerator.src/M000030.html +38 -0
  264. data/ref/ruby/classes/InputGenerator.src/M000031.html +19 -0
  265. data/ref/ruby/classes/InputGenerator.src/M000032.html +19 -0
  266. data/ref/ruby/classes/MaximumCounterValue.html +159 -0
  267. data/ref/ruby/classes/MaximumCounterValue.src/M000035.html +23 -0
  268. data/ref/ruby/classes/MaximumCounterValue.src/M000036.html +21 -0
  269. data/ref/ruby/classes/ModuleInfo.html +199 -0
  270. data/ref/ruby/classes/ModuleInfo.src/M000018.html +44 -0
  271. data/ref/ruby/classes/ModuleInfo.src/M000019.html +26 -0
  272. data/ref/ruby/classes/OutputInfo.html +304 -0
  273. data/ref/ruby/classes/OutputInfo.src/M000017.html +51 -0
  274. data/ref/ruby/classes/RDoc.html +135 -0
  275. data/ref/ruby/classes/RDoc.src/M000051.html +40 -0
  276. data/ref/ruby/classes/ResettedCounterValue.html +174 -0
  277. data/ref/ruby/classes/ResettedCounterValue.src/M000014.html +19 -0
  278. data/ref/ruby/classes/ResettedCounterValue.src/M000015.html +18 -0
  279. data/ref/ruby/classes/ResettedCounterValue.src/M000016.html +23 -0
  280. data/ref/ruby/classes/RubyVPI.html +186 -0
  281. data/ref/ruby/classes/RubyVPI.src/M000049.html +18 -0
  282. data/ref/ruby/classes/RubyVPI.src/M000050.html +39 -0
  283. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +370 -0
  284. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000041.html +22 -0
  285. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000042.html +44 -0
  286. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000043.html +82 -0
  287. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000044.html +127 -0
  288. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000045.html +26 -0
  289. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000046.html +18 -0
  290. data/ref/ruby/classes/SWIG.html +111 -0
  291. data/ref/ruby/classes/String.html +140 -0
  292. data/ref/ruby/classes/String.src/M000033.html +37 -0
  293. data/ref/ruby/classes/Template.html +158 -0
  294. data/ref/ruby/classes/Template.src/M000026.html +18 -0
  295. data/ref/ruby/classes/TestHw5UnitModel.html +180 -0
  296. data/ref/ruby/classes/TestHw5UnitModel.src/M000020.html +19 -0
  297. data/ref/ruby/classes/TestHw5UnitModel.src/M000021.html +19 -0
  298. data/ref/ruby/classes/TestHw5UnitModel.src/M000022.html +64 -0
  299. data/ref/ruby/created.rid +1 -0
  300. data/ref/ruby/files/bin/generate_test_rb.html +236 -0
  301. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +29 -0
  302. data/ref/ruby/files/bin/generate_test_tpl/bench_rb.html +115 -0
  303. data/ref/ruby/files/bin/generate_test_tpl/design_rb.html +107 -0
  304. data/ref/ruby/files/bin/generate_test_tpl/proto_rb.html +107 -0
  305. data/ref/ruby/files/bin/generate_test_tpl/spec_rb.html +140 -0
  306. data/ref/ruby/files/bin/generate_test_tpl/spec_rb.src/M000002.html +22 -0
  307. data/ref/ruby/files/bin/header_to_ruby_rb.html +116 -0
  308. data/ref/ruby/files/ext/extconf_rb.html +108 -0
  309. data/ref/ruby/files/gem_extconf_rb.html +114 -0
  310. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +108 -0
  311. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +108 -0
  312. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +108 -0
  313. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +115 -0
  314. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +108 -0
  315. data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +108 -0
  316. data/ref/ruby/files/lib/ruby-vpi_rb.html +108 -0
  317. data/ref/ruby/files/samp/counter/counter_rspecTest_bench_rb.html +115 -0
  318. data/ref/ruby/files/samp/counter/counter_rspecTest_design_rb.html +107 -0
  319. data/ref/ruby/files/samp/counter/counter_rspecTest_proto_rb.html +107 -0
  320. data/ref/ruby/files/samp/counter/counter_rspecTest_spec_rb.html +142 -0
  321. data/ref/ruby/files/samp/counter/counter_unitTest_bench_rb.html +115 -0
  322. data/ref/ruby/files/samp/counter/counter_unitTest_design_rb.html +107 -0
  323. data/ref/ruby/files/samp/counter/counter_unitTest_proto_rb.html +107 -0
  324. data/ref/ruby/files/samp/counter/counter_unitTest_spec_rb.html +135 -0
  325. data/ref/ruby/files/samp/pipelined_alu/Hw5UnitModel_rb.html +101 -0
  326. data/ref/ruby/files/samp/pipelined_alu/InputGenerator_rb.html +101 -0
  327. data/ref/ruby/files/samp/pipelined_alu/TestHw5UnitModel_rb.html +111 -0
  328. data/ref/ruby/files/samp/pipelined_alu/hw5_unit_bench_rb.html +108 -0
  329. data/ref/ruby/files/samp/pipelined_alu/hw5_unit_design_rb.html +107 -0
  330. data/ref/ruby/files/samp/pipelined_alu/hw5_unit_spec_rb.html +112 -0
  331. data/ref/ruby/fr_class_index.html +46 -0
  332. data/ref/ruby/fr_file_index.html +55 -0
  333. data/ref/ruby/fr_method_index.html +77 -0
  334. data/ref/ruby/index.html +24 -0
  335. data/ref/ruby/rdoc-style.css +208 -0
  336. data/samp/counter/Rakefile +1 -0
  337. data/samp/counter/counter.v +20 -0
  338. data/samp/counter/counter_rspecTest_bench.rb +9 -0
  339. data/samp/counter/counter_rspecTest_bench.v +28 -0
  340. data/samp/counter/counter_rspecTest_design.rb +22 -0
  341. data/samp/counter/counter_rspecTest_proto.rb +10 -0
  342. data/samp/counter/counter_rspecTest_runner.rake +28 -0
  343. data/samp/counter/counter_rspecTest_spec.rb +47 -0
  344. data/samp/counter/counter_unitTest_bench.rb +9 -0
  345. data/samp/counter/counter_unitTest_bench.v +28 -0
  346. data/samp/counter/counter_unitTest_design.rb +22 -0
  347. data/samp/counter/counter_unitTest_proto.rb +10 -0
  348. data/samp/counter/counter_unitTest_runner.rake +28 -0
  349. data/samp/counter/counter_unitTest_spec.rb +49 -0
  350. data/samp/pipelined_alu/Hw5UnitModel.rb +134 -0
  351. data/samp/pipelined_alu/InputGenerator.rb +94 -0
  352. data/samp/pipelined_alu/README +127 -0
  353. data/samp/pipelined_alu/Rakefile +1 -0
  354. data/samp/pipelined_alu/TestHw5UnitModel.rb +88 -0
  355. data/samp/pipelined_alu/hw5_unit.v +186 -0
  356. data/samp/pipelined_alu/hw5_unit_bench.rb +8 -0
  357. data/samp/pipelined_alu/hw5_unit_bench.v +45 -0
  358. data/samp/pipelined_alu/hw5_unit_design.rb +18 -0
  359. data/samp/pipelined_alu/hw5_unit_runner.rake +10 -0
  360. data/samp/pipelined_alu/hw5_unit_spec.rb +123 -0
  361. data/tpl/launcher.rake +30 -0
  362. data/tpl/runner.rake +96 -0
  363. data/tpl/synopsys_vcs.tab +2 -0
  364. metadata +484 -0
data/ext/vpi_user.h ADDED
@@ -0,0 +1,924 @@
1
+ /*******************************************************************************
2
+ * vpi_user.h
3
+ *
4
+ * IEEE 1364-2005 Verilog HDL Programming Language Interface (PLI)
5
+ *
6
+ * This file contains the constant definitions, structure definitions, and
7
+ * routine declarations used by the Verilog PLI procedural interface VPI
8
+ * access routines.
9
+ *
10
+ ******************************************************************************/
11
+
12
+ /*******************************************************************************
13
+ * NOTE: the constant values 1 through 299 are reserved for use in this
14
+ * vpi_user.h file.
15
+ ******************************************************************************/
16
+
17
+ #ifndef VPI_USER_H
18
+ #define VPI_USER_H
19
+
20
+ #include <stdarg.h>
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ /*----------------------------------------------------------------------------*/
27
+ /*----------------------------- Portability Help -----------------------------*/
28
+ /*----------------------------------------------------------------------------*/
29
+
30
+ /* Sized variables */
31
+
32
+ #ifndef PLI_TYPES
33
+ #define PLI_TYPES
34
+ typedef int PLI_INT32;
35
+ typedef unsigned int PLI_UINT32;
36
+ typedef short PLI_INT16;
37
+ typedef unsigned short PLI_UINT16;
38
+ typedef char PLI_BYTE8;
39
+ typedef unsigned char PLI_UBYTE8;
40
+ #endif
41
+
42
+ /* Use to export a symbol */
43
+
44
+ #if WIN32
45
+ #ifndef PLI_DLLISPEC
46
+ #define PLI_DLLISPEC __declspec(dllimport)
47
+ #define VPI_USER_DEFINED_DLLISPEC 1
48
+ #endif
49
+ #else
50
+ #ifndef PLI_DLLISPEC
51
+ #define PLI_DLLISPEC
52
+ #endif
53
+ #endif
54
+
55
+ /* Use to import a symbol */
56
+
57
+ #if WIN32
58
+ #ifndef PLI_DLLESPEC
59
+ #define PLI_DLLESPEC __declspec(dllexport)
60
+ #define VPI_USER_DEFINED_DLLESPEC 1
61
+ #endif
62
+ #else
63
+ #ifndef PLI_DLLESPEC
64
+ #define PLI_DLLESPEC
65
+ #endif
66
+ #endif
67
+
68
+ /* Use to mark a function as external */
69
+
70
+ #ifndef PLI_EXTERN
71
+ #define PLI_EXTERN
72
+ #endif
73
+
74
+ /* Use to mark a variable as external */
75
+
76
+ #ifndef PLI_VEXTERN
77
+ #define PLI_VEXTERN extern
78
+ #endif
79
+
80
+ #ifndef PLI_PROTOTYPES
81
+ #define PLI_PROTOTYPES
82
+ #define PROTO_PARAMS(params) params
83
+
84
+ /* object is defined imported by the application */
85
+
86
+ #define XXTERN PLI_EXTERN PLI_DLLISPEC
87
+
88
+ /* object is exported by the application */
89
+
90
+ #define EETERN PLI_EXTERN PLI_DLLESPEC
91
+ #endif
92
+
93
+ /********************************** TYPEDEFS **********************************/
94
+
95
+ typedef PLI_UINT32 *vpiHandle;
96
+
97
+ /******************************** OBJECT TYPES ********************************/
98
+
99
+ #define vpiAlways 1 /* always construct */
100
+ #define vpiAssignStmt 2 /* quasi-continuous assignment */
101
+ #define vpiAssignment 3 /* procedural assignment */
102
+ #define vpiBegin 4 /* block statement */
103
+ #define vpiCase 5 /* case statement */
104
+ #define vpiCaseItem 6 /* case statement item */
105
+ #define vpiConstant 7 /* numerical constant or literal string */
106
+ #define vpiContAssign 8 /* continuous assignment */
107
+ #define vpiDeassign 9 /* deassignment statement */
108
+ #define vpiDefParam 10 /* defparam */
109
+ #define vpiDelayControl 11 /* delay statement (e.g. #10) */
110
+ #define vpiDisable 12 /* named block disable statement */
111
+ #define vpiEventControl 13 /* wait on event, e.g. @e */
112
+ #define vpiEventStmt 14 /* event trigger, e.g. ->e */
113
+ #define vpiFor 15 /* for statement */
114
+ #define vpiForce 16 /* force statement */
115
+ #define vpiForever 17 /* forever statement */
116
+ #define vpiFork 18 /* fork-join block */
117
+ #define vpiFuncCall 19 /* HDL function call */
118
+ #define vpiFunction 20 /* HDL function */
119
+ #define vpiGate 21 /* primitive gate */
120
+ #define vpiIf 22 /* if statement */
121
+ #define vpiIfElse 23 /* if-else statement */
122
+ #define vpiInitial 24 /* initial construct */
123
+ #define vpiIntegerVar 25 /* integer variable */
124
+ #define vpiInterModPath 26 /* intermodule wire delay */
125
+ #define vpiIterator 27 /* iterator */
126
+ #define vpiIODecl 28 /* input/output declaration */
127
+ #define vpiMemory 29 /* behavioral memory */
128
+ #define vpiMemoryWord 30 /* single word of memory */
129
+ #define vpiModPath 31 /* module path for path delays */
130
+ #define vpiModule 32 /* module instance */
131
+ #define vpiNamedBegin 33 /* named block statement */
132
+ #define vpiNamedEvent 34 /* event variable */
133
+ #define vpiNamedFork 35 /* named fork-join block */
134
+ #define vpiNet 36 /* scalar or vector net */
135
+ #define vpiNetBit 37 /* bit of vector net */
136
+ #define vpiNullStmt 38 /* a semicolon. Ie. #10 ; */
137
+ #define vpiOperation 39 /* behavioral operation */
138
+ #define vpiParamAssign 40 /* module parameter assignment */
139
+ #define vpiParameter 41 /* module parameter */
140
+ #define vpiPartSelect 42 /* part-select */
141
+ #define vpiPathTerm 43 /* terminal of module path */
142
+ #define vpiPort 44 /* module port */
143
+ #define vpiPortBit 45 /* bit of vector module port */
144
+ #define vpiPrimTerm 46 /* primitive terminal */
145
+ #define vpiRealVar 47 /* real variable */
146
+ #define vpiReg 48 /* scalar or vector reg */
147
+ #define vpiRegBit 49 /* bit of vector reg */
148
+ #define vpiRelease 50 /* release statement */
149
+ #define vpiRepeat 51 /* repeat statement */
150
+ #define vpiRepeatControl 52 /* repeat control in an assign stmt */
151
+ #define vpiSchedEvent 53 /* vpi_put_value() event */
152
+ #define vpiSpecParam 54 /* specparam */
153
+ #define vpiSwitch 55 /* transistor switch */
154
+ #define vpiSysFuncCall 56 /* system function call */
155
+ #define vpiSysTaskCall 57 /* system task call */
156
+ #define vpiTableEntry 58 /* UDP state table entry */
157
+ #define vpiTask 59 /* HDL task */
158
+ #define vpiTaskCall 60 /* HDL task call */
159
+ #define vpiTchk 61 /* timing check */
160
+ #define vpiTchkTerm 62 /* terminal of timing check */
161
+ #define vpiTimeVar 63 /* time variable */
162
+ #define vpiTimeQueue 64 /* simulation event queue */
163
+ #define vpiUdp 65 /* user-defined primitive */
164
+ #define vpiUdpDefn 66 /* UDP definition */
165
+ #define vpiUserSystf 67 /* user defined system task or function */
166
+ #define vpiVarSelect 68 /* variable array selection */
167
+ #define vpiWait 69 /* wait statement */
168
+ #define vpiWhile 70 /* while statement */
169
+
170
+ /********************** object types added with 1364-2001 *********************/
171
+
172
+ #define vpiAttribute 105 /* attribute of an object */
173
+ #define vpiBitSelect 106 /* Bit-select of parameter, var select */
174
+ #define vpiCallback 107 /* callback object */
175
+ #define vpiDelayTerm 108 /* Delay term which is a load or driver */
176
+ #define vpiDelayDevice 109 /* Delay object within a net */
177
+ #define vpiFrame 110 /* reentrant task/func frame */
178
+ #define vpiGateArray 111 /* gate instance array */
179
+ #define vpiModuleArray 112 /* module instance array */
180
+ #define vpiPrimitiveArray 113 /* vpiprimitiveArray type */
181
+ #define vpiNetArray 114 /* multidimensional net */
182
+ #define vpiRange 115 /* range declaration */
183
+ #define vpiRegArray 116 /* multidimensional reg */
184
+ #define vpiSwitchArray 117 /* switch instance array */
185
+ #define vpiUdpArray 118 /* UDP instance array */
186
+ #define vpiContAssignBit 128 /* Bit of a vector continuous assignment */
187
+ #define vpiNamedEventArray 129 /* multidimensional named event */
188
+
189
+ /********************** object types added with 1364-2005 *********************/
190
+
191
+ #define vpiIndexedPartSelect 130 /* Indexed part-select object */
192
+ #define vpiGenScopeArray 133 /* array of generated scopes */
193
+ #define vpiGenScope 134 /* A generated scope */
194
+ #define vpiGenVar 135 /* Object used to instantiate gen scopes */
195
+
196
+ /*********************************** METHODS **********************************/
197
+ /**************** methods used to traverse 1 to 1 relationships ***************/
198
+
199
+ #define vpiCondition 71 /* condition expression */
200
+ #define vpiDelay 72 /* net or gate delay */
201
+ #define vpiElseStmt 73 /* else statement */
202
+ #define vpiForIncStmt 74 /* increment statement in for loop */
203
+ #define vpiForInitStmt 75 /* initialization statement in for loop */
204
+ #define vpiHighConn 76 /* higher connection to port */
205
+ #define vpiLhs 77 /* left-hand side of assignment */
206
+ #define vpiIndex 78 /* index of var select, bit-select, etc. */
207
+ #define vpiLeftRange 79 /* left range of vector or part-select */
208
+ #define vpiLowConn 80 /* lower connection to port */
209
+ #define vpiParent 81 /* parent object */
210
+ #define vpiRhs 82 /* right-hand side of assignment */
211
+ #define vpiRightRange 83 /* right range of vector or part-select */
212
+ #define vpiScope 84 /* containing scope object */
213
+ #define vpiSysTfCall 85 /* task function call */
214
+ #define vpiTchkDataTerm 86 /* timing check data term */
215
+ #define vpiTchkNotifier 87 /* timing check notifier */
216
+ #define vpiTchkRefTerm 88 /* timing check reference term */
217
+
218
+ /************* methods used to traverse 1 to many relationships ***************/
219
+
220
+ #define vpiArgument 89 /* argument to (system) task/function */
221
+ #define vpiBit 90 /* bit of vector net or port */
222
+ #define vpiDriver 91 /* driver for a net */
223
+ #define vpiInternalScope 92 /* internal scope in module */
224
+ #define vpiLoad 93 /* load on net or reg */
225
+ #define vpiModDataPathIn 94 /* data terminal of a module path */
226
+ #define vpiModPathIn 95 /* Input terminal of a module path */
227
+ #define vpiModPathOut 96 /* output terminal of a module path */
228
+ #define vpiOperand 97 /* operand of expression */
229
+ #define vpiPortInst 98 /* connected port instance */
230
+ #define vpiProcess 99 /* process in module */
231
+ #define vpiVariables 100 /* variables in module */
232
+ #define vpiUse 101 /* usage */
233
+
234
+ /******** methods which can traverse 1 to 1, or 1 to many relationships *******/
235
+
236
+ #define vpiExpr 102 /* connected expression */
237
+ #define vpiPrimitive 103 /* primitive (gate, switch, UDP) */
238
+ #define vpiStmt 104 /* statement in process or task */
239
+
240
+ /************************ methods added with 1364-2001 ************************/
241
+
242
+ #define vpiActiveTimeFormat 119 /* active $timeformat() system task */
243
+ #define vpiInTerm 120 /* To get to a delay device's drivers. */
244
+ #define vpiInstanceArray 121 /* vpiInstance arrays */
245
+ #define vpiLocalDriver 122 /* local drivers (within a module */
246
+ #define vpiLocalLoad 123 /* local loads (within a module */
247
+ #define vpiOutTerm 124 /* To get to a delay device's loads. */
248
+ #define vpiPorts 125 /* Module port */
249
+ #define vpiSimNet 126 /* simulated net after collapsing */
250
+ #define vpiTaskFunc 127 /* HDL task or function */
251
+
252
+ /************************ methods added with 1364-2005 ************************/
253
+
254
+ #define vpiBaseExpr 131 /* Indexed part-select's base expression */
255
+ #define vpiWidthExpr 132 /* Indexed part-select's width expression */
256
+
257
+ /********************************* PROPERTIES *********************************/
258
+ /************************** generic object properties *************************/
259
+
260
+ #define vpiUndefined -1 /* undefined property */
261
+ #define vpiType 1 /* type of object */
262
+ #define vpiName 2 /* local name of object */
263
+ #define vpiFullName 3 /* full hierarchical name */
264
+ #define vpiSize 4 /* size of gate, net, port, etc. */
265
+ #define vpiFile 5 /* File name in which the object is used*/
266
+ #define vpiLineNo 6 /* line number where the object is used */
267
+
268
+ /***************************** module properties ******************************/
269
+
270
+ #define vpiTopModule 7 /* top-level module (boolean) */
271
+ #define vpiCellInstance 8 /* cell (boolean) */
272
+ #define vpiDefName 9 /* module definition name */
273
+ #define vpiProtected 10 /* source protected module (boolean) */
274
+ #define vpiTimeUnit 11 /* module time unit */
275
+ #define vpiTimePrecision 12 /* module time precision */
276
+ #define vpiDefNetType 13 /* default net type */
277
+ #define vpiUnconnDrive 14 /* unconnected port drive strength */
278
+ #define vpiHighZ 1 /* No default drive given */
279
+ #define vpiPull1 2 /* default pull1 drive */
280
+ #define vpiPull0 3 /* default pull0 drive */
281
+ #define vpiDefFile 15 /* File name where the module is defined*/
282
+ #define vpiDefLineNo 16 /* line number for module definition */
283
+ #define vpiDefDelayMode 47 /* Default delay mode for a module */
284
+ #define vpiDelayModeNone 1 /* no delay mode specified */
285
+ #define vpiDelayModePath 2 /* path delay mode */
286
+ #define vpiDelayModeDistrib 3 /* distributed delay mode */
287
+ #define vpiDelayModeUnit 4 /* unit delay mode */
288
+ #define vpiDelayModeZero 5 /* zero delay mode */
289
+ #define vpiDelayModeMTM 6 /* min:typ:max delay mode */
290
+ #define vpiDefDecayTime 48 /* Default decay time for a module */
291
+
292
+ /*************************** port and net properties **************************/
293
+
294
+ #define vpiScalar 17 /* scalar (boolean) */
295
+ #define vpiVector 18 /* vector (boolean) */
296
+ #define vpiExplicitName 19 /* port is explicitly named */
297
+ #define vpiDirection 20 /* direction of port: */
298
+ #define vpiInput 1 /* input */
299
+ #define vpiOutput 2 /* output */
300
+ #define vpiInout 3 /* inout */
301
+ #define vpiMixedIO 4 /* mixed input-output */
302
+ #define vpiNoDirection 5 /* no direction */
303
+ #define vpiConnByName 21 /* connected by name (boolean) */
304
+
305
+ #define vpiNetType 22 /* net subtypes: */
306
+ #define vpiWire 1 /* wire net */
307
+ #define vpiWand 2 /* wire-and net */
308
+ #define vpiWor 3 /* wire-or net */
309
+ #define vpiTri 4 /* three-state net */
310
+ #define vpiTri0 5 /* pull-down net */
311
+ #define vpiTri1 6 /* pull-up net */
312
+ #define vpiTriReg 7 /* tri state reg net */
313
+ #define vpiTriAnd 8 /* three-state wire-and net */
314
+ #define vpiTriOr 9 /* three-state wire-or net */
315
+ #define vpiSupply1 10 /* supply 1 net */
316
+ #define vpiSupply0 11 /* supply zero net */
317
+ #define vpiNone 12 /* no default net type (1364-2001) */
318
+ #define vpiUwire 13 /* unresolved wire net (1364-2005) */
319
+
320
+ #define vpiExplicitScalared 23 /* explicitly scalared (boolean) */
321
+ #define vpiExplicitVectored 24 /* explicitly vectored (boolean) */
322
+ #define vpiExpanded 25 /* expanded vector net (boolean) */
323
+ #define vpiImplicitDecl 26 /* implicitly declared net (boolean) */
324
+ #define vpiChargeStrength 27 /* charge decay strength of net */
325
+
326
+ /* Defined as part of strengths section.
327
+ #define vpiLargeCharge 0x10
328
+ #define vpiMediumCharge 0x04
329
+ #define vpiSmallCharge 0x02
330
+ */
331
+
332
+ #define vpiArray 28 /* variable array (boolean) */
333
+ #define vpiPortIndex 29 /* Port index */
334
+
335
+ /************************ gate and terminal properties ************************/
336
+
337
+ #define vpiTermIndex 30 /* Index of a primitive terminal */
338
+ #define vpiStrength0 31 /* 0-strength of net or gate */
339
+ #define vpiStrength1 32 /* 1-strength of net or gate */
340
+ #define vpiPrimType 33 /* prmitive subtypes: */
341
+ #define vpiAndPrim 1 /* and gate */
342
+ #define vpiNandPrim 2 /* nand gate */
343
+ #define vpiNorPrim 3 /* nor gate */
344
+ #define vpiOrPrim 4 /* or gate */
345
+ #define vpiXorPrim 5 /* xor gate */
346
+ #define vpiXnorPrim 6 /* xnor gate */
347
+ #define vpiBufPrim 7 /* buffer */
348
+ #define vpiNotPrim 8 /* not gate */
349
+ #define vpiBufif0Prim 9 /* zero-enabled buffer */
350
+ #define vpiBufif1Prim 10 /* one-enabled buffer */
351
+ #define vpiNotif0Prim 11 /* zero-enabled not gate */
352
+ #define vpiNotif1Prim 12 /* one-enabled not gate */
353
+ #define vpiNmosPrim 13 /* nmos switch */
354
+ #define vpiPmosPrim 14 /* pmos switch */
355
+ #define vpiCmosPrim 15 /* cmos switch */
356
+ #define vpiRnmosPrim 16 /* resistive nmos switch */
357
+ #define vpiRpmosPrim 17 /* resistive pmos switch */
358
+ #define vpiRcmosPrim 18 /* resistive cmos switch */
359
+ #define vpiRtranPrim 19 /* resistive bidirectional */
360
+ #define vpiRtranif0Prim 20 /* zero-enable resistive bidirectional */
361
+ #define vpiRtranif1Prim 21 /* one-enable resistive bidirectional */
362
+ #define vpiTranPrim 22 /* bidirectional */
363
+ #define vpiTranif0Prim 23 /* zero-enabled bidirectional */
364
+ #define vpiTranif1Prim 24 /* one-enabled bidirectional */
365
+ #define vpiPullupPrim 25 /* pullup */
366
+ #define vpiPulldownPrim 26 /* pulldown */
367
+ #define vpiSeqPrim 27 /* sequential UDP */
368
+ #define vpiCombPrim 28 /* combinational UDP */
369
+
370
+ /**************** path, path terminal, timing check properties ****************/
371
+
372
+ #define vpiPolarity 34 /* polarity of module path... */
373
+ #define vpiDataPolarity 35 /* ...or data path: */
374
+ #define vpiPositive 1 /* positive */
375
+ #define vpiNegative 2 /* negative */
376
+ #define vpiUnknown 3 /* unknown (unspecified) */
377
+
378
+ #define vpiEdge 36 /* edge type of module path: */
379
+ #define vpiNoEdge 0x00 /* no edge */
380
+ #define vpiEdge01 0x01 /* 0 -> 1 */
381
+ #define vpiEdge10 0x02 /* 1 -> 0 */
382
+ #define vpiEdge0x 0x04 /* 0 -> x */
383
+ #define vpiEdgex1 0x08 /* x -> 1 */
384
+ #define vpiEdge1x 0x10 /* 1 -> x */
385
+ #define vpiEdgex0 0x20 /* x -> 0 */
386
+ #define vpiPosedge (vpiEdgex1 | vpiEdge01 | vpiEdge0x)
387
+ #define vpiNegedge (vpiEdgex0 | vpiEdge10 | vpiEdge1x)
388
+ #define vpiAnyEdge (vpiPosedge | vpiNegedge)
389
+
390
+ #define vpiPathType 37 /* path delay connection subtypes: */
391
+ #define vpiPathFull 1 /* ( a *> b ) */
392
+ #define vpiPathParallel 2 /* ( a => b ) */
393
+
394
+ #define vpiTchkType 38 /* timing check subtypes: */
395
+ #define vpiSetup 1 /* $setup */
396
+ #define vpiHold 2 /* $hold */
397
+ #define vpiPeriod 3 /* $period */
398
+ #define vpiWidth 4 /* $width */
399
+ #define vpiSkew 5 /* $skew */
400
+ #define vpiRecovery 6 /* $recovery */
401
+ #define vpiNoChange 7 /* $nochange */
402
+ #define vpiSetupHold 8 /* $setuphold */
403
+ #define vpiFullskew 9 /* $fullskew -- added for 1364-2001 */
404
+ #define vpiRecrem 10 /* $recrem -- added for 1364-2001 */
405
+ #define vpiRemoval 11 /* $removal -- added for 1364-2001 */
406
+ #define vpiTimeskew 12 /* $timeskew -- added for 1364-2001 */
407
+
408
+ /**************************** expression properties ***************************/
409
+
410
+ #define vpiOpType 39 /* operation subtypes: */
411
+ #define vpiMinusOp 1 /* unary minus */
412
+ #define vpiPlusOp 2 /* unary plus */
413
+ #define vpiNotOp 3 /* unary not */
414
+ #define vpiBitNegOp 4 /* bitwise negation */
415
+ #define vpiUnaryAndOp 5 /* bitwise reduction and */
416
+ #define vpiUnaryNandOp 6 /* bitwise reduction nand */
417
+ #define vpiUnaryOrOp 7 /* bitwise reduction or */
418
+ #define vpiUnaryNorOp 8 /* bitwise reduction nor */
419
+ #define vpiUnaryXorOp 9 /* bitwise reduction xor */
420
+ #define vpiUnaryXNorOp 10 /* bitwise reduction xnor */
421
+ #define vpiSubOp 11 /* binary subtraction */
422
+ #define vpiDivOp 12 /* binary division */
423
+ #define vpiModOp 13 /* binary modulus */
424
+ #define vpiEqOp 14 /* binary equality */
425
+ #define vpiNeqOp 15 /* binary inequality */
426
+ #define vpiCaseEqOp 16 /* case (x and z) equality */
427
+ #define vpiCaseNeqOp 17 /* case inequality */
428
+ #define vpiGtOp 18 /* binary greater than */
429
+ #define vpiGeOp 19 /* binary greater than or equal */
430
+ #define vpiLtOp 20 /* binary less than */
431
+ #define vpiLeOp 21 /* binary less than or equal */
432
+ #define vpiLShiftOp 22 /* binary left shift */
433
+ #define vpiRShiftOp 23 /* binary right shift */
434
+ #define vpiAddOp 24 /* binary addition */
435
+ #define vpiMultOp 25 /* binary multiplication */
436
+ #define vpiLogAndOp 26 /* binary logical and */
437
+ #define vpiLogOrOp 27 /* binary logical or */
438
+ #define vpiBitAndOp 28 /* binary bitwise and */
439
+ #define vpiBitOrOp 29 /* binary bitwise or */
440
+ #define vpiBitXorOp 30 /* binary bitwise xor */
441
+ #define vpiBitXNorOp 31 /* binary bitwise xnor */
442
+ #define vpiBitXnorOp vpiBitXNorOp /* added with 1364-2001 */
443
+ #define vpiConditionOp 32 /* ternary conditional */
444
+ #define vpiConcatOp 33 /* n-ary concatenation */
445
+ #define vpiMultiConcatOp 34 /* repeated concatenation */
446
+ #define vpiEventOrOp 35 /* event or */
447
+ #define vpiNullOp 36 /* null operation */
448
+ #define vpiListOp 37 /* list of expressions */
449
+ #define vpiMinTypMaxOp 38 /* min:typ:max: delay expression */
450
+ #define vpiPosedgeOp 39 /* posedge */
451
+ #define vpiNegedgeOp 40 /* negedge */
452
+ #define vpiArithLShiftOp 41 /* arithmetic left shift (1364-2001) */
453
+ #define vpiArithRShiftOp 42 /* arithmetic right shift (1364-2001) */
454
+ #define vpiPowerOp 43 /* arithmetic power op (1364-2001) */
455
+
456
+ #define vpiConstType 40 /* constant subtypes: */
457
+ #define vpiDecConst 1 /* decimal integer */
458
+ #define vpiRealConst 2 /* real */
459
+ #define vpiBinaryConst 3 /* binary integer */
460
+ #define vpiOctConst 4 /* octal integer */
461
+ #define vpiHexConst 5 /* hexadecimal integer */
462
+ #define vpiStringConst 6 /* string literal */
463
+ #define vpiIntConst 7 /* HDL integer constant (1364-2001) */
464
+
465
+ #define vpiBlocking 41 /* blocking assignment (boolean) */
466
+ #define vpiCaseType 42 /* case statement subtypes: */
467
+ #define vpiCaseExact 1 /* exact match */
468
+ #define vpiCaseX 2 /* ignore X's */
469
+ #define vpiCaseZ 3 /* ignore Z's */
470
+ #define vpiNetDeclAssign 43 /* assign part of decl (boolean) */
471
+
472
+ /************************** task/function properties **************************/
473
+
474
+ #define vpiFuncType 44 /* HDL function & system function type */
475
+ #define vpiIntFunc 1 /* returns integer */
476
+ #define vpiRealFunc 2 /* returns real */
477
+ #define vpiTimeFunc 3 /* returns time */
478
+ #define vpiSizedFunc 4 /* returns an arbitrary size */
479
+ #define vpiSizedSignedFunc 5 /* returns sized signed value */
480
+
481
+ /** alias 1364-1995 system function subtypes to 1364-2001 function subtypes ***/
482
+
483
+ #define vpiSysFuncType vpiFuncType
484
+ #define vpiSysFuncInt vpiIntFunc
485
+ #define vpiSysFuncReal vpiRealFunc
486
+ #define vpiSysFuncTime vpiTimeFunc
487
+ #define vpiSysFuncSized vpiSizedFunc
488
+
489
+ #define vpiUserDefn 45 /*user defined system task/func(boolean)*/
490
+ #define vpiScheduled 46 /* object still scheduled (boolean) */
491
+
492
+ /*********************** properties added with 1364-2001 **********************/
493
+
494
+ #define vpiActive 49 /* reentrant task/func frame is active */
495
+ #define vpiAutomatic 50 /* task/func obj is automatic */
496
+ #define vpiCell 51 /* configuration cell */
497
+ #define vpiConfig 52 /* configuration config file */
498
+ #define vpiConstantSelect 53 /* (boolean) bit-select or part-select
499
+ indices are constant expressions */
500
+ #define vpiDecompile 54 /* decompile the object */
501
+ #define vpiDefAttribute 55 /* Attribute defined for the obj */
502
+ #define vpiDelayType 56 /* delay subtype */
503
+ #define vpiModPathDelay 1 /* module path delay */
504
+ #define vpiInterModPathDelay 2 /* intermodule path delay */
505
+ #define vpiMIPDelay 3 /* module input port delay */
506
+ #define vpiIteratorType 57 /* object type of an iterator */
507
+ #define vpiLibrary 58 /* configuration library */
508
+ #define vpiMultiArray 59 /* Object is a multidimensional array */
509
+ #define vpiOffset 60 /* offset from LSB */
510
+ #define vpiResolvedNetType 61 /* net subtype after resolution, returns
511
+ same subtypes as vpiNetType */
512
+ #define vpiSaveRestartID 62 /* unique ID for save/restart data */
513
+ #define vpiSaveRestartLocation 63 /* name of save/restart data file */
514
+ #define vpiValid 64 /* reentrant task/func frame is valid */
515
+ #define vpiSigned 65 /* TRUE for vpiIODecl and any object in
516
+ the expression class if the object
517
+ has the signed attribute */
518
+ #define vpiLocalParam 70 /* TRUE when a param is declared as a
519
+ localparam */
520
+ #define vpiModPathHasIfNone 71 /* Mod path has an ifnone statement */
521
+
522
+ /*********************** properties added with 1364-2005 **********************/
523
+
524
+ #define vpiIndexedPartSelectType 72 /* Indexed part-select type */
525
+ #define vpiPosIndexed 1 /* +: */
526
+ #define vpiNegIndexed 2 /* -: */
527
+ #define vpiIsMemory 73 /* TRUE for a one-dimensional reg array */
528
+
529
+ /*************** vpi_control() constants (added with 1364-2001) ***************/
530
+
531
+ #define vpiStop 66 /* execute simulator's $stop */
532
+ #define vpiFinish 67 /* execute simulator's $finish */
533
+ #define vpiReset 68 /* execute simulator's $reset */
534
+ #define vpiSetInteractiveScope 69 /* set simulator's interactive scope */
535
+
536
+ /**************************** I/O related defines *****************************/
537
+
538
+ #define VPI_MCD_STDOUT 0x00000001
539
+
540
+ /*************************** STRUCTURE DEFINITIONS ****************************/
541
+
542
+ /******************************* time structure *******************************/
543
+
544
+ typedef struct t_vpi_time
545
+ {
546
+ PLI_INT32 type; /* [vpiScaledRealTime, vpiSimTime,
547
+ vpiSuppressTime] */
548
+ PLI_UINT32 high, low; /* for vpiSimTime */
549
+ double real; /* for vpiScaledRealTime */
550
+ } s_vpi_time, *p_vpi_time;
551
+
552
+ /* time types */
553
+
554
+ #define vpiScaledRealTime 1
555
+ #define vpiSimTime 2
556
+ #define vpiSuppressTime 3
557
+
558
+ /****************************** delay structures ******************************/
559
+
560
+ typedef struct t_vpi_delay
561
+ {
562
+ struct t_vpi_time *da; /* pointer to user allocated array of
563
+ delay values */
564
+ PLI_INT32 no_of_delays; /* number of delays */
565
+ PLI_INT32 time_type; /* [vpiScaledRealTime, vpiSimTime,
566
+ vpiSuppressTime] */
567
+ PLI_INT32 mtm_flag; /* true for mtm values */
568
+ PLI_INT32 append_flag; /* true for append */
569
+ PLI_INT32 pulsere_flag; /* true for pulsere values */
570
+ } s_vpi_delay, *p_vpi_delay;
571
+
572
+ /***************************** value structures *******************************/
573
+
574
+ /* vector value */
575
+
576
+ #ifndef VPI_VECVAL /* added in 1364-2005 */
577
+ #define VPI_VECVAL
578
+
579
+ typedef struct t_vpi_vecval
580
+ {
581
+ /* following fields are repeated enough times to contain vector */
582
+ PLI_INT32 aval, bval; /* bit encoding: ab: 00=0, 10=1, 11=X, 01=Z */
583
+ } s_vpi_vecval, *p_vpi_vecval;
584
+
585
+ #endif
586
+
587
+ /* strength (scalar) value */
588
+
589
+ typedef struct t_vpi_strengthval
590
+ {
591
+ PLI_INT32 logic; /* vpi[0,1,X,Z] */
592
+ PLI_INT32 s0, s1; /* refer to strength coding below */
593
+ } s_vpi_strengthval, *p_vpi_strengthval;
594
+
595
+ /* strength values */
596
+
597
+ #define vpiSupplyDrive 0x80
598
+ #define vpiStrongDrive 0x40
599
+ #define vpiPullDrive 0x20
600
+ #define vpiWeakDrive 0x08
601
+ #define vpiLargeCharge 0x10
602
+ #define vpiMediumCharge 0x04
603
+ #define vpiSmallCharge 0x02
604
+ #define vpiHiZ 0x01
605
+
606
+ /* generic value */
607
+
608
+ typedef struct t_vpi_value
609
+ {
610
+ PLI_INT32 format; /* vpi[[Bin,Oct,Dec,Hex]Str,Scalar,Int,Real,String,
611
+ Vector,Strength,Suppress,Time,ObjType]Val */
612
+ union
613
+ {
614
+ PLI_BYTE8 *str; /* string value */
615
+ PLI_INT32 scalar; /* vpi[0,1,X,Z] */
616
+ PLI_INT32 integer; /* integer value */
617
+ double real; /* real value */
618
+ struct t_vpi_time *time; /* time value */
619
+ struct t_vpi_vecval *vector; /* vector value */
620
+ struct t_vpi_strengthval *strength; /* strength value */
621
+ PLI_BYTE8 *misc; /* ...other */
622
+ } value;
623
+ } s_vpi_value, *p_vpi_value;
624
+
625
+ /* value formats */
626
+
627
+ #define vpiBinStrVal 1
628
+ #define vpiOctStrVal 2
629
+ #define vpiDecStrVal 3
630
+ #define vpiHexStrVal 4
631
+ #define vpiScalarVal 5
632
+ #define vpiIntVal 6
633
+ #define vpiRealVal 7
634
+ #define vpiStringVal 8
635
+ #define vpiVectorVal 9
636
+ #define vpiStrengthVal 10
637
+ #define vpiTimeVal 11
638
+ #define vpiObjTypeVal 12
639
+ #define vpiSuppressVal 13
640
+
641
+ /* delay modes */
642
+
643
+ #define vpiNoDelay 1
644
+ #define vpiInertialDelay 2
645
+ #define vpiTransportDelay 3
646
+ #define vpiPureTransportDelay 4
647
+
648
+ /* force and release flags */
649
+
650
+ #define vpiForceFlag 5
651
+ #define vpiReleaseFlag 6
652
+
653
+ /* scheduled event cancel flag */
654
+
655
+ #define vpiCancelEvent 7
656
+
657
+ /* bit mask for the flags argument to vpi_put_value() */
658
+
659
+ #define vpiReturnEvent 0x1000
660
+
661
+ /* scalar values */
662
+
663
+ #define vpi0 0
664
+ #define vpi1 1
665
+ #define vpiZ 2
666
+ #define vpiX 3
667
+ #define vpiH 4
668
+ #define vpiL 5
669
+ #define vpiDontCare 6
670
+ /*
671
+ #define vpiNoChange 7 Defined under vpiTchkType, but
672
+ can be used here.
673
+ */
674
+
675
+ /*********************** system task/function structure ***********************/
676
+
677
+ typedef struct t_vpi_systf_data
678
+ {
679
+ PLI_INT32 type; /* vpiSysTask, vpiSysFunc */
680
+ PLI_INT32 sysfunctype; /* vpiSysTask, vpi[Int,Real,Time,Sized,
681
+ SizedSigned]Func */
682
+ PLI_BYTE8 *tfname; /* first character must be '$' */
683
+ PLI_INT32 (*calltf)(PLI_BYTE8 *);
684
+ PLI_INT32 (*compiletf)(PLI_BYTE8 *);
685
+ PLI_INT32 (*sizetf)(PLI_BYTE8 *); /* for sized function callbacks only */
686
+ PLI_BYTE8 *user_data;
687
+ } s_vpi_systf_data, *p_vpi_systf_data;
688
+
689
+ #define vpiSysTask 1
690
+ #define vpiSysFunc 2
691
+
692
+ /* the subtypes are defined under the vpiFuncType property */
693
+
694
+ /****************** Verilog execution information structure *******************/
695
+
696
+ typedef struct t_vpi_vlog_info
697
+ {
698
+ PLI_INT32 argc;
699
+ PLI_BYTE8 **argv;
700
+ PLI_BYTE8 *product;
701
+ PLI_BYTE8 *version;
702
+ } s_vpi_vlog_info, *p_vpi_vlog_info;
703
+
704
+ /*********************** PLI error information structure **********************/
705
+
706
+ typedef struct t_vpi_error_info
707
+ {
708
+ PLI_INT32 state; /* vpi[Compile,PLI,Run] */
709
+ PLI_INT32 level; /* vpi[Notice,Warning,Error,System,Internal] */
710
+ PLI_BYTE8 *message;
711
+ PLI_BYTE8 *product;
712
+ PLI_BYTE8 *code;
713
+ PLI_BYTE8 *file;
714
+ PLI_INT32 line;
715
+ } s_vpi_error_info, *p_vpi_error_info;
716
+
717
+ /* state when error occurred */
718
+
719
+ #define vpiCompile 1
720
+ #define vpiPLI 2
721
+ #define vpiRun 3
722
+
723
+ /* error severity levels */
724
+
725
+ #define vpiNotice 1
726
+ #define vpiWarning 2
727
+ #define vpiError 3
728
+ #define vpiSystem 4
729
+ #define vpiInternal 5
730
+
731
+ /**************************** callback structures *****************************/
732
+
733
+ /* normal callback structure */
734
+
735
+ typedef struct t_cb_data
736
+ {
737
+ PLI_INT32 reason; /* callback reason */
738
+ PLI_INT32 (*cb_rtn)(struct t_cb_data *); /* call routine */
739
+ vpiHandle obj; /* trigger object */
740
+ p_vpi_time time; /* callback time */
741
+ p_vpi_value value; /* trigger object value */
742
+ PLI_INT32 index; /* index of the memory word or
743
+ var select that changed */
744
+ PLI_BYTE8 *user_data;
745
+ } s_cb_data, *p_cb_data;
746
+
747
+ /****************************** CALLBACK REASONS ******************************/
748
+ /***************************** Simulation related *****************************/
749
+
750
+ #define cbValueChange 1
751
+ #define cbStmt 2
752
+ #define cbForce 3
753
+ #define cbRelease 4
754
+
755
+ /******************************** Time related ********************************/
756
+
757
+ #define cbAtStartOfSimTime 5
758
+ #define cbReadWriteSynch 6
759
+ #define cbReadOnlySynch 7
760
+ #define cbNextSimTime 8
761
+ #define cbAfterDelay 9
762
+
763
+ /******************************* Action related *******************************/
764
+
765
+ #define cbEndOfCompile 10
766
+ #define cbStartOfSimulation 11
767
+ #define cbEndOfSimulation 12
768
+ #define cbError 13
769
+ #define cbTchkViolation 14
770
+ #define cbStartOfSave 15
771
+ #define cbEndOfSave 16
772
+ #define cbStartOfRestart 17
773
+ #define cbEndOfRestart 18
774
+ #define cbStartOfReset 19
775
+ #define cbEndOfReset 20
776
+ #define cbEnterInteractive 21
777
+ #define cbExitInteractive 22
778
+ #define cbInteractiveScopeChange 23
779
+ #define cbUnresolvedSystf 24
780
+
781
+ /**************************** Added with 1364-2001 ****************************/
782
+
783
+ #define cbAssign 25
784
+ #define cbDeassign 26
785
+ #define cbDisable 27
786
+ #define cbPLIError 28
787
+ #define cbSignal 29
788
+
789
+ /**************************** FUNCTION DECLARATIONS ***************************/
790
+
791
+ /* callback related */
792
+
793
+ XXTERN vpiHandle vpi_register_cb PROTO_PARAMS((p_cb_data cb_data_p));
794
+ XXTERN PLI_INT32 vpi_remove_cb PROTO_PARAMS((vpiHandle cb_obj));
795
+ XXTERN void vpi_get_cb_info PROTO_PARAMS((vpiHandle object,
796
+ p_cb_data cb_data_p));
797
+ XXTERN vpiHandle vpi_register_systf PROTO_PARAMS((p_vpi_systf_data
798
+ systf_data_p));
799
+ XXTERN void vpi_get_systf_info PROTO_PARAMS((vpiHandle object,
800
+ p_vpi_systf_data
801
+ systf_data_p));
802
+
803
+ /* for obtaining handles */
804
+
805
+ XXTERN vpiHandle vpi_handle_by_name PROTO_PARAMS((PLI_BYTE8 *name,
806
+ vpiHandle scope));
807
+ XXTERN vpiHandle vpi_handle_by_index PROTO_PARAMS((vpiHandle object,
808
+ PLI_INT32 indx));
809
+
810
+ /* for traversing relationships */
811
+
812
+ XXTERN vpiHandle vpi_handle PROTO_PARAMS((PLI_INT32 type,
813
+ vpiHandle refHandle));
814
+ XXTERN vpiHandle vpi_handle_multi PROTO_PARAMS((PLI_INT32 type,
815
+ vpiHandle refHandle1,
816
+ vpiHandle refHandle2,
817
+ ... ));
818
+ XXTERN vpiHandle vpi_iterate PROTO_PARAMS((PLI_INT32 type,
819
+ vpiHandle refHandle));
820
+ XXTERN vpiHandle vpi_scan PROTO_PARAMS((vpiHandle iterator));
821
+
822
+ /* for processing properties */
823
+
824
+ XXTERN PLI_INT32 vpi_get PROTO_PARAMS((PLI_INT32 property,
825
+ vpiHandle object));
826
+ XXTERN PLI_BYTE8 *vpi_get_str PROTO_PARAMS((PLI_INT32 property,
827
+ vpiHandle object));
828
+
829
+ /* delay processing */
830
+
831
+ XXTERN void vpi_get_delays PROTO_PARAMS((vpiHandle object,
832
+ p_vpi_delay delay_p));
833
+ XXTERN void vpi_put_delays PROTO_PARAMS((vpiHandle object,
834
+ p_vpi_delay delay_p));
835
+
836
+ /* value processing */
837
+
838
+ XXTERN void vpi_get_value PROTO_PARAMS((vpiHandle expr,
839
+ p_vpi_value value_p));
840
+ XXTERN vpiHandle vpi_put_value PROTO_PARAMS((vpiHandle object,
841
+ p_vpi_value value_p,
842
+ p_vpi_time time_p,
843
+ PLI_INT32 flags));
844
+
845
+ /* time processing */
846
+
847
+ XXTERN void vpi_get_time PROTO_PARAMS((vpiHandle object,
848
+ p_vpi_time time_p));
849
+
850
+ /* I/O routines */
851
+
852
+ XXTERN PLI_UINT32 vpi_mcd_open PROTO_PARAMS((PLI_BYTE8 *fileName));
853
+ XXTERN PLI_UINT32 vpi_mcd_close PROTO_PARAMS((PLI_UINT32 mcd));
854
+ XXTERN PLI_BYTE8 *vpi_mcd_name PROTO_PARAMS((PLI_UINT32 cd));
855
+ XXTERN PLI_INT32 vpi_mcd_printf PROTO_PARAMS((PLI_UINT32 mcd,
856
+ PLI_BYTE8 *format,
857
+ ...));
858
+ XXTERN PLI_INT32 vpi_printf PROTO_PARAMS((PLI_BYTE8 *format,
859
+ ...));
860
+
861
+ /* utility routines */
862
+
863
+ XXTERN PLI_INT32 vpi_compare_objects PROTO_PARAMS((vpiHandle object1,
864
+ vpiHandle object2));
865
+ XXTERN PLI_INT32 vpi_chk_error PROTO_PARAMS((p_vpi_error_info
866
+ error_info_p));
867
+ XXTERN PLI_INT32 vpi_free_object PROTO_PARAMS((vpiHandle object));
868
+ XXTERN PLI_INT32 vpi_get_vlog_info PROTO_PARAMS((p_vpi_vlog_info
869
+ vlog_info_p));
870
+
871
+ /* routines added with 1364-2001 */
872
+
873
+ XXTERN PLI_INT32 vpi_get_data PROTO_PARAMS((PLI_INT32 id,
874
+ PLI_BYTE8 *dataLoc,
875
+ PLI_INT32 numOfBytes));
876
+ XXTERN PLI_INT32 vpi_put_data PROTO_PARAMS((PLI_INT32 id,
877
+ PLI_BYTE8 *dataLoc,
878
+ PLI_INT32 numOfBytes));
879
+ XXTERN void *vpi_get_userdata PROTO_PARAMS((vpiHandle obj));
880
+ XXTERN PLI_INT32 vpi_put_userdata PROTO_PARAMS((vpiHandle obj,
881
+ void *userdata));
882
+ XXTERN PLI_INT32 vpi_vprintf PROTO_PARAMS((PLI_BYTE8 *format,
883
+ va_list ap));
884
+ XXTERN PLI_INT32 vpi_mcd_vprintf PROTO_PARAMS((PLI_UINT32 mcd,
885
+ PLI_BYTE8 *format,
886
+ va_list ap));
887
+ XXTERN PLI_INT32 vpi_flush PROTO_PARAMS((void));
888
+ XXTERN PLI_INT32 vpi_mcd_flush PROTO_PARAMS((PLI_UINT32 mcd));
889
+ XXTERN PLI_INT32 vpi_control PROTO_PARAMS((PLI_INT32 operation,
890
+ ...));
891
+ XXTERN vpiHandle vpi_handle_by_multi_index PROTO_PARAMS((vpiHandle obj,
892
+ PLI_INT32 num_index,
893
+ PLI_INT32 *index_array));
894
+
895
+ /****************************** GLOBAL VARIABLES ******************************/
896
+
897
+ PLI_VEXTERN PLI_DLLESPEC void (*vlog_startup_routines[])();
898
+
899
+ /* array of function pointers, last pointer should be null */
900
+
901
+ #undef PLI_EXTERN
902
+ #undef PLI_VEXTERN
903
+
904
+ #ifdef VPI_USER_DEFINED_DLLISPEC
905
+ #undef VPI_USER_DEFINED_DLLISPEC
906
+ #undef PLI_DLLISPEC
907
+ #endif
908
+ #ifdef VPI_USER_DEFINED_DLLESPEC
909
+ #undef VPI_USER_DEFINED_DLLESPEC
910
+ #undef PLI_DLLESPEC
911
+ #endif
912
+
913
+ #ifdef PLI_PROTOTYPES
914
+ #undef PLI_PROTOTYPES
915
+ #undef PROTO_PARAMS
916
+ #undef XXTERN
917
+ #undef EETERN
918
+ #endif
919
+
920
+ #ifdef __cplusplus
921
+ }
922
+ #endif
923
+
924
+ #endif /* VPI_USER_H */