Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am a beginner. Can anyone tell me what's wrong with my simple code?

Status
Not open for further replies.

PeggyYao

Programmer
Aug 25, 2003
6
0
0
SG
Dear all,

I am a beginning learner of VHDL. My following simple code got compile error, but I have no idea at all... Can anyone tell me what's wrong with it? The compile error message is also attached. Thanks a lot!!!

Peggy

entity bt_vertex is
port (A: in character; B,C: out character);
end bt_vertex;

architecture bt_vertex_arch of bt_vertex is
signal value: character := NUL;
begin
if value = NUL then
value <= A;
elsif A < value then
B <= A;
else
C <= A;
end if;
end bt_vertex_arch;

rror: CSVHDL0002: bt.vhdl: (line 9): Syntax error at or near `if'
Error: CSVHDL0002: bt.vhdl: (line 9): Invalid prefix for an indexed/selected/slice/attribute name
 
Oh, probably I know what's wrong... I shall use behavioral modeling here. Therefore, I need to define a process. Am I right?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top