I am writing a code for a seven segment decoder for a project yet when I check for syntax errors it shown me those:
Error (10500): VHDL syntax error at sevenseg.vhd(16) near text "with"; expecting "end", or "(", or an identifier ("with" is a reserved keyword), or a sequential statement
Error (10500): VHDL syntax error at sevenseg.vhd(17) near text "when"; expecting ";"
My code:
library IEEE;
use IEEE.std_logic_1164.all;
entity sevenseg is
port (m3, m2, m1, m0:in std_logic;
out7 : out std_logic_vector (6 downto 0));
end sevenseg;
architecture ssdec of sevenseg is
signal min : std_logic_vector (3 downto 0);
begin
process(m0, m1, m2, m3)
begin
min <= m3 & m2 & m1 & m0; --concatenate m0, m1, m2, m3 into vector min
with min select --here is where the error specify
out7 <= "0111111" when "0000" | "1010", -- 0
"0000110" when "0001" | "1011", -- 1
"1010111" when "0010" | "1100", -- 2
"1001111" when "0011" | "1101", -- 3
"1100110" when "0100" | "1110", -- 4
"1101101" when "0101" | "1111", -- 5
"1111100" when "0110", -- 6
"0000111" when "0111", -- 7
"1111111" when "1000", -- 8
"1100111" when "1001"; -- 9
end process;
end ssdec;
What are the errors and how I correct it, thanks.