Skip to content

Instantly share code, notes, and snippets.

@Atlantic777
Created November 20, 2013 21:22
Show Gist options
  • Save Atlantic777/7571284 to your computer and use it in GitHub Desktop.
Save Atlantic777/7571284 to your computer and use it in GitHub Desktop.
-- uključiti ovu biblioteku
use IEEE.STD_LOGIC_UNSIGNED.ALL
-- dodati ovaj interni signal
signal sCOUNTER : STD_LOGIC_VECTOR (7 downto 0);
process (iCLK) begin
if(iCLK'event and iCLK = '1') then
if(inRST = '0') then
sCOUNTER <= "00000000";
elsif (sCOUNTER = "00001011") then
sCOUNTER <= "00000000";
sTC <= '1';
else
sCOUNTER <= sCOUNTER + 1;
sTC <= '0';
end if
end if;
end process;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment