Forum Discussion
Altera_Forum
Honored Contributor
22 years agoSign Extend operation
Hi, Now I am worry about performance of Sign Extend operation. for example, char sc(unsgined char uc) { return (signed char) uc; } Nios II GCC will generates following cod...
Altera_Forum
Honored Contributor
22 years agoYa just do a custom instruction. Depending on how fast you want the shift to be, there are various ways of doing it. If you don't care about speed you could use barrel shifter and increase the clock speed so that it shifts faster. (but really it's up to you how you're going to do it).
I call them soft DSP blocks because they use memory to do the operations instead of dedicated hardware (DSP blocks in stratix use dedicated hardware and they do not take up LEs because they are already present in the FPGA).