You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Quartus最简VHDL示例仿真报错:端口类型不匹配问题求助

解决Quartus 18.1仿真报错vsim-3807的方法

问题原因

你代码里用的是VHDL原生的bit类型,但Quartus的University Program VWF(波形文件)默认会把信号识别为std_logic类型,仿真时波形文件里的信号(组件端口)和你代码实体的端口类型不匹配,导致报错。

具体解决办法

方法1:修改代码类型为std_logic

把代码里的bit替换成FPGA设计中更常用的std_logic类型,同时引入IEEE标准库:

library IEEE;
use IEEE.std_logic_1164.all;

entity test is
    port (
        x1, x2 : in std_logic;
        f     : out std_logic
    ); 
end test;

architecture behavior of test is
begin
    f <= x1 and x2;
end behavior;

修改后重新编译工程,再重新生成波形文件执行仿真即可。

方法2:手动修改波形文件的信号类型

如果不想改动代码,可按以下步骤调整波形文件的信号类型:

  • 打开已创建的VWF文件,选中所有信号(x1、x2、f)
  • 右键选择Edit->Properties
  • 在属性窗口中,将每个信号的Type从默认的std_logic改为bit
  • 保存波形文件后,重新运行功能仿真

内容的提问来源于stack exchange,提问作者Vladimir Korshunov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 05:07:03