Sasi Cm
Junior Member level 1
- Joined
- Aug 22, 2013
- Messages
- 19
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 112
Code:
module encc(a,b,c,clk,temp);
input [0:499]a;
input clk;
output [0:4]temp;
reg [0:4]temp;
output [0:4]b;
output [0:1]c;
reg [0:4]b;
reg [0:1]c;
integer m,n;
always @ (a)
assign b=a[0:4];
always @ (posedge clk)
begin
for(n=5;n<=499;n=n+5)
begin
for(m=9;m<=499;m=m+5)
begin
assign temp=b^a[5:10];
if(temp[0]!=1&&temp[1]!=1&&temp[2]!=1&&temp[3]!=1&&temp[4]!=1)
begin
c<=00;
end
else if(temp[0]!=0&&temp[1]!=0&&temp[2]!=0&&temp[3]!=0&&temp[4]!=0)
begin
c<=10;
end
else
begin
c<=11;
end
end
end
end
endmodule