dr.farnsworth
Member level 3
illegal base specifier verilog
I want to change this function which is in vhdl into verilog
function char2vector (c : character) return std_logic_vector is
variable result : std_logic_vector(7 downto 0) ;
begin
case c is
--large letters
when 'A' => result := "01000001" ;
when 'B' => result := "01000010" ;
when 'C' => result := "01000011" ;
when 'D' => result := "01000100" ;
when 'E' => result := "01000101" ;
when 'F' => result := "01000110" ;
when 'G' => result := "01000111" ;
............
end case ;
return result ;
end char2vector ;
I want to change this function which is in vhdl into verilog
function char2vector (c : character) return std_logic_vector is
variable result : std_logic_vector(7 downto 0) ;
begin
case c is
--large letters
when 'A' => result := "01000001" ;
when 'B' => result := "01000010" ;
when 'C' => result := "01000011" ;
when 'D' => result := "01000100" ;
when 'E' => result := "01000101" ;
when 'F' => result := "01000110" ;
when 'G' => result := "01000111" ;
............
end case ;
return result ;
end char2vector ;