X
xipn
Guest
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);
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);