![]() The function they write should use the following taps: 32 30 26 and 25 You must write main in C that calls the ARM/AVR/IA32-x86 assembly lfsr function and displays the first twenty 32 bit values generated when starting with a seed value of 0x5AA5FF00. Note that one bit shift generates one bit and 32 NEW bits must be generated for return to the caller each time the function is called. You must write the function in C first, and then write your own COMMENTED assembly language version that is *different* than the code generated by a compiler. if argument seed !=0 it is used as the initial "seed" value if argument seed =0 it returns the next 32 bit value in the sequence Unsigned long lfsr32 ( unsigned long seed ) Write a 32 bit pseudo-random number generator function, using a 32 bit LFSR (Linear Feedback Shift Register) - see:Īnimated graphic illustrating a 4 bit LFSR:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |