cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,249 Views
Registered: ‎02-04-2015

Passing packed struct with member named *_id through HLS axis stream gives ERROR: [RTGEN 206-102]

The minimal example below gives the following error during HLS Synthesis using Vivado HLS 2017.2:

 

 

INFO: [HLS 200-10] ----------------------------------------------------------------
INFO: [HLS 200-10] -- Generating RTL for module 'test'
INFO: [HLS 200-10] ----------------------------------------------------------------
INFO: [RTGEN 206-500] Setting interface mode on port 'test/intf_stream_V_a_V' to 'axis' (register, both mode).
INFO: [RTGEN 206-500] Setting interface mode on port 'test/intf_stream_V_b_id_V' to 'axis' (register, both mode).
INFO: [RTGEN 206-500] Setting interface mode on function 'test' to 'ap_ctrl_hs'.
ERROR: [RTGEN 206-102] Read value from an output port: 'test/intf_stream_TVALID' to 'test/intf_stream_V_b_id_V_0_vld_in'.
ERROR: [HLS 200-103] Read value from an RTL output.

Source:

 

#include <ap_fixed.h>
#include <hls_stream.h>

typedef struct {
  ap_uint<8>   a;
  ap_uint<8>   b_id;
} intf_t;

void test( hls::stream<intf_t>   &intf_stream )
  {
  #pragma HLS INTERFACE axis port=intf_stream
  #pragma HLS DATA_PACK variable=intf_stream

  intf_t intf;
  intf.a = 3;
  intf.b_id = 2;

  intf_stream.write(intf);

}

This error disappears if any one of the following is changed:

 

  • The struct member b_id is renamed (e.g. to b_index, b_ad or just b)
  • The DATA_PACK directive is removed
  • The INTERFACE axis directive is removed

Is this a known bug?

 

0 Kudos
2 Replies
Highlighted
Explorer
Explorer
1,185 Views
Registered: ‎10-09-2014

This has something to do with the fact that new HLS uses any axi-like fields including *_id, *_dest to infer axi stream field, so it will break all any interface struct with those naming conventions with axis and DATAPACK pragma. We had the same problem before, hope HLS can be smarter....

Highlighted
Moderator
Moderator
1,122 Views
Registered: ‎10-04-2011

Hello @alexlee256,

 

I know we have had some issues with this in the past as @linzhongduo mentioned. I tested your code example out with 2017.4 and do not see the error you mention. I made sure I tested with the directives included for this since you did a good job of isolating what triggered this. I also tested again in 2017.2 just to make sure it failed as you described, which it does. Do you have access to the 2017.4 and can you test that out? 

OK, thank you for bringing this up @alexlee256 and for the good naming suggestions @linzhongduo.

Regards,
Scott

 

 

0 Kudos