signal dma_config_i : std_logic_vector(31 downto 0);
signal apl_read_dma : std_logic;
signal debug_dma_core : std_logic_vector(31 downto 0);
- signal status_dma_core : std_logic_vector(127 downto 0);
+ signal status_dma_core : std_logic_vector(159 downto 0);
+ signal bus_wdat_last : std_logic_vector(31 downto 0);
signal do_reprogram_i : std_logic;
signal reprogram_i : std_logic;
signal restart_fpga_counter: unsigned(11 downto 0);
+
+ signal wren_addr_fifo : std_logic;
+ signal wren_length_fifo : std_logic;
+
begin
RESET_i <= RESET;
bus_stb_last <= BUS_STB_IN;
bus_read_last <= bus_read_i;
bus_write_last <= bus_write_i;
+ bus_wdat_last <= BUS_WDAT_IN;
end if;
end process;
bus_data_i <= status_dma_core(95 downto 64);
when x"77" =>
bus_data_i <= status_dma_core(127 downto 96);
+ when x"78" =>
+ bus_data_i <= status_dma_core(159 downto 128);
when others =>
bus_data_i <= x"10000000"; --"1000000000000000000" & CTRL(31 downto 19);
end case;
sender_target <= (others => '0');
sender_error <= (others => '0');
dma_control_i <= (others => '0');
- dma_start_address_i <= (others => '0');
- dma_length_i <= (others => '0');
reg_extended_trigger_information <= (others => '0');
- dma_config_i <= x"0000001f";
+ dma_config_i <= x"00000030";
+ wren_length_fifo <= '0';
+ wren_addr_fifo <= '0';
else
dma_control_i <= (others => '0');
do_reprogram_i <= '0';
+ wren_length_fifo <= '0';
+ wren_addr_fifo <= '0';
if bus_write_i = '1' and BUS_ADDR_IN(11 downto 8) = x"1" and USE_CHANNELS(channel_address) = c_YES then
case BUS_ADDR_IN(3 downto 0) is
--middle nibble is dont care
elsif bus_write_i = '1' and BUS_ADDR_IN(11 downto 8) = x"7" then
case BUS_ADDR_IN(3 downto 0) is
when x"0" =>
- dma_start_address_i <= BUS_WDAT_IN;
+ wren_addr_fifo <= '1';
when x"1" =>
- dma_length_i <= BUS_WDAT_IN;
+ wren_length_fifo <= '1';
when x"2" =>
dma_control_i <= BUS_WDAT_IN; --pulses only!
when x"3" =>
CLK_IN => CLK,
CLK_125_IN => CLK_125_IN,
- DMA_START_ADDR_IN => dma_start_address_i,
- DMA_LENGTH_IN => dma_length_i,
+ DMA_DATA_IN => bus_wdat_last,
+ DMA_LENGTH_WR_IN => wren_length_fifo,
+ DMA_ADDR_WR_IN => wren_addr_fifo,
+
DMA_CONTROL_IN => dma_control_i,
DMA_STATUS_OUT => dma_status_i,
DMA_CONFIG_IN => dma_config_i,
);
+
--------------------------------
-- SPI Flash Programming
--------------------------------