我可以在配置中使用“for all”来绑定生成的实例吗?

xeb*_*btl 5 vhdl

我的 VHDL 架构实例化了一堆库单元,其中一些在generate块内,例如

a_inst: foo_cell
  port map ( ... );

b_gen: for i in 1 to 3 generate
  b_inst_i : foo_cell
    port map ( ... );
end generate b_gen;
Run Code Online (Sandbox Code Playgroud)

在配置中,我想将这些实例绑定到库中的特定配置。我想使用for all

for all : foo_cell
  use configuration foo_lib.foo_cell_cfg;
end for;
Run Code Online (Sandbox Code Playgroud)

人们可能期望这也涵盖这些generate块,但不,我发现的最简洁的可能性是

for b_gen
  for all : foo_cell
    use configuration foo_lib.foo_cell_cfg;
  end for;
end for;
Run Code Online (Sandbox Code Playgroud)

需要对每个 重复此操作generate

有没有更简洁的方法来达到相同的结果?

编辑:这是一个可编译的示例(为了简单起见,使用“库单元”work而不是单独的库)

entity foo_cell is
end foo_cell;

architecture RTL of foo_cell is
begin
end RTL;

configuration foo_cell_cfg of foo_cell is
  for RTL
  end for;
end foo_cell_cfg;

entity MWE is
end MWE;

architecture RTL of MWE is
  component foo_cell
  end component;
begin
  a_inst: foo_cell;
  b_inst: for i in 1 to 3 generate
    b_i: foo_cell;
  end generate;
end RTL;

configuration MWE_RTL_cfg of MWE is
  for RTL
    for all : foo_cell
      use configuration work.foo_cell_cfg;
    end for;

    for b_inst
      for all : foo_cell
        use configuration work.foo_cell_cfg;
      end for;
    end for;
end for;
end MWE_RTL_cfg;
Run Code Online (Sandbox Code Playgroud)

我把所有这些放在一个文件中mwe.vhd并用irun -elaborate mwe.vhd -top mwe_rtl_cfg