- --register <=> UFM datatransfer
- -------------------------------------------------------------------
--- ufm_bus_ready_in <= '0';
-
--- if ufm_cmd = '0' and ufm_bus_ready_out = '1' then
- --copy data from UFM to registers
--- ufm_bus_ready_in <= '1';
--- case to_integer(ufm_databyte_counter) is
--- when 0 => reg(7 downto 0) <= ufm_data_out;
--- when 1 => reg(15 downto 8) <= ufm_data_out;
--- when 2 => reg(23 downto 16) <= ufm_data_out;
--- when 3 => reg(31 downto 24) <= ufm_data_out;
-
--- when 4 => pulser_periodlength(7 downto 0) <= ufm_data_out;
--- when 5 => pulser_periodlength(15 downto 8) <= ufm_data_out;
--- when 6 => pulser_periodlength(23 downto 16) <= ufm_data_out;
--- when 7 => pulser_periodlength(27 downto 24) <= ufm_data_out(3 downto 0);
-
--- when 8 => pulser_pulslength(7 downto 0) <= ufm_data_out;
--- when 9 => pulser_pulslength(15 downto 8) <= ufm_data_out;
--- when 10 => pulser_pulslength(23 downto 16) <= ufm_data_out;
--- when 11 => pulser_pulslength(27 downto 24) <= ufm_data_out(3 downto 0);
-
--- when others =>null;
--- end case;
-
--- elsif ufm_cmd = '1' and ufm_bus_ready_out = '1' then
- --save data from registers to UFM
--- ufm_bus_ready_in <= '1';
--- case to_integer(ufm_databyte_counter) is
--- when 0 => ufm_data_in <= reg(7 downto 0);
--- when 1 => ufm_data_in <= reg(15 downto 8);
--- when 2 => ufm_data_in <= reg(23 downto 16);
--- when 3 => ufm_data_in <= reg(31 downto 24);
-
--- when 4 => ufm_data_in <= pulser_periodlength(7 downto 0);
--- when 5 => ufm_data_in <= pulser_periodlength(15 downto 8);
--- when 6 => ufm_data_in <= pulser_periodlength(23 downto 16);
--- when 7 => ufm_data_in <= x"0" & std_logic_vector(pulser_periodlength(27 downto 24));
-
--- when 8 => ufm_data_in <= pulser_pulslength(7 downto 0);
--- when 9 => ufm_data_in <= pulser_pulslength(15 downto 8);
--- when 10 => ufm_data_in <= pulser_pulslength(23 downto 16);
--- when 11 => ufm_data_in <= x"0" & std_logic_vector(pulser_pulslength(27 downto 24));
-
--- when others =>null;
--- end case;
-
--- end if;