F
flowrian
Guest
module p_odd (y, d_in, clk, rst);
input clk,rst,d_in;
output y;
reg y;
wire w1,d;
always @(posedge clk or negedge rst)
begin
w1 <= y^d_in;
d <= w1;
if (!rst)
y = 0;
else
y <= d;
end
endmodule
I don't know where it is wrong.
<a href ="http://www.clien.net/zboard/data/kin/dff.gif"
target="_blank">Please click this!</a>
input clk,rst,d_in;
output y;
reg y;
wire w1,d;
always @(posedge clk or negedge rst)
begin
w1 <= y^d_in;
d <= w1;
if (!rst)
y = 0;
else
y <= d;
end
endmodule
I don't know where it is wrong.
<a href ="http://www.clien.net/zboard/data/kin/dff.gif"
target="_blank">Please click this!</a>