Beginner problems Syntax error

OP #3613794
Rate this post
• ▲ useful
▼ not useful
I am trying to make a DEC to 7 segment converter for 2 segment, but i am 
having some problems with the syntax.
1
signal counter_1r: std_logic_vector (7 downto 0);
2
signal counter_1: integer range 0 to 9;
3
counter_1r  <= "11000000" when counter_1 = 0 else
4
        <= "11111001" when counter_1 = 1 else
5
        <= "10100100" when counter_1 = 2 else
6
        <= "10110000" when counter_1 = 3 else
7
        <= "10011001" when counter_1 = 4 else
8
        <= "10010010" when counter_1 = 5 else
9
        <= "10000010" when counter_1 = 6 else
10
        <= "11111000" when counter_1 = 7 else
11
        <= "10000000" when counter_1 = 8 else
12
        <= "10010000" when counter_1 = 9 else
13
        "00000000";
I am getting a error message saying that there is a syntax error near 
"<="..
Which i don't get.  Counter_1 is getting incremented, and counter_1r 
runs concurrently, (not in a process).

So why am i getting this error?

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.