1 Montgomery Modular Multiplication in Hard- ware
1 Montgomery Modular Multiplication in Hard- ware
1 Montgomery Modular Multiplication in Hard- ware
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
FEI KEMT<br />
plement the program code. The fully hard<strong>ware</strong> solution needs greater logic resources<br />
and eventually some data memory. In a mixed hard<strong>ware</strong>-soft<strong>ware</strong> design, parallel<br />
and time critical operations can be done <strong>in</strong> a hard<strong>ware</strong> (dedicated coprocessors)<br />
and complex sequential and control operations <strong>in</strong> a soft<strong>ware</strong> (ma<strong>in</strong> processor). In<br />
our SOC design the speedup factor of the coprocessor application <strong>in</strong> relationship to<br />
the entirely soft<strong>ware</strong>-based solution can be measured quite easily: both implemen-<br />
tations use the same embedded processor, Altera Nios soft core described further <strong>in</strong><br />
the follow<strong>in</strong>g paragraph.<br />
Embedded Nios Processor The Nios CPU [10] is a pipel<strong>in</strong>ed general-purpose<br />
RISC processor that is generated by proprietary Altera VHDL generator (SOPC<br />
Builder) and can be synthesised and embedded <strong>in</strong> all recent Altera FPGAs. The<br />
Nios supports both 32-bit and 16-bit architectural variants. Both variants use 16-bit<br />
<strong>in</strong>structions. The pr<strong>in</strong>cipal features of the Nios <strong>in</strong>struction set architecture are:<br />
1. large, w<strong>in</strong>dowed register file,<br />
2. simple, complete <strong>in</strong>struction set,<br />
3. powerful address<strong>in</strong>g modes,<br />
4. extensibility.<br />
Exist<strong>in</strong>g Nios peripherals (e.g. UART, timer. . . ) as well as new custom peripherals<br />
can be connected through an Avalon bus [9]. Avalon is a simple bus architecture<br />
designed for connect<strong>in</strong>g on-chip processor(s) and peripheral together <strong>in</strong>to a SOC.<br />
Comparison of Implementations The Nios processor is used as a control unit<br />
<strong>in</strong> mixed implementations and as a ma<strong>in</strong> processor for the soft<strong>ware</strong> implementa-<br />
tion. The 32-bit version of the Nios CPU can optionally be configured to <strong>in</strong>clude<br />
a hard<strong>ware</strong>-supported <strong>in</strong>teger multiplier. The additional logic is used by the MUL<br />
<strong>in</strong>struction to compute 32-bit result <strong>in</strong> three clock cycles 1 . This option is not sup-<br />
ported <strong>in</strong> the 16-bit Nios <strong>in</strong>struction set. In order to obta<strong>in</strong> realistic comparisons,<br />
32-bit Nios CPU with hard<strong>ware</strong> supported MUL <strong>in</strong>struction was used for soft<strong>ware</strong><br />
implementation.<br />
In order to compare them, we have implemented three different systems:<br />
1 When us<strong>in</strong>g the MUL option with Altera Stratix devices, the hard<strong>ware</strong> multiplier uses the<br />
Stratix DSP blocks for implementation.<br />
39