sobella1923
Newbie level 4
- Joined
- Jun 17, 2013
- Messages
- 7
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 43
hi!
im trying to write a verilog prog that inserts an even parity at the end of the data. i need some help in debugging it. thx
module parity(data,vparity);
input [4:0] data;
output vparity;
integer i;
reg [4:0] data;
reg parity;
reg vparity;
initial
begin
assign data=5'b10100;
assign parity = 1'b0;
for (i= 0; i < 5; i = i + 1)
begin
assign parity = parity ^ data;
end
assign vparity={data, vparity};
end
endmodule
im trying to write a verilog prog that inserts an even parity at the end of the data. i need some help in debugging it. thx
module parity(data,vparity);
input [4:0] data;
output vparity;
integer i;
reg [4:0] data;
reg parity;
reg vparity;
initial
begin
assign data=5'b10100;
assign parity = 1'b0;
for (i= 0; i < 5; i = i + 1)
begin
assign parity = parity ^ data;
end
assign vparity={data, vparity};
end
endmodule