没有 EN 的模块 - VHDL
Module without an EN - VHDL
我有一个模块,当我不使用它时,它必须进入重置状态,所以我不需要模块EN。
所以,像这样的模块:
process(clock, reset)
begin
if reset = '0' then
elsif rising_edge(clock) then
end if;
合成器正确吗?
或者更好:
process(clock, reset)
begin
if reset = '0' then
elsif rising_edge(clock) then
if moduleEN = '1' then
end if;
end if;
但是 moduleEN 与 high 密切相关。
有一个没有moduleEN信号的组件是完全可以的。其实我见过的大部分模块都没有使能信号。
但是,如果您打算在运行时重置子模块,使用同步重置信号更可靠:
process(clock, reset)
begin
if rising_edge(clock) then
if reset = '0' then
... reset logic ...
else
... normal logic ...
end if;
end if;
end process;
这确保模块干净地离开复位状态。否则,时钟边沿靠近被取消断言的复位信号可能会导致未定义的行为。
此处可以使用异步复位,但通常需要为时序分析器指定手动约束以验证行为是否正确。
我有一个模块,当我不使用它时,它必须进入重置状态,所以我不需要模块EN。
所以,像这样的模块:
process(clock, reset)
begin
if reset = '0' then
elsif rising_edge(clock) then
end if;
合成器正确吗?
或者更好:
process(clock, reset)
begin
if reset = '0' then
elsif rising_edge(clock) then
if moduleEN = '1' then
end if;
end if;
但是 moduleEN 与 high 密切相关。
有一个没有moduleEN信号的组件是完全可以的。其实我见过的大部分模块都没有使能信号。
但是,如果您打算在运行时重置子模块,使用同步重置信号更可靠:
process(clock, reset)
begin
if rising_edge(clock) then
if reset = '0' then
... reset logic ...
else
... normal logic ...
end if;
end if;
end process;
这确保模块干净地离开复位状态。否则,时钟边沿靠近被取消断言的复位信号可能会导致未定义的行为。
此处可以使用异步复位,但通常需要为时序分析器指定手动约束以验证行为是否正确。