Beginner problems Syntax error

OP #3613794
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

A question of your own? This thread is over 12 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

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.