UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 13961

4.2i XST - As of 4.2i, XST supports VHDL record types in constant declarations

Description

Keywords: XST, 4.2i, VHDL, record, type, constant, declaration, aggregate

Urgency: Standard

General Description:
As of the 4.2i software release, XST supports record types in constant declarations.

Solution

The following complete sample code illustrates the newly supported VHDL construct:

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;

package test_con is

constant a1 : boolean := true;
constant b1 : natural := 31;
constant c1 : std_logic_vector (7 downto 0) := X"44";

constant a2 : boolean := false;
constant b2 : natural := 12;
constant c2 : std_logic_vector (7 downto 0) := X"FF";

type My_Record_Type is record

True_False : boolean;
Natural_Integer : natural;
standard_vect : std_logic_vector (7 downto 0);

end record My_Record_Type;

constant abc1 : My_Record_Type := (a1, b1, c1);
constant abc2 : My_Record_Type := (a2, b2, c2);

end test_con;



LIBRARY ieee;
library my_lib;

use ieee.std_logic_1164.all;
use work.test_con.all;

entity test is
Port (
sel : in std_logic;
y : out My_Record_Type
);
end test;

architecture behavioral of test is

begin

process (sel)
begin
if sel = '1' then
y <= abc1;
else
y <= abc2;
end if;
end process;

end behavioral;
AR# 13961
Date Created 02/26/2002
Last Updated 08/06/2003
Status Archive
Type General Article