Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - please help! unknown sintax errors with my code?

 
Thread Tools Search this Thread
Old 12-05-2003, 04:45 PM   #1
Default please help! unknown sintax errors with my code?


what is wrong with my code that I get these errors when I check
sintax?

ERROR:HDLParsers:164 -
C:/projects/XilinxISEProjects/WL02Coolrunner/BCD_27SEGM.vhd Line 25.
parse error, unexpected LT, expecting OPENPAR or TICK or LSQBRACK
ERROR:HDLParsers:164 -
C:/projects/XilinxISEProjects/WL02Coolrunner/BCD_27SEGM.vhd Line 26.
parse error, unexpected LT, expecting OPENPAR or TICK or LSQBRACK
.....ect....


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity BCD_27SEGM is
port (
PHASE: in STD_LOGIC; --LCD USES PHASE TO PREVENT BURNING
BCD: in std_logic_vector(3 downto 0);
segment: out std_logic_vector(6 downto 0)
);
end BCD_27SEGM;

architecture Behavioral of BCD_27SEGM is
begin
process (BCD,PHASE)
begin
if (PHASE = '0') then
case BCD is -- display segment order a b c d e f g
when "0000" => segment < = "1111110";
when "0001" => segment < = "0110000";
when "0010" => segment < = "1101101";
when "0011" => segment < = "1111001";
when "0100" => segment < = "0110011";
when "0101" => segment < = "1011011";
when "0110" => segment < = "1011111";
when "0111" => segment < = "1110000";
when "1000" => segment < = "1111111";
when "1001" => segment < = "1110011";
when others => segment < = "0000000";
end case;
elsif (PHASE = '1') then
case BCD is -- display segment order a b c d e f g
when "0000" => segment < = "0111111";
when "0001" => segment < = "1001111";
when "0010" => segment < = "0010010";
when "0011" => segment < = "0000110";
when "0100" => segment < = "1001100";
when "0101" => segment < = "0100100";
when "0110" => segment < = "0100000";
when "0111" => segment < = "0001111";
when "1000" => segment < = "0000000";
when "1001" => segment < = "0001100";
when others => segment < = "1111111";
end case;
end if;
end process;
end Behavioral;


bob
  Reply With Quote
Old 12-05-2003, 04:57 PM   #2
Gietek
 
Posts: n/a
Default Re: please help! unknown sintax errors with my code?

> process (BCD,PHASE)
> begin
> if (PHASE = '0') then
> case BCD is -- display segment order a b c d e f g

(...)
> end case;
> elsif (PHASE = '1') then <-----------------

?
> case BCD is -- display segment order a b c d e f g

(...)
> end case;
> end if;
> end process;



Well, I'm not so good in VHDL but... isn't it supposed to be else instead of
elsif ?
Any help is good




Gietek
  Reply With Quote
Old 12-05-2003, 05:05 PM   #3
bob
 
Posts: n/a
Default Re: please help! unknown sintax errors with my code?
tried that variation but still get the same problem
even when I simplify it by commenting out the phase and if than
statments

On Fri, 5 Dec 2003 17:57:29 +0100, "Gietek" <> wrote:

>
>> process (BCD,PHASE)
>> begin
>> if (PHASE = '0') then
>> case BCD is -- display segment order a b c d e f g

>(...)
>> end case;
>> elsif (PHASE = '1') then <-----------------

>?
>> case BCD is -- display segment order a b c d e f g

>(...)
>> end case;
>> end if;
>> end process;

>
>
>Well, I'm not so good in VHDL but... isn't it supposed to be else instead of
>elsif ?
>Any help is good
>




bob
  Reply With Quote
Old 12-05-2003, 05:45 PM   #4
Tim Hubberstey
 
Posts: n/a
Default Re: please help! unknown sintax errors with my code?
bob wrote:
>
> what is wrong with my code that I get these errors when I check
> sintax?
> when "0000" => segment < = "1111110";

-------------------------------------------^
One too many spaces. Use <= not < =.

--
Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com


Tim Hubberstey
  Reply With Quote
Old 12-05-2003, 05:55 PM   #5
Mike Treseler
 
Posts: n/a
Default Re: please help! unknown sintax errors with my code?
bob wrote:
> what is wrong with my code that I get these errors when I check
> sintax?


try this:

library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity BCD_27SEGM is
port (
PHASE : in std_logic; --LCD USES PHASE TO PREVENT BURNING
BCD : in std_logic_vector(3 downto 0);
segment : out std_logic_vector(6 downto 0)
);
end BCD_27SEGM;

architecture Behavioral of BCD_27SEGM is
begin
process (BCD, PHASE)
begin
if (PHASE = '0') then
case BCD is -- display segment order a b c d e f g
when "0000" => segment <= "1111110";
when "0001" => segment <= "0110000";
when "0010" => segment <= "1101101";
when "0011" => segment <= "1111001";
when "0100" => segment <= "0110011";
when "0101" => segment <= "1011011";
when "0110" => segment <= "1011111";
when "0111" => segment <= "1110000";
when "1000" => segment <= "1111111";
when "1001" => segment <= "1110011";
when others => segment <= "0000000";
end case;
elsif (PHASE = '1') then
case BCD is -- display segment order a b c d e f g
when "0000" => segment <= "0111111";
when "0001" => segment <= "1001111";
when "0010" => segment <= "0010010";
when "0011" => segment <= "0000110";
when "0100" => segment <= "1001100";
when "0101" => segment <= "0100100";
when "0110" => segment <= "0100000";
when "0111" => segment <= "0001111";
when "1000" => segment <= "0000000";
when "1001" => segment <= "0001100";
when others => segment <= "1111111";
end case;
end if;
end process;
end Behavioral;


-- Mike Treseler



Mike Treseler
  Reply With Quote
Old 12-05-2003, 06:17 PM   #6
bob
 
Posts: n/a
Default Re: please help! unknown sintax errors with my code?
Thanks tim that was it.
On Fri, 05 Dec 2003 17:45:23 GMT, Tim Hubberstey <>
wrote:

>bob wrote:
>>
>> what is wrong with my code that I get these errors when I check
>> sintax?
>> when "0000" => segment < = "1111110";

>-------------------------------------------^
>One too many spaces. Use <= not < =.




bob
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Access HTML elements in code behind??? nedums_b Software 1 02-07-2008 07:15 PM
Circumvent Region Code hufaunder@yahoo.com DVD Video 11 01-29-2007 09:51 PM
.avi files giving region code error Craig Cameron DVD Video 2 03-07-2006 02:49 PM
JVC Camcorder Errors "REMOVE AND REATTACH BATTERY" or "UNIT IN SAFEGUARD MODE" or E04 Juan Carrera DVD Video 0 06-22-2004 05:34 AM
Memorizing IRQs & Beep Code Errors the easy way \a:\\\ A+ Certification 2 03-05-2004 06:51 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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