关于最佳VHDL设计实践的问题。最佳VHDL设计实践
在设计状态机时,我应该在体系结构内使用信号还是使用变量。我到目前为止使用了变量,因为它们对流程来说“有点”私有的,恕我直言,因为它们不应该在流程之外访问。但这是一个很好的设计实践吗?
type state_type is (s0,s1);
signal state : state_type := s0;
A : process(clk)
begin
if rising_edge(clk) then
case state is
.....
end case;
end if;
end process;
--This process uses a variable
B : process(clk)
type state_type is (s0,s1);
variable state : state_type := s0;
begin
if rising_edge(clk) then
case state is
.....
end case;
end if;
end process;
我发现多个交互过程往往会混淆代码的意图 - 正如你所说,这是一种风格的东西:) – 2013-09-26 13:49:28
我认为我们已经同意在此之前有所不同;-) – 2013-09-27 12:34:15