cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anoir.nechi
Observer
Observer
337 Views
Registered: ‎08-31-2018

Exqmple of ECC encoder using Vitis

Jump to solution

Recently, I am trying to get more involved with Vitis. I need to create Kernel IP based on C for a Hamming encoder (7,4) before getting to the host application, here is my simple code:

#include "hamming_enc.h"

void hamming_enc(const unsigned int *d_in, unsigned int *d_out)
{
#pragma HLS INTERFACE m_axi port=d_in  offset=slave bundle=gmem0
#pragma HLS INTERFACE m_axi port=d_out  offset=slave bundle=gmem1
#pragma HLS INTERFACE s_axilite port=d_in  bundle=control
#pragma HLS INTERFACE s_axilite port=d_out  bundle=control
#pragma HLS INTERFACE s_axilite port=return bundle=control

		d_out[3] = d_in[1];
		d_out[5] = d_in[2];
		d_out[6] = d_in[3];
		d_out[7] = d_in[4];
		d_out[1] = d_in[1]^d_in[2]^d_in[4];
		d_out[2] = d_in[1]^d_in[3]^d_in[4];
		d_out[4] = d_in[2]^d_in[3]^d_in[4];
}

Here I am not sure whether I used the correct pragmas for the argument knowing that:

d_in : input word, int array[4] (example : 1000)

d_out : output coded word, int array[7] (example : 1110000)

I already tested this code and it is working with the testbench

Is there a way to export an IP to a Vitis project from Vivado hls?

Thank you

0 Kudos
1 Solution

Accepted Solutions
hongh
Moderator
Moderator
270 Views
Registered: ‎11-04-2010

You can generate XO file in either Vitis or Vivado hls and import the XO file into the Vitis project.

Such flow is called bottom-up flow.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

1 Reply
hongh
Moderator
Moderator
271 Views
Registered: ‎11-04-2010

You can generate XO file in either Vitis or Vivado hls and import the XO file into the Vitis project.

Such flow is called bottom-up flow.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post