|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
The function we want to implement in hardware is the well-know Factorial noted with an exclamation mark :
0 ! = 1 (by convention)
1 ! = 1
N ! = N x (N-1) x (N-2) …. x 2 x 1
This function is easy to define using recursion :
N ! = N x (N-1) !
We'll see that we can code the recursion while keeping the code synthesizable. |
|