سلام
یکی از وارنینگ ها
FF/Latch <a_31> has a constant value of 0 in block <progsquarepwm>. This FF/Latch will be trimmed during the optimization process.
و دیگری که ازش خیلی زیاد هست اینه
Due to other FF/Latch trimming, FF/Latch <a_30> has a constant value of 0 in block <progsquarepwm>. This FF/Latch will be trimmed during the optimization process.
مشکل دیگم در نوشتن کد اسیلتور با پریود 100 نانو ثانیه هست.
زمانی که میخواد از سطح 0 به 1 بره میره اما مدت زمانی که باید در سطح 1 بمونه (100 نانو ثانیه) نیست و کلا یک کلاک میخوره.
کد در زیر ارسال میشه :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity quad is
port(
clk,reset:in std_logic;
o:out std_logic
--m,n:in std_logic_vector(3 downto 0)
);
end quad;
architecture Behavioral of quad is
begin
process(clk,reset)
constant m :integer:=5;
variable m_1:integer range 0 to m;
begin
if reset='1' then
o <='0';
elsif (clk'event and clk='1') then
o <= '0';
m_1:=m_1+1;
if (m_1=m) then
m_1:=0;
o <='1';
m_1:=m_1+1;
if (m_1=m) then
m_1:=0;
o<='0';
end if;
end if;
end if;
end process;
end Behavioral;