Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Simulation Error While writing to file

Reply
Thread Tools

Simulation Error While writing to file

 
 
Mohammed khader
Guest
Posts: n/a
 
      11-24-2004
Hi Vhdl Folks,

For the Process 'Read_HexFile_L' while simulating I got the
follwing error for the first time

KERNEL: Error: E8060 : Stack Overflow
# Fatal error occurred during simulation.

When I simulated next time after re comilation I got the another
error as

# KERNEL: Error: E8017 : Unknown error in kernel process module.
# Fatal error occurred during simulation.

Later it worked well when I used an intermediate variable to pass
the std_Logic_vector to the WRITE function as follows...

std_result:=CONV_STD_LOGIC_VECTOR(integer_result,S INCOS_WORD_LENGTH);
WRITE(SinCos_Vhd,std_result);

According to me CONV_STD_LOGIC_VECTOR is a function and can be used
in any expression or as parameter .But it did'nt work..

Please Help me in understanding this.....




Read_HexFile_Lrocess
file SinCos_Str: Text open read_mode is Hex_File;
type Std_File_Type is file of Std_Logic_Vector;
file SinCos_Vhd: Std_File_Type open write_mode is StdVec_File;
variable Ptr: Line;
variable ch:Character;
variable found:boolean:=false;
variable integer_result:Integer;
variable std_result:std_logic_vector(SINCOS_WORD_LENGTH-1 downto 0);
variable line_read:Natural:=0;
begin
ReadLine_L: while(not ENDFILE(SinCos_Str))loop
READLINE(SinCos_Str,Ptr);
found:=false;
Check_Start_L:for i in Ptr'range loop
READ(Ptr,ch);
if(ch = '$')then
found:=true;
exit Check_Start_L;
end if;
end loop Check_Start_L ;
if(found=true)then
READHEX(Ptr,integer_result);
WRITE(SinCos_Vhd,CONV_STD_LOGIC_VECTOR(integer_res ult,SINCOS_WORD_LENGTH));
line_read:=line_read+1;
end if;


end loop ReadLIne_L;
wait; -- Wait forever...
end process Read_HexFile_L;


Regards,
Mohammed Khader.
 
Reply With Quote
 
 
 
 
Neo
Guest
Posts: n/a
 
      11-25-2004
Hi,
I think the problem is not with conversion function but with the write
function, it wont take arguments which are functions or some other
expressions other than whats to be written.


Neo.
 
Reply With Quote
 
 
 
 
Mohammed khader
Guest
Posts: n/a
 
      11-26-2004
(Neo) wrote in message news:<. com>...
> Hi,
> I think the problem is not with conversion function but with the write
> function, it wont take arguments which are functions or some other
> expressions other than whats to be written.
>
>
> Neo.



I got this error during Simulation NOT while compling.

According to me first CONV_STD_LOGIC_VECTOR is executed then the
return value is passed to the WRITE function.

Please clarify me if I am wrong.
 
Reply With Quote
 
Jim Lewis
Guest
Posts: n/a
 
      11-30-2004
Mohammed,
Your post to the recent thread caused me to re-read this.

Submit this as a bug to your toool vendor. It
should have worked. You are using the VHDL built-in
write. It is implicitly defined. I cut the following
out of the LRM:

type FT is file of TM;
procedure WRITE (file F: FT; VALUE: in TM);


As long as the inputs to the functions and procedures
are constant class, you can call them using an expression.
If there is not class specified and the mode is in (as
marked above), then the class is constant. In fact, to
put you at ease with this, all of your operators
(such as "and" "or" "+") are functions with constant
inputs. As long as your types match the following is ok:

Y <= (A and B) or C ; -- calling or with result from and

Why did you find a bug here? The textio facility is
used much more than the built-in write function as
As a result, your vendor probably did not do alot of
compliance testing with it.

You are using the VHDL built-in write. Most
vendors probably do not do much testing in this
area as they expect people to be using the textio
read and write facilities using the file type text
(as it is the only one guaranteed to be ASCII).

Cheers,
Jim
P.S.
The only time I use the built-in write is for prompting
as the textio write/writeline always inserts a newline.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training private.php?do=newpm&u=
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~


> Hi Vhdl Folks,
>
> For the Process 'Read_HexFile_L' while simulating I got the
> follwing error for the first time
>
> KERNEL: Error: E8060 : Stack Overflow
> # Fatal error occurred during simulation.
>
> When I simulated next time after re comilation I got the another
> error as
>
> # KERNEL: Error: E8017 : Unknown error in kernel process module.
> # Fatal error occurred during simulation.
>
> Later it worked well when I used an intermediate variable to pass
> the std_Logic_vector to the WRITE function as follows...
>
> std_result:=CONV_STD_LOGIC_VECTOR(integer_result,S INCOS_WORD_LENGTH);
> WRITE(SinCos_Vhd,std_result);
>
> According to me CONV_STD_LOGIC_VECTOR is a function and can be used
> in any expression or as parameter .But it did'nt work..
>
> Please Help me in understanding this.....
>
>
>
>
> Read_HexFile_Lrocess
> file SinCos_Str: Text open read_mode is Hex_File;
> type Std_File_Type is file of Std_Logic_Vector;
> file SinCos_Vhd: Std_File_Type open write_mode is StdVec_File;
> variable Ptr: Line;
> variable ch:Character;
> variable found:boolean:=false;
> variable integer_result:Integer;
> variable std_result:std_logic_vector(SINCOS_WORD_LENGTH-1 downto 0);
> variable line_read:Natural:=0;
> begin
> ReadLine_L: while(not ENDFILE(SinCos_Str))loop
> READLINE(SinCos_Str,Ptr);
> found:=false;
> Check_Start_L:for i in Ptr'range loop
> READ(Ptr,ch);
> if(ch = '$')then
> found:=true;
> exit Check_Start_L;
> end if;
> end loop Check_Start_L ;
> if(found=true)then
> READHEX(Ptr,integer_result);
> WRITE(SinCos_Vhd,CONV_STD_LOGIC_VECTOR(integer_res ult,SINCOS_WORD_LENGTH));
> line_read:=line_read+1;
> end if;
>
>
> end loop ReadLIne_L;
> wait; -- Wait forever...
> end process Read_HexFile_L;
>
>
> Regards,
> Mohammed Khader.

 
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
Problem with post-route simulation / timing simulation jasperng VHDL 0 11-27-2008 06:23 AM
Error while Simulation sridar VHDL 0 09-06-2007 06:52 AM
Question: Writing text file based TestBenches vs. Waveform file based simulation. BLF VHDL 4 08-07-2004 12:44 AM
Help while error "Error while trying to run project:" David ASP .Net 1 07-19-2004 08:41 PM
Got error msg while Debugging : Error while trying to run project: ... ^CrazyCoder^ ASP .Net 3 09-15-2003 09:40 AM



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