kender
Advanced Member level 4
Colleagues,
Here’s another VHDL problem. I want to put a one-shot timer into the CPLD. It will serve a safety purpose, if it’s not reset (strobed) on time, it will cut the power. To improve fault-tolerance, I want the reset to be edge-triggered (most of the flip-flops have level-triggered resets, though). So, I wrote the following VHDL code:
But Xilinx WebPack gives me an error:
How can I get around this problem?
Thanks,
- Nick
Here’s another VHDL problem. I want to put a one-shot timer into the CPLD. It will serve a safety purpose, if it’s not reset (strobed) on time, it will cut the power. To improve fault-tolerance, I want the reset to be edge-triggered (most of the flip-flops have level-triggered resets, though). So, I wrote the following VHDL code:
Code:
architecture Behavioral of watch_dog_timer is
signal wdt_clk_cnt: unsigned(23 downto 0);
begin
process (wdt_clk, wdi) begin
if (wdt_clk'event and wdt_clk = '1' and wdt_clk_cnt < 16777215) then
wdt_clk_cnt <= wdt_clk_cnt + 1;
if (wdt_clk_cnt = 16777215) then
wdo <= '0';
end if;
elsif (wdi'event and wdi = '1') then -- reset on positive edge
wdt_clk_cnt <= (others => '0');
wdo <= '1';
end if;
end process;
end Behavioral;
But Xilinx WebPack gives me an error:
Code:
ERROR:Xst:827 - "E:/Relievant/Gen2/PLD_firmware/watch_dog_timer.vhd" line 41: Signal wdo cannot be synthesized, bad synchronous description. The description style you are using to describe a synchronous element (register, memory, etc.) is not supported in the current software release.
How can I get around this problem?
Thanks,
- Nick