Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Using REPORT statement during synthesis

 
Thread Tools Search this Thread
Old 10-25-2006, 11:17 PM   #1
Default Using REPORT statement during synthesis


Hi all,
I am working on design which is parametrized by GENERIC. In dependence
on values of GENERIC there is inherited e. g. number of counter bits
(just for simplicity). Is there any way how to write on the stdout
(console) actual value of bits during the synthesis?

I have tied textio package (write etc.) without avail.
Partial success has been achieved by means of REPORT statement:
REPORT "Value: " & INTEGER'image(v_line);
On the console (XST) at least static text "Value:" appears but
without the actual value.

Is there any idea how to write to the console actual values?

I attached the code. Of course the output of the function is not
difficult calculate by hand I have chosen it only because of its simplicity.

Thanks for comments.


-------------------------------------------------------------------------------
FUNCTION log2ceil (
CONSTANT x : NATURAL)
RETURN POSITIVE IS

VARIABLE v_tmp : NATURAL := x;
VARIABLE v_ret : NATURAL := 0;
VARIABLE v_line : INTEGER;

BEGIN -- FUNCTION log2

WHILE (v_tmp > 0) LOOP

v_tmp := v_tmp / 2;
v_ret := v_ret + 1;

END LOOP;

v_line := v_ret;
REPORT "Value: " & INTEGER'image(v_line);

RETURN v_ret;

END FUNCTION log2ceil;
-------------------------------------------------------------------------------

After that I can use
CONSTANT N_CNT_ADDR : NATURAL := log2ceil(N_COE_PER_SECTION);



xipn
  Reply With Quote
Old 10-26-2006, 12:29 AM   #2
Mike Treseler
 
Posts: n/a
Default Re: Using REPORT statement during synthesis
xipn wrote:

> Is there any way how to write on the stdout
> (console) actual value of bits during the synthesis?


No.
Run a simulation to see text output.
textio and "report" are ignored for synthesis.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 10-26-2006, 11:30 AM   #3
KJ
 
Posts: n/a
Default Re: Using REPORT statement during synthesis

"xipn" <> wrote in message
news:ehonpf$2c0a$...
> Hi all,
> I am working on design which is parametrized by GENERIC. In dependence
> on values of GENERIC there is inherited e. g. number of counter bits
> (just for simplicity). Is there any way how to write on the stdout
> (console) actual value of bits during the synthesis?
>
> Is there any idea how to write to the console actual values?
>

Depends on the synthesis tool, but most will not (or at least didn't when I
last checked). If you're using Altera, then Quartus will output one line
from either an assert or a report. As Mike stated though, better to get
what you want from a simulator since all of them handle 'report'.

KJ




KJ
  Reply With Quote
Old 10-26-2006, 03:22 PM   #4
Ben Jones
 
Posts: n/a
Default Re: Using REPORT statement during synthesis
Hi,

"xipn" <> wrote in message
news:ehonpf$2c0a$...
> Hi all,
> I am working on design which is parametrized by GENERIC. In dependence
> on values of GENERIC there is inherited e. g. number of counter bits
> (just for simplicity). Is there any way how to write on the stdout
> (console) actual value of bits during the synthesis?


As you have discovered, XST will process REPORT statements and print the
value to the console & log file... but only if the string to be reported is
a constant value. If your generic has a very limited range of values, and
you're really desperate to print it out, you can do something like:

assert COUNTER_BITS = 4 report "4 counter bits" severity note;
assert COUNTER_BITS = 5 report "5 counter bits" severity note;
assert COUNTER_BITS = 6 report "6 counter bits" severity note;

This gets tedious very quickly.

I know that requests have been made (internally) here at Xilinx to lift this
restriction. There doesn't seem to me to be a good reason not to allow
REPORT statements to print out information about your design while it is
being processed. It is very useful as a sanity check during debugging.

For similar reasons, I think that the ability to write files during
synthesis, by means of the standard VHDL mechanisms, has also been
requested, although that is probably a lower priority. I cannot think of any
other solution to your problem right now...

Cheers,

-Ben-




Ben Jones
  Reply With Quote
Old 10-26-2006, 06:32 PM   #5
Mike Treseler
 
Posts: n/a
Default Re: Using REPORT statement during synthesis
Ben Jones wrote:

> I know that requests have been made (internally) here at Xilinx to lift this
> restriction. There doesn't seem to me to be a good reason not to allow
> REPORT statements to print out information about your design while it is
> being processed. It is very useful as a sanity check during debugging.


The problem is that synthesis processing
unwinds all loops and flattens hierarchy
to construct a netlist. It doesn't
"run the code" like a simulator does.
Doing more than reporting some static values
during elaboration does not make sense to me.

The more valuable debugging aid provided
by synthesis is the RTL viewer.

> For similar reasons, I think that the ability to write files during
> synthesis, by means of the standard VHDL mechanisms, has also been
> requested, although that is probably a lower priority.


For good reason.
Synthesis data ought to be in a vhdl package
anyway or it will miss the free consistency
checks during syntax parsing and elaboration.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 10-27-2006, 09:16 AM   #6
Ben Jones
 
Posts: n/a
Default Re: Using REPORT statement during synthesis
Hi Mike,

"Mike Treseler" <> wrote in message
news:...
> Ben Jones wrote:
>
>> I know that requests have been made (internally) here at Xilinx to lift
>> this
>> restriction. There doesn't seem to me to be a good reason not to allow
>> REPORT statements to print out information about your design while it is
>> being processed. It is very useful as a sanity check during debugging.

> The problem is that synthesis processing
> unwinds all loops and flattens hierarchy
> to construct a netlist. It doesn't
> "run the code" like a simulator does.


Well, that's true to some extent, but it does rather depend what you mean by
"run the code". If I write some VHDL that implies a ROM, and the values
inside that ROM are being calculated by a function, then that function is by
necessity being "run" by the synthesis tool.

> Doing more than reporting some static values
> during elaboration does not make sense to me.


The OP's complaint was that he has a static value (well, a generic
parameter, which seems static enough to me whatever the LRM says on the
subject!) and he can't print it out. I think he should be able to do that.
Currently I think XST will only process a report statement if its argument
is a single, constant string literal.

If your design is, or contains, a highly parameterized piece of re-usable
IP, then there is a good chance that you cannot run enough simulations to
cover the entire generic space. If your design has a deep hierarchy in which
the parameters passed to each level are calculated by the level above, and
so on all the way down, then it can be hard to know exactly which
sub-modules are being instantiated with what parameters.

In situations like these, having a log file that tells you "what the
synthesis tool did" is just as valid a requirement as having one telling you
"what the simulator did" when elaborating a design. At the very least, it's
useful to be able to cross-check one against the other to make sure they are
both doing what you expect.

> Synthesis data ought to be in a vhdl package
> anyway or it will miss the free consistency
> checks during syntax parsing and elaboration.


I'd absolutely agree with that (although I think that's a different issue).

Cheers,

-Ben-




Ben Jones
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we make Java web report just by drag and drop? freezea Software 0 08-13-2009 07:06 AM
Crystal stops displaying data when new field added to a report nickmellor Software 0 01-14-2009 01:07 AM
changing Crystal report table at run time rakesh201180 Software 1 10-22-2008 10:58 AM
Microsoft Visio 2007 & Report imransyed63 Software 0 08-21-2008 09:35 AM
slow crystal report guptamkomal Software 0 05-23-2007 01:17 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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