Lösung des Praktikums Systementwurf
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

task_sine.vhd 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. library work;
  5. use work.reg32.all;
  6. use work.task.all;
  7. entity task_sine is
  8. port (
  9. clk : in std_logic;
  10. reset : in std_logic;
  11. address : in std_logic_vector( 3 downto 0 );
  12. read : in std_logic;
  13. readdata : out std_logic_vector( 31 downto 0 );
  14. write : in std_logic;
  15. writedata : in std_logic_vector( 31 downto 0 );
  16. signal_write : out std_logic;
  17. signal_writedata : out std_logic_vector( 31 downto 0 )
  18. );
  19. end entity task_sine;
  20. architecture struct of task_sine is
  21. signal task_start : std_logic;
  22. signal task_state : work.task.State := work.task.TASK_IDLE;
  23. signal task_config : work.reg32.RegArray( 0 to 2 );
  24. begin
  25. u_control: entity work.hardware_task_control
  26. port map (
  27. clk => clk,
  28. reset => reset,
  29. address => address,
  30. read => read,
  31. readdata => readdata,
  32. write => write,
  33. writedata => writedata,
  34. task_start => task_start,
  35. task_state => task_state,
  36. task_config => task_config
  37. );
  38. u_sine: entity work.sine
  39. port map (
  40. clk => clk,
  41. reset => reset,
  42. task_start => task_start,
  43. task_state => task_state,
  44. step_size => task_config( 0 ),
  45. phase => task_config( 1 ),
  46. amplitude => task_config( 2 ),
  47. signal_write => signal_write,
  48. signal_writedata => signal_writedata
  49. );
  50. end architecture struct;