Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
std:start [2023/04/08 16:16] – [Functions] rajitstd:start [2025/09/16 14:33] (current) – [Runtime Functions] rajit
Line 34: Line 34:
 Given the current ''W''-bit state of a Fibonacci-style linear feedback shift register (LFSR), compute the next state. The LFSR has ''N'' taps, and the ith tap is at location ''taps[i]''. Given the current ''W''-bit state of a Fibonacci-style linear feedback shift register (LFSR), compute the next state. The LFSR has ''N'' taps, and the ith tap is at location ''taps[i]''.
  
 +<code act> 
 +export template<pint W; pint N; pint taps[N]> function galois_lfsr (int<W> state) : int<W>; 
 +</code> 
 +Given the current ''W''-bit state of a Galois-style linear feedback shift register (LFSR), compute the next state. The LFSR has ''N'' taps, and the ith tap is at location ''taps[i]''.
  
  
Line 74: Line 77:
   * [[cells|cells]]: A simple synchronous standard-cell library   * [[cells|cells]]: A simple synchronous standard-cell library
   * [[io|io]]: Standard I/O primitives   * [[io|io]]: Standard I/O primitives
 +  * [[bit|bit]]: Bit-manipulation functions