Line 62... |
Line 62... |
b_gpif_bus : inout std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
b_gpif_bus : inout std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
-- simple test "user interface" signals
|
-- simple test "user interface" signals
|
o_LEDrx : out std_logic; -- controll LED receive data
|
o_LEDrx : out std_logic; -- controll LED receive data
|
o_LEDtx : out std_logic; -- controll LED send data
|
o_LEDtx : out std_logic; -- controll LED send data
|
o_LEDrun : out std_logic; -- power LED
|
o_LEDrun : out std_logic; -- power LED
|
|
o_dummy : out std_logic; -- dummy output for otherwise unused signals
|
i_mode_switch : in std_logic_vector(2 downto 0));
|
i_mode_switch : in std_logic_vector(2 downto 0));
|
end GECKO3COM_simple_test;
|
end GECKO3COM_simple_test;
|
|
|
|
|
|
|
Line 79... |
Line 80... |
-- lenght of the message stored in the response message rom:
|
-- lenght of the message stored in the response message rom:
|
signal c_transfer_size_rom : std_logic_vector(31 downto 0) := x"0000000E";
|
signal c_transfer_size_rom : std_logic_vector(31 downto 0) := x"0000000E";
|
|
|
-- we will transmitt 1 MiB data when the pseude random number generator
|
-- we will transmitt 1 MiB data when the pseude random number generator
|
-- is used:
|
-- is used:
|
signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00100000";
|
--signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00100000";
|
|
signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00000FA0";
|
|
|
|
|
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
-- COMPONENTS
|
-- COMPONENTS
|
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
Line 214... |
Line 216... |
b_gpif_bus => b_gpif_bus);
|
b_gpif_bus => b_gpif_bus);
|
|
|
|
|
response_message_rom_1: response_message_rom
|
response_message_rom_1: response_message_rom
|
port map (
|
port map (
|
A => s_send_counter_value(3 downto 0),
|
A => s_send_counter_value(5 downto 2),
|
D => s_message_rom_data);
|
D => s_message_rom_data);
|
|
|
|
|
o_LEDrun <= '1';
|
o_LEDrun <= '1';
|
|
|
|
o_dummy <= s_send_finished or s_receive_end_of_message or s_receive_newdata
|
|
or s_receive_data_error;
|
|
|
|
|
-- purpose: converts the mode_switch input to a binary coded value
|
-- purpose: converts the mode_switch input to a binary coded value
|
-- type : combinational
|
-- type : combinational
|
-- inputs : i_mode_switch
|
-- inputs : i_mode_switch
|
-- outputs: s_mode
|
-- outputs: s_mode
|
Line 329... |
Line 334... |
elsif i_sysclk'event and i_sysclk = '1' then -- rising clock edge
|
elsif i_sysclk'event and i_sysclk = '1' then -- rising clock edge
|
if s_send_counter_reset = '1' then
|
if s_send_counter_reset = '1' then
|
s_send_counter_value <= (others => '0');
|
s_send_counter_value <= (others => '0');
|
end if;
|
end if;
|
if s_send_counter_en = '1' then
|
if s_send_counter_en = '1' then
|
s_send_counter_value <= s_send_counter_value + 1;
|
s_send_counter_value(31 downto 2) <=
|
|
s_send_counter_value(31 downto 2) + 1;
|
|
s_send_counter_value(1 downto 0) <= "00"; -- every fifo write (32bit)
|
|
-- transfers 4 bytes.
|
end if;
|
end if;
|
end if;
|
end if;
|
end process send_counter;
|
end process send_counter;
|
|
|
-- transfer size counter comparator
|
-- transfer size counter comparator
|
s_send_counter_equals_transfer_size <=
|
s_send_counter_equals_transfer_size <=
|
'1' when s_send_counter_value = s_send_transfersize else
|
'1' when s_send_counter_value >= s_send_transfersize else
|
'0';
|
'0';
|
|
|
|
|
-- purpose: subracts the send counter end value from the remaining transfer size value
|
-- purpose: subracts the send counter end value from the remaining transfer size value
|
-- type : combinational
|
-- type : combinational
|