Solution of Verilog HDL by Samir Palnitkar
Solution of Verilog HDL by Samir Palnitkar
Define a function to calculate the factorial of a 4-bit number. The output is a 32-bit value.
2. Define a function to multiply two 4-bit numbers a and b. The output is an 8-bit value. Invoke the function by using stimulus and check results.
Define a task to compute the factorial of a 4-bit number. The output is a 32bit value. The result is assigned to the output after a delay of 10 time units.
Define a task to compute even parity of a 16-bit number. The result is a 1-bit value that is assigned to the output after three positive edges of clock.(Hint: Use a repeat loop in the task).
6.Using named events, tasks, and functions, design the traffic signal controller in Traffic Signal Controller