cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shuvo_vivado
Visitor
Visitor
1,558 Views
Registered: ‎01-27-2018

How to initialize a HLS IP in SDK XAPP1167_2014.4 (Sobal filter) in Zybo.

Jump to solution

Hi,

Has anybody implemented image processing ip core generated by HLS in Zybo board? I badly need help. I am trying to implement an HLS generated ip core in Zybo board. Initially , I have generated the  XAPP1167_2014.4 (Sobal filter)  in HLS and then added in the Zybo Hdmi demo project. I run bit stream generation but, got a negative slack -69.068ns and no of failing points 92. I am not sure about this error. Then I have export hardware and lunch SDK. I got information from @hbucher about, how to initialize in SDK from HLS development manual. But, it is also not working. The updated code is in the following..But, in the code it gives me the following error..

../src/helloworld.c:106:6: error: 'status' undeclared (first use in this function)
      status = XImage_filter_CfgInitialize(&HlsImage_filter, Image_filterPtr);
      ^
../src/helloworld.c:106:6: note: each undeclared identifier is reported only once for each function it appears in
make: *** [src/helloworld.o] Error 1

updated code:

int main(void)
{
	DemoInitialize();

	DemoRun();

	return 0;
}

XImage_filter HlsImage_filter;
XImage_filter_Config *Image_filterPtr;

void DemoInitialize()
{
		// look up device configuration
	    Image_filterPtr = XImage_filter_LookupConfig(XPAR_XIMAGE_FILTER_0_DEVICE_ID);
		if(!Image_filterPtr){
			xil_printf("ERROR: Lookup of acceleration failed.\n\r");
		}
		// Initialize the device
		status = XImage_filter_CfgInitialize(&HlsImage_filter, Image_filterPtr);
	    if(status != XST_SUCCESS){
		xil_printf("ERROR: Could not initialize accelerator.\n\r");
		exit(-1);
		}
    // Set the input parameter of the HLS block
    XImage_filter_Set_rows(&HlsImage_filter,1080);
    XImage_filter_Set_cols(&HlsImage_filter,1920);
    XImage_filter_Set_C_XR0C0(&HlsImage_filter,1);
    XImage_filter_Set_C_XR0C1(&HlsImage_filter,0);
    XImage_filter_Set_C_XR0C2(&HlsImage_filter,-1);
    XImage_filter_Set_C_XR1C0(&HlsImage_filter,2);
    XImage_filter_Set_C_XR1C1(&HlsImage_filter,0);
    XImage_filter_Set_C_XR1C2(&HlsImage_filter,-2);
    XImage_filter_Set_C_XR2C0(&HlsImage_filter,1);
    XImage_filter_Set_C_XR2C1(&HlsImage_filter,0);
    XImage_filter_Set_C_XR2C2(&HlsImage_filter,-1);

    XImage_filter_Set_C_YR0C0(&HlsImage_filter,1);
    XImage_filter_Set_C_YR0C1(&HlsImage_filter,2);
    XImage_filter_Set_C_YR0C2(&HlsImage_filter,1);
    XImage_filter_Set_C_YR1C0(&HlsImage_filter,0);
    XImage_filter_Set_C_YR1C1(&HlsImage_filter,0);
    XImage_filter_Set_C_YR1C2(&HlsImage_filter,0);
    XImage_filter_Set_C_YR2C0(&HlsImage_filter,-1);
    XImage_filter_Set_C_YR2C1(&HlsImage_filter,-2);
    XImage_filter_Set_C_YR2C2(&HlsImage_filter,-1);
    XImage_filter_Set_c_high_thresh(&HlsImage_filter,200);
    XImage_filter_Set_c_low_thresh(&HlsImage_filter,100);
    XImage_filter_Set_c_invert(&HlsImage_filter,0);	    // start the device and read results
	XImage_filter_Start(&HlsImage_filter);


	int Status;
	XAxiVdma_Config *vdmaConfig;
	int i;

	/*
	 * Initialize an array of pointers to the 3 frame buffers
	 */
	for (i = 0; i < DISPLAY_NUM_FRAMES; i++)
	{
		pFrames[i] = frameBuf[i];
	}

	/*
	 * Initialize a timer used for a simple delay
	 */
	TimerInitialize(SCU_TIMER_ID);

	/*
	 * Initialize VDMA driver
	 */
	vdmaConfig = XAxiVdma_LookupConfig(VGA_VDMA_ID);
	if (!vdmaConfig)
	{
		xil_printf("No video DMA found for ID %d\r\n", VGA_VDMA_ID);
		return;
	}
	Status = XAxiVdma_CfgInitialize(&vdma, vdmaConfig, vdmaConfig->BaseAddress);
	if (Status != XST_SUCCESS)
	{
		xil_printf("VDMA Configuration Initialization failed %d\r\n", Status);
		return;
	}

	/*
	 * Initialize the Display controller and start it
	 */
........

 Zybo HDMI In : https://reference.digilentinc.com/learn/programmable-logic/tutorials/zybo-hdmi-demo/start

any kind of info will be very helpful for me.. 

0 Kudos
1 Solution

Accepted Solutions
hbucher
Scholar
Scholar
2,055 Views
Registered: ‎03-22-2016

@shuvo_vivado No, it is showing that the display resolution is 1080. It's just the data inside the framebuffer that has a smaller colorbar.

Try playing around with the options. Also try to understand how the SDK example works, mainly the framebuffer index. 

 

> What kind of impact has negative slack has on the design. 

 

It is REALLY BAD. This should never happen. Perhaps you developed your HLS component with one frequency (say eg 10ns=100MHz) and then you are driving it with a clock at a higher frequency (say 200 MHz). 

Go back to HLS and increase the period.

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post

0 Kudos
4 Replies
hbucher
Scholar
Scholar
1,553 Views
Registered: ‎03-22-2016

@shuvo_vivado  You have to define

 

int status; 

 

before the function call.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
shuvo_vivado
Visitor
Visitor
1,537 Views
Registered: ‎01-27-2018

@hbucher thank you once again. It seems running now. But, At the output monitor I am getting color bar.  I have designed the ip core for 1080p. But, as the output is VGA which has lower dimension. Is it a reason for that. And my implemented design has a negative slack. What kind of impact has negative slack has on the design. Or should I call it as like the other options.  

 

before.jpg
IMG_0078.JPG
IMG_0079.JPG
0 Kudos
hbucher
Scholar
Scholar
2,056 Views
Registered: ‎03-22-2016

@shuvo_vivado No, it is showing that the display resolution is 1080. It's just the data inside the framebuffer that has a smaller colorbar.

Try playing around with the options. Also try to understand how the SDK example works, mainly the framebuffer index. 

 

> What kind of impact has negative slack has on the design. 

 

It is REALLY BAD. This should never happen. Perhaps you developed your HLS component with one frequency (say eg 10ns=100MHz) and then you are driving it with a clock at a higher frequency (say 200 MHz). 

Go back to HLS and increase the period.

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post

0 Kudos
shuvo_vivado
Visitor
Visitor
1,452 Views
Registered: ‎01-27-2018

Hi @hbucher, the system has three frame buffer. One is the colour bar and the rest are black with some flicker noise. But, have integrated any hls created ip core with this system? Or Should I change any parameter in the block design? 

0 Kudos