XST Internal error: VHDL constant record support

Apr 25, 2006 3 Replies

Hi All,



Just wanted to know if anyone has experienced any problems with Xilinx XST when declaring a constant record in VHDL.



Below is some, what I hope to be valid, VHDL, that makes XST fail and spit out a Internal Error. I'm using ISE 7.1 (SP4) running on a Linux Box.



Is this really an XST bug/problem/deficiency? Would be great to hear from any 8.1 users to see if this is still a problem.



The Error: INTERNAL_ERROR:Xst:cmain.c:3022:1.146.4.1 - To resolve this error, please consult the Answers Database and other online resources at

formatting link



The VHDL: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all;



entity Test is end entity Test;



architecture General of Test is



type SNAPTYPE_ALU_FLAGS is record zero : std_logic; negative : std_logic; carryBorrow : std_logic; overflow : std_logic; end record SNAPTYPE_ALU_FLAGS;



type SNAPTYPE_INTERNAL_FLAGS is record aluFlags : SNAPTYPE_ALU_FLAGS; equalityTests : std_logic_vector(2 downto 0); globalInterruptEn : std_logic; end record SNAPTYPE_INTERNAL_FLAGS;



constant SNAP_FLAGS_RESET : SNAPTYPE_INTERNAL_FLAGS := ((zero => '0', negative => '0', carryBorrow => '0', overflow => '0'), equalityTests => b"000", globalInterruptEn => '0');



begin end General;


Cheers Andy


Dr. Andrew Greensted Department of Electronics Bio-Inspired Engineering University of York, YO10 5DD, UK Tel: +44(0)1904 432379 Mailto: ajg112@ohm.york.ac.uk Fax: +44(0)1904 433224 Web: www.bioinspired.com/users/ajg112

Hi Andrew,

Have you tried using named association for that first parameter? i.e.

constant SNAP_FLAGS_RESET : SNAPTYPE_INTERNAL_FLAGS := (aluFlags => (zero => '0', negative => '0', carryBorrow => '0', overflow => '0'), equalityTests => b"000", globalInterruptEn => '0');

Both are legal, but synthesis tools are known to take exception to the slightest unexpected things...

-Ben-

Ben, That did the trick. Also, if anything, that approach is a little clearer/meaningful too. Thanks for the pointer. Shame XST failed horribly though, rather than produced a more meaningful error.

Cheers Andy

Dr. Andrew Greensted Department of Electronics Bio-Inspired Engineering University of York, YO10 5DD, UK Tel: +44(0)1904 432379 Mailto: ajg112@ohm.york.ac.uk Fax: +44(0)1904 433224 Web: www.bioinspired.com/users/ajg112

Hi Andrew,

Indeed. I've hit several record/aggregate-related snags like this before and spent ages trying to pinpoint exactly what bit of (legal) syntax XST was complaining about, because they always seem to fail with a "fatal error" (or else work fine)

FYI, I ran your snippet through a slighty behind-the-curve 8.1i build of XST and it worked fine for me.

Cheers,

-Ben-

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required