Embedded 多路复用器没有模拟变化

Embedded 多路复用器没有模拟变化,embedded,vhdl,fpga,xilinx,vivado,Embedded,Vhdl,Fpga,Xilinx,Vivado,我是FPGA新手,目前正在尝试实现多路复用器 目前我的代码如下所示 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

我是FPGA新手,目前正在尝试实现多路复用器

目前我的代码如下所示

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;
先谢谢你!:)


E是一个输入,所以你不会期望它在模拟中自动改变-相反,E和S的改变会影响Y。

E是一个输入,所以你不会期望它在模拟中自动改变-相反,E和S的改变会影响Y。

当你的数据类型不是
位类型时,你应该使用它的图书馆。您使用了
std\u logic\u vector
数据类型。所以你需要调用它的实现库。该库称为
std\u logic\u 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;
IEEE库;
使用IEEE.std_logic_1164.all
实体mux4x1为
端口:在标准逻辑向量中(1到0);
E:标准逻辑向量(3到0);
Y:输出标准(U逻辑);
末端mux4x1;
mux4x1的架构是
开始
用S选择

Y当您的数据类型不是
类型时,您应该使用它的库。您使用了
std\u logic\u vector
数据类型。所以你需要调用它的实现库。该库称为
std\u logic\u 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;
IEEE库;
使用IEEE.std_logic_1164.all
实体mux4x1为
端口:在标准逻辑向量中(1到0);
E:标准逻辑向量(3到0);
Y:输出标准(U逻辑);
末端mux4x1;
mux4x1的架构是
开始
用S选择

请注意,错误消息是:“详细说明”步骤失败,出现错误。有关详细信息,请检查Tcl控制台输出或“C:…/sim_1/behav/xsim/detailure.log”文件。因此,详细说明(大致为编译的链接器阶段)失败。检查上述文件以了解更多信息:如有必要,将该信息添加到问题中。选择与标题匹配的错误消息(“[USF-XSim-62]“精心制作”步骤失败,出现错误。)在deployate.log中发现了哪些错误和警告消息?在实体声明之前加入上下文子句(
库ieee;使用ieee.std_logic_1164.all;
),您的代码能够在其他模拟器中分析(编译)、细化(链接)和运行(加载和执行)。其余错误与与目标设备不匹配的XDC文件有关。”此时运行模拟。请注意,错误消息说:“‘精心制作’步骤失败,出现错误。有关详细信息,请检查Tcl控制台输出或‘C:…/sim_1/behav/xsim/精心制作.log’文件。”因此精心制作(大致为编译的链接器阶段)失败。检查上述文件以了解更多信息:如有必要,将该信息添加到问题中。选择与标题匹配的错误消息(“[USF-XSim-62]“精心制作”步骤失败,出现错误。)在deployate.log中发现了哪些错误和警告消息?在实体声明之前加入上下文子句(
库ieee;使用ieee.std_logic_1164.all;
),您的代码能够在其他模拟器中分析(编译)、细化(链接)和运行(加载和执行)。其余错误与与目标设备不匹配的XDC文件有关。”此时运行“模拟”。这并不能提供问题的答案。若要评论或要求作者澄清,请在其帖子下方留下评论。-完美的thx为您的答复!我的程序正在成功运行!这并不能回答这个问题。若要评论或要求作者澄清,请在其帖子下方留下评论。-完美的thx为您的答复!我的程序正在成功运行!谢谢你的回复,我的程序现在运行成功了!请接受它作为正确的解决方案。谢谢你的回复我的程序现在工作成功!请接受它作为正确的解决方案。