Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error Message! Could someone help!

Status
Not open for further replies.

Bobbyunccstudent

Newbie level 4
Newbie level 4
Joined
Nov 9, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
47
I continue getting this error message. I have tried several different things but cannot seem to figure out how to fix this error. Could someone help.
ERROR:HDLParsers:164 - "/afs/uncc.edu/usr/k/jmoone11/linux/apps/xilinx/Project4/Project4.vhd" Line 48. parse error, unexpected CHARACTER_LITERAL, expecting THEN

This is some of the program so far. I numbered a few lines so you would know approx where the error is located.

Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity Project4 is
    Port ( Clock : in  STD_LOGIC;
           Resetn : in  STD_LOGIC;
           R : in  STD_LOGIC;
           S : in  STD_LOGIC;
           T : in  STD_LOGIC;
           Z : out  STD_LOGIC);
end Project4;

architecture Behavioral of Project4 is
type state_type is (A, B, C, D);
signal y : State_type;

45.begin
46.Process (Resetn, clock, )
begin
47.If resetn '0' then y<= 'A';
48.Else If ( clock' Event and Clock = '1') Then
49.Case y is
50.when A => 
51.If s = '1' and T = '1' then y <= A;
52.else If s = '1' and T = '0' then y <= B;
else If s = '0' then y <= C;
else If S= '0'; End If;

When B=> 
If R= '0' then y<=B;
Else If R='1' the y<=C;

when c=> 
If R='0' and T='0' then y<=B;
else if R='1' and T='1' then y<=B;
else if R='1' and T='0' then y<=A;
else if R='0' and T='1' then y<=D;
when D=>
If R='0' then y<=A;
else y<=D; end if
end case;
end if;
end process;



end Behavioral;

- - - Updated - - -

I numbered the lines incorrectly sorry. It starts at 45 but I skipped the begin it should 47 and so on.
 
Last edited by a moderator:

I dont understand

- - - Updated - - -

Ifigured the error out I didnt have a =. I had If resetn '0' then y<= 'A'; it should be If resetn= '0' then y<= 'A';

Code:
47.If resetn '0' then y<= 'A';
48.Else If ( clock' Event and Clock = '1') Then
49.Case y is
50.when A => 
51.If s = '1' and T = '1' then y <= A;
52.else If s = '1' and T = '0' then y <= B;
else If s = '0' then y <= C;
else If S= '0'; End If;
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top