2022-12-26 23:16:26 +01:00
|
|
|
:ivl_version "13.0" "vec4-stack";
|
2001-03-25 01:34:40 +01:00
|
|
|
:vpi_module "system";
|
2001-03-18 05:37:35 +01:00
|
|
|
|
2015-08-16 05:28:23 +02:00
|
|
|
; Copyright (c) 2001-2015 Stephen Williams (steve@icarus.com)
|
2001-03-18 05:37:35 +01:00
|
|
|
;
|
2014-12-09 05:54:04 +01:00
|
|
|
; This program is free software; you can redistribute it and/or modify
|
|
|
|
|
; it under the terms of the GNU General Public License as published by
|
|
|
|
|
; the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
; (at your option) any later version.
|
2001-03-18 05:37:35 +01:00
|
|
|
;
|
|
|
|
|
; This program is distributed in the hope that it will be useful,
|
|
|
|
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
; GNU General Public License for more details.
|
|
|
|
|
;
|
2014-12-09 05:54:04 +01:00
|
|
|
; You should have received a copy of the GNU General Public License along
|
|
|
|
|
; with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2001-03-18 05:37:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
; This example is similar to the code that the following Verilog program
|
2014-12-09 05:54:04 +01:00
|
|
|
; would generate:
|
2001-03-18 05:37:35 +01:00
|
|
|
;
|
|
|
|
|
; module main;
|
|
|
|
|
; initial $display("Hello, World.");
|
|
|
|
|
; endmodule
|
|
|
|
|
;
|
|
|
|
|
; This tests that a simple %vpi_call works properly. This is very nearly
|
2014-12-09 05:54:04 +01:00
|
|
|
; the most trivial VVP source file that can generate any output.
|
2001-03-18 05:37:35 +01:00
|
|
|
|
|
|
|
|
|
2014-12-09 05:54:04 +01:00
|
|
|
main .scope module, "main" "main" 0 0;
|
|
|
|
|
|
|
|
|
|
code %vpi_call 0 0 "$display", "Hello, World." {0 0 0};
|
2004-10-04 03:10:51 +02:00
|
|
|
%end;
|
2001-03-18 05:37:35 +01:00
|
|
|
.thread code;
|
2008-01-02 19:42:23 +01:00
|
|
|
:file_names 2;
|
|
|
|
|
"N/A";
|
|
|
|
|
"<interactive>";
|