我有以下类型声明:
type cachesubset is record
tag : std_logic_vector(3 downto 0);
word0 : w32;
word1 : w32;
dirty : std_logic;
valid : std_logic;
end record;
type cacheset is record
lru : std_logic;
subsets: array(0 to 1) of cachesubset
end record;
我想定义空的缓存集常量:
constant
empty_cachesubset : cachesubset := (
tag => "0000",
word0 => "00000000000000000000000000000000",
word1 => "00000000000000000000000000000000",
dirty => '0',
valid => '0'
);
constant
empty_cacheset : cacheset := (
lru => '0',
subsets => ???
);
关键是我不知道如何创建数组文字。
一些笔记...
请不要介意我使用两个单独的字段来处理子集中的单词,而我可能对缓存集和子集做同样的事情......关键是我还将为子集中的单词应用数组...