Change decoding convention
In muti-word decoding do not call the "FETCH" stage in the last-to-second sub-stage.
This commit is contained in:
parent
158ab05a4d
commit
c9d4b55d4a
@ -40,18 +40,21 @@ The generated decode_stage first checks the alignement and aligns the stream usi
|
|||||||
member is taken, and the 'FETCH' stage is called.
|
member is taken, and the 'FETCH' stage is called.
|
||||||
* Primitive size 8
|
* Primitive size 8
|
||||||
The decode_stage is divided with the help of 'cnt' in 3 sub-stages. A helper double-word latch 'dw_latch'
|
The decode_stage is divided with the help of 'cnt' in 3 sub-stages. A helper double-word latch 'dw_latch'
|
||||||
is used. The first 2 sub-stages latch the word into the helper latch (calling 'FETCH' stage each time),
|
is used. The first 2 sub-stages latch the word into the helper latch, and the last sub-stage is for
|
||||||
and the last sub-stage is for latching the final signal in it's final place. In the last sub-stage 8 is
|
latching the final signal in it's final place. The "FETCH" stage is called in the first and last
|
||||||
added to the 'align_offset' and the decode_stage of the next declared member is taken.
|
sub-stages. In the last sub-stage 8 is added to the 'align_offset' and the decode_stage of the next
|
||||||
|
declared member is taken.
|
||||||
NOTE: The extra sub-stage is used to push the signal to a memory in a single operation
|
NOTE: The extra sub-stage is used to push the signal to a memory in a single operation
|
||||||
NOTE: If there is no next declared member, the second-to-last stage should NOT call the "FETCH" stage
|
|
||||||
* Primitive size 16
|
* Primitive size 16
|
||||||
The decode_stage is divided with the help of 'cnt' in 5 sub-stages. A helper quad-word latch 'qw_latch'
|
The decode_stage is divided with the help of 'cnt' in 5 sub-stages. A helper quad-word latch 'qw_latch'
|
||||||
is used. The first 4 sub-stages latch the word into the helper latch (calling 'FETCH' stage each time),
|
is used. The first 4 sub-stages latch the word into the helper latch, and the last sub-stage is for
|
||||||
and the last sub-stage is for latching the final signal in it's final place. In the last sub-stage 16 is
|
latching the final signal in it's final place. The "FETCH" stage is called in all except the
|
||||||
added to the 'align_offset' and the decode_stage of the next declared member is taken.
|
second-to-last sub-stage. In the last sub-stage 16 is added to the 'align_offset' and the decode_stage
|
||||||
|
of the next declared member is taken.
|
||||||
NOTE: The extra sub-stage is used to push the signal to a memory in a single operation
|
NOTE: The extra sub-stage is used to push the signal to a memory in a single operation
|
||||||
NOTE: If there is no next declared member, the second-to-last stage should NOT call the "FETCH" stage
|
|
||||||
|
NOTE: If there is no next declared member, the last sub-stage should not call the "FETCH" stage.
|
||||||
|
(Should be overriden by "SKIP_PAYLOAD")
|
||||||
|
|
||||||
The alignements and sizes for IDL primitive types are following:
|
The alignements and sizes for IDL primitive types are following:
|
||||||
|
|
||||||
|
|||||||
@ -433,10 +433,10 @@ begin
|
|||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_OPTIONAL_HEADER;
|
decode_stage_next <= GET_OPTIONAL_HEADER;
|
||||||
return_stage_next <= GET_TESTSEQUENCE_TESTLONGDOUBLE;
|
return_stage_next <= GET_TESTSEQUENCE_TESTLONGDOUBLE;
|
||||||
@ -477,10 +477,10 @@ begin
|
|||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Quad Word 4/4
|
-- Quad Word 4/4
|
||||||
when 3 =>
|
when 3 =>
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Quad Word
|
-- Push Quad Word
|
||||||
when 4 =>
|
when 4 =>
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 16;
|
align_offset_next <= align_offset + 16;
|
||||||
|
|
||||||
-- All Elements processed
|
-- All Elements processed
|
||||||
|
|||||||
@ -780,7 +780,6 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next <= write_sub_vector(dw_latch_next, data_in_latch, 1, TRUE);
|
dw_latch_next <= write_sub_vector(dw_latch_next, data_in_latch, 1, TRUE);
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
@ -791,6 +790,7 @@ begin
|
|||||||
-- Memory Operation Guard
|
-- Memory Operation Guard
|
||||||
if (TestSequence_TestLongLong_mem_ready_in = '1') then
|
if (TestSequence_TestLongLong_mem_ready_in = '1') then
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
|
stage_next <= FETCH;
|
||||||
decode_stage_next <= GET_OPTIONAL_HEADER;
|
decode_stage_next <= GET_OPTIONAL_HEADER;
|
||||||
return_stage_next <= GET_TESTSEQUENCE_TESTLONGDOUBLE;
|
return_stage_next <= GET_TESTSEQUENCE_TESTLONGDOUBLE;
|
||||||
cnt_next <= 0;
|
cnt_next <= 0;
|
||||||
@ -842,7 +842,6 @@ begin
|
|||||||
-- Quad Word 4/4
|
-- Quad Word 4/4
|
||||||
when 3 =>
|
when 3 =>
|
||||||
qw_latch_next <= write_sub_vector(qw_latch_next, data_in_latch, 3, TRUE);
|
qw_latch_next <= write_sub_vector(qw_latch_next, data_in_latch, 3, TRUE);
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Quad Word
|
-- Push Quad Word
|
||||||
when 4 =>
|
when 4 =>
|
||||||
@ -852,6 +851,7 @@ begin
|
|||||||
|
|
||||||
-- Memory Operation Guard
|
-- Memory Operation Guard
|
||||||
if (TestSequence_TestLongLong_mem_ready_in = '1') then
|
if (TestSequence_TestLongLong_mem_ready_in = '1') then
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 16;
|
align_offset_next <= align_offset + 16;
|
||||||
|
|
||||||
-- All Elements processed
|
-- All Elements processed
|
||||||
|
|||||||
@ -365,12 +365,12 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
||||||
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_RID_SN;
|
decode_stage_next <= GET_RID_SN;
|
||||||
cnt_next <= 0;
|
cnt_next <= 0;
|
||||||
@ -393,14 +393,14 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
-- ###GENERATED START###
|
-- ###GENERATED START###
|
||||||
stage_next <= TODO;
|
decode_stage_next <= TODO;
|
||||||
-- ###GENERATED END###
|
-- ###GENERATED END###
|
||||||
when others =>
|
when others =>
|
||||||
null;
|
null;
|
||||||
|
|||||||
@ -360,12 +360,12 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
||||||
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_RID_SN;
|
decode_stage_next <= GET_RID_SN;
|
||||||
cnt_next <= 0;
|
cnt_next <= 0;
|
||||||
@ -388,14 +388,14 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
-- ###GENERATED START###
|
-- ###GENERATED START###
|
||||||
stage_next <= TODO;
|
decode_stage_next <= TODO;
|
||||||
-- ###GENERATED END###
|
-- ###GENERATED END###
|
||||||
when others =>
|
when others =>
|
||||||
null;
|
null;
|
||||||
|
|||||||
@ -362,12 +362,12 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
||||||
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_RID_SN;
|
decode_stage_next <= GET_RID_SN;
|
||||||
cnt_next <= 0;
|
cnt_next <= 0;
|
||||||
@ -390,11 +390,11 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
-- ###GENERATED START###
|
-- ###GENERATED START###
|
||||||
decode_stage_next <= GET_RR_SUM;
|
decode_stage_next <= GET_RR_SUM;
|
||||||
@ -424,6 +424,7 @@ begin
|
|||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
sum_latch_next <= endian_swap(endian_flag, dw_latch);
|
sum_latch_next <= endian_swap(endian_flag, dw_latch);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
|
|
||||||
-- DONE
|
-- DONE
|
||||||
|
|||||||
@ -360,12 +360,12 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(0) <= get_sub_vector(endian_swap(endian_flag, dw_latch),0,WORD_WIDTH,TRUE);
|
||||||
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
service_info_sig_next.request_id.writer_guid(1) <= get_sub_vector(endian_swap(endian_flag, dw_latch),1,WORD_WIDTH,TRUE);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_RID_SN;
|
decode_stage_next <= GET_RID_SN;
|
||||||
cnt_next <= 0;
|
cnt_next <= 0;
|
||||||
@ -388,11 +388,11 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
service_info_sig_next.request_id.sequence_number <= to_double_word(unsigned(endian_swap(endian_flag, dw_latch)));
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
-- ###GENERATED START###
|
-- ###GENERATED START###
|
||||||
decode_stage_next <= GET_RQ_A;
|
decode_stage_next <= GET_RQ_A;
|
||||||
@ -418,11 +418,11 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
dw_latch_next((CDR_LONG_LONG_WIDTH/2)-1 downto 0) <= data_in_latch;
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
a_latch_next <= endian_swap(endian_flag, dw_latch);
|
a_latch_next <= endian_swap(endian_flag, dw_latch);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_RQ_B;
|
decode_stage_next <= GET_RQ_B;
|
||||||
cnt_next <= 0;
|
cnt_next <= 0;
|
||||||
@ -449,6 +449,7 @@ begin
|
|||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
b_latch_next <= endian_swap(endian_flag, dw_latch);
|
b_latch_next <= endian_swap(endian_flag, dw_latch);
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
|
|
||||||
-- DONE
|
-- DONE
|
||||||
|
|||||||
@ -489,7 +489,6 @@ begin
|
|||||||
-- Double Word 2/2
|
-- Double Word 2/2
|
||||||
when 1 =>
|
when 1 =>
|
||||||
dw_latch_next <= write_sub_vector(dw_latch_next, endian_swap(endian_flag, data_in_latch), 1, TRUE);
|
dw_latch_next <= write_sub_vector(dw_latch_next, endian_swap(endian_flag, data_in_latch), 1, TRUE);
|
||||||
stage_next <= FETCH;
|
|
||||||
cnt_next <= cnt + 1;
|
cnt_next <= cnt + 1;
|
||||||
-- Push Double Word
|
-- Push Double Word
|
||||||
when 2 =>
|
when 2 =>
|
||||||
@ -499,6 +498,7 @@ begin
|
|||||||
|
|
||||||
-- Memory Operation Guard
|
-- Memory Operation Guard
|
||||||
if (status_list_goal_info_stamp_mem_ready_in = '1') then
|
if (status_list_goal_info_stamp_mem_ready_in = '1') then
|
||||||
|
stage_next <= FETCH;
|
||||||
align_offset_next <= align_offset + 8;
|
align_offset_next <= align_offset + 8;
|
||||||
decode_stage_next <= GET_STATUS_LIST_STATUS;
|
decode_stage_next <= GET_STATUS_LIST_STATUS;
|
||||||
end if;
|
end if;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user