Question: (a) Complete the following code by defining a macro Sum. Use parameters to initialize the numbers to 9 and 11. always @(posedge clk) begin $display(The
(a) Complete the following code by defining a macro Sum. Use parameters to initialize the numbers to 9 and 11.
always @(posedge clk)
begin
$display("The sum of %d and %d is %d", A, B, Sum(A,B));
$stop;
$display("This sentence should be on the screen");
end
(b) What will the completed code print on the screen when it executes?
Step by Step Solution
3.44 Rating (167 Votes )
There are 3 Steps involved in it
a Add the following lines ... View full answer
Get step-by-step solutions from verified subject matter experts
