【发布时间】:2015-12-11 01:31:38
【问题描述】:
我正在用 VHDL 编写一个指定的 UART 组件。
send: process(send_start)
variable bit_index : integer range 0 to 2 := 0;
begin
if (falling_edge(send_start)) then
if (start = '0' and transceiver_start = '1') then
bit_index := 0;
end if;
transceiver_start <= '1';
if (bit_index = 0) then
temp_data <= data.RE;
bit_index := 1;
transceiver_start <= '0';
delay_counter <= 0;
elsif (bit_index = 1) then
temp_data <= data.IM;
bit_index := 2;
transceiver_start <= '0';
end if;
end if;
end process;
transceiver_start 信号的下降沿触发子组件运行。我想触发它两次,但我不知道如何生成第二个下降沿。
我考虑过使用并发进程,它基本上会在delay_counter 达到某个限制后将transceiver_start 信号重置为高状态。因此,我可以再次将其置于send 进程中以生成下降沿。但是,这使我对delay_counter 信号有两个驱动过程,并且我读到具有解析函数并不是合成的好习惯(此代码需要可合成。)
bit_index = 1 时有什么方法可以让我生成下降沿?
【问题讨论】: