jhonyrod
Newbie level 3
- Joined
- Mar 31, 2014
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 59
Hello,
I have to make a simple VHDL program on a Nexys 2 for a college assignment (the board is provided by the lab) that displays a simple message on the built in seven segment displays.
Thing is, the display refresh rate is always too high or too low, so I decided to use two push buttons of the board to change the clock divider's factor, either higher or lower, instead of changing the code and re-synthesize every time. That's when I ran into trouble and I get said message:
"Signal P cannot be synthesized, bad synchronous description.".
Here's the code itself:
It may be good to know that I tried several combinations of "if" structures with no luck. Also, I tried splitting the ClockSel process, which made that message disappear, but an new one popped up:
"Multi-source on Integers in Concurrent Assignment."
I may post that other version of the code if needed, please let me know.
Thanks in advance.
I have to make a simple VHDL program on a Nexys 2 for a college assignment (the board is provided by the lab) that displays a simple message on the built in seven segment displays.
Thing is, the display refresh rate is always too high or too low, so I decided to use two push buttons of the board to change the clock divider's factor, either higher or lower, instead of changing the code and re-synthesize every time. That's when I ran into trouble and I get said message:
"Signal P cannot be synthesized, bad synchronous description.".
Here's the code itself:
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 48 49 50 51 52 53 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.ALL; entity Main is Port ( D : out STD_LOGIC_VECTOR (6 downto 0); S : out STD_LOGIC_VECTOR (3 downto 0); UP: in STD_LOGIC; DN: in STD_LOGIC; C : in STD_LOGIC); end Main; architecture Word of Main is shared variable P : natural :=0; signal DivC: STD_LOGIC_VECTOR(31 downto 0); signal Sel : STD_LOGIC_VECTOR(1 downto 0); begin S <= "0111" when Sel="00" else "1011" when Sel="01" else "1101" when Sel="10" else "1110" when Sel="11"; D <= "1001000" when Sel="00" else "0000001" when Sel="01" else "1110001" when Sel="10" else "0001000" when Sel="11"; ClockSel: process (UP,DN) begin if ((P<DivC'High) and ((P-1)>DivC'Low)) then if rising_edge(UP) then P:=P+1; elsif rising_edge(DN) then P:=P-1; end if; else P:=1; end if; Sel <= DivC(P downto (P-1)); end process ClockSel; ClockDiv: process (C) begin if rising_edge(C) then if DivC(31)='0' then DivC <= DivC+1; else DivC <= (others=>'0'); end if; end if; end process ClockDiv; end Word;
It may be good to know that I tried several combinations of "if" structures with no luck. Also, I tried splitting the ClockSel process, which made that message disappear, but an new one popped up:
"Multi-source on Integers in Concurrent Assignment."
I may post that other version of the code if needed, please let me know.
Thanks in advance.