Compare commits
No commits in common. "4e4853c540f829ce6f52a2e42d75f9ca9ad28cc2" and "1146970be57a3e18e05f6d10eb55ea834abf49e5" have entirely different histories.
4e4853c540
...
1146970be5
@ -13,8 +13,7 @@ use grlib.stdlib.all;
|
|||||||
|
|
||||||
entity socbridge_driver is
|
entity socbridge_driver is
|
||||||
generic(
|
generic(
|
||||||
MAX_PKT_SIZE : integer range 1 to 128 := 128;
|
MAX_PKT_SIZE : integer range 1 to 128 := 8
|
||||||
BUFFER_SIZE : integer
|
|
||||||
);
|
);
|
||||||
port(
|
port(
|
||||||
clk : in std_logic;
|
clk : in std_logic;
|
||||||
@ -342,7 +341,7 @@ begin
|
|||||||
elsif st.curr_rx_transaction = READ or st.curr_rx_transaction = READ_ADD
|
elsif st.curr_rx_transaction = READ or st.curr_rx_transaction = READ_ADD
|
||||||
or st.curr_rx_transaction = WRITE or st.curr_rx_transaction = WRITE_ADD then
|
or st.curr_rx_transaction = WRITE or st.curr_rx_transaction = WRITE_ADD then
|
||||||
trans_read_next_state <= IDLE;
|
trans_read_next_state <= IDLE;
|
||||||
elsif trans_st.read.curr_inst.request = '1' and BUFFER_SIZE - ip_to_socbridge_driver.read_fifo.used_slots > 2*MAX_PKT_SIZE then
|
elsif trans_st.read.curr_inst.request = '1' then
|
||||||
trans_read_next_state <= SEND;
|
trans_read_next_state <= SEND;
|
||||||
else
|
else
|
||||||
trans_read_next_state <= IDLE;
|
trans_read_next_state <= IDLE;
|
||||||
@ -363,7 +362,7 @@ begin
|
|||||||
trans_read_next_state <= IDLE;
|
trans_read_next_state <= IDLE;
|
||||||
elsif ip_to_socbridge_driver.flush = '1'and not st.read_in_flight then
|
elsif ip_to_socbridge_driver.flush = '1'and not st.read_in_flight then
|
||||||
trans_read_next_state <= IDLE;
|
trans_read_next_state <= IDLE;
|
||||||
elsif not st.read_in_flight and BUFFER_SIZE - ip_to_socbridge_driver.read_fifo.used_slots > 2*MAX_PKT_SIZE then
|
elsif not st.read_in_flight then
|
||||||
trans_read_next_state <= SEND;
|
trans_read_next_state <= SEND;
|
||||||
else
|
else
|
||||||
trans_read_next_state <= AWAIT;
|
trans_read_next_state <= AWAIT;
|
||||||
@ -394,7 +393,7 @@ begin
|
|||||||
else
|
else
|
||||||
next_tx_data_size <= 0;
|
next_tx_data_size <= 0;
|
||||||
end if;
|
end if;
|
||||||
elsif trans_st.write.curr_state = SEND and not st.read_in_flight then
|
elsif trans_st.write.curr_state = SEND then
|
||||||
if trans_st.write.is_first_word = '1' then
|
if trans_st.write.is_first_word = '1' then
|
||||||
local_next_tx_transaction := WRITE_ADD;
|
local_next_tx_transaction := WRITE_ADD;
|
||||||
else
|
else
|
||||||
@ -617,14 +616,6 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
trans_st.write.is_first_word <= '1';
|
trans_st.write.is_first_word <= '1';
|
||||||
when SEND =>
|
when SEND =>
|
||||||
if trans_st.write.curr_inst.seq_mem_access_count mod 256 = 0 then
|
|
||||||
trans_st.write.is_first_word <= '1';
|
|
||||||
elsif st.last_sent_transaction = READ or st.last_sent_transaction = READ_ADD
|
|
||||||
or next_tx_transaction = READ or next_tx_transaction = READ_ADD then
|
|
||||||
trans_st.write.is_first_word <= '1';
|
|
||||||
else
|
|
||||||
trans_st.write.is_first_word <= '0';
|
|
||||||
end if;
|
|
||||||
when SEND_ACCEPTED =>
|
when SEND_ACCEPTED =>
|
||||||
trans_st.write.curr_inst.seq_mem_access_count <= trans_st.write.curr_inst.seq_mem_access_count - MAX_PKT_SIZE;
|
trans_st.write.curr_inst.seq_mem_access_count <= trans_st.write.curr_inst.seq_mem_access_count - MAX_PKT_SIZE;
|
||||||
trans_st.write.curr_inst.address <= std_logic_vector(unsigned(trans_st.write.curr_inst.address) + MAX_PKT_SIZE);
|
trans_st.write.curr_inst.address <= std_logic_vector(unsigned(trans_st.write.curr_inst.address) + MAX_PKT_SIZE);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user