小编Chi*_*lus的帖子

未解析的信号具有多个源VHDL

我正在使用VHDL实现一个简单的FSM。我在VHDL中使用此代码,但遇到了以下错误:“未解决的信号NS有多个来源”。我对代码进行了深入研究,但无法弄清楚该错误有人可以帮助我解决此问题吗?

                     library ieee ;
                     use ieee.std_logic_1164.all ;
                     entity MeallyMachine is
                     port( 
                     x,res,clk:in std_logic;
                     z1,z2:out std_logic       
                     );

                    end MooreMachine;


                    architecture M1 of MooreMachine is
                    type state_type is(s0,s1,s2,s3);
                    signal PS,NS:state_type;

                     begin
                     ETAT:process(PS,x)
                     begin
                     case PS is
                      when  s0=>  if (x='0') then
                      NS<=s0;
                                 elsif (x='1') then
                                 NS<=s1;
                                 end if;
                     when s1=>  if (x='0') then
                      NS<=s1;
                                elsif (x='1') then
                      NS<=s2;
                                end if;  
                     when s2=>  if (x='0') then
                     NS<=s2;
                                elsif (x='1') then
                     NS<=s3;
                                 end if;
                     when s3=>  if (x='0') then
                     NS<=s3;
                                 elsif (x='1') then
                     NS<=s0; …
Run Code Online (Sandbox Code Playgroud)

vhdl fsm

0
推荐指数
1
解决办法
5804
查看次数

python中有和没有括号的函数之间的区别

假设代码如下,我有两个关于python的问题:

  1. 为什么不能将带括号或参数的函数传递给add_command
  2. 如果我的CreateWindow函数必须参数,我该怎么办?

这是代码行:

filemenu.add_command(label="update...", command=CreateWindow)
Run Code Online (Sandbox Code Playgroud)

python tkinter

-1
推荐指数
1
解决办法
69
查看次数

标签 统计

fsm ×1

python ×1

tkinter ×1

vhdl ×1