连接 Verilog 整数输入的 VHDL 整数信号出错

Error with VHDL integer signal connecting Verilog integer input

我正在尝试将 VHDL 模块的输出整数端口连接到信号。这个信号将连接其他模块。 (此模块用 Verilog 编写)。但是我遇到了这个

ERROR : VHDL integer data type not supported for actual signals in component instantiation across language boundaries. Port "fifo4_frame_number" is an integer VHDL signal connected to a Verilog port.

我还必须说我可以生成比特流。没问题。

您必须在 VHDL 文件中将整数转换为 logic_vector,以便端口具有相同的类型。两种语言的端口不能是整数类型

VHDL 中的整数与 Verilog 中的整数根本不同,因此它们不兼容也就不足为奇了。 VHDL 中的 integer 类型类似于任何其他语言中的整数类型,而 Verilog 中的 integer 类型只是向量的简写。这个

integer i;

还有这个

reg signed [31:0] i;

在 Verilog 中完全等价。正如其他人所说,您需要在 VHDL 中转换为 std_logic_vector