VHDL文字列に接続できるSystemVerilogモジュールを作成しようとしています。しかし、私はSystemVerilogで対応する型を見つけることができません。タイプ "string"を使用すると、Questaで詳細なエラーが発生します。VHDL文字列に対応するSystemVerilog構文はどれですか?
VHDLコード:
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コード:
module serdes_support (cmd);
import uvm_pkg::*;
input string cmd;
always_comb begin
$display(cmd);
end
endmodule
編集:エラーメッセージ(クエスタ):
** Error: (vsim-3059) Cannot connect a VHDL array signal to Verilog scalar port 'cmd'.
私は[こちら]からの回答であなたを引用するちょうど約ました( https://verificationacademy.com/forums/systemverilog/passing-string-sv-systemc-port)。 ;) – JHBonarius