Question: given this : parameter P 1 = 2 4 ; localparam P 2 = 2 5 ; reg [ 7 : 0 ] y; .

given this :
parameter P1=24;
localparam P2=25;
reg [7:0] y;
.....................................
initial
begin
#100 P1=25;
#100 P2=26;
#100 y = P1+P2;
end
This code contains errors, What are they?
A parameter doesnt need an = in line 1
B P1 cannot be changed in the initial block in line7
C P2 cannot be changed in the initial block in line 8
D y cannot be set to unsized number P1, P2 in line 9

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!