سلام به همگی
آقا من میخوام یه ماژول داشته باشم که وقتی clk1 میاد، خروجی 0 بشه و 0 بمونه تا clk2 بیاد و خروجی رو 1 کنه و 1 بمونه تا باز دوباره clk1 بیاد.
کد VHDL ش رو اینطور نوشتم:
[left]
entity clocking is
Port ( clk1 : in STD_LOGIC;
clk2 : in STD_LOGIC;
result : out STD_LOGIC);
end clocking;
architecture Behavioral of clocking is
begin
process
begin
if( rising_edge(clk1) ) then
result <= '0';
end if;
if( rising_edge(clk2) ) then
result <= '1';
end if;
end process;
end Behavioral;
آقا من میخوام یه ماژول داشته باشم که وقتی clk1 میاد، خروجی 0 بشه و 0 بمونه تا clk2 بیاد و خروجی رو 1 کنه و 1 بمونه تا باز دوباره clk1 بیاد.
کد VHDL ش رو اینطور نوشتم:
[left]
entity clocking is
Port ( clk1 : in STD_LOGIC;
clk2 : in STD_LOGIC;
result : out STD_LOGIC);
end clocking;
architecture Behavioral of clocking is
begin
process
begin
if( rising_edge(clk1) ) then
result <= '0';
end if;
if( rising_edge(clk2) ) then
result <= '1';
end if;
end process;
end Behavioral;
تو شبیه سازی جواب میده اما موقع سنتز کردن error زیر رو میده:
"statement is not synthesizable since it does not hold its value under NOT(clock-edge) condition"
واقعاٌ نمی فهمم مشکل چیه؟ کسی راه دیگه ای بنظرش نمیرسه که این بلوک رو پیاده کنم. به نظر خیلی سادست ولی نمیشه نوشتش.
ممنون
"statement is not synthesizable since it does not hold its value under NOT(clock-edge) condition"
واقعاٌ نمی فهمم مشکل چیه؟ کسی راه دیگه ای بنظرش نمیرسه که این بلوک رو پیاده کنم. به نظر خیلی سادست ولی نمیشه نوشتش.
ممنون
دیدگاه