Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

image processing on fpga problem

Status
Not open for further replies.

hodahussein

Full Member level 2
Joined
Apr 17, 2007
Messages
144
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,276
dear all



i do some processing on image stored in fpga block ram virtex2pro30.

i want to do this equation x= A+2*i*k where A and K are constant and i is counter





i wait your reply for very importance



regards
 

When A,K are constants and i is counter so why not use LUT ?
 

could you tell me how i can use LUT?plz
 

Its simple ROM. You have to store "X" values in e.g. BRAM and read from it depending on "I" value. Lets say A = 1, K = 2 so considering your equation: x(i) = A + 2*i*K you will get:

x(0) = 1 + 2*0*2 = 1
x(1) = 1 + 2*1*2 = 5
x(2) = 1 + 2*2*2 = 9
etc.

So you fill ROM with values 1,5,9 etc and to the input address of ROM you connect your counter.

Hope this helps.
 

x= A+2*i*k only needs 1 multiplier and an adder. No need for a rom.
 

Yes, thats true. I gave just one solution.

But which will be faster?
 

hi tricky

how can i do multiplier and is it cost (tack resouce form fpga)

wait your reply
 

multiplier should use less resources. Virtex 2 have embedded multipliers so you can use them.

Are you trying to use VHDL or Verilog?
 

dear tricky
are you mean it should use ip [multiplier] ? or what?
plz explaine

regards
 

If "i" is a linearly incrementing counter, then all you would need is an adder I'd say.

Anticipating the next question, let me pre-emptively answer it with a question:
What are typical values of "i" you run through on say an example that runs for 100 cycles? From 0 to 99? Cool! What are A and K? Got values? excellent. Now calculate "x", and see if you see a pattern emerging here? ;-)

As already suggested, you can use a lookup table, or a multiplier, or an adder. All these can give you a solution. Which is best depends on the values of A, K and the sequence of your "i" counter. Not to mention clock speed, what parts, etc.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top