2025-05-17 04:32:25 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
2026-01-27 02:24:34 +01:00
|
|
|
// This program is free software; you can redistribute it and/or modify it
|
|
|
|
|
// under the terms of either the GNU Lesser General Public License Version 3
|
|
|
|
|
// or the Perl Artistic License Version 2.0.
|
|
|
|
|
// SPDX-FileCopyrightText: 2010 Wilson Snyder
|
2025-05-17 04:32:25 +02:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
|
|
2026-03-03 13:21:24 +01:00
|
|
|
module t;
|
2025-05-17 04:32:25 +02:00
|
|
|
|
|
|
|
|
`ifndef VERILATOR
|
2026-03-08 23:26:40 +01:00
|
|
|
`error "Only Verilator supports PLI-ish DPI calls and sformat conversion."
|
2025-05-17 04:32:25 +02:00
|
|
|
`endif
|
|
|
|
|
|
2026-03-08 23:26:40 +01:00
|
|
|
import "DPI-C" context dpii_display_call
|
|
|
|
|
= function void \$dpii_display
|
|
|
|
|
(input string formatted /*verilator sformat*/, input string other_bad );
|
2025-05-17 04:32:25 +02:00
|
|
|
|
2026-03-08 23:26:40 +01:00
|
|
|
initial begin
|
|
|
|
|
$dpii_display("hello", "huh");
|
|
|
|
|
$stop;
|
|
|
|
|
end
|
2025-05-17 04:32:25 +02:00
|
|
|
|
|
|
|
|
endmodule
|