update
This commit is contained in:
1 parent
86a615148a
commit
8a916271e1
1 file changed
+11
-5
@@ -43,7 +43,7 @@ architecture rtl of add is
|
|||||||
signal next_task_state : work.task.State;
|
signal next_task_state : work.task.State;
|
||||||
signal index : integer range 0 to work.task.STREAM_LEN;
|
signal index : integer range 0 to work.task.STREAM_LEN;
|
||||||
|
|
||||||
type AddState is ( ADD_IDLE, ADD_WAIT_DONE, ADD_WRITE ); -- #
|
type AddState is ( ADD_IDLE, ADD_WAIT_DONE, ADD_WRITE, ADD_FINISH ); -- #
|
||||||
signal current_add_state : AddState; -- #
|
signal current_add_state : AddState; -- #
|
||||||
|
|
||||||
signal add_start : std_logic; -- #
|
signal add_start : std_logic; -- #
|
||||||
@@ -124,15 +124,21 @@ begin
|
|||||||
end if; -- #
|
end if; -- #
|
||||||
|
|
||||||
when ADD_WRITE => -- #
|
when ADD_WRITE => -- #
|
||||||
if ( index < work.task.STREAM_LEN - 1 ) then -- #
|
if ( index < work.task.STREAM_LEN - 2 ) then -- #
|
||||||
index <= index + 1; -- #
|
index <= index + 1; -- #
|
||||||
current_add_state <= ADD_IDLE; -- #
|
current_add_state <= ADD_IDLE; -- #
|
||||||
else -- #
|
else -- #
|
||||||
current_add_state <= ADD_DONE_WAIT; -- #
|
current_add_state <= ADD_FINISH; -- #
|
||||||
end if; -- #
|
end if; -- #
|
||||||
|
|
||||||
when ADD_DONE_WAIT => -- #
|
when ADD_FINISH => -- #
|
||||||
index <= index + 1; -- #
|
add_start <= '1'; -- #
|
||||||
|
if ( add_done = '1' ) then -- #
|
||||||
|
add_start <= '0'; -- #
|
||||||
|
signal_write <= '1'; -- #
|
||||||
|
signal_writedata <= add_sum; -- #
|
||||||
|
index <= work.task.STREAM_LEN - 1; -- #
|
||||||
|
end if; -- #
|
||||||
|
|
||||||
when others => -- #
|
when others => -- #
|
||||||
current_add_state <= ADD_IDLE; -- #
|
current_add_state <= ADD_IDLE; -- #
|
||||||
|
|||||||
Reference in new issue
Block a user