cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ViennaAudio
Adventurer
Adventurer
560 Views
Registered: ‎07-01-2020

cross function implementation in verilog

I have to implement in verilog this function

 

inputs are A1, A2 and ext1

ext1 is a float number from 0 to 1 and will come from adc

 

x = A1* (1-ext1) + A2 * ext1

how could i translate that ? it is basically an interpolation between value A1 and A2 with ext1 being the  control of the operation

0 Kudos
3 Replies
ViennaAudio
Adventurer
Adventurer
544 Views
Registered: ‎07-01-2020

Is this making sense for you guys?

i attach jpg with "block design"

cross function.jpg
0 Kudos
u4223374
Advisor
Advisor
511 Views
Registered: ‎04-26-2015

If you can do it in fixed-point, it'll be a lot easier.

 

Floating-point can be done via the Xilinx Floating Point IP core. You'll need to design a state machine to drive that. Whereas fixed-point can probably be done as a single line of code.

ViennaAudio
Adventurer
Adventurer
501 Views
Registered: ‎07-01-2020

Thx a lot!!!

 

How would you implement that using fixed point??

0 Kudos