- allow reallocation during tx-fill

tx is re-armed and already written data is discarded.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@807 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2010-03-21 15:12:09 +00:00
parent 88bd1e16d9
commit 8960bc52e7
+10 -4
View File
@@ -76,6 +76,7 @@ ARCHITECTURE behavior OF emac_jb IS
signal tx_fill_rdy : std_logic;
signal tx_fill_cnt_set : std_logic;
signal tx_fill_cnt_adv : std_logic;
signal tx_fill_ptr_set : std_logic;
signal tx_fill_ptr_adv : std_logic;
signal tx_alloc_OK : std_logic;
@@ -200,6 +201,8 @@ host_tx_state:
tx_flush_ptr_set <= '0';
tx_alloc_ack <= '0';
tx_fill_cnt_set <= '0';
tx_fill_cnt_adv <= '0';
tx_fill_ptr_set <= '0';
tx_fill_ptr_adv <= '0';
tx_commit_en <= '0';
tx_alloc_en <= '0';
@@ -232,7 +235,8 @@ host_tx_state:
when host_tx_setup =>
tx_fill_cnt_set <= '1';
host_tx_sn <= host_tx_arm;
tx_fill_ptr_set <= '1';
host_tx_sn <= host_tx_arm;
when host_tx_arm =>
tx_fill_ptr_adv <= '1';
@@ -242,7 +246,9 @@ host_tx_state:
when host_tx_fill =>
tx_fill_cnt_adv <= host_data_we;
tx_fill_ptr_adv <= not tx_fill_rdy and host_data_we;
if tx_fill_rdy = '1' then
if tx_alloc_req = '1' then
host_tx_sn <= host_tx_alloc;
elsif tx_fill_rdy = '1' then
host_tx_sn <= host_tx_commit;
end if;
@@ -366,8 +372,8 @@ tx_fill_pointer:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if tx_flush_en = '1' then
tx_fill_ptr <= (others => '0');
if tx_fill_ptr_set = '1' then
tx_fill_ptr <= tx_alloc_base;
elsif tx_fill_ptr_adv = '1' then
tx_fill_ptr <= tx_fill_ptr + 1;
end if;