diff --git a/rtl/udp.v b/rtl/udp.v index 22b0a0a2..24ed0ab2 100644 --- a/rtl/udp.v +++ b/rtl/udp.v @@ -109,7 +109,6 @@ module udp # input wire [2:0] input_udp_ip_flags, input wire [12:0] input_udp_ip_fragment_offset, input wire [7:0] input_udp_ip_ttl, - input wire [7:0] input_udp_ip_protocol, input wire [15:0] input_udp_ip_header_checksum, input wire [31:0] input_udp_ip_source_ip, input wire [31:0] input_udp_ip_dest_ip, @@ -177,7 +176,6 @@ wire [15:0] tx_udp_ip_identification; wire [2:0] tx_udp_ip_flags; wire [12:0] tx_udp_ip_fragment_offset; wire [7:0] tx_udp_ip_ttl; -wire [7:0] tx_udp_ip_protocol; wire [15:0] tx_udp_ip_header_checksum; wire [31:0] tx_udp_ip_source_ip; wire [31:0] tx_udp_ip_dest_ip; @@ -278,13 +276,12 @@ if (CHECKSUM_ENABLE) begin .input_ip_flags(input_udp_ip_flags), .input_ip_fragment_offset(input_udp_ip_fragment_offset), .input_ip_ttl(input_udp_ip_ttl), - .input_ip_protocol(input_udp_ip_protocol), + .input_ip_protocol(0), .input_ip_header_checksum(input_udp_ip_header_checksum), .input_ip_source_ip(input_udp_ip_source_ip), .input_ip_dest_ip(input_udp_ip_dest_ip), .input_udp_source_port(input_udp_source_port), .input_udp_dest_port(input_udp_dest_port), - .input_udp_length(input_udp_length), .input_udp_checksum(input_udp_checksum), .input_udp_payload_tdata(input_udp_payload_tdata), .input_udp_payload_tvalid(input_udp_payload_tvalid), @@ -306,7 +303,7 @@ if (CHECKSUM_ENABLE) begin .output_ip_flags(tx_udp_ip_flags), .output_ip_fragment_offset(tx_udp_ip_fragment_offset), .output_ip_ttl(tx_udp_ip_ttl), - .output_ip_protocol(tx_udp_ip_protocol), + .output_ip_protocol(), .output_ip_header_checksum(tx_udp_ip_header_checksum), .output_ip_source_ip(tx_udp_ip_source_ip), .output_ip_dest_ip(tx_udp_ip_dest_ip), @@ -336,7 +333,6 @@ end else begin assign tx_udp_ip_flags = input_udp_ip_flags; assign tx_udp_ip_fragment_offset = input_udp_ip_fragment_offset; assign tx_udp_ip_ttl = input_udp_ip_ttl; - assign tx_udp_ip_protocol = input_udp_ip_protocol; assign tx_udp_ip_header_checksum = input_udp_ip_header_checksum; assign tx_udp_ip_source_ip = input_udp_ip_source_ip; assign tx_udp_ip_dest_ip = input_udp_ip_dest_ip; @@ -372,7 +368,7 @@ udp_ip_tx_inst ( .input_ip_flags(tx_udp_ip_flags), .input_ip_fragment_offset(tx_udp_ip_fragment_offset), .input_ip_ttl(tx_udp_ip_ttl), - .input_ip_protocol(tx_udp_ip_protocol), + .input_ip_protocol(8'h11), .input_ip_header_checksum(tx_udp_ip_header_checksum), .input_ip_source_ip(tx_udp_ip_source_ip), .input_ip_dest_ip(tx_udp_ip_dest_ip), diff --git a/rtl/udp_64.v b/rtl/udp_64.v index f90d5334..c0c90ea4 100644 --- a/rtl/udp_64.v +++ b/rtl/udp_64.v @@ -111,7 +111,6 @@ module udp_64 # input wire [2:0] input_udp_ip_flags, input wire [12:0] input_udp_ip_fragment_offset, input wire [7:0] input_udp_ip_ttl, - input wire [7:0] input_udp_ip_protocol, input wire [15:0] input_udp_ip_header_checksum, input wire [31:0] input_udp_ip_source_ip, input wire [31:0] input_udp_ip_dest_ip, @@ -181,7 +180,6 @@ wire [15:0] tx_udp_ip_identification; wire [2:0] tx_udp_ip_flags; wire [12:0] tx_udp_ip_fragment_offset; wire [7:0] tx_udp_ip_ttl; -wire [7:0] tx_udp_ip_protocol; wire [15:0] tx_udp_ip_header_checksum; wire [31:0] tx_udp_ip_source_ip; wire [31:0] tx_udp_ip_dest_ip; @@ -285,13 +283,12 @@ if (CHECKSUM_ENABLE) begin .input_ip_flags(input_udp_ip_flags), .input_ip_fragment_offset(input_udp_ip_fragment_offset), .input_ip_ttl(input_udp_ip_ttl), - .input_ip_protocol(input_udp_ip_protocol), + .input_ip_protocol(0), .input_ip_header_checksum(input_udp_ip_header_checksum), .input_ip_source_ip(input_udp_ip_source_ip), .input_ip_dest_ip(input_udp_ip_dest_ip), .input_udp_source_port(input_udp_source_port), .input_udp_dest_port(input_udp_dest_port), - .input_udp_length(input_udp_length), .input_udp_checksum(input_udp_checksum), .input_udp_payload_tdata(input_udp_payload_tdata), .input_udp_payload_tkeep(input_udp_payload_tkeep), @@ -314,7 +311,6 @@ if (CHECKSUM_ENABLE) begin .output_ip_flags(tx_udp_ip_flags), .output_ip_fragment_offset(tx_udp_ip_fragment_offset), .output_ip_ttl(tx_udp_ip_ttl), - .output_ip_protocol(tx_udp_ip_protocol), .output_ip_header_checksum(tx_udp_ip_header_checksum), .output_ip_source_ip(tx_udp_ip_source_ip), .output_ip_dest_ip(tx_udp_ip_dest_ip), @@ -345,7 +341,6 @@ end else begin assign tx_udp_ip_flags = input_udp_ip_flags; assign tx_udp_ip_fragment_offset = input_udp_ip_fragment_offset; assign tx_udp_ip_ttl = input_udp_ip_ttl; - assign tx_udp_ip_protocol = input_udp_ip_protocol; assign tx_udp_ip_header_checksum = input_udp_ip_header_checksum; assign tx_udp_ip_source_ip = input_udp_ip_source_ip; assign tx_udp_ip_dest_ip = input_udp_ip_dest_ip; @@ -382,7 +377,7 @@ udp_ip_tx_64_inst ( .input_ip_flags(tx_udp_ip_flags), .input_ip_fragment_offset(tx_udp_ip_fragment_offset), .input_ip_ttl(tx_udp_ip_ttl), - .input_ip_protocol(tx_udp_ip_protocol), + .input_ip_protocol(8'h11), .input_ip_header_checksum(tx_udp_ip_header_checksum), .input_ip_source_ip(tx_udp_ip_source_ip), .input_ip_dest_ip(tx_udp_ip_dest_ip), diff --git a/tb/test_udp.py b/tb/test_udp.py index 5f1760b0..9f56e2bd 100755 --- a/tb/test_udp.py +++ b/tb/test_udp.py @@ -109,7 +109,6 @@ def dut_udp(clk, input_udp_ip_flags, input_udp_ip_fragment_offset, input_udp_ip_ttl, - input_udp_ip_protocol, input_udp_ip_header_checksum, input_udp_ip_source_ip, input_udp_ip_dest_ip, @@ -225,7 +224,6 @@ def dut_udp(clk, input_udp_ip_flags=input_udp_ip_flags, input_udp_ip_fragment_offset=input_udp_ip_fragment_offset, input_udp_ip_ttl=input_udp_ip_ttl, - input_udp_ip_protocol=input_udp_ip_protocol, input_udp_ip_header_checksum=input_udp_ip_header_checksum, input_udp_ip_source_ip=input_udp_ip_source_ip, input_udp_ip_dest_ip=input_udp_ip_dest_ip, @@ -313,7 +311,6 @@ def bench(): input_udp_ip_flags = Signal(intbv(0)[3:]) input_udp_ip_fragment_offset = Signal(intbv(0)[13:]) input_udp_ip_ttl = Signal(intbv(0)[8:]) - input_udp_ip_protocol = Signal(intbv(0)[8:]) input_udp_ip_header_checksum = Signal(intbv(0)[16:]) input_udp_ip_source_ip = Signal(intbv(0)[32:]) input_udp_ip_dest_ip = Signal(intbv(0)[32:]) @@ -470,7 +467,6 @@ def bench(): ip_flags=input_udp_ip_flags, ip_fragment_offset=input_udp_ip_fragment_offset, ip_ttl=input_udp_ip_ttl, - ip_protocol=input_udp_ip_protocol, ip_header_checksum=input_udp_ip_header_checksum, ip_source_ip=input_udp_ip_source_ip, ip_dest_ip=input_udp_ip_dest_ip, @@ -586,7 +582,6 @@ def bench(): input_udp_ip_flags, input_udp_ip_fragment_offset, input_udp_ip_ttl, - input_udp_ip_protocol, input_udp_ip_header_checksum, input_udp_ip_source_ip, input_udp_ip_dest_ip, diff --git a/tb/test_udp.v b/tb/test_udp.v index 278552e2..e6ba1c71 100644 --- a/tb/test_udp.v +++ b/tb/test_udp.v @@ -71,7 +71,6 @@ reg [15:0] input_udp_ip_identification = 0; reg [2:0] input_udp_ip_flags = 0; reg [12:0] input_udp_ip_fragment_offset = 0; reg [7:0] input_udp_ip_ttl = 0; -reg [7:0] input_udp_ip_protocol = 0; reg [15:0] input_udp_ip_header_checksum = 0; reg [31:0] input_udp_ip_source_ip = 0; reg [31:0] input_udp_ip_dest_ip = 0; @@ -183,7 +182,6 @@ initial begin input_udp_ip_flags, input_udp_ip_fragment_offset, input_udp_ip_ttl, - input_udp_ip_protocol, input_udp_ip_header_checksum, input_udp_ip_source_ip, input_udp_ip_dest_ip, @@ -330,7 +328,6 @@ UUT ( .input_udp_ip_flags(input_udp_ip_flags), .input_udp_ip_fragment_offset(input_udp_ip_fragment_offset), .input_udp_ip_ttl(input_udp_ip_ttl), - .input_udp_ip_protocol(input_udp_ip_protocol), .input_udp_ip_header_checksum(input_udp_ip_header_checksum), .input_udp_ip_source_ip(input_udp_ip_source_ip), .input_udp_ip_dest_ip(input_udp_ip_dest_ip), diff --git a/tb/test_udp_64.py b/tb/test_udp_64.py index 3b4e6d1c..dd1c54d1 100755 --- a/tb/test_udp_64.py +++ b/tb/test_udp_64.py @@ -111,7 +111,6 @@ def dut_udp(clk, input_udp_ip_flags, input_udp_ip_fragment_offset, input_udp_ip_ttl, - input_udp_ip_protocol, input_udp_ip_header_checksum, input_udp_ip_source_ip, input_udp_ip_dest_ip, @@ -231,7 +230,6 @@ def dut_udp(clk, input_udp_ip_flags=input_udp_ip_flags, input_udp_ip_fragment_offset=input_udp_ip_fragment_offset, input_udp_ip_ttl=input_udp_ip_ttl, - input_udp_ip_protocol=input_udp_ip_protocol, input_udp_ip_header_checksum=input_udp_ip_header_checksum, input_udp_ip_source_ip=input_udp_ip_source_ip, input_udp_ip_dest_ip=input_udp_ip_dest_ip, @@ -322,7 +320,6 @@ def bench(): input_udp_ip_flags = Signal(intbv(0)[3:]) input_udp_ip_fragment_offset = Signal(intbv(0)[13:]) input_udp_ip_ttl = Signal(intbv(0)[8:]) - input_udp_ip_protocol = Signal(intbv(0)[8:]) input_udp_ip_header_checksum = Signal(intbv(0)[16:]) input_udp_ip_source_ip = Signal(intbv(0)[32:]) input_udp_ip_dest_ip = Signal(intbv(0)[32:]) @@ -484,7 +481,6 @@ def bench(): ip_flags=input_udp_ip_flags, ip_fragment_offset=input_udp_ip_fragment_offset, ip_ttl=input_udp_ip_ttl, - ip_protocol=input_udp_ip_protocol, ip_header_checksum=input_udp_ip_header_checksum, ip_source_ip=input_udp_ip_source_ip, ip_dest_ip=input_udp_ip_dest_ip, @@ -604,7 +600,6 @@ def bench(): input_udp_ip_flags, input_udp_ip_fragment_offset, input_udp_ip_ttl, - input_udp_ip_protocol, input_udp_ip_header_checksum, input_udp_ip_source_ip, input_udp_ip_dest_ip, diff --git a/tb/test_udp_64.v b/tb/test_udp_64.v index dbce9b8c..556324b4 100644 --- a/tb/test_udp_64.v +++ b/tb/test_udp_64.v @@ -72,7 +72,6 @@ reg [15:0] input_udp_ip_identification = 0; reg [2:0] input_udp_ip_flags = 0; reg [12:0] input_udp_ip_fragment_offset = 0; reg [7:0] input_udp_ip_ttl = 0; -reg [7:0] input_udp_ip_protocol = 0; reg [15:0] input_udp_ip_header_checksum = 0; reg [31:0] input_udp_ip_source_ip = 0; reg [31:0] input_udp_ip_dest_ip = 0; @@ -188,7 +187,6 @@ initial begin input_udp_ip_flags, input_udp_ip_fragment_offset, input_udp_ip_ttl, - input_udp_ip_protocol, input_udp_ip_header_checksum, input_udp_ip_source_ip, input_udp_ip_dest_ip, @@ -340,7 +338,6 @@ UUT ( .input_udp_ip_flags(input_udp_ip_flags), .input_udp_ip_fragment_offset(input_udp_ip_fragment_offset), .input_udp_ip_ttl(input_udp_ip_ttl), - .input_udp_ip_protocol(input_udp_ip_protocol), .input_udp_ip_header_checksum(input_udp_ip_header_checksum), .input_udp_ip_source_ip(input_udp_ip_source_ip), .input_udp_ip_dest_ip(input_udp_ip_dest_ip),