Guest User

multipelxer_pulser_solo_state

a guest
Sep 4th, 2020
16
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. LIBRARY ieee;
  2. use ieee.numeric_std.all;
  3. use IEEE.std_logic_1164.all;
  4.  
  5. library work;
  6. use work.type_package.all;
  7.  
  8. ENTITY multiplexer_pulser_solo_state IS
  9.     generic (
  10.         max_step_value : integer
  11.         );
  12.     PORT(  
  13.             current_state           :   in  t_state;
  14.            
  15.             offset_initialization   :   in integer range 0 to max_step_value;
  16.             length_initialization   :   in integer range 0 to max_step_value;
  17.            
  18.             offset_measurement      :   in integer range 0 to max_step_value;
  19.             length_measurement      :   in integer range 0 to max_step_value;
  20.            
  21.             offset                  :   out integer range 0 to max_step_value;
  22.             len                     :   out integer range 0 to max_step_value
  23.         );
  24. END ENTITY multiplexer_pulser_solo_state;
  25.  
  26. ARCHITECTURE behavioural OF multiplexer_pulser_solo_state IS
  27.  
  28. begin
  29.    
  30.     with current_state select offset <=
  31.                             offset_initialization   when s_initialization,
  32.                             offset_measurement      when s_measurement1,
  33.                             offset_measurement      when s_measurement2,
  34.                             0 when others;
  35.                            
  36.    
  37.     with current_state select len <=
  38.                             length_initialization   when s_initialization,
  39.                             length_measurement      when s_measurement1,
  40.                             length_measurement      when s_measurement2,
  41.                             0 when others;
  42.                            
  43.  
  44.    
  45. end architecture behavioural;
RAW Paste Data