Usually I would do this manually, i.e. write the top-level VHDL myself. But I guess you can create it automatically (or semi-automatically) too.
When you generate a VHDL file from your block diagram (using Create HDL Design File for Current File), you should see all your components plus the connections and logic between them inside the VHDL. If you look closely, your components in this VHDL should include those 2 VHDL entities (with generics) that you mentioned earlier. These generics should also appear as the generics inside both of the components in your generated VHDL like this (this is just an example for illustration):
COMPONENT entityA
GENERIC (a1 : INTEGER;
a2: BOOLEAN;
a3 : STD_LOGIC_VECTOR(7 DOWNTO 0);
a4 : INTEGER
);
PORT(...);
END COMPONENT;
COMPONENT entityB
GENERIC (b1 : INTEGER
);
PORT(...);
END COMPONENT;
Now, here we need to do a bit of extra work to let these generics propagate to the top-level entity of this VHDL file.
LIBRARY ieee;
USE ieee.std_logic_1164.all;
LIBRARY work;
ENTITY top_level IS
generic(a1:integer;
a2:boolean;
a3:std_logic_vector(7 downto 0);
a4:integer;
b1:integer);
PORT
(
);
END top_level;
ARCHITECTURE bdf_type OF top_level IS
COMPONENT entityA
...
END COMPONENT;
/* similar for entityB */
...
BEGIN
...
b2v_inst : entityA
GENERIC MAP(a1 => a1,
a2 => a2,
a3 => a3,
a4 => a4
)
PORT MAP(...);
b2v_inst1 : entityB
GENERIC MAP(b1 => b1
)
PORT MAP(...);
END bdf_type;
That's it. Just add a generics clause to the top-level entity, and change (or remap) the generics of each of the VHDL components to the top-level entity instead of its default values.