2 use ieee.std_logic_1164.all;
3 use ieee.std_logic_arith.all;
4 use ieee.std_logic_unsigned.all;
6 --------------------------------------------------------------------------------
10 IRF_ADR_W : integer := 5;
11 P_BASE : integer := 16;
12 PWM_OFF : integer := 1;
13 PWM_W : integer := 10);
15 -- Primary slave intefrace
16 ACK_O : out std_logic;
21 PWM_DAT_O : out std_logic_vector (PWM_W-1 downto 0);
22 PWM_STB_O : out std_logic := '0';
23 -- Shared dual-port memory
24 IRF_ACK_I : in std_logic;
25 IRF_ADR_O : out std_logic_vector (IRF_ADR_W-1 downto 0);
26 IRF_DAT_I : in std_logic_vector (15 downto 0);
27 IRF_STB_O : out std_logic);
30 --------------------------------------------------------------------------------
32 architecture behavioral of pwm_dump is
34 type state_t is (ready, done);
35 subtype irf_adr_t is std_logic_vector (IRF_ADR_W-1 downto 0);
37 constant PWM_ADR : irf_adr_t := conv_std_logic_vector(P_BASE + PWM_OFF, IRF_ADR_W);
39 signal state : state_t := ready;
41 signal INNER_ACK : std_logic := '0';
43 --------------------------------------------------------------------------------
47 ACK_O <= STB_I and INNER_ACK;
49 PWM_DAT_O <= IRF_DAT_I (PWM_DAT_O'RANGE);
55 FSM : process (CLK_I, RST_I) is
57 if rising_edge(CLK_I) then
83 end architecture behavioral;