what's incorrect ALIAS

  • Thread starter =?ISO-8859-15?Q?Stefan_Schw=E4rzler?=
  • Start date
?

=?ISO-8859-15?Q?Stefan_Schw=E4rzler?=

in my code i wan' to use the alias
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.std_logic_textio.ALL;
use STD.textio.all;

alias swrite is write [line, string, side, width] ;
swrite(my_line, "divs=");


ERROR MESSAGE:
ERROR:HDLParsers:3246 - "D:/projekte/lemos/divide/testdiv.vhd" Line 46.
ALIAS
declarations without subtype specified are not supported
 
J

Jonathan Bromley

in my code i wan' to use the alias [...]
alias swrite is write [line, string, side, width] ;
swrite(my_line, "divs=");

Looks good to me.
ERROR:HDLParsers:3246 - "D:/projekte/lemos/divide/testdiv.vhd" Line 46.
ALIAS
declarations without subtype specified are not supported

Oh dear. Like the message says - your tool doesn't support it.

Easy workaround:

procedure swrite (
L : inout line;
S: string;
J: side := left;
W: width := 0
) is begin
write(L, S, J, W);
end;

Definitely better than...
write (L, string'("divs=") );
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:[email protected]
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top