always @(posedge clk or negedge reset) begin
if(~reset) begin
data1_temp <= 8'b00000000;
data2_temp <= 8'b00000000;
end
else begin
data1_temp <= data1;
data2_temp <= data2;
end
end
always @(posedge clk or negedge reset) begin
if(~reset) begin
D1 <= 8'b00000000;
D1_temp <= 8'b00000000;
end
else begin
D1 <= data1_temp;
D1_temp <= D1;
end
end
always @(negedge clk or negedge reset) begin
if(~reset) begin
D2 <= 8'b00000000;
D2_temp <= 8'b00000000;
end
else begin
D2 <= data2_temp;
D2_temp <= D2;
end
end
always @(clk, D1, D2)
if(~clk)
DB = D1;
else
DB = D2;