AR# 13961

|

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

描述

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.

解决方案

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
日期 08/06/2003
状态 Archive
Type 综合文章
People Also Viewed