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.

How do I code convergent rounding with variable scaling in VHDL?

Status
Not open for further replies.

kel8157

Full Member level 2
Full Member level 2
Joined
Nov 14, 2007
Messages
131
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,298
Visit site
Activity points
2,017
Assume the following C code, what's the most efficient method do I use in VHDL, assuming timing is more important than area?

Thank you in advance.

Code:
Assume 8 bit Din, 3 bit scl (scaling factor);

K = 7;

Temp = (Din << (K-scl) + (1<< (K-1));
Dout = (Temp >> K) & ((K&0xFF) ? 0xFF, 0xFE);
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top