richirichard
Newbie level 2
- Joined
- Dec 2, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 29
Hey there!
Im new to VHDL and im getting "unresolved signal is multiply driven" at --> <-- this line in the code. What does it stand for and how shall i recode to resolve this issue?
Im just coding a 5 bit counter that can count up and down that doesnt pass 0 when its counting down and doesnt pass 31 when counting up with a signal s16 that sets the counter to position 0..
Code;
Im new to VHDL and im getting "unresolved signal is multiply driven" at --> <-- this line in the code. What does it stand for and how shall i recode to resolve this issue?
Im just coding a 5 bit counter that can count up and down that doesnt pass 0 when its counting down and doesnt pass 31 when counting up with a signal s16 that sets the counter to position 0..
Code;
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; entity C5b_uds is port(upp, ned,clock, s16:in std_logic; q:out std_logic_vector(4 downto 0); carrry:out std_logic); end entity C5b_uds; architecture beteende of C5b_uds is subtype state_type is integer range 0 to 31; -----------> signal present_state, next_state: state_type; <---------------------- begin process(present_state,upp,ned,s16) begin if (ned = '1' and upp = '1') or (ned = '0' and upp = '0') then next_state <= present_state; else if ned = '0' and upp = '1' then if present_state = 31 then next_state <= present_state; else next_state <= present_state + 1; end if; else if ned = '1' and upp = '0' then if present_state = 0 then next_state <= present_state; else next_state <= present_state - 1; end if; end if; end if; end if; end process; q<=conv_std_logic_vector(present_state,5); state_register:process(clock) begin if rising_edge(clock) then if s16 = '0' then next_state <= 16; else present_state <= next_state; end if; end if; end process; end architecture beteende;
Last edited by a moderator: