Ich versuche, ein SystemVerilog-Modul zu erstellen, das ich mit einer VHDL-Zeichenfolge verbinden konnte. Ich kann jedoch einen entsprechenden Typ in SystemVerilog nicht finden. Die Verwendung des Typs "string" führt zu einem Fehler bei der Verarbeitung in Questa.Welches SystemVerilog-Konstrukt entspricht der VHDL-Zeichenfolge?
VHDL-Code:
library IEEE;
use IEEE.std_logic_1164.all;
entity tb_serdes_support is
end entity;
architecture beh of tb_serdes_support is
component serdes_support is port (
cmd : in string
);
end component;
signal cmd : string(1 to 100);
begin
i_srds_support: serdes_support port map (
cmd => cmd
);
process
begin
cmd(1 to 12) <= "hello world!";
wait for 10 ns;
cmd(1 to 18) <= "hello world again!";
wait;
end process;
end architecture;
SV-Code:
module serdes_support (cmd);
import uvm_pkg::*;
input string cmd;
always_comb begin
$display(cmd);
end
endmodule
Edit: Fehlermeldung (Questa):
** Error: (vsim-3059) Cannot connect a VHDL array signal to Verilog scalar port 'cmd'.
Ich wollte Sie gerade in einer Antwort von [hier] zu zitieren (https://verificationacademy.com/forums/systemverilog/passing-string-sv-systemc-port). ;) – JHBonarius