Делал. Работало.
Вот Вам пример. Конфигурирование PHY на 100М линк
Код
----------------------------------------------------------------------------------
entity mii_mem is
Port ( clk : in STD_LOGIC;
en : in STD_LOGIC;
addr : in STD_LOGIC_VECTOR (6 downto 0);
do : out STD_LOGIC
);
end mii_mem;
architecture Behavioral of mii_mem is
type rom_type is array (0 to 127) of std_logic;
signal rom : rom_type :=
(
--preambl
'1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1',
--ST
'0','1',
--OP CODE
'0','1',
--PHY ADDR
'0','0','0','0','0',
--REG ADDR
'0','0','0','0','0',
--TAR
'1','0',
--DATA
'0','0','1','0','0','0','0','0',
--DATA
'0','0','0','0','0','0','0','0',
--post
--'1','1','1','1',
--preambl
'1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1',
--ST
'0','1',
--OP CODE
'0','1',
--PHY ADDR
'0','0','0','0','0',
--REG ADDR
'0','0','0','0','0',
--TAR
'1','0',
--DATA
'1','0','1','0','0','0','0','0',
--DATA
'0','0','0','0','0','0','0','0'
--post
--'1','1','1','1'
);
attribute rom_style: string;
attribute rom_style of rom: signal is "distributed";
begin
process(clk)
begin
if clk'event and clk = '1' then
if en = '1' then
do <= rom(conv_integer(addr));
end if;
end if;
end process;
end Behavioral;
сигнал addr инкрементирутся по каждому clk