EDAboard.com | EDAboard.de | EDAboard.co.uk | WTWH Media

Help on un-supported allocator and '.all'

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - VHDL Language - Help on un-supported allocator and '.all'

fl
Guest

Sat Dec 16, 2017 3:43 am   



Hello,

I am still new to VHDL. Now two questions pop up from an example code snippet.
See below please.

The first question is about 'new' allocator. It looks like Xilinx Vivado does
not support it (it has an error of the line headed with 'string_v...'

My second question is about '.all'. I know string_v is an access type. I
don't find the answer of '.all'.

Could you help me on the two questions?


Thanks,


/////////////////////////////
procedure verify is
type string_p is access string;
variable string_v : string_p;
begin
string_v := new string'(integer'image(to_integer(expect_v)));
report "___Step " & integer'image(step_v);
.........
ck : if match_v then
boring : if verbose_g then
report "____________ saw " & string_v.all & " as expected";
end if boring;

fl
Guest

Sat Dec 16, 2017 3:52 am   



On Friday, December 15, 2017 at 8:43:53 PM UTC-5, fl wrote:
Quote:
Hello,

I am still new to VHDL. Now two questions pop up from an example code snippet.
See below please.

The first question is about 'new' allocator. It looks like Xilinx Vivado does
not support it (it has an error of the line headed with 'string_v...'

My second question is about '.all'. I know string_v is an access type. I
don't find the answer of '.all'.

Could you help me on the two questions?


Thanks,


/////////////////////////////
procedure verify is
type string_p is access string;
variable string_v : string_p;
begin
string_v := new string'(integer'image(to_integer(expect_v)));
report "___Step " & integer'image(step_v);
........
ck : if match_v then
boring : if verbose_g then
report "____________ saw " & string_v.all & " as expected";
end if boring;


Excuse me. I want to make it clear here.
I want to know whether there is a way to replace the code having 'new'
to make it work in Vivado?

I have browsed through VHDL tutorial on allocator, but I am still unclear
about the reason to use 'new'. Just as the above said, can we use an
alternative way making it work?


Thanks again,

Rob Gaddi
Guest

Sat Dec 16, 2017 3:58 am   



On 12/15/2017 05:52 PM, fl wrote:
Quote:
On Friday, December 15, 2017 at 8:43:53 PM UTC-5, fl wrote:
Hello,

I am still new to VHDL. Now two questions pop up from an example code snippet.
See below please.

The first question is about 'new' allocator. It looks like Xilinx Vivado does
not support it (it has an error of the line headed with 'string_v...'

My second question is about '.all'. I know string_v is an access type. I
don't find the answer of '.all'.

Could you help me on the two questions?


Thanks,


/////////////////////////////
procedure verify is
type string_p is access string;
variable string_v : string_p;
begin
string_v := new string'(integer'image(to_integer(expect_v)));
report "___Step " & integer'image(step_v);
........
ck : if match_v then
boring : if verbose_g then
report "____________ saw " & string_v.all & " as expected";
end if boring;

Excuse me. I want to make it clear here.
I want to know whether there is a way to replace the code having 'new'
to make it work in Vivado?

I have browsed through VHDL tutorial on allocator, but I am still unclear
about the reason to use 'new'. Just as the above said, can we use an
alternative way making it work?


Thanks again,


I haven't tried using the Vivado simulator very much, but let me get the
obvious question out of the way: You are talking about the simulator,
not synthesis right?

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.

fl
Guest

Sat Dec 16, 2017 3:42 pm   



On Friday, December 15, 2017 at 8:58:49 PM UTC-5, Rob Gaddi wrote:
Quote:
On 12/15/2017 05:52 PM, fl wrote:
On Friday, December 15, 2017 at 8:43:53 PM UTC-5, fl wrote:
Hello,

I am still new to VHDL. Now two questions pop up from an example code snippet.
See below please.

The first question is about 'new' allocator. It looks like Xilinx Vivado does
not support it (it has an error of the line headed with 'string_v...'

My second question is about '.all'. I know string_v is an access type. I
don't find the answer of '.all'.

Could you help me on the two questions?


Thanks,


/////////////////////////////
procedure verify is
type string_p is access string;
variable string_v : string_p;
begin
string_v := new string'(integer'image(to_integer(expect_v)));
report "___Step " & integer'image(step_v);
........
ck : if match_v then
boring : if verbose_g then
report "____________ saw " & string_v.all & " as expected";
end if boring;

Excuse me. I want to make it clear here.
I want to know whether there is a way to replace the code having 'new'
to make it work in Vivado?

I have browsed through VHDL tutorial on allocator, but I am still unclear
about the reason to use 'new'. Just as the above said, can we use an
alternative way making it work?


Thanks again,


I haven't tried using the Vivado simulator very much, but let me get the
obvious question out of the way: You are talking about the simulator,
not synthesis right?

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.


Thanks. You are right. The simulation code may not be put in the design part.

elektroda.net NewsGroups Forum Index - VHDL Language - Help on un-supported allocator and '.all'

Ask a question - edaboard.com

Arabic version Bulgarian version Catalan version Czech version Danish version German version Greek version English version Spanish version Finnish version French version Hindi version Croatian version Indonesian version Italian version Hebrew version Japanese version Korean version Lithuanian version Latvian version Dutch version Norwegian version Polish version Portuguese version Romanian version Russian version Slovak version Slovenian version Serbian version Swedish version Tagalog version Ukrainian version Vietnamese version Chinese version Turkish version
EDAboard.com map