floatgrass
Member level 3
delta-cycle change verilog
if i use posedge clock triger always statement ,but A sigal is posedge change,simulator think it as low level,but that is for synthesis ok?
if Pix_Mux_s1[7] change from 0 to 1,at the same time memtemp_v1 change frome one value to another value ,then how to assign? it is after or before the change?
thanks!
always @ (Mem_Pointer_s1 or pixel_s1 or Pix_Mux_s1)
begin
if (Pix_Mux_s1[7])
begin
case (Mem_Pointer_s1)
3'b001: begin
pixelcol_v1[23:16] = pixel_s1;
pixelcol_v1[15:8] = memtemp_v1[15:8];
pixelcol_v1[7:0] = memtemp_v1[7:0];
end
3'b010: begin
pixelcol_v1[23:16] = memtemp_v1[23:16];
pixelcol_v1[15:8] = pixel_s1;
pixelcol_v1[7:0] = memtemp_v1[7:0];
end
3'b100: begin
pixelcol_v1[23:16] = memtemp_v1[23:16];
pixelcol_v1[15:8] = memtemp_v1[15:8];
pixelcol_v1[7:0] = pixel_s1;
end
default: pixelcol_v1 = memtemp_v1; // nothing new is written
endcase
end
end
if i use posedge clock triger always statement ,but A sigal is posedge change,simulator think it as low level,but that is for synthesis ok?
if Pix_Mux_s1[7] change from 0 to 1,at the same time memtemp_v1 change frome one value to another value ,then how to assign? it is after or before the change?
thanks!
always @ (Mem_Pointer_s1 or pixel_s1 or Pix_Mux_s1)
begin
if (Pix_Mux_s1[7])
begin
case (Mem_Pointer_s1)
3'b001: begin
pixelcol_v1[23:16] = pixel_s1;
pixelcol_v1[15:8] = memtemp_v1[15:8];
pixelcol_v1[7:0] = memtemp_v1[7:0];
end
3'b010: begin
pixelcol_v1[23:16] = memtemp_v1[23:16];
pixelcol_v1[15:8] = pixel_s1;
pixelcol_v1[7:0] = memtemp_v1[7:0];
end
3'b100: begin
pixelcol_v1[23:16] = memtemp_v1[23:16];
pixelcol_v1[15:8] = memtemp_v1[15:8];
pixelcol_v1[7:0] = pixel_s1;
end
default: pixelcol_v1 = memtemp_v1; // nothing new is written
endcase
end
end