Re-design Key Holder interaction of DDS Reader/Writer

The DDS Writer was expecting the user to provide the serialized key
on DISPOSE/UNREGISTER operations. The user should have no direct
interaction with the serialized key.
The operation flow was changed to expect the normal payload from the
user, push it to the Key Holder, and the calculate the serialized key.
The stage that was responsible for simutanously pushing the input to
payload memory and/or the Key Holder was simplified, and the decode
error signal of the Key Holder is now handled.

The last two changes (simplified stage and decode error handling)
were also ported to the DDS Reader.
This commit is contained in:
John Ring 2023-06-22 11:33:21 +02:00
parent d2c0b37c27
commit c318b3c560
4 changed files with 431 additions and 396 deletions

View File

@ -284,6 +284,22 @@ begin
return ret; return ret;
end function; end function;
function convert_to_serialized_key(input : CACHE_CHANGE_TYPE) return CACHE_CHANGE_TYPE is
variable ret : CACHE_CHANGE_TYPE := input;
begin
if (input.serialized_key) then
return ret;
else
-- Convert Payload to Serialized Key, compatible with test_key_holder
-- (Keep Only First 4 Bytes of the Payload)
ret.serialized_key := TRUE;
ret.payload.last(3) := '1';
ret.payload.length := 4;
return ret;
end if;
end function;
procedure start_dds is procedure start_dds is
begin begin
dds_start <= '1'; dds_start <= '1';
@ -410,7 +426,6 @@ begin
-- TEST: ADD SAMPLE WITH KEY_HASH [UNKNOWN INSTANCE] -- TEST: ADD SAMPLE WITH KEY_HASH [UNKNOWN INSTANCE]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -502,7 +517,6 @@ begin
-- TEST: WRITE UNALIGNED PAYLOAD [>1 SLOT] -- TEST: WRITE UNALIGNED PAYLOAD [>1 SLOT]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,12); cc.payload := gen_payload(kh2,12);
@ -593,7 +607,6 @@ begin
-- TEST: ADD SAMPLE WITH HANDLE_NIL [KNOWN INSTANCE] -- TEST: ADD SAMPLE WITH HANDLE_NIL [KNOWN INSTANCE]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,15); cc.payload := gen_payload(kh1,15);
@ -703,7 +716,6 @@ begin
-- TEST: WRITE UNALIGNED PAYLOAD [<1 SLOT] -- TEST: WRITE UNALIGNED PAYLOAD [<1 SLOT]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,8); cc.payload := gen_payload(kh3,8);
@ -847,7 +859,6 @@ begin
-- TEST: NORMAL DISPOSE -- TEST: NORMAL DISPOSE
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -938,7 +949,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc1 := cc; cc1 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE);
@ -1006,7 +1017,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -1102,7 +1112,6 @@ begin
-- TEST: NORMAL UNREGISTER -- TEST: NORMAL UNREGISTER
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -1126,7 +1135,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc3 := cc; cc3 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 0, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 0, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 33, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 33, "Payload Memory Empty List Head incorrect", FAILURE);
@ -1195,7 +1204,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -1326,7 +1334,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,15); cc.payload := gen_payload(kh2,15);
@ -1365,7 +1372,6 @@ begin
-- INSTANCE MEMORY: 0(I4),18(I3),9(I2)/- -- INSTANCE MEMORY: 0(I4),18(I3),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -1407,7 +1413,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -1429,7 +1434,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 54, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 54, "Payload Memory Empty List Head incorrect", FAILURE);
@ -1534,7 +1539,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -1605,7 +1609,6 @@ begin
-- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -1638,7 +1641,6 @@ begin
-- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,10); cc.payload := gen_payload(kh2,10);
@ -1715,7 +1717,6 @@ begin
-- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -1902,7 +1903,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,5); cc.payload := gen_payload(kh2,5);
@ -1924,7 +1924,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc3 := cc; cc3 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 44, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 44, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE);
@ -1955,7 +1955,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,20); cc.payload := gen_payload(kh4,20);
@ -2044,7 +2043,6 @@ begin
-- TEST: UNREGISTER INSTANCE ON PAYLOAD MEMORY FULL [WITHOUT ACKed SAMPLES] -- TEST: UNREGISTER INSTANCE ON PAYLOAD MEMORY FULL [WITHOUT ACKed SAMPLES]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -2104,7 +2102,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc2 := cc; cc2 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 54, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 54, "Payload Memory Empty List Head incorrect", FAILURE);
@ -2121,7 +2119,6 @@ begin
-- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I1),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -2205,7 +2202,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc1 := cc; cc1 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 22, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 22, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 33, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 33, "Payload Memory Empty List Head incorrect", FAILURE);
@ -2322,7 +2319,6 @@ begin
-- INSTANCE MEMORY: 18(I3),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I3),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,10); cc.payload := gen_payload(kh3,10);
@ -2363,7 +2359,6 @@ begin
-- INSTANCE MEMORY: 18(I3),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I3),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -2402,7 +2397,6 @@ begin
-- INSTANCE MEMORY: 18(I3),0(I4),9(I2)/- -- INSTANCE MEMORY: 18(I3),0(I4),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,10); cc.payload := gen_payload(kh2,10);
@ -2489,7 +2483,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,5); cc.payload := gen_payload(kh4,5);
@ -2511,7 +2504,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc1 := cc; cc1 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 22, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 22, "Payload Memory Empty List Head incorrect", FAILURE);
@ -2542,7 +2535,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -2625,7 +2617,6 @@ begin
-- INSTANCE MEMORY: 18(I2),9(I3),0(I4)/- -- INSTANCE MEMORY: 18(I2),9(I3),0(I4)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,5); cc.payload := gen_payload(kh2,5);
@ -2647,7 +2638,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc1 := cc; cc1 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 0, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 0, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE);
@ -2664,7 +2655,6 @@ begin
-- INSTANCE MEMORY: 0(I1),18(I3),9(I2)/- -- INSTANCE MEMORY: 0(I1),18(I3),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -2688,7 +2678,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 33, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 33, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 22, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 22, "Payload Memory Empty List Head incorrect", FAILURE);
@ -2700,7 +2690,6 @@ begin
-- TEST: ADD SAMPLE ON MAX_SAMPLES & MAX_INSTANCES [UNKNOWN INSTANCE,WITH STALE INSTANCE, WITHOUT ACKed SAMPLE] -- TEST: ADD SAMPLE ON MAX_SAMPLES & MAX_INSTANCES [UNKNOWN INSTANCE,WITH STALE INSTANCE, WITHOUT ACKed SAMPLE]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -2804,7 +2793,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -2906,7 +2894,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,10); cc.payload := gen_payload(kh3,10);
@ -2948,7 +2935,6 @@ begin
-- INSTANCE MEMORY: 0(I1),18(I3),9(I2)/- -- INSTANCE MEMORY: 0(I1),18(I3),9(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -2972,7 +2958,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,5); cc.payload := gen_payload(kh4,5);
@ -3027,7 +3012,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -3121,7 +3105,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 0, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 0, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 0, "Payload Memory Empty List Head incorrect", FAILURE);
@ -3146,7 +3130,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -3170,7 +3153,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc3 := cc; cc3 := convert_to_serialized_key(cc);
-- WRITER 0 -- WRITER 0
AlertIf(empty_sample_head(0) /= 44, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(0) /= 44, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(0) /= 33, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(0) /= 33, "Payload Memory Empty List Head incorrect", FAILURE);
@ -3213,7 +3196,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,10); cc.payload := gen_payload(kh4,10);
@ -3364,7 +3346,6 @@ begin
-- INSTANCE MEMORY: 9(I4),0(I1),18(I2)/- -- INSTANCE MEMORY: 9(I4),0(I1),18(I2)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,10); cc.payload := gen_payload(kh2,10);
@ -3428,7 +3409,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -3505,7 +3485,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,10); cc.payload := gen_payload(kh2,10);
@ -3606,7 +3585,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -3631,7 +3609,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,10); cc.payload := gen_payload(kh3,10);
@ -3685,7 +3662,6 @@ begin
-- TEST: ADD SAMPLE WITH KEY_HASH -- TEST: ADD SAMPLE WITH KEY_HASH
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -3747,7 +3723,6 @@ begin
-- TEST: WRITE UNALIGNED PAYLOAD [>1 SLOT] -- TEST: WRITE UNALIGNED PAYLOAD [>1 SLOT]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,18); cc.payload := gen_payload(kh1,18);
@ -3772,7 +3747,6 @@ begin
-- PAYLOAD MEMORY: 0(S1),11(S2),22(S2)/33,44 -- PAYLOAD MEMORY: 0(S1),11(S2),22(S2)/33,44
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,10); cc.payload := gen_payload(kh2,10);
@ -3796,7 +3770,6 @@ begin
-- TEST: WRITE UNALIGNED PAYLOAD [<1 SLOT] -- TEST: WRITE UNALIGNED PAYLOAD [<1 SLOT]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -3903,7 +3876,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -3930,7 +3902,6 @@ begin
-- PAYLOAD MEMORY: 0(S1),11(S2),22(S2),33(S3),44(S4)/- -- PAYLOAD MEMORY: 0(S1),11(S2),22(S2),33(S3),44(S4)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -3994,7 +3965,6 @@ begin
-- PAYLOAD MEMORY: 11(S2),22(S2),33(S3),44(S4),0(S5)/- -- PAYLOAD MEMORY: 11(S2),22(S2),33(S3),44(S4),0(S5)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,10); cc.payload := gen_payload(kh1,10);
@ -4065,7 +4035,6 @@ begin
-- PAYLOAD MEMORY: 11(S2),22(S2),44(S4),0(S5),33(S6)/- -- PAYLOAD MEMORY: 11(S2),22(S2),44(S4),0(S5),33(S6)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -4126,7 +4095,6 @@ begin
-- PAYLOAD MEMORY: 44(S4),0(S5),33(S6),11(S7)/22 -- PAYLOAD MEMORY: 44(S4),0(S5),33(S6),11(S7)/22
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -4257,7 +4225,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -4284,7 +4251,6 @@ begin
-- PAYLOAD MEMORY: 44(S4),11(S7),22(S8),0(S9)/33 -- PAYLOAD MEMORY: 44(S4),11(S7),22(S8),0(S9)/33
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -4320,7 +4286,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,20); cc.payload := gen_payload(kh1,20);
@ -4495,7 +4460,6 @@ begin
-- TEST: ADD SAMPLE WITH KEY_HASH [UNKNOWN INSTANCE] -- TEST: ADD SAMPLE WITH KEY_HASH [UNKNOWN INSTANCE]
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,9); cc.payload := gen_payload(kh1,9);
@ -4559,7 +4523,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,16); cc.payload := gen_payload(kh1,16);
@ -4588,7 +4551,6 @@ begin
-- INSTANCE MEMORY: 0(I1)/9,18 -- INSTANCE MEMORY: 0(I1)/9,18
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,5); cc.payload := gen_payload(kh2,5);
@ -4639,7 +4601,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc3 := cc; cc3 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 40, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 40, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 18, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 18, "Instance Memory Empty List Head incorrect", FAILURE);
@ -4717,7 +4679,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -4747,7 +4708,6 @@ begin
-- INSTANCE MEMORY: 9(I2),0(I1)/18 -- INSTANCE MEMORY: 9(I2),0(I1)/18
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);
@ -4787,7 +4747,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);
@ -4873,7 +4832,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -4892,7 +4850,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc2 := cc; cc2 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 20, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 20, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -4910,7 +4868,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,18); cc.payload := gen_payload(kh2,18);
@ -4988,7 +4945,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -5007,7 +4963,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc2 := cc; cc2 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 22, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 22, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 54, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 54, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5074,7 +5030,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -5094,7 +5049,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 54, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 54, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5112,7 +5067,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,5); cc.payload := gen_payload(kh2,5);
@ -5131,7 +5085,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc2 := cc; cc2 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 44, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 44, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 54, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 54, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5167,7 +5121,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,9); cc.payload := gen_payload(kh4,9);
@ -5238,7 +5191,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -5319,7 +5271,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -5345,7 +5296,6 @@ begin
-- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/- -- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -5382,7 +5332,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -5419,7 +5368,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,5); cc.payload := gen_payload(kh2,5);
@ -5439,7 +5387,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc3 := cc; cc3 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 10, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 10, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5497,7 +5445,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,5); cc.payload := gen_payload(kh4,5);
@ -5514,7 +5461,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 20, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 20, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5523,7 +5470,6 @@ begin
-- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/- -- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -5562,7 +5508,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 10, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 10, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5571,7 +5517,6 @@ begin
-- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/- -- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);
@ -5600,7 +5545,6 @@ begin
-- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/- -- INSTANCE MEMORY: 0(I2),9(I4),18(I3)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);
@ -5637,7 +5581,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);
@ -5674,7 +5617,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);
@ -5752,7 +5694,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -5774,7 +5715,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,9); cc.payload := gen_payload(kh1,9);
@ -5804,7 +5744,6 @@ begin
-- INSTANCE MEMORY: 9(I1),0(I2),18(I3)/- -- INSTANCE MEMORY: 9(I1),0(I2),18(I3)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,9); cc.payload := gen_payload(kh4,9);
@ -5891,7 +5830,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -5936,7 +5874,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh1; cc.instance := kh1;
cc.payload := gen_payload(kh1,5); cc.payload := gen_payload(kh1,5);
@ -5953,7 +5890,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc4 := cc; cc4 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 44, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 44, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 30, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 30, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -5984,7 +5921,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -6004,7 +5940,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_UNREGISTERED; cc.kind := NOT_ALIVE_UNREGISTERED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -6021,7 +5956,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc2 := cc; cc2 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 11, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 11, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 20, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 20, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -6030,7 +5965,6 @@ begin
-- INSTANCE MEMORY: 0(I4),9(I1),18(I3)/- -- INSTANCE MEMORY: 0(I4),9(I1),18(I3)/-
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := TRUE;
cc.kind := NOT_ALIVE_DISPOSED; cc.kind := NOT_ALIVE_DISPOSED;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,5); cc.payload := gen_payload(kh3,5);
@ -6049,7 +5983,7 @@ begin
start_dds; start_dds;
wait_on_sig(dds_done); wait_on_sig(dds_done);
wait_on_idle; wait_on_idle;
cc1 := cc; cc1 := convert_to_serialized_key(cc);
AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE); AlertIf(empty_sample_head(2) /= 33, "Sample Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_payload_head(2) /= 10, "Payload Memory Empty List Head incorrect", FAILURE); AlertIf(empty_payload_head(2) /= 10, "Payload Memory Empty List Head incorrect", FAILURE);
AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE); AlertIf(empty_inst_head(2) /= 26, "Instance Memory Empty List Head incorrect", FAILURE);
@ -6076,7 +6010,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -6152,7 +6085,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -6196,7 +6128,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh4; cc.instance := kh4;
cc.payload := gen_payload(kh4,9); cc.payload := gen_payload(kh4,9);
@ -6257,7 +6188,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh2; cc.instance := kh2;
cc.payload := gen_payload(kh2,9); cc.payload := gen_payload(kh2,9);
@ -6345,7 +6275,6 @@ begin
wait_on_idle; wait_on_idle;
cc := DEFAULT_CACHE_CHANGE; cc := DEFAULT_CACHE_CHANGE;
cc.serialized_key := FALSE;
cc.kind := ALIVE; cc.kind := ALIVE;
cc.instance := kh3; cc.instance := kh3;
cc.payload := gen_payload(kh3,9); cc.payload := gen_payload(kh3,9);

View File

@ -9,7 +9,7 @@ architecture test of key_holder is
--*****TYPE DECLARATION***** --*****TYPE DECLARATION*****
-- FSM states. Explained below in detail -- FSM states. Explained below in detail
type STAGE_TYPE is (IDLE,SKIP_PAYLOAD,GET_KEY_HASH,PUSH_KEY_HASH); type STAGE_TYPE is (IDLE,SKIP_PAYLOAD,GET_KEY_HASH,PUSH_KEY_HASH,PUSH_SERIALIZED_KEY);
-- ###GENERATED END### -- ###GENERATED END###
-- *MAIN PROCESS* -- *MAIN PROCESS*
@ -54,7 +54,7 @@ begin
cnt_next <= 0; cnt_next <= 0;
when READ_SERIALIZED_KEY => when READ_SERIALIZED_KEY =>
ack <= '1'; ack <= '1';
stage_next <= PUSH_KEY_HASH; stage_next <= PUSH_SERIALIZED_KEY;
cnt_next <= 0; cnt_next <= 0;
when others => when others =>
null; null;
@ -123,6 +123,45 @@ begin
when others => when others =>
null; null;
end case; end case;
when PUSH_SERIALIZED_KEY =>
case (cnt) is
-- Key Hash 1/4
when 0 =>
data_out <= not key_hash(0);
valid_out <= '1';
-- Output Guard
if (ready_out = '1') then
cnt_next <= cnt + 1;
end if;
-- Key Hash 2/4
when 1 =>
data_out <= not key_hash(1);
valid_out <= '1';
-- Output Guard
if (ready_out = '1') then
cnt_next <= cnt + 1;
end if;
-- Key Hash 3/4
when 2 =>
data_out <= not key_hash(2);
valid_out <= '1';
-- Output Guard
if (ready_out = '1') then
cnt_next <= cnt + 1;
end if;
-- Key Hash 4/4
when 3 =>
data_out <= not key_hash(3);
valid_out <= '1';
last_word_out <= '1';
-- Output Guard
if (ready_out = '1') then
-- DONE
stage_next <= IDLE;
end if;
when others =>
null;
end case;
when others => when others =>
null; null;
end case; end case;

View File

@ -606,7 +606,7 @@ architecture arch of dds_reader is
--*****TYPE DECLARATION***** --*****TYPE DECLARATION*****
-- FSM states. Explained below in detail -- FSM states. Explained below in detail
type STAGE_TYPE is (IDLE, RETURN_DDS, RETURN_RTPS, ADD_SAMPLE_INFO, ADD_PAYLOAD, NEXT_PAYLOAD_SLOT, ALIGN_PAYLOAD, GET_KEY_HASH, INITIATE_INSTANCE_SEARCH, type STAGE_TYPE is (IDLE, RETURN_DDS, RETURN_RTPS, ADD_SAMPLE_INFO, PROCESS_INPUT, NEXT_PAYLOAD_SLOT, ALIGN_PAYLOAD, GET_KEY_HASH, INITIATE_INSTANCE_SEARCH,
FILTER_STAGE, UPDATE_INSTANCE, FINALIZE_PAYLOAD, PRE_SAMPLE_FINALIZE, FIND_POS, FIX_POINTERS, FINALIZE_SAMPLE, GENERATE_SAMPLE, GET_OLDEST_SAMPLE_INSTANCE, FILTER_STAGE, UPDATE_INSTANCE, FINALIZE_PAYLOAD, PRE_SAMPLE_FINALIZE, FIND_POS, FIX_POINTERS, FINALIZE_SAMPLE, GENERATE_SAMPLE, GET_OLDEST_SAMPLE_INSTANCE,
FIND_OLDEST_INST_SAMPLE, REMOVE_SAMPLE, POST_SAMPLE_REMOVE, SKIP_AND_RETURN, REMOVE_WRITER, REMOVE_STALE_INSTANCE, WAIT_READ, GET_PAYLOAD, CHECK_LIFESPAN, FIND_OLDEST_INST_SAMPLE, REMOVE_SAMPLE, POST_SAMPLE_REMOVE, SKIP_AND_RETURN, REMOVE_WRITER, REMOVE_STALE_INSTANCE, WAIT_READ, GET_PAYLOAD, CHECK_LIFESPAN,
PROCESS_PENDING_SAMPLE_GENERATION, GET_SAMPLE_REJECTED_STATUS, GET_REQUESTED_DEADLINE_MISSED_STATUS, CHECK_DEADLINE, RESET_SAMPLE_MEMORY, RESET_PAYLOAD_MEMORY); PROCESS_PENDING_SAMPLE_GENERATION, GET_SAMPLE_REJECTED_STATUS, GET_REQUESTED_DEADLINE_MISSED_STATUS, CHECK_DEADLINE, RESET_SAMPLE_MEMORY, RESET_PAYLOAD_MEMORY);
@ -704,7 +704,7 @@ architecture arch of dds_reader is
signal inst_abort_read_i : std_logic_vector(0 to NUM_READERS-1); signal inst_abort_read_i : std_logic_vector(0 to NUM_READERS-1);
-- *KEY HOLDER CONNECTION SIGNALS* -- *KEY HOLDER CONNECTION SIGNALS*
signal start_kh, ack_kh, valid_in_kh, ready_in_kh, last_word_in_kh, valid_out_kh, ready_out_kh, last_word_out_kh, abort_kh : std_logic_vector(0 to NUM_READERS-1); signal start_kh, ack_kh, valid_in_kh, ready_in_kh, last_word_in_kh, valid_out_kh, ready_out_kh, last_word_out_kh, abort_kh, decode_error_kh : std_logic_vector(0 to NUM_READERS-1);
signal opcode_kh : KEY_HOLDER_OPCODE_ARRAY_TYPE(0 to NUM_READERS-1); signal opcode_kh : KEY_HOLDER_OPCODE_ARRAY_TYPE(0 to NUM_READERS-1);
signal data_in_kh, data_out_kh : WORD_ARRAY_TYPE(0 to NUM_READERS-1); signal data_in_kh, data_out_kh : WORD_ARRAY_TYPE(0 to NUM_READERS-1);
@ -1001,7 +1001,7 @@ begin
start => start_kh(i), start => start_kh(i),
opcode => opcode_kh(i), opcode => opcode_kh(i),
ack => ack_kh(i), ack => ack_kh(i),
decode_error => open, decode_error => decode_error_kh(i),
abort => abort_kh(i), abort => abort_kh(i),
-- INPUT -- INPUT
ready_in => ready_out_kh(i), ready_in => ready_out_kh(i),
@ -1193,7 +1193,7 @@ begin
-- RETURN_DDS Return latched DDS Return Code -- RETURN_DDS Return latched DDS Return Code
-- RETURN_RTPS Return latched RTPS Return Code -- RETURN_RTPS Return latched RTPS Return Code
-- ADD_SAMPLE_INFO Latch and store Cache Change (pre-payload) -- ADD_SAMPLE_INFO Latch and store Cache Change (pre-payload)
-- ADD_PAYLOAD Push payload to memory and key hash generator (as needed) -- PROCESS_INPUT Push payload to memory and/or Key Holder (as needed)
-- NEXT_PAYLOAD_SLOT Get pointer to next empty payload slot -- NEXT_PAYLOAD_SLOT Get pointer to next empty payload slot
-- ALIGN_PAYLOAD Store the offset of the actual payload in the last address of the last payload slot. -- ALIGN_PAYLOAD Store the offset of the actual payload in the last address of the last payload slot.
-- GET_KEY_HASH Fetch the calculated key hash from the Key Hash Generator -- GET_KEY_HASH Fetch the calculated key hash from the Key Hash Generator
@ -1684,7 +1684,7 @@ begin
if (has_key_hash = '0') then if (has_key_hash = '0') then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
elsif (has_data = '1') then elsif (has_data = '1') then
stage_next <= ADD_PAYLOAD; stage_next <= PROCESS_INPUT;
cnt_next <= 0; cnt_next <= 0;
payload_cnt_next <= 1; payload_cnt_next <= 1;
else else
@ -1705,20 +1705,14 @@ begin
end if; end if;
if (ack_kh(ind) = '1') then if (ack_kh(ind) = '1') then
-- Payload is Serialized Key stage_next <= PROCESS_INPUT;
if (has_data = '0') then cnt_next <= 0; -- Process Input
stage_next <= ADD_PAYLOAD;
cnt_next <= 1;
else
stage_next <= ADD_PAYLOAD;
cnt_next <= 0;
payload_cnt_next <= 1; payload_cnt_next <= 1;
end if; end if;
end if;
when others => when others =>
null; null;
end case; end case;
when ADD_PAYLOAD => when PROCESS_INPUT =>
-- Precondition (if has_data = '1'): cur_payload set (Current Slot) -- Precondition (if has_data = '1'): cur_payload set (Current Slot)
-- NOTE: This state is responsible for reading the payload and writing it through to the local payload memory -- NOTE: This state is responsible for reading the payload and writing it through to the local payload memory
@ -1729,94 +1723,59 @@ begin
-- 0 0 There is no payload to write, but the input contains the serialized key for the KHG -- 0 0 There is no payload to write, but the input contains the serialized key for the KHG
case (cnt) is case (cnt) is
-- Push to memory -- Process Input
when 0 => when 0 =>
-- Input Guard -- Input Guard
if (valid_in_rtps(ind) = '1') then if (valid_in_rtps(ind) = '1') then
payload_valid_in <= '1'; -- Payload Memory
payload_addr <= cur_payload + payload_cnt; payload_addr <= cur_payload + payload_cnt;
payload_write_data <= data_in_rtps(ind); payload_write_data <= data_in_rtps(ind);
-- Memory Control Flow Guard -- Key Holder
if (payload_ready_in = '1') then
-- Key Hash needs to be calculated
if (CONFIG_ARRAY_T(ind).WITH_KEY and has_key_hash = '0') then
cnt_next <= cnt + 1;
else
ready_in_rtps(ind) <= '1';
-- End of Payload
if (last_word_in_rtps(ind) = '1') then
-- End of Payload Slot
if (payload_cnt = PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= INITIATE_INSTANCE_SEARCH;
else
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0;
end if;
else
-- End of Payload Slot
if (payload_cnt = PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= NEXT_PAYLOAD_SLOT;
cnt_next <= 0;
else
-- Next Word
payload_cnt_next <= payload_cnt + 1;
end if;
end if;
end if;
end if;
end if;
-- Push to KHG
when 1 =>
assert (CONFIG_ARRAY_T(ind).WITH_KEY) severity FAILURE;
-- Input Guard
if (valid_in_rtps(ind) = '1') then
valid_out_kh(ind) <= '1';
data_out_kh(ind) <= data_in_rtps(ind); data_out_kh(ind) <= data_in_rtps(ind);
last_word_out_kh(ind) <= last_word_in_rtps(ind);
-- Output Guard -- Control Flow Guard
if (ready_out_kh(ind) = '1') then if ((((not has_data) or payload_ready_in) = '1') and (((has_key_hash) or ready_out_kh(ind)) = '1')) then
ready_in_rtps(ind) <= '1'; ready_in_rtps(ind) <= '1';
if (has_data = '1') then if (has_data = '1') then
-- End of Payload payload_valid_in <= '1';
if (last_word_in_rtps(ind) = '1') then
last_word_out_kh(ind) <= '1';
-- End of Payload Slot
if (payload_cnt = PAYLOAD_FRAME_SIZE(ind)-1) then
-- Fetch the Key Hash
stage_next <= GET_KEY_HASH;
cnt_next <= 0;
payload_cnt_next <= 0;
else
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0;
end if;
else
-- End of Payload Slot -- End of Payload Slot
if (payload_cnt = PAYLOAD_FRAME_SIZE(ind)-1) then if (payload_cnt = PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= NEXT_PAYLOAD_SLOT; stage_next <= NEXT_PAYLOAD_SLOT;
cnt_next <= 0; cnt_next <= 0;
else else
-- Next Word -- Next Word
cnt_next <= 0; -- PUSH TO MEMORY
payload_cnt_next <= payload_cnt + 1; payload_cnt_next <= payload_cnt + 1;
end if; end if;
end if; end if;
else
-- End of Payload if (has_key_hash = '0') then
valid_out_kh(ind) <= '1';
end if;
-- End of Input
if (last_word_in_rtps(ind) = '1') then if (last_word_in_rtps(ind) = '1') then
last_word_out_kh(ind) <= '1'; -- Overrule
stage_next <= PROCESS_INPUT;
cnt_next <= cnt + 1;
payload_cnt_next <= payload_cnt;
end if;
end if;
end if;
-- Post Input Process
when 1 =>
-- Payload Unaligned
if (has_data = '1' and payload_cnt /= PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0; -- Mark Payload as Unaligned
elsif (has_key_hash = '0') then
-- Fetch the Key Hash -- Fetch the Key Hash
stage_next <= GET_KEY_HASH; stage_next <= GET_KEY_HASH;
cnt_next <= 0; cnt_next <= 0; -- Initiate READ Operation
payload_cnt_next <= 0; payload_cnt_next <= 0;
else else
-- Next Word stage_next <= INITIATE_INSTANCE_SEARCH;
cnt_next <= 1; -- Same Sub-state
end if;
end if;
end if;
end if; end if;
when others => when others =>
null; null;
@ -1858,7 +1817,7 @@ begin
else else
-- Latch next Payload Slot and Continue -- Latch next Payload Slot and Continue
cur_payload_next <= resize(unsigned(payload_read_data),PAYLOAD_MEMORY_ADDR_WIDTH); cur_payload_next <= resize(unsigned(payload_read_data),PAYLOAD_MEMORY_ADDR_WIDTH);
stage_next <= ADD_PAYLOAD; stage_next <= PROCESS_INPUT;
cnt_next <= 0; cnt_next <= 0;
payload_cnt_next <= 1; payload_cnt_next <= 1;
end if; end if;
@ -1904,12 +1863,21 @@ begin
case (cnt) is case (cnt) is
-- Initiate READ Operation -- Initiate READ Operation
when 0 => when 0 =>
-- Key Holder Decode Error
if (decode_error_kh(ind) = '1') then
done_dds(ind) <= '1';
return_code_dds(ind) <= RETCODE_ERROR;
-- DONE
stage_next <= IDLE;
else
start_kh(ind) <= '1'; start_kh(ind) <= '1';
opcode_kh(ind) <= READ_KEY_HASH; opcode_kh(ind) <= READ_KEY_HASH;
if (ack_kh(ind) = '1') then if (ack_kh(ind) = '1') then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
end if; end if;
end if;
-- READ Key Hash -- READ Key Hash
when 1 => when 1 =>
ready_in_kh(ind) <= '1'; ready_in_kh(ind) <= '1';
@ -1922,7 +1890,7 @@ begin
-- Exit Condition -- Exit Condition
if (last_word_in_kh(ind) = '1') then if (last_word_in_kh(ind) = '1') then
-- DONE -- Exit
stage_next <= INITIATE_INSTANCE_SEARCH; stage_next <= INITIATE_INSTANCE_SEARCH;
end if; end if;
end if; end if;

View File

@ -524,7 +524,7 @@ architecture arch of dds_writer is
--*****TYPE DECLARATION***** --*****TYPE DECLARATION*****
-- FSM states. Explained below in detail -- FSM states. Explained below in detail
type STAGE_TYPE is (IDLE, UNKNOWN_OPERATION_DDS, UNKNOWN_OPERATION_RTPS, UNKNOWN_SEQ_NR, ASSERT_LIVELINESS, ADD_SAMPLE_INFO, ADD_PAYLOAD, NEXT_PAYLOAD_SLOT, type STAGE_TYPE is (IDLE, UNKNOWN_OPERATION_DDS, UNKNOWN_OPERATION_RTPS, UNKNOWN_SEQ_NR, ASSERT_LIVELINESS, ADD_SAMPLE_INFO, PROCESS_INPUT, GET_SERIALIZED_KEY, NEXT_PAYLOAD_SLOT,
ALIGN_PAYLOAD, GET_KEY_HASH, INITIATE_INSTANCE_SEARCH, REGISTER_OPERATION, LOOKUP_OPERATION, PUSH_KEY_HASH, FILTER_STAGE, UPDATE_INSTANCE, CHECK_ACK_WAIT, ALIGN_PAYLOAD, GET_KEY_HASH, INITIATE_INSTANCE_SEARCH, REGISTER_OPERATION, LOOKUP_OPERATION, PUSH_KEY_HASH, FILTER_STAGE, UPDATE_INSTANCE, CHECK_ACK_WAIT,
FINALIZE_PAYLOAD, FINALIZE_SAMPLE, GET_OLDEST_SAMPLE_INSTANCE, FIND_SAMPLE, REMOVE_ORPHAN_SAMPLES, REMOVE_SAMPLE, FINALIZE_PAYLOAD, FINALIZE_SAMPLE, GET_OLDEST_SAMPLE_INSTANCE, FIND_SAMPLE, REMOVE_ORPHAN_SAMPLES, REMOVE_SAMPLE,
POST_SAMPLE_REMOVE, SKIP_AND_RETURN, SKIP, REMOVE_STALE_INSTANCE, GET_SEQ_NR, FIND_SEQ_NR, ACKNACK_SAMPLE, GET_SAMPLE, GET_PAYLOAD, POST_SAMPLE_REMOVE, SKIP_AND_RETURN, SKIP, REMOVE_STALE_INSTANCE, GET_SEQ_NR, FIND_SEQ_NR, ACKNACK_SAMPLE, GET_SAMPLE, GET_PAYLOAD,
@ -611,7 +611,7 @@ architecture arch of dds_writer is
signal inst_abort_read_i : std_logic_vector(0 to NUM_WRITERS-1); signal inst_abort_read_i : std_logic_vector(0 to NUM_WRITERS-1);
-- *KEY HOLDER CONNECTION SIGNALS* -- *KEY HOLDER CONNECTION SIGNALS*
signal start_kh, ack_kh, valid_in_kh, ready_in_kh, last_word_in_kh, valid_out_kh, ready_out_kh, last_word_out_kh, abort_kh : std_logic_vector(0 to NUM_WRITERS-1); signal start_kh, ack_kh, valid_in_kh, ready_in_kh, last_word_in_kh, valid_out_kh, ready_out_kh, last_word_out_kh, abort_kh, decode_error_kh : std_logic_vector(0 to NUM_WRITERS-1);
signal opcode_kh : KEY_HOLDER_OPCODE_ARRAY_TYPE(0 to NUM_WRITERS-1); signal opcode_kh : KEY_HOLDER_OPCODE_ARRAY_TYPE(0 to NUM_WRITERS-1);
signal data_in_kh, data_out_kh : WORD_ARRAY_TYPE(0 to NUM_WRITERS-1); signal data_in_kh, data_out_kh : WORD_ARRAY_TYPE(0 to NUM_WRITERS-1);
@ -717,6 +717,12 @@ architecture arch of dds_writer is
signal orphan_samples, orphan_samples_next : std_logic; signal orphan_samples, orphan_samples_next : std_logic;
-- Signal used to index the writers -- Signal used to index the writers
signal ind, ind_next : natural range 0 to NUM_WRITERS-1; signal ind, ind_next : natural range 0 to NUM_WRITERS-1;
-- Denotes if payload from input is stored in payload memory
signal store_payload, store_payload_next : std_logic;
-- Denotes if calculated serialized key is stored in payload memory (Mutually Exclusive with 'store_payload')
signal store_serialized_key, store_serialized_key_next : std_logic;
-- Denotes if a Key Holder Operation is necessary, and thus if the input payload need to be pushed to the Key Holder.
signal need_kh_op, need_kh_op_next : std_logic;
-- Test signals used in testbenches -- Test signals used in testbenches
signal idle_sig : std_logic; signal idle_sig : std_logic;
signal empty_inst_head_sig : NATURAL_ARRAY_TYPE; signal empty_inst_head_sig : NATURAL_ARRAY_TYPE;
@ -828,7 +834,7 @@ begin
start => start_kh(i), start => start_kh(i),
opcode => opcode_kh(i), opcode => opcode_kh(i),
ack => ack_kh(i), ack => ack_kh(i),
decode_error => open, decode_error => decode_error_kh(i),
abort => abort_kh(i), abort => abort_kh(i),
-- INPUT -- INPUT
ready_in => ready_out_kh(i), ready_in => ready_out_kh(i),
@ -987,10 +993,11 @@ begin
-- UNKNOWN_SEQ_NR Dummy State for RTPS Operation with unknown Sequence Number -- UNKNOWN_SEQ_NR Dummy State for RTPS Operation with unknown Sequence Number
-- ASSERT_LIVELINESS Propagate Liveliness Assertion to RTPS -- ASSERT_LIVELINESS Propagate Liveliness Assertion to RTPS
-- ADD_SAMPLE_INFO Latch and store Cache Change (pre-payload) -- ADD_SAMPLE_INFO Latch and store Cache Change (pre-payload)
-- ADD_PAYLOAD Push payload to memory and key hash generator (as needed) -- PROCESS_INPUT Consume input and push to memory and/or Key Holder (as needed)
-- GET_SERIALIZED_KEY Fetch calculated serialized key from the Key Holder
-- NEXT_PAYLOAD_SLOT Get pointer to next empty payload slot -- NEXT_PAYLOAD_SLOT Get pointer to next empty payload slot
-- ALIGN_PAYLOAD Store the offset of the actual payload in the last address of the last payload slot. -- ALIGN_PAYLOAD Store the offset of the actual payload in the last address of the last payload slot.
-- GET_KEY_HASH Fetch the calculated key hash from the Key Hash Generator -- GET_KEY_HASH Fetch the calculated key hash from the Key Holder
-- INITIATE_INSTANCE_SEARCH Initiate Instance Search Memory Operation. This state is used to start the Search operation as soon as the required data is available -- INITIATE_INSTANCE_SEARCH Initiate Instance Search Memory Operation. This state is used to start the Search operation as soon as the required data is available
-- REGISTER_OPERATION Insert new Instance into Memory, or Re-register an existing Unregistered Instance -- REGISTER_OPERATION Insert new Instance into Memory, or Re-register an existing Unregistered Instance
-- LOOKUP_OPERATION Check Instance lookup results and return special value in case Instance was not found. -- LOOKUP_OPERATION Check Instance lookup results and return special value in case Instance was not found.
@ -1089,6 +1096,9 @@ begin
key_hash_next <= key_hash; key_hash_next <= key_hash;
return_code_latch_next <= return_code_latch; return_code_latch_next <= return_code_latch;
ind_next <= ind; ind_next <= ind;
store_serialized_key_next <= store_serialized_key;
store_payload_next <= store_payload;
need_kh_op_next <= need_kh_op;
-- DEFAULT Unregistered -- DEFAULT Unregistered
inst_opcode <= NOP; inst_opcode <= NOP;
ret_rtps <= (others => ERROR); ret_rtps <= (others => ERROR);
@ -1303,19 +1313,23 @@ begin
key_hash_next <= KEY_HASH_NIL; key_hash_next <= KEY_HASH_NIL;
new_sample_next <= SAMPLE_MEMORY_MAX_ADDRESS; new_sample_next <= SAMPLE_MEMORY_MAX_ADDRESS;
return_code_latch_next <= RETCODE_UNSUPPORTED; return_code_latch_next <= RETCODE_UNSUPPORTED;
store_serialized_key_next <= '0';
store_payload_next <= '0';
need_kh_op_next <= '0';
case (opcode_dds(ind)) is case (opcode_dds(ind)) is
when REGISTER_INSTANCE => when REGISTER_INSTANCE =>
-- Synthesis Guard -- Synthesis Guard
if (CONFIG_ARRAY_T(ind).WITH_KEY) then if (CONFIG_ARRAY_T(ind).WITH_KEY) then
need_kh_op_next <= '1';
start_kh(ind) <= '1'; start_kh(ind) <= '1';
opcode_kh(ind) <= PUSH_DATA; opcode_kh(ind) <= PUSH_DATA;
if (ack_kh(ind) = '1') then if (ack_kh(ind) = '1') then
ack_dds(ind) <= '1'; ack_dds(ind) <= '1';
register_op_next <= '1'; register_op_next <= '1';
stage_next <= ADD_PAYLOAD; stage_next <= PROCESS_INPUT;
cnt_next <= 1; cnt_next <= 0; -- Process Input
end if; end if;
else else
ack_dds(ind) <= '1'; ack_dds(ind) <= '1';
@ -1337,6 +1351,11 @@ begin
-- NOTE: The ALIGNED_FLAG is set by default. If actual Payload is not aligned, need to reset. -- NOTE: The ALIGNED_FLAG is set by default. If actual Payload is not aligned, need to reset.
sample_status_info_next <= (SSI_DATA_FLAG => '1', SSI_ALIGNED_FLAG => '1', others => '0'); sample_status_info_next <= (SSI_DATA_FLAG => '1', SSI_ALIGNED_FLAG => '1', others => '0');
cur_sample_next <= empty_sample_list_head(ind); cur_sample_next <= empty_sample_list_head(ind);
store_payload_next <= '1';
if (CONFIG_ARRAY_T(ind).WITH_KEY and instance_handle_in_dds(ind) = HANDLE_NIL) then
need_kh_op_next <= '1';
end if;
-- NOTE: We have to explicitly check the Payload Memory, as it may be "unaligned" with our Sample Memory -- NOTE: We have to explicitly check the Payload Memory, as it may be "unaligned" with our Sample Memory
-- (Sample Memory has available Slot, but Payload Memory not) -- (Sample Memory has available Slot, but Payload Memory not)
@ -1385,6 +1404,13 @@ begin
-- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset. -- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset.
sample_status_info_next <= (SSI_DATA_FLAG => '1', SSI_ALIGNED_FLAG => '1', SSI_DISPOSED_FLAG => '1', others => '0'); sample_status_info_next <= (SSI_DATA_FLAG => '1', SSI_ALIGNED_FLAG => '1', SSI_DISPOSED_FLAG => '1', others => '0');
cur_sample_next <= empty_sample_list_head(ind); cur_sample_next <= empty_sample_list_head(ind);
if (CONFIG_ARRAY_T(ind).WITH_KEY) then
store_serialized_key_next <= '1';
need_kh_op_next <= '1';
else
-- For a key-less Topic payload=serialized_key
store_payload_next <= '1';
end if;
-- NOTE: We always expect a Serialized Key as Input of this Operation, so we also check the Payload memory -- NOTE: We always expect a Serialized Key as Input of this Operation, so we also check the Payload memory
-- Payload Memory Full -- Payload Memory Full
@ -1430,6 +1456,13 @@ begin
-- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset. -- NOTE: The ALIGNED_FLAG is set by default. if actual Payload is not aligned, need to reset.
sample_status_info_next <= (SSI_DATA_FLAG => '1', SSI_ALIGNED_FLAG => '1', SSI_UNREGISTERED_FLAG => '1', others => '0'); sample_status_info_next <= (SSI_DATA_FLAG => '1', SSI_ALIGNED_FLAG => '1', SSI_UNREGISTERED_FLAG => '1', others => '0');
cur_sample_next <= empty_sample_list_head(ind); cur_sample_next <= empty_sample_list_head(ind);
if (CONFIG_ARRAY_T(ind).WITH_KEY) then
store_serialized_key_next <= '1';
need_kh_op_next <= '1';
else
-- For a key-less Topic payload=serialized_key
store_payload_next <= '1';
end if;
-- NOTE: We always expect a Serialized Key as Input of this Operation, so we also check the Payload memory -- NOTE: We always expect a Serialized Key as Input of this Operation, so we also check the Payload memory
-- Payload Memory Full -- Payload Memory Full
@ -1466,12 +1499,13 @@ begin
if (CONFIG_ARRAY_T(ind).WITH_KEY) then if (CONFIG_ARRAY_T(ind).WITH_KEY) then
start_kh(ind) <= '1'; start_kh(ind) <= '1';
opcode_kh(ind) <= PUSH_DATA; opcode_kh(ind) <= PUSH_DATA;
need_kh_op_next <= '1';
if (ack_kh(ind) = '1') then if (ack_kh(ind) = '1') then
ack_dds(ind) <= '1'; ack_dds(ind) <= '1';
lookup_op_next <= '1'; lookup_op_next <= '1';
stage_next <= ADD_PAYLOAD; stage_next <= PROCESS_INPUT;
cnt_next <= 1; cnt_next <= 0; -- Process Input
end if; end if;
else else
ack_dds(ind) <= '1'; ack_dds(ind) <= '1';
@ -1627,63 +1661,52 @@ begin
cur_payload_next <= empty_payload_list_head(ind); cur_payload_next <= empty_payload_list_head(ind);
-- Memory Flow Control Guard -- Memory Flow Control Guard
if (sample_ready_in = '1') then if (sample_ready_in = '1') then
-- Key Hash needs to be calculated -- Key Holder needs data
if (CONFIG_ARRAY_T(ind).WITH_KEY and instance_handle = HANDLE_NIL) then if (need_kh_op = '1') then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
else else
stage_next <= ADD_PAYLOAD; stage_next <= PROCESS_INPUT;
cnt_next <= 0; cnt_next <= 0; -- Process Input
cnt2_next <= 1; cnt2_next <= 1;
end if; end if;
end if; end if;
-- Initiate KH Operation -- Initiate KH Operation
when 8 => when 8 =>
assert (CONFIG_ARRAY_T(ind).WITH_KEY) severity FAILURE; assert (CONFIG_ARRAY_T(ind).WITH_KEY) severity FAILURE;
assert (need_kh_op = '1') severity FAILURE;
start_kh(ind) <= '1'; start_kh(ind) <= '1';
-- Payload is Serialized Key
if (sample_status_info(SSI_DISPOSED_FLAG) = '1' or sample_status_info(SSI_UNREGISTERED_FLAG) = '1' or sample_status_info(SSI_FILTERED_FLAG) = '1') then
opcode_kh(ind) <= PUSH_SERIALIZED_KEY;
else
opcode_kh(ind) <= PUSH_DATA; opcode_kh(ind) <= PUSH_DATA;
end if;
if (ack_kh(ind) = '1') then if (ack_kh(ind) = '1') then
stage_next <= ADD_PAYLOAD; stage_next <= PROCESS_INPUT;
cnt_next <= 0; cnt_next <= 0; -- Process Input
cnt2_next <= 1; cnt2_next <= 1;
end if; end if;
when others => when others =>
null; null;
end case; end case;
when ADD_PAYLOAD => when PROCESS_INPUT =>
-- Precondition: cur_payload set -- Precondition (if store_payload = '1'): cur_payload set (Current Slot)
case (cnt) is case (cnt) is
-- Push to memory -- Process Input
when 0 => when 0 =>
-- Input Guard -- Input Guard
if (valid_in_dds(ind) = '1') then if (valid_in_dds(ind) = '1') then
payload_valid_in <= '1'; -- Payload Memory
payload_addr <= cur_payload + cnt2; payload_addr <= cur_payload + cnt2;
payload_write_data <= data_in_dds(ind); payload_write_data <= data_in_dds(ind);
-- Memory Control Flow Guard -- Key Holder
if (payload_ready_in = '1') then data_out_kh(ind) <= data_in_dds(ind);
-- Key Hash needs to be calculated last_word_out_kh(ind) <= last_word_in_dds(ind);
if (CONFIG_ARRAY_T(ind).WITH_KEY and instance_handle = HANDLE_NIL) then
cnt_next <= cnt + 1; -- Control Flow Guard
else if ((((not store_payload) or payload_ready_in) = '1') and (((not need_kh_op) or ready_out_kh(ind)) = '1')) then
ready_in_dds(ind) <= '1'; ready_in_dds(ind) <= '1';
-- End of Payload
if (last_word_in_dds(ind) = '1') then if (store_payload = '1') then
-- End of Payload Slot payload_valid_in <= '1';
if (cnt2 = PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= INITIATE_INSTANCE_SEARCH;
else
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0;
end if;
else
-- End of Payload Slot -- End of Payload Slot
if (cnt2 = PAYLOAD_FRAME_SIZE(ind)-1) then if (cnt2 = PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= NEXT_PAYLOAD_SLOT; stage_next <= NEXT_PAYLOAD_SLOT;
@ -1693,62 +1716,112 @@ begin
cnt2_next <= cnt2 + 1; cnt2_next <= cnt2 + 1;
end if; end if;
end if; end if;
if (need_kh_op = '1') then
valid_out_kh(ind) <= '1';
end if;
-- End of Input
if (last_word_in_dds(ind) = '1') then
-- Overrule
stage_next <= PROCESS_INPUT;
cnt_next <= cnt + 1;
cnt2_next <= cnt2;
end if; end if;
end if; end if;
end if; end if;
-- Push to KH -- Post Input Process
when 1 => when 1 =>
-- Payload Unaligned
if (store_payload = '1' and cnt2 /= PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0; -- Mark Payload as Unaligned
elsif (store_serialized_key = '1') then
assert (CONFIG_ARRAY_T(ind).WITH_KEY) severity FAILURE;
-- Fetch Serialized Key
stage_next <= GET_SERIALIZED_KEY;
cnt_next <= 0; -- Initiate READ Operation
cnt2_next <= 1;
elsif (CONFIG_ARRAY_T(ind).WITH_KEY and instance_handle = HANDLE_NIL) then
assert (need_kh_op = '1') severity FAILURE;
-- Fetch the Key Hash
stage_next <= GET_KEY_HASH;
cnt_next <= 0; -- Initiate READ Operation
cnt2_next <= 0;
else
stage_next <= INITIATE_INSTANCE_SEARCH;
end if;
when others =>
null;
end case;
when GET_SERIALIZED_KEY =>
assert (CONFIG_ARRAY_T(ind).WITH_KEY) severity FAILURE; assert (CONFIG_ARRAY_T(ind).WITH_KEY) severity FAILURE;
-- Input Guard case (cnt) is
if (valid_in_dds(ind) = '1') then -- Initiate READ Operation
when 0 =>
-- Key Holder Decode Error
if (decode_error_kh(ind) = '1') then
done_dds(ind) <= '1';
return_code_dds(ind) <= RETCODE_ERROR;
valid_out_kh(ind) <= '1'; -- DONE
data_out_kh(ind) <= data_in_dds(ind); stage_next <= IDLE;
else
start_kh(ind) <= '1';
opcode_kh(ind) <= READ_SERIALIZED_KEY;
-- Output Guard if (ack_kh(ind) = '1') then
if (ready_out_kh(ind) = '1') then cnt_next <= cnt + 1;
ready_in_dds(ind) <= '1';
-- Operation does not have Payload to store
if (sample_status_info(SSI_DATA_FLAG) = '0') then
-- End of Payload
if (last_word_in_dds(ind) = '1') then
last_word_out_kh(ind) <= '1';
-- Fetch the Key Hash
stage_next <= GET_KEY_HASH;
cnt_next <= 0;
cnt2_next <= 0;
else
-- Next Word
cnt_next <= 1; -- Same Sub-state
end if; end if;
else
-- End of Payload
if (last_word_in_dds(ind) = '1') then
last_word_out_kh(ind) <= '1';
-- End of Payload Slot
if (cnt2 = PAYLOAD_FRAME_SIZE(ind)-1) then
-- Fetch the Key Hash
stage_next <= GET_KEY_HASH;
cnt_next <= 0;
cnt2_next <= 0;
else
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0;
end if; end if;
else -- READ Key Hash
when 1 =>
-- Key Holder Control Flow Guard
if (valid_in_kh(ind) = '1') then
payload_addr <= cur_payload + cnt2;
payload_write_data <= data_in_kh(ind);
-- Memory Control Flow Guard
if (payload_ready_in = '1') then
payload_valid_in <= '1';
ready_in_kh(ind) <= '1';
-- End of Payload Slot -- End of Payload Slot
if (cnt2 = PAYLOAD_FRAME_SIZE(ind)-1) then if (cnt2 = PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= NEXT_PAYLOAD_SLOT; stage_next <= NEXT_PAYLOAD_SLOT;
cnt_next <= 0; cnt_next <= 0;
else else
-- Next Word -- Next Word
cnt_next <= 0;
cnt2_next <= cnt2 + 1; cnt2_next <= cnt2 + 1;
end if; end if;
-- Exit Condition
if (last_word_in_kh(ind) = '1') then
-- Overrule
stage_next <= GET_SERIALIZED_KEY;
cnt_next <= cnt + 1;
cnt2_next <= cnt2;
end if; end if;
end if; end if;
end if; end if;
-- Post READ Operation
when 2 =>
-- Payload Unaligned
if (cnt2 /= PAYLOAD_FRAME_SIZE(ind)-1) then
stage_next <= ALIGN_PAYLOAD;
cnt_next <= 0;
elsif (instance_handle = HANDLE_NIL) then
assert (need_kh_op = '1') severity FAILURE;
-- Fetch the Key Hash
stage_next <= GET_KEY_HASH;
cnt_next <= 0; -- Initiate READ Operation
cnt2_next <= 0;
else
-- Exit
stage_next <= INITIATE_INSTANCE_SEARCH;
end if; end if;
when others => when others =>
null; null;
@ -1784,9 +1857,17 @@ begin
else else
-- Latch next Payload Slot and Continue -- Latch next Payload Slot and Continue
cur_payload_next <= resize(unsigned(payload_read_data), PAYLOAD_MEMORY_ADDR_WIDTH); cur_payload_next <= resize(unsigned(payload_read_data), PAYLOAD_MEMORY_ADDR_WIDTH);
stage_next <= ADD_PAYLOAD; if (store_payload = '1') then
cnt_next <= 0; stage_next <= PROCESS_INPUT;
cnt_next <= 0; -- Process Input
cnt2_next <= 1; cnt2_next <= 1;
else
assert (store_serialized_key = '1') severity FAILURE;
stage_next <= GET_SERIALIZED_KEY;
cnt_next <= 1; -- Read Key Hash
cnt2_next <= 1;
end if;
end if; end if;
end if; end if;
when others => when others =>
@ -1814,10 +1895,13 @@ begin
-- Memory Control Flow Guard -- Memory Control Flow Guard
if (payload_ready_in = '1') then if (payload_ready_in = '1') then
if (CONFIG_ARRAY_T(ind).WITH_KEY and instance_handle = HANDLE_NIL) then if (CONFIG_ARRAY_T(ind).WITH_KEY and instance_handle = HANDLE_NIL) then
assert (need_kh_op = '1') severity FAILURE;
stage_next <= GET_KEY_HASH; stage_next <= GET_KEY_HASH;
cnt_next <= 0; cnt_next <= 0; -- Initiate READ Operation
cnt2_next <= 0; cnt2_next <= 0;
else else
-- Exit
stage_next <= INITIATE_INSTANCE_SEARCH; stage_next <= INITIATE_INSTANCE_SEARCH;
end if; end if;
end if; end if;
@ -1830,12 +1914,21 @@ begin
case (cnt) is case (cnt) is
-- Initiate READ Operation -- Initiate READ Operation
when 0 => when 0 =>
-- Key Holder Decode Error
if (decode_error_kh(ind) = '1') then
done_dds(ind) <= '1';
return_code_dds(ind) <= RETCODE_ERROR;
-- DONE
stage_next <= IDLE;
else
start_kh(ind) <= '1'; start_kh(ind) <= '1';
opcode_kh(ind) <= READ_KEY_HASH; opcode_kh(ind) <= READ_KEY_HASH;
if (ack_kh(ind) = '1') then if (ack_kh(ind) = '1') then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
end if; end if;
end if;
-- READ Key Hash -- READ Key Hash
when 1 => when 1 =>
ready_in_kh(ind) <= '1'; ready_in_kh(ind) <= '1';
@ -1848,7 +1941,7 @@ begin
-- Exit Condition -- Exit Condition
if (last_word_in_kh(ind) = '1') then if (last_word_in_kh(ind) = '1') then
-- DONE -- Exit
stage_next <= INITIATE_INSTANCE_SEARCH; stage_next <= INITIATE_INSTANCE_SEARCH;
end if; end if;
end if; end if;
@ -4923,6 +5016,9 @@ begin
global_ack_cnt <= (others => 0); global_ack_cnt <= (others => 0);
stale_inst_cnt <= (others => 0); stale_inst_cnt <= (others => 0);
inst_cnt <= 0; inst_cnt <= 0;
store_payload <= '0';
store_serialized_key <= '0';
need_kh_op <= '0';
remove_oldest_sample <= '0'; remove_oldest_sample <= '0';
remove_oldest_inst_sample <= '0'; remove_oldest_inst_sample <= '0';
remove_ack_sample <= '0'; remove_ack_sample <= '0';
@ -4997,6 +5093,9 @@ begin
global_ack_cnt <= global_ack_cnt_next; global_ack_cnt <= global_ack_cnt_next;
stale_inst_cnt <= stale_inst_cnt_next; stale_inst_cnt <= stale_inst_cnt_next;
inst_cnt <= inst_cnt_next; inst_cnt <= inst_cnt_next;
store_payload <= store_payload_next;
store_serialized_key <= store_serialized_key_next;
need_kh_op <= need_kh_op_next;
remove_oldest_sample <= remove_oldest_sample_next; remove_oldest_sample <= remove_oldest_sample_next;
remove_oldest_inst_sample <= remove_oldest_inst_sample_next; remove_oldest_inst_sample <= remove_oldest_inst_sample_next;
remove_ack_sample <= remove_ack_sample_next; remove_ack_sample <= remove_ack_sample_next;