Skip to content

Commit 82fab8d

Browse files
author
Mario Ruiz
committed
Change the use of tuser to id connections for tdest
1 parent 6562a0c commit 82fab8d

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

hls/UDP/udp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void udpRxEngine (
191191

192192
/**
193193
* @brief This module reads the metadata and forward the payload depending on the socket status.
194-
* If the payload is forwarded, the id is included in both tuser and tdest
194+
* If the payload is forwarded, the id is included in tdest
195195
*
196196
* @param repdDataIn Input Payload
197197
* @param repdMetaIn Input Metadata, id and drop decision
@@ -252,7 +252,7 @@ void appGetMetaData (
252252
case GET_METADATA:
253253
if (!DataIn.empty()){
254254
DataIn.read(currWord);
255-
idOut.write(currWord.user);
255+
idOut.write(currWord.dest);
256256
DataOut.write(axiWord(currWord.data,currWord.keep,currWord.last));
257257

258258
lenCount = 64;

hls/UDP/udp.hpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ template<int D>
4040
struct my_axis_udp {
4141
ap_uint< D > data;
4242
ap_uint<D/8> keep;
43-
ap_uint<16> user;
4443
ap_uint<16> dest;
4544
ap_uint< 1> last;
4645
my_axis_udp() {}
47-
my_axis_udp(ap_uint<D> data, ap_uint<D/8> keep, ap_uint<16> user, ap_uint<1> last)
48-
: data(data), keep(keep), user(user), dest(user), last(last) {}
46+
my_axis_udp(ap_uint<D> data, ap_uint<D/8> keep, ap_uint<16> dest, ap_uint<1> last)
47+
: data(data), keep(keep), dest(dest), last(last) {}
4948
};
5049

5150
typedef my_axis_udp<ETH_INTERFACE_WIDTH> axiWordUdp;

hls/UDP/udp_tb.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void readTxtFile () {
6666
currWord.last = 1;
6767
DataInApp.write(currWord);
6868
AppRxGolden.write(currWord);
69-
currWord.user = 0;
69+
currWord.dest = 0;
7070
}
7171
else if (((i + 1) % 64) == 0){
7272
DataInApp.write(currWord);
@@ -180,10 +180,10 @@ int main(void){
180180
#endif
181181
rxErrors--;
182182
}
183-
if (goldenWord.user != currWord.user){
183+
if (goldenWord.dest != currWord.dest){
184184
#ifndef DEBUG
185185
std::cerr << "Rx path, packet[" << std::setw(4) << rxPacket << "][" << std::setw(2);
186-
std::cerr << rxBeat << "] user field does not match golden data" << std::endl;
186+
std::cerr << rxBeat << "] dest field does not match golden data" << std::endl;
187187
#endif
188188
rxErrors--;
189189
}

scripts/udp_script.tcl

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ set_part ${fpga_part} -tool vivado
2323
create_clock -period 2.5 -name default
2424
set_clock_uncertainty 0.2
2525

26+
csim_design
27+
2628
config_rtl -disable_start_propagation
2729
csynth_design
2830
export_design -rtl verilog -format ip_catalog

0 commit comments

Comments
 (0)