t22.vhd

来自「Workshop vhdl code from Esperan」· VHDL 代码 · 共 27 行

VHD
27
字号
--
-- This file tests support for Records of records.
--
entity TEST is
	port( A	: in  bit;
	      Z : out bit);
end TEST;
architecture T22 of TEST is
	type T_DATA is record 
		PARITY 	: bit;
		DATA 	: bit_vector(3 downto 0);
		ADDRESS : integer range 0 to 7;
	end record;

	type T_REC is record
		MESSAGE  : T_DATA;
		ERROR    : boolean;
	end record;

	signal RX_DATA, TX_DATA : T_REC;
begin
	RX_DATA.ERROR <= true;
	RX_DATA.MESSAGE.PARITY <= A; 
	TX_DATA <= RX_DATA;
	Z <= TX_DATA.MESSAGE.PARITY;
end T22;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?