triplel06
Newbie level 3
Hello all,
I'm trying to use VHDL so create a 12 hour clock. I have to break up each part into blocks and them use a top level to combine them all. I have the TickGenerator which moves the 50MHz clock down to a 1Hz clock. Next is the second generator block which I have below but keep getting errors.
I'm trying to use VHDL so create a 12 hour clock. I have to break up each part into blocks and them use a top level to combine them all. I have the TickGenerator which moves the 50MHz clock down to a 1Hz clock. Next is the second generator block which I have below but keep getting errors.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity SecondGenerator is port( tick_in: in std_logic; minute_out: out std_logic second : out std_logic_vector (5 downto 0); ); end entity; architecture behave of SecondGenerator is signal tick_in1 : std_logic :='1'; signal sec: integer range 0 to 59; begin process(tick_in) begin if(rising_edge(tick_in))then if(sec = 59) then sec <= sec+1; else sec <= 0; end if; end if; end process; end behave;