verilator/test_regress/t/t_dpi_display_bad.v

25 lines
702 B
Systemverilog
Raw Normal View History

2025-05-17 04:32:25 +02:00
// DESCRIPTION: Verilator: Verilog Test module
//
// 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