Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

DE2 - VGA Draw Text generate Stack Overflow on quartus_map.exe while compiling

Hello community,

I try to text information to VGA to display it on screen. Everything works fine. I convert characters of a font to 2D integer position xy-array and read it out in a loop to make this pixels black, if they are equal with horizontal and vertical counter from VGA Synchronisation.

But if a increase the amount of text to display from 2 lines (about 80 characters) to 3 lines (about 120 characters) I get the following error message while compiling (don't rise over 10%):

*** Fatal Error: Stack Overflow
Module: quartus_map.exeStack Trace:0xc9dbb: vrfx_add_to_extractor_migration_report +0x1e00b (synth_vrfx)0xca52a: vrfx_add_to_extractor_migration_report +0x1e77a (synth_vrfx)0xca52a: vrfx_add_to_extractor_migration_report +0x1e77a (synth_vrfx)....100 times the sameEnd-traceExecutable: quartus_mapComment:NoneSystem InformationPlatform: windows64OS name: Windows 7OS version:6.2Quartus II InformationAddress bits:64Version:14.1.0Build:186Edition: Web Edition

I don't understand why, in my view, such a small difference provocate the error.

At the border from fail and not fail, Quartus give me the feedback:

Warning (11085): Combinational logic depth is over 6000, which may cause stack overflow. The synthesis may fail.

If I increase the array size now per one, the error will come.

My array which is the reason for the error looks like:

signal STR_TEXT : ARRAY_TEXT(2 downto 0); --TEXT INITALISIERUNG

and it contain the following definition:

    type ARRAY_LINE is array (CHAR_COLS downto 0) of character;            --LINE ARRAY
    type ARRAY_TEXT is array (natural range <>) of ARRAY_LINE;            --TEXT ARRAY

so ARRAY_TEXT is an array of ARRAY_LINE which contain a array of characters.

And at the end the inisalisation of TEXT_ARRAY looks like:

    STR_TEXT(0) <= DRAW_LINE("......VHDL VGA TEXT", '.');    STR_TEXT(1) <= DRAW_LINE("......SELFCREATED BY", '.');
    STR_TEXT(2) <= DRAW_LINE("......TOOL FROM FONT", '.');         --WILL WORK
   STR_TEXT(3) <= DRAW_LINE("......TO PIXEL POSITION", '.');     --WILL FAIL

Function DRAW_LINE only fill up the character array with '.' until the screen end.

--DRAW LINE FUNCTION	function DRAW_LINE(Word: string; Fill: character) return ARRAY_LINE is
		variable temp : ARRAY_LINE;
		begin
		--LOOP CHARS IN LINE
		for c in ARRAY_LINE'range loop
			if(Word'length > c) then
				temp(c) := Word(c+1);
			else
				temp(c) := Fill;
			end if;
		end loop;
		return temp;
	end function;

The 2D Array for the char 'a' looks like this:

when 'a' => temp := ((6, 2), (6, 3), (6, 4), (6, 5), (7, 2), (7, 3), (7, 5), (7, 6), (8, 2), (8, 3), (8, 4), (8, 5), (8, 6), (9, 1), (9, 2), (9, 5), (9, 6), (10, 1), (10, 2), (10, 3), (10, 4), (10, 5), (10, 6), (10, 7), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0));
                

I understand that there are a lot of information in one array. Maybe I need RAM stuff the store it correctly but I don't know how. So anyone know how I can solve this issue?

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi

    1.Which Quartus version your are using?Try with latest Quartus version.

    2.To work around this problem, reduce the number of consecutive LUTs between registers. Alternatively try a different operating system as the maximum stack size is defined by the operating system.

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello Anand,

    thank you for your response.

    I use

    Version:14.1.0

    Build:186

    Edition: Web Edition

    the problem I have is that newer versions do not support Cyclone IV E (EP4CE115F29C7) Boards. I there a way to use newer versions with older boards?

    To your second point, how could I realize that?

    Greetings Martin.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Martin,

    1.If you can't find the board in newer Quartus version,You should add it from design store check the image.

    2.Due to a problem in the Quartus II software version 14 and earlier, you may see this error when you compile a design containing a long series of LUTs with no registers.

    Or

    Increase the stack size of OS.

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)

    https://www.alteraforum.com/forum/attachment.php?attachmentid=14474