I just started to learn VHDL and I realy need to write a program that hase 1 input and 1 output, the program hase to divide the input frequency by 4 and send it to the output.
I have couple of idias of how to do it but I wasnt able to write it.
This code does not work...
Please help
I have couple of idias of how to do it but I wasnt able to write it.
Code:
entity NAME_OF_ENTITY is
port (FreqIn: in std_logic;
FreqOut: out std_logic);
end NAME_OF_ENTITY;
architecture architecture_name of NAME_OF_ENTITY is
signal Freq: std_logic_vector (1 downto 0);
begin
if (rising_edge(FeqIn)) then
Freq<=Freq+1;
end if;
if (Freq="11")
FreqOut<="1"
Freq<="00";
elsif (Freq\="11")
FreqOut<="0";
end if;
end architecture_name;
This code does not work...
Please help