Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Newbie Question

Reply
Thread Tools

Newbie Question

 
 
Tarique
Guest
Posts: n/a
 
      09-14-2008
Can anyone please help me fix the error ? I am trying to compile the
code with Modelsim PE Student Edition 6.4
and i am getting an error :
# Compile of test.vhd failed with 1 errors.

vcom -work work -2002 -explicit F:/new/test.vhd
Model Technology ModelSim PE Student Edition vcom 6.4 Compiler 2008.05
Jun 30 2008
-- Loading package standard
** Error: F:/new/test.vhd(2): near "EOF": syntax error

This is the code :-


entity Counter_1 is end;
library STD;
use STD.TEXTIO.all;

architecture Behave_1 of Counter_1 is
-- declare a signal for the clock ,type BIT , initial Value '0'
signal Clock : BIT := '0' ;
-- declare a signal for the count Type INTEGER , initial value 0
signal Count : INTEGER := 0 ;
begin
process
begin -- process to generate a clock
wait for 10 ns; -- a delay of 10 ns is half the clock cycle
Clock <= not Clock;
if ( now > 340 ns ) then wait; end if; -- stop after 340 ns
end process;
-- process to do the counting ,runs concurrently with the other processes

process
begin
-- wait until the clock goes from 1 to 0
wait until ( Clock = '0');
-- now handle the counting
if ( Count = 7 ) then Count <= 0;
else Count <= Count + 1;
end if ;
end process;

process (Count) variable L: LINE ;
begin -- process to print
write (L, now); write (L , STRING'("Counter = "));
write (L, Count); writeline(output , L);
end process;
end;


Regards
Tarique
 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      09-14-2008

"Tarique" <> wrote in message news:gajlu3$ulk$...
> Can anyone please help me fix the error ? I am trying to compile the code
> with Modelsim PE Student Edition 6.4
> and i am getting an error :
> # Compile of test.vhd failed with 1 errors.
>
> vcom -work work -2002 -explicit F:/new/test.vhd
> Model Technology ModelSim PE Student Edition vcom 6.4 Compiler 2008.05 Jun
> 30 2008
> -- Loading package standard
> ** Error: F:/new/test.vhd(2): near "EOF": syntax error
>
> This is the code :-
>
>
> entity Counter_1 is end;
> library STD;
> use STD.TEXTIO.all;
>
> architecture Behave_1 of Counter_1 is
> -- declare a signal for the clock ,type BIT , initial Value '0'
> signal Clock : BIT := '0' ;
> -- declare a signal for the count Type INTEGER , initial value 0
> signal Count : INTEGER := 0 ;
> begin
> process
> begin -- process to generate a clock
> wait for 10 ns; -- a delay of 10 ns is half the clock cycle
> Clock <= not Clock;
> if ( now > 340 ns ) then wait; end if; -- stop after 340 ns
> end process;
> -- process to do the counting ,runs concurrently with the other processes
>
> process
> begin
> -- wait until the clock goes from 1 to 0
> wait until ( Clock = '0');
> -- now handle the counting
> if ( Count = 7 ) then Count <= 0;
> else Count <= Count + 1;
> end if ;
> end process;
>
> process (Count) variable L: LINE ;
> begin -- process to print
> write (L, now); write (L , STRING'("Counter = "));
> write (L, Count); writeline(output , L);
> end process;
> end;
>
>
> Regards
> Tarique


Add the following statement at the end
end Behave_1;

The structure of an architecture is of the form...
architecture Arbitray_Name_Of_Architecture of Entity_Name is
-- signal names here
begin
end Arbitray_Name_Of_Architecture;

KJ


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VONAGE Newbie w/newbie question New_kid@nowhere.new VOIP 0 08-11-2007 01:40 PM
another newbie question from another newbie.... Lee UK VOIP 4 05-17-2005 04:10 PM
newbie: cisco vlan newbie question No Spam Cisco 3 06-07-2004 10:02 AM
dumb newbie question (or newbie dumb question) Jerry C. Perl Misc 8 11-23-2003 04:11 AM
Newbie! I'm a newbie! What's wrong with this program? Id0x Python 4 07-20-2003 11:40 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57