Skip to content

Commit

Permalink
fixing ip header drop
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sidler committed Sep 11, 2019
1 parent b8063fb commit 775a181
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ if (NETWORK_BANDWIDTH STREQUAL "100")
set(NETWORK_INTERFACE 100)
endif()
if (NOT DEFINED DATA_WIDTH)
message( "abc")
set(DATA_WIDTH 64)
endif()
if (NOT DEFINED CLOCK_PERIOD)
Expand Down
7 changes: 4 additions & 3 deletions hls/toe/rx_engine/rx_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ void drop_optional_ip_header( stream<ap_uint<4> >& process2dropLengthFifo,
process2dropLengthFifo.read(length);
std::cout << "(Optional) Header length: " << length << std::endl;

if (WIDTH == 64)
//TODO for WIDTH == 128 this only works if no IP options
if (WIDTH == 64 || WIDTH == 128)
{
if (length > 1)
{
Expand All @@ -114,9 +115,9 @@ void drop_optional_ip_header( stream<ap_uint<4> >& process2dropLengthFifo,
doh_state = SHIFT;
}
}
if (WIDTH == 512)
if (WIDTH == 256 || WIDTH == 512)
{
//TODO this is hack and works for AXI_WIDTH == 512bit
//TODO this is a hack and only works if there are no IP options
if (length == 5)
{
process2dropFifo.read(prevWord);
Expand Down

0 comments on commit 775a181

Please sign in to comment.