a floating point divider for complex numbers in the nios ii presented by john-marc desmarais...

14
A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino , Martin Klemm, Daniel Shapiro and Miodrag Bolic Email: {dshap092, mbolic}@site.uottawa.ca

Upload: samantha-atkins

Post on 21-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

A Floating Point Divider for Complex Numbers in the NIOS II

Presented by John-Marc DesmaraisAuthors: Philipp Digeser, Marco Tubolino , Martin Klemm, Daniel Shapiro and Miodrag BolicEmail: {dshap092, mbolic}@site.uottawa.ca

Page 2: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Overview

Floating point division Instruction Set Extensions (ISE) NIOS II processor Instruction hardware Software interface Experiment Conclusion

carg.site.uottawa.ca

CARG 2010

Page 3: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Floating Point Division

carg.site.uottawa.ca

CARG 2010

Unlike real multiplication or real division, mathematicaloperations for complex numbers are usually provided by slowsoftware. Consider complex division:

Slow

Page 4: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Floating Point Division

• Fast complex dividers are necessary to drive an increasing number of applications such as signal processing systems for image and audio manipulation, GPS, and multi-antenna systems.

• Example: STSDAS offers math libraries for image analysis, including stsdas.analysis.fourier.carith, which is used to multiply or divide two complex images1.

carg.site.uottawa.ca

CARG 2010

1http://stsdas.stsci.edu/cgibin/gethelp.cgi?carith.hlp

Page 5: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Instruction Set Extensions

carg.site.uottawa.ca

ISE(Instruction Set Extensions)

Instruction-Set Extensions, as the name implies, involves the addition of custom instructions to a processor’s instruction set.

CARG 2010

Many market processors allow for the addition of these internal custom instructions:1. Tensilica Xtensa (VLIW)2. Altera NIOS II3. Xilinx Microblaze4. MIPS CorExtend

In recent years there has been much research into the area of automatic identification of Instruction Set Extensions.

Page 6: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Instruction Set Extensions

carg.site.uottawa.ca

ISE(Instruction Set Extensions)

These automated efforts vary in their approach. Some look at the functional C level of the program where hotspot functions are identified. Others look lower at the basic construct of the program as data and control flow graphs.

CARG 2010

+

/ >>

x

yz

Modify ISAAdd

Custom Hardware

Modify Compiler, ASM & LD

Regenerate Custom Program

Page 7: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Instruction Set Extensions

carg.site.uottawa.ca

• An ISE candidate has limited IO access to the register file.

• The instruction width also poses an IO barrier.

Possible Remedies:1. Multiport Register File2. Register File Replication3. Shadow Registers4. Multicycle Reads (Altera’s NIOS II)5. Dedicated Data Links (Microblaze)

25 05610111516202131 26

opcode rs rt rd shamt funct

CARG 2010

Solution (Pozzi05):We use multicycle reads/writes from/to

the register bank in order to squeeze several operands into the two input-one-output register file.

Page 8: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

NIOS II Processor

carg.site.uottawa.ca

CARG 2010

Generic custom instruction datapath Our custom logic block

Page 9: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Instruction Hardware

carg.site.uottawa.ca

CARG 2010

We can see in these figures that a sequence of three calls to the custom instruction results in a complex operation with four inputs and two outputs.

Cycl

es

Page 10: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Instruction Hardware

carg.site.uottawa.ca

CARG 2010

Operation when n=0 above, n=1 at right.

Page 11: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Software Interface

carg.site.uottawa.ca

CARG 2010

The designed hardware for complex division can be used easily in assembly (by inline) or C/C++ code as shown below:

Page 12: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Experiment

carg.site.uottawa.ca

CARG 2010

We used a NIOS II processor and a PLL as the starting point for the design.

Page 13: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Experiment

carg.site.uottawa.ca

CARG 2010

Page 14: A Floating Point Divider for Complex Numbers in the NIOS II Presented by John-Marc Desmarais Authors: Philipp Digeser, Marco Tubolino, Martin Klemm, Daniel

Conclusion

CARG 2010

carg.site.uottawa.ca

• We designed a complex divider instruction set extension for the NIOS II

• This instruction was able to accelerate the execution of code that uses complex division

• In the future we would like to implement additional complex operations, and publish the core on OPENCORES.org

Applications can be accelerated with instruction set extensions, and complex division is one case where there is a tangible benefit.