Memory Size of rtps_builtin_endpoint made Generic

Each Entity that contains a memory will have an independent size
generic. The testbench was modified to accomodate different RAM memory
sizes. This in effect makes all Memory related stuff pre-entity
dependant. The rtps_test_package needs updated Frame Sizes for the Tests
to work properly.
This commit is contained in:
Greek 2021-02-17 10:51:57 +01:00
parent bfdc366273
commit 7244fffacd
17 changed files with 118 additions and 73 deletions

View File

@ -25,8 +25,12 @@ end entity;
architecture testbench of L0_rtps_builtin_endpoint_test1 is
-- *CONSTANT DECLARATION*
constant MAX_REMOTE_PARTICIPANTS : natural := 3;
-- *TYPE DECLARATION*
type TEST_STAGE_TYPE is (IDLE, BUSY);
type TEST_RAM_TYPE is array (0 to (MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE)-1) of std_logic_vector(WORD_WIDTH-1 downto 0);
-- *SIGNAL DECLARATION*
signal clk, in_empty, rd_sig, last_word_in, last_word_out: std_logic := '0';
@ -51,6 +55,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => MAX_REMOTE_PARTICIPANTS
)
port map (
clk => clk,
reset => reset,
@ -484,10 +491,10 @@ begin
start_test;
wait_on_complete;
TranscriptOpen(RESULTS_FILE, APPEND_MODE);
SetTranscriptMirror;
stim_done <= '1';
wait until check_done = '1';
TranscriptOpen(RESULTS_FILE, APPEND_MODE);
SetTranscriptMirror;
AlertIf((not SB_out.empty) or (not SB_mem.empty), "Incomplete test run");
ReportAlerts;
TranscriptClose;

View File

@ -144,6 +144,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => 3
)
port map (
clk => clk,
reset => reset,
@ -828,10 +831,10 @@ begin
sub_s.data := EMPTY_TEST_PACKET;
p2_sns := p2_sns + 1;
TranscriptOpen(RESULTS_FILE, APPEND_MODE);
SetTranscriptMirror;
stim_done <= '1';
wait until check_done = '1';
TranscriptOpen(RESULTS_FILE, APPEND_MODE);
SetTranscriptMirror;
AlertIf(not SB.empty, "Incomplete test run");
ReportAlerts;
TranscriptClose;

View File

@ -45,6 +45,10 @@ end entity;
architecture testbench of L0_rtps_builtin_endpoint_test3 is
-- *CONSTANT DECLARATION*
constant MAX_REMOTE_PARTICIPANTS : natural := 11;
type TEST_RAM_TYPE is array (0 to (MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE)-1) of std_logic_vector(WORD_WIDTH-1 downto 0);
-- *TYPE DECLARATION*
type TEST_STAGE_TYPE is (IDLE, BUSY);
@ -72,6 +76,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => MAX_REMOTE_PARTICIPANTS
)
port map (
clk => clk,
reset => reset,

View File

@ -17,8 +17,12 @@ end entity;
architecture testbench of L0_rtps_builtin_endpoint_test4 is
-- *CONSTANT DECLARATION*
constant MAX_REMOTE_PARTICIPANTS : natural := 4;
-- *TYPE DECLARATION*
type TEST_STAGE_TYPE is (IDLE, BUSY);
type TEST_RAM_TYPE is array (0 to (MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE)-1) of std_logic_vector(WORD_WIDTH-1 downto 0);
-- *SIGNAL DECLARATION*
signal clk, in_empty, rd_sig, last_word_in, last_word_out: std_logic := '0';
@ -44,6 +48,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => MAX_REMOTE_PARTICIPANTS
)
port map (
clk => clk,
reset => reset,

View File

@ -17,8 +17,12 @@ end entity;
architecture testbench of L0_rtps_builtin_endpoint_test5 is
-- *CONSTANT DECLARATION*
constant MAX_REMOTE_PARTICIPANTS : natural := 1;
-- *TYPE DECLARATION*
type TEST_STAGE_TYPE is (IDLE, BUSY);
type TEST_RAM_TYPE is array (0 to (MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE)-1) of std_logic_vector(WORD_WIDTH-1 downto 0);
-- *SIGNAL DECLARATION*
signal clk, in_empty, rd_sig, last_word_in, last_word_out: std_logic := '0';
@ -52,6 +56,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => MAX_REMOTE_PARTICIPANTS
)
port map (
clk => clk,
reset => reset,

View File

@ -21,8 +21,12 @@ end entity;
architecture testbench of L0_rtps_builtin_endpoint_test6 is
-- *CONSTANT DECLARATION*
constant MAX_REMOTE_PARTICIPANTS : natural := 3;
-- *TYPE DECLARATION*
type TEST_STAGE_TYPE is (IDLE, BUSY);
type TEST_RAM_TYPE is array (0 to (MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE)-1) of std_logic_vector(WORD_WIDTH-1 downto 0);
-- *SIGNAL DECLARATION*
signal clk, in_empty, rd_sig, last_word_in, last_word_out: std_logic := '0';
@ -57,6 +61,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => MAX_REMOTE_PARTICIPANTS
)
port map (
clk => clk,
reset => reset,

View File

@ -53,6 +53,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => 2
)
port map (
clk => clk,
reset => reset,

View File

@ -172,7 +172,7 @@ begin
-- NOTE: Each time a stimulus is generated, the Sequence Number is (manually) incremented
rtps_data := DEFAULT_RTPS_SUBMESSAGE;
rtps_data.submessageID := SID_DATA;
rtps_data.writerId := DEFAULT_ENTITYID;
rtps_data.writerId := DEFAULT_WRITER_ENTITYID;
rtps_data.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_data.data := RAND_DATA;
@ -249,7 +249,7 @@ begin
-- Valid DATA [Empty DATA] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
-- Finalize Packet
fix_output_packet(stimulus);
@ -267,7 +267,7 @@ begin
-- Valid DATA [META Traffic, Big Endian] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
gen_rtps_submessage(rtps_sub, stimulus);
@ -292,7 +292,7 @@ begin
-- Valid DATA [USER Traffic, Big Endian] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
gen_rtps_submessage(rtps_sub, stimulus);
@ -313,7 +313,7 @@ begin
-- Valid DATA [+7 Unknown Header Bytes] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
rtps_sub.octetsToInlineQos := int(23,16);
@ -335,7 +335,7 @@ begin
-- Valid DATA [Invalid Flags] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.flags(SUBMESSAGE_KEY_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
@ -360,7 +360,7 @@ begin
-- Valid DATA [SubLength > PackeSize] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
gen_rtps_submessage(rtps_sub, stimulus);
@ -381,7 +381,7 @@ begin
-- Valid DATA [SubLength invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
rtps_sub.submessageLength := int(16,16);
@ -405,7 +405,7 @@ begin
-- Valid DATA [Invalid writerSN] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
rtps_sub.data := RAND_DATA;
rtps_sub.writerSN := (others => (others => '0'));
@ -431,7 +431,7 @@ begin
-- Valid ACKNACK [META Traffic, Big Endian] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_ACKNACK;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
-- Valid ACKNACK [META Traffic, Little Endian] (Expected)
@ -454,7 +454,7 @@ begin
-- Valid ACKNACK [USER Traffic, Big Endian] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_ACKNACK;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
-- Finalize Packet
@ -473,7 +473,7 @@ begin
-- Invalid ACKNACK [SubLength > PacketSize] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_ACKNACK;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
stimulus.length := stimulus.length-1;
-- Finalize Packet
@ -492,7 +492,7 @@ begin
-- Invalid ACKNACK [SubLength invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_ACKNACK;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
rtps_sub.submessageLength := int(20,16);
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -514,7 +514,7 @@ begin
-- Invalid ACKNACK [readerSNState invalid (Base Invalid)] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_ACKNACK;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
rtps_sub.readerSNState.base := (others => (others => '0'));
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid DATA (Dropped)
@ -536,7 +536,7 @@ begin
-- Invalid ACKNACK [readerSNState invalid (NumBits Invalid)] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_ACKNACK;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
rtps_sub.readerSNState.numBits := int(257, 32);
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid DATA (Dropped)
@ -559,7 +559,7 @@ begin
-- Valid GAP [META Traffic, Big Endian]
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
-- Valid GAP [META Traffic, Little Endian]
@ -582,7 +582,7 @@ begin
-- Valid GAP [User Traffic, Big Endian]
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
-- Finalize Packet
@ -601,7 +601,7 @@ begin
-- Invalid GAP [SubLength > PacketSize] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
stimulus.length := stimulus.length-1;
-- Finalize Packet
@ -620,7 +620,7 @@ begin
-- Invalid GAP [SubLength invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.submessageLength := int(24,16);
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -642,7 +642,7 @@ begin
-- Invalid GAP [GapStart invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.gapStart := (others => (others => '0'));
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -664,7 +664,7 @@ begin
-- Invalid GAP [GapList invalid (Base invalid)] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.gapList.base := (others => (others => '0'));
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -686,7 +686,7 @@ begin
-- Invalid GAP [GapList invalid (NumBits invalid)] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_GAP;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.gapList.numBits := int(257,32);
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -710,7 +710,7 @@ begin
-- Valid HEARTBEAT [META Traffic, Big Endian] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
-- Valid HEARTBEAT [META Traffic, Little Endian] (Expected)
@ -733,7 +733,7 @@ begin
-- Valid HEARTBEAT [USER Traffic, Big Endian] (Expected)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
-- Finalize Packet
@ -752,7 +752,7 @@ begin
-- Invalid HEARTBEAT [SubLength > PackeSize] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
stimulus.length := stimulus.length-1;
-- Finalize Packet
@ -771,7 +771,7 @@ begin
-- Invalid HEARTBEAT [SubLength invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.submessageLength := int(24,16);
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -793,7 +793,7 @@ begin
-- Invalid HEARTBEAT [FirstSN invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.firstSN := (others => (others => '0'));
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -815,7 +815,7 @@ begin
-- Invalid HEARTBEAT [LastSN invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.lastSN := (others => (others => '1')); -- Negative
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Dropped)
@ -837,7 +837,7 @@ begin
-- Invalid HEARTBEAT [LastSN invalid] (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
rtps_sub.firstSN := ((others => '0'), unsigned(int(5,WORD_WIDTH))); -- 5
rtps_sub.lastSN := ((others => '0'), unsigned(int(1,WORD_WIDTH))); -- 1
gen_rtps_submessage(rtps_sub, stimulus);
@ -1242,7 +1242,7 @@ begin
-- Valid DATA_FRAG (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_DATA_FRAG;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Expected)
gen_rtps_submessage(rtps_data, stimulus);
@ -1251,7 +1251,7 @@ begin
-- Valid HEARTBEAT_FRAG (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_HEARTBEAT_FRAG;
rtps_sub.writerId := DEFAULT_ENTITYID;
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Expected)
gen_rtps_submessage(rtps_data, stimulus);
@ -1260,7 +1260,7 @@ begin
-- Valid NACK_FRAG (Dropped)
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
rtps_sub.submessageID := SID_NACK_FRAG;
rtps_sub.readerId := DEFAULT_ENTITYID;
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
gen_rtps_submessage(rtps_sub, stimulus);
-- Valid Data (Expected)
gen_rtps_submessage(rtps_data, stimulus);

View File

@ -12,7 +12,7 @@ use work.rtps_test_package.all;
-- This testbench tests the Output Routing of the rtps_handler. It generates stimulus for different destinations and compares the selected output to the expected.
-- This testbench covers following:
-- * METATRAFFIC/USERTRAFFIC/UKNOWN Destination Addresses (All Address/Port Combinations)
-- * METATRAFFIC/USERTRAFFIC/UNKNOWN Destination Addresses (All Address/Port Combinations)
-- * UNKNOWN/BUILT-IN/USER/ENTITY_UNKNOWN Entity Destinations
-- * READER/WRITER Source
@ -184,12 +184,12 @@ begin
when 0 =>
rtps_data.submessageID := SID_DATA;
rtps_data.readerId := tmp_id;
rtps_data.writerId := DEFAULT_ENTITYID;
rtps_data.writerId := DEFAULT_WRITER_ENTITYID;
ref3 := (NUM_ENDPOINTS => '1', NUM_READERS-1 downto 0 => '1', others => '0');
-- Reader Source
when others =>
rtps_data.submessageID := SID_ACKNACK;
rtps_data.readerId := DEFAULT_ENTITYID;
rtps_data.readerId := DEFAULT_READER_ENTITYID;
rtps_data.writerId := tmp_id;
ref3 := (NUM_ENDPOINTS => '1', NUM_ENDPOINTS-1 downto NUM_READERS => '1', others => '0');
end case;

View File

@ -379,6 +379,9 @@ begin
-- Unit Under Test
uut : entity work.rtps_builtin_endpoint(arch)
generic map (
MAX_REMOTE_PARTICIPANTS => 1
)
port map (
clk => clk,
reset => reset,

View File

@ -212,10 +212,6 @@ package user_config is
constant ENDPOINT_AUTOPURGE_NOWRITER_SAMPLES_DELAY : USER_DURATION_ARRAY_TYPE(0 to NUM_ENDPOINTS-1) := (others => DEFAULT_AUTOPURGE_NOWRITER_SAMPLES_DELAY);
constant ENDPOINT_AUTOPURGE_DISPOSED_SAMPLES_DELAY : USER_DURATION_ARRAY_TYPE(0 to NUM_ENDPOINTS-1) := (others => DEFAULT_AUTOPURGE_DISPOSED_SAMPLES_DELAY);
-- NOTE: The buffer will not only store participants, but also endpoint data
-- Used to determine the size of the builtin endpoint buffer
constant MAX_REMOTE_PARTICIPANTS : natural := 11;
-- TESTING PARAMETERS
constant TEST_STRING : string := "TEST_CONFIG_1";

View File

@ -22,13 +22,12 @@ end entity;
architecture arch of single_port_ram is
type TEST_RAM_TYPE is array (0 to MEMORY_DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
signal mem : TEST_RAM_TYPE := (others => (others => '0'));
begin
assert (TEST_RAM_TYPE'length = MEMORY_DEPTH) report "TEST_RAM_TYPE does not respect Memory Depth" severity FAILURE;
ram_prc : process(all)
begin
if rising_edge(clk) then

View File

@ -8,15 +8,16 @@ analyze ../rtps_package.vhd
analyze test_config.vhd
analyze ../rtps_config_package.vhd
analyze ../rtps_test_package.vhd
analyze test_ram.vhd
analyze ../FWFT_FIFO.vhd
analyze ../mem_ctrl.vhd
analyze ScoreBoard_test_memory.vhd
analyze ScoreBoard_builtin_endpoint.vhd
analyze ../rtps_handler.vhd
analyze ../rtps_builtin_endpoint.vhd
analyze ../rtps_out.vhd
analyze ../FWFT_FIFO.vhd
analyze Level_0/L0_rtps_handler_test1.vhd
analyze Level_0/L0_rtps_handler_test2.vhd
analyze test_ram.vhd
analyze ScoreBoard_test_memory.vhd
analyze ScoreBoard_builtin_endpoint.vhd
analyze Level_0/L0_rtps_builtin_endpoint_test1.vhd
analyze Level_0/L0_rtps_builtin_endpoint_test2.vhd
analyze Level_0/L0_rtps_builtin_endpoint_test3.vhd
@ -26,6 +27,7 @@ analyze Level_0/L0_rtps_builtin_endpoint_test6.vhd
analyze Level_0/L0_rtps_builtin_endpoint_test7.vhd
analyze Level_0/L0_rtps_out_test1.vhd
analyze Level_1/L1_rtps_builtin_endpoint_test1.vhd
#analyze Level_0/L0_mem_ctrl_test1.vhd
simulate L0_rtps_handler_test1
simulate L0_rtps_handler_test2
@ -37,4 +39,5 @@ simulate L0_rtps_builtin_endpoint_test5
simulate L0_rtps_builtin_endpoint_test6
simulate L0_rtps_builtin_endpoint_test7
simulate L0_rtps_out_test1
simulate L1_rtps_builtin_endpoint_test1
simulate L1_rtps_builtin_endpoint_test1
#simulate L0_mem_ctrl_test1

View File

@ -14,6 +14,9 @@ use work.rtps_config_package.all;
-- TODO: Parse inlineQOS HASH_KEY.
entity rtps_builtin_endpoint is
generic (
MAX_REMOTE_PARTICIPANTS : natural := 50
);
port (
clk : in std_logic; -- Input Clock
reset : in std_logic; -- Synchronous Reset
@ -116,6 +119,8 @@ architecture arch of rtps_builtin_endpoint is
--*****CONSTANT DECLARATION*****
-- Max Serialized Payload Size in a UDP Stream (Bytes) [MAX_PAYLAOD(65536) - IPv4_HEADER(20) - UDP_HEADER(8) - RTPS_HEADER(20) - DATA_HEADER(24)]
constant UDP_MAX_SIZE_SERIALIZED : natural := 65464;
-- 4-Byte Word Size of a Participant Entry in Memory
constant PARTICIPANT_FRAME_SIZE : natural := 23;
-- Memory Size in 4-Byte Words
constant BUILTIN_BUFFER_SIZE : natural := MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE;
-- Memory Address Width
@ -3244,6 +3249,7 @@ begin
-- Participant Message Sequence Number 2/2
when 20 =>
mem_participant_data_next.mes_seq_nr(1) <= unsigned(mem_read_data);
mem_rd <= '0';
-- DONE
mem_stage_next <= IDLE;
when others =>

View File

@ -34,11 +34,6 @@ package rtps_config_package is
-- participant_id=0
constant USER_IPv4_UNICAST_PORT : std_logic_vector(UDP_PORT_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(PORT_CONFIG_PB + PORT_CONFIG_D3 + PORT_CONFIG_DG*USER_DOMAIN_ID, UDP_PORT_WIDTH));
-- 4-Byte Word Size of a Participant Entry in Memory
constant PARTICIPANT_FRAME_SIZE : natural := 23;
-- Built-in Endpoint Memory Buffer 4-Byte Word Size
constant BUILTIN_BUFFER_SIZE : natural := MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE;
-- ENDPOINT FRAME OPCODES
constant ENDPOINT_MATCH_OPCODE_WIDTH: natural := 32;
constant OPCODE_ENDPOINT_MATCH : std_logic_vector(ENDPOINT_MATCH_OPCODE_WIDTH-1 downto 0) := x"55000000";

View File

@ -14,10 +14,11 @@ package rtps_test_package is
constant RESULTS_FILE : string := "./Test_Results.txt";
constant DEFAULT_GUIDPREFIX : GUIDPREFIX_TYPE; -- Deferred to Package Body
constant DEFAULT_ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0); -- Deferred to Package Body
constant PARTICIPANT_FRAME_SIZE : natural := 23;
type TEST_RAM_TYPE is array (0 to (MAX_REMOTE_PARTICIPANTS*PARTICIPANT_FRAME_SIZE)-1) of std_logic_vector(WORD_WIDTH-1 downto 0);
constant DEFAULT_GUIDPREFIX : GUIDPREFIX_TYPE; -- Deferred to Package Body
constant DEFAULT_READER_ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0); -- Deferred to Package Body
constant DEFAULT_WRITER_ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0); -- Deferred to Package Body
type MATCH_TYPE is (MATCH, UNMATCH);
@ -277,7 +278,8 @@ package body rtps_test_package is
constant DEFAULT_GUIDPREFIX : GUIDPREFIX_TYPE := (0 => x"da27cc3c", 1 => x"687ddcde", 2 => x"88bce3d1");
constant DEFAULT_ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0) := x"b9cbad04";
constant DEFAULT_READER_ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0) := x"b9cbad04";
constant DEFAULT_WRITER_ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0) := x"b9cbad03";
constant EMPTY_TEST_PACKET : TEST_PACKET_TYPE := (length => 0, data => (others => (others => '0')), last => (others => '0'));
@ -440,7 +442,7 @@ package body rtps_test_package is
reader => TRUE,
littleEndian => '0',
participant => DEFAULT_PARTICIPANT_DATA,
entityId => DEFAULT_ENTITYID,
entityId => DEFAULT_READER_ENTITYID,
topic_name => EMPTY_STRING,
type_name => EMPTY_STRING,
durability => DEFAULT_DURABILITY_QOS,

View File

@ -6,19 +6,19 @@ LIBRARY altera_mf;
USE altera_mf.altera_mf_components.all;
entity single_port_ram is
generic (
ADDR_WIDTH : natural := 8;
DATA_WIDTH : natural := 12;
MEMORY_DEPTH : natural := 256
);
port (
clk : in std_logic;
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
wen : in std_logic;
ren : in std_logic;
wr_data : in std_logic_vector(DATA_WIDTH-1 downto 0);
rd_data : out std_logic_vector(DATA_WIDTH-1 downto 0)
);
generic (
ADDR_WIDTH : natural;
DATA_WIDTH : natural;
MEMORY_DEPTH : natural
);
port (
clk : in std_logic;
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
wen : in std_logic;
ren : in std_logic;
wr_data : in std_logic_vector(DATA_WIDTH-1 downto 0);
rd_data : out std_logic_vector(DATA_WIDTH-1 downto 0)
);
end entity;
architecture arch of single_port_ram is