【问题标题】:Multiplexer is not simulating changes多路复用器不模拟更改
【发布时间】:2020-12-25 04:36:09
【问题描述】:

我是 FPGA 的新手,目前正在尝试实现 MUX。

目前我的代码如下所示

entity mux4x1 is
    Port ( S : in std_logic_vector(1 downto 0);
           E : in std_logic_vector(3 downto 0);
           Y : out std_logic);
end mux4x1;

architecture Behavioral of mux4x1 is
signal outputBuff: std_logic;
begin
        Y <= outputBuff; 
        with S select
        outputBuff <=   E(0) when "00",
                        E(1) when "01",
                        E(2) when "10",
                        E(3) when "11",
                        '0' when others;
                              
end Behavioral;

不幸的是,每次我尝试模拟代码并更改输入“S”的值时,E 的值都没有改变!

当我尝试创建比特流时,它显示以下错误报告:

Vivado Commands
General Messages
[USF-XSim-62] 'elaborate' step failed with error(s). Please check the Tcl console output or 'C:/Users/John Bryan Valle/Documents/Vivado/Programme/Artix-7/MUX4X1/MUX4X1.sim/sim_1/behav/xsim/elaborate.log' file for more information.

[Vivado 12-4473] Detected error while running simulation. Please correct the issue and retry this operation.

Synthesis
[Designutils 20-970] Unrecognized or unsupported command 'set_property IOSTANDARD LVCMOS33 [get_ports {E[2]}}]' found in constraint file. ["C:/Users/John Bryan Valle/Documents/Vivado/Programme/Artix-7/Lab-1/Lab 1 Full Adder/BASYS 3/Full_Adder_2.xdc":55]

Implementation
Design Initialization
[Designutils 20-970] Unrecognized or unsupported command 'set_property IOSTANDARD LVCMOS33 [get_ports {E[2]}}]' found in constraint file. ["C:/Users/John Bryan Valle/Documents/Vivado/Programme/Artix-7/Lab-1/Lab 1 Full Adder/BASYS 3/Full_Adder_2.xdc":55]

Place Design
DRC
Pin Planning
IO Standard
[DRC BIVC-1] Bank IO standard Vcc: Conflicting Vcc voltages in bank 14. For example, the following two ports in this bank have conflicting VCCOs:  
E[2] (LVCMOS18, requiring VCCO=1.800) and E[0] (LVCMOS33, requiring VCCO=3.300)

[Vivado_Tcl 4-23] Error(s) found during DRC. Placer not run.

提前感谢您! :)

enter image description here

【问题讨论】:

  • 请注意错误消息说:“'elaborate' 步骤因错误而失败。请检查 Tcl 控制台输出或 'C:.../sim_1/behav/xsim/elaborate.log'文件以获取更多信息。”所以细化(粗略地说,编译的链接器阶段)失败了。检查上述文件以获取更多信息:如有必要,将该信息添加到问题中。
  • 选择与标题匹配的错误消息(“[USF-XSim-62] 'elaborate' step failed with error(s).”)在 detail.log 中发现了哪些错误和警告消息?通过在实体声明之前包含上下文子句 (library ieee; use ieee.std_logic_1164.all;),您的代码能够在其他模拟器中分析(编译)、细化(链接)和运行(加载和执行)。其余错误与与目标设备不匹配的 XDC 文件有关。此时“运行模拟”。

标签: embedded vhdl fpga xilinx vivado


【解决方案1】:

E 是一个输入,因此您不会期望它在模拟中自行改变 - 相反,E 和 S 的变化会影响 Y。

【讨论】:

    【解决方案2】:

    当您的数据类型不是bit 类型时,您应该使用它的库。您使用了std_logic_vector 数据类型。所以你需要调用它的实现库。该库称为std_logic_1164。 另外,不需要定义中间缓冲区,但它的存在不是问题

    library IEEE;
    use IEEE.std_logic_1164.all
    
    entity mux4x1 is
      Port ( S : in  std_logic_vector(1 downto 0);
             E : in  std_logic_vector(3 downto 0);
             Y : out std_logic);
    end mux4x1;
    
    architecture Behavioral of mux4x1 is
    begin
        with S select
        Y <=   E(0) when "00",
               E(1) when "01",
               E(2) when "10",
               E(3) when "11",
               '0'  when others;
                                  
    end Behavioral;
    

    【讨论】:

    • 感谢您的回复,我的程序现在可以成功运行了!
    猜你喜欢
    • 2013-12-16
    • 1970-01-01
    • 1970-01-01
    • 2023-04-02
    • 2016-08-14
    • 2021-07-27
    • 2020-05-14
    • 2014-02-08
    • 1970-01-01
    相关资源
    最近更新 更多