我如何生成一个";勾选“;在VHDL中的进程内部?
我正在用VHDL编写一个指定的UART组件我如何生成一个";勾选“;在VHDL中的进程内部?,vhdl,fpga,hdl,Vhdl,Fpga,Hdl,我正在用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;
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;
send:process(发送\启动)
变量位_索引:整数范围0到2:=0;
开始
如果(下降沿(发送开始)),则
如果(start='0'和收发器_start='1'),则
位索引:=0;
如果结束;
收发器_startFPGA设备和相关合成工具针对同步逻辑进行了优化,
因此,一个时钟触发进程执行的VHDL。使用特定的信号
因此,问题代码中的触发器进程执行不符合
缩进式FPGA和VHDL设计方法
相反,使用内部时钟触发进程执行,通常是上升
时钟的边缘。然后,流程内的实际更新可能取决于
检测控制信号的变化,可以是send\u start
process (clock) is
begin
if rising_edge(clock) then
send_start_prev <= send_start; -- Previous for edge detection
if ((send_start = '0') and (send_start_prev = '1')) then -- Falling edge of send_start
... -- More code
end if;
end if;
end process;
send_start_prev <= send_start; -- Previous for edge detection
rerun_request <= '0'; -- Default no rerun
if ((send_start = '0') and (send_start_prev = '1')) or -- Falling edge of send_start
(rerun_request = '1') then -- Rerun request
if bit_index = 1 then
rerun_request <= '1';
end if;
... -- More code
end if;