bob2987
Junior Member level 1
- Joined
- Feb 20, 2014
- Messages
- 18
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 192
Hi all!
I would like to create a ferquency_divider i write this code but it doesn't work, if anyone find a error.
Thank you.
-----------------------------------------------------------------------
-----------------------------------------------------------------------
I would like to create a ferquency_divider i write this code but it doesn't work, if anyone find a error.
Thank you.
-----------------------------------------------------------------------
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 library ieee; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity diviseur is Port ( reset : in STD_LOGIC; clk : in STD_LOGIC; s : out STD_LOGIC); end diviseur; architecture Behavioral of diviseur is signal s1: std_logic; signal CPT: std_logic_vector (2 downto 0); begin process(clk,reset) begin if reset = '0' then CPT<="000"; elsif (clk'event and clk='1') then if CPT="110" then CPT<="000"; s1 <= not s1; s <= s1; else CPT<=CPT+1; end if; end if; end process; end Behavioral;
-----------------------------------------------------------------------
Last edited by a moderator: