Forum Discussion
Altera_Forum
Honored Contributor
9 years agoCustomized signal
Hello, for my project, i need to generate an input that is customizable. Means that i want to customize the high state and low state. For example, I set 1 sec for high state and 0.5 sec for low state...
Altera_Forum
Honored Contributor
9 years ago
signal cnt : unsigned(31 downto 0);
process(clk)
begin
if rising_edge(clk) then
cnt <= cnt + 1;
if cnt = ONE_S then
op <= '1';
elsif cnt = ONE_S_PLUS_0_5s then
op <= '0';
end if;
end if;
end process;