Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
tarifeen
Posts: 4
Registered: ‎06-22-2012
0

image processing -verilog and virtex 6

Hi,

I am a beginer and working on a IP project.If someone could please help me with the following questios,will be grateful:

 

1)The image is  .dat file containing the pixel data,do i need to convert the floating point values of pixels to hexadecimal in order to read the file through $readmemh command?what is the method?The file is of 1001*201 pixels i cannot store it as 2D array?

 

2)Since verlog 2001 allows 2D arrays, i tried output reg [6:0] xyz [10:0] but it turns to fail at synthesize since 2D arrays are not synthesizable. what is the tactic to use this? i read about macro and pack unpack array,which belongs to system verilog...can system verilog be used with verilog?still synthesizable?

 

3)The core generator can generate FFT and floating point arithmetic blocks....I am able to generate them but how do i integrate them in my syntheizable verilog code such that I can test them with my own input values.

 

looking forward to all the help.

Thanks a lot

 

 

Xilinx Employee
chrisar
Posts: 383
Registered: ‎08-01-2007
0

Re: image processing -verilog and virtex 6

You have to think about things differntly in hardware.  In hardware, memory is expensive and you typically build smaller arrays, and try to process video through line buffering.  If you do need to story a large number of pixels, you would typically try to store them in external memory and then pull what you need to do processing.

 

I'm gussing that you would probably doing a kernal of say 8x8.  In which case you only need to buffer up 8 lines at a time, while leaving the rest of the data in external memory.

 

Now to specically address your questions.

 

1.  Yes you can save this as a 2D array, which could get converted to memory.  You would want to look at the memory tempaltes in Project Navigator to see how to write this code so that it is synthesizable.  But do keep in mind that comments about on using external memory if you can.

 

2.  See above.

 

3.  Floatingpoint is expensive in hardware, and there is limited support for synthesizable Floatoing Point operations in most syntheis tools.  This is improving and will continue to improve.  In the mean time you will have to deal with these as vectors if you want to use floating point values.  You might want to consider converting to fixed point if possible.  In most cases this is sufficient, though it does take some time to validate that you are expereincing any overflows.

Chris
Visitor
tarifeen
Posts: 4
Registered: ‎06-22-2012
0

Re: image processing -verilog and virtex 6

Thanks for responding :)

 

Can i use the Block RAM from Core Generator to save the image..I tried generating the BRAM ,it asks for .coe file.The image file i have contains floating points (double) since it is .dat format I converted it to CSV  and tried to use memory editor to generate .coe file....but it fails to do so....the image is 1001*201 so i kept write width as 64 and depth as 201201...can you tell where i am going wrong please?

 

So since it is not a good idea to work with floating points ..I also want to convert the data to fixed point...the floating point generator can be used in this regard?

 

Then i also want to use the FFT block as a step in my image processing

 

I am hoping I can keep such a flow that I convert image data to fixed point and then store in BRAM and then apply fft on it...

 

Please guide...I know my questions are vague but i need some directions...

 

Xilinx Employee
Xilinx Employee
ywu
Posts: 2,861
Registered: ‎11-28-2007
0

Re: image processing -verilog and virtex 6

Do you have Matlab fixed-point tool box? If yes, you can easily convert the floatng point numbers to fixed point numbers using the "quantize" function.

 


tarifeen wrote:

Thanks for responding :)

 

Can i use the Block RAM from Core Generator to save the image..I tried generating the BRAM ,it asks for .coe file.The image file i have contains floating points (double) since it is .dat format I converted it to CSV  and tried to use memory editor to generate .coe file....but it fails to do so....the image is 1001*201 so i kept write width as 64 and depth as 201201...can you tell where i am going wrong please?

 

So since it is not a good idea to work with floating points ..I also want to convert the data to fixed point...the floating point generator can be used in this regard?

 

Then i also want to use the FFT block as a step in my image processing

 

I am hoping I can keep such a flow that I convert image data to fixed point and then store in BRAM and then apply fft on it...

 

Please guide...I know my questions are vague but i need some directions...

 




Cheers,
Jim
Visitor
tarifeen
Posts: 4
Registered: ‎06-22-2012
0

Re: image processing -verilog and virtex 6

yes,i have it...ohkays...will try that...

 

what about the other qeuries