library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
USE ieee.math_real.all;
library work;
use work.my_pkg.all;
entity my_inst is
generic ( COUNT : natural := 16 -- Max count is 16
);
port(
.
.
.
);
end entity my_inst ;
architecture my_inst_rtl of my_inst is
-- all other signals declared
signal ahblite_haddr : c_32b_16x; -- type c_32b_16x is array (0 to 15) of std_logic_vector(31 downto 0);
signal ahblite_hrdata : c_32b_16x; -- so are other types declared inside the my_pkg.vhd file
signal ahblite_hready_s2m : c_01b_16x;
signal ahblite_hready_m2s : c_01b_16x;
signal ahblite_hresp : c_01b_16x;
signal ahblite_htrans : c_02b_16x;
signal ahblite_hwdata : c_32b_16x;
signal ahblite_hwrite : c_01b_16x;
signal ahblite_hsel : c_01b_16x;
signal ahblite_hresp_m : c_02b_16x;
--
begin
.
.
.
-- Inst 16x mysub_mod.vhd
example_gen: for i in 0 to (COUNT-1) generate
mysub_mod_inst: entity work.mysub_mod(arch_rtl)
generic map(
CHANNEL_NR => 0,
CLK_FREQ => 125_000_000 -- 125MHz clock frequency
)
port map(
rst_n_i => rst_n_i,
clk_i => clk_125M_i,
srst_n_i => srst_125M_n_i,
-- AHB Lite i/f (slave)
hready_i => ahblite_hready_m2s(i),
hsel_i => ahblite_hsel(i) ,
haddr_i => ahblite_haddr(i) ,
htrans_i => ahblite_htrans(i) ,
hwdata_i => ahblite_hwdata(i) ,
hwrite_i => ahblite_hwrite(i) ,
hrdata_o => ahblite_hrdata(i) ,
hreadyout_o => ahblite_hready_s2m(i),
hresp_o => ahblite_hresp(i) ,
-- Data i/f
log_data_o => log_data(i),
log_we_o => log_we(i) ,
log_end_o =>log_end(i)
); --- Modelsim reports error here!!!
end generate example_gen;
.
.
end architecture my_inst_rtl;