Forum Discussion
Altera_Forum
Honored Contributor
15 years agoNios II custom instruction faster in 32bit or 128bit
Hi all, Will the NIOS II run faster processing 128bit data using 128-bit custom instruction or 32bit custom instruction and run 4 times? Since NIOS II is 32-bit processor. Thanks..
Altera_Forum
Honored Contributor
15 years agoEverything is just a number!
The C 'char' type is just a 8-bit number, you can think of the input/output as using base 256 where some of the values are impossible to type! In C all arithmetic on types smaller than 'int' is done by converting the value to 'int', doing the maths, then masking off the high bits if the value is saved to a char variable. char is usually signed. (This is probably because the pdp11 only had a sign-extending byte read!) This means that 'unsigned char' gets promoted to 'int' (not 'unsigned int') unless 'sizeof (int) == 1'.