Question: CSE 2 2 4 Introduction to Digital Systems Lab Homework Due: Monday, 2 9 / 0 4 / 2 0 2 4 @ 1 7

CSE 224
Introduction to Digital Systems
Lab Homework
Due: Monday, 29/04/2024@17:00
Design a circuit to calculate the power a given 4-bit number, A, by a series of multiplications. Assume
that the power value is a 3-bit number, B. For example, to calculate 7??5, the value of 7**7**7**7**7 must
be calculated by the help of a counter circuit. You can use a temporary Prev register to calculate the
intermediate values until the counter reaches to 5. Write a testbench to test your design with various
input values of A and B.
Hint: You can use the Fibonacci number calculating circuit given in YULearn course page as a template
for your design.
An example run for calculating 75 is given below.
module pow (clk, rst, A, B, out);
input clk, rst;
input [3:0] A;
input [2:0] B;
output reg [27:0] out;
reg [27:0] Prev, PrevN;
reg 2:0 counter, counterN;
// Write your code here
endmodule
Expected Files:
Design file (pow.v)
Testbench file (tb_pow.v)
Waveform screen capture image file to verify the design is working.
CSE 2 2 4 Introduction to Digital Systems Lab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!