Note above code is a serilizer. You can do a desrializer on same basis.
I possibly got mixed up with serializer/deserilizer
important note:
Your desrialiser will not work since there is no indication of word beginning. You must send a signal from serialiser to indicate that, send it with the first bit. or use clk27 edge if properly aligned with data transition.
desrialiser
signal clk27_d : std_logic;
signal count : integer range 0 to 9;
process(reset,clk270)
begin
if reset = '1' then
q <= (others => '0');
clk27_d <= '0';
count <= 0;
elsif rising_edge(clk270) then
clk27_d <= clk_27; -- for word boundary detection
if clk27 = '1' and clk27_d = '0' then
count <= 1;
elsif count = 9 then
count <= 0;
else
count <= count + 1;
end if;
q(count) <= data_in;
end if;
end process;