MRFGUY
Full Member level 1
- Joined
- Sep 16, 2003
- Messages
- 98
- Helped
- 9
- Reputation
- 18
- Reaction score
- 3
- Trophy points
- 1,288
- Activity points
- 1,049
74ls74
Hi,
I just start to learn HDL and choose to study verilog. I try to write D-FF (74ls74), but it shows some errors. I've seen some D-FF example but those did not include preset and clear.
What wrong with my program? Please help me. Thanks alot.
Following is my program by using Xilinx
module dffpc(d, q, preset, clear, clk);
input d, preset, clear, clk;
output q;
reg q;
always @ (posedge clk or posedge clear or posedge preset)
begin
if (preset)
begin
if(clear)
q<=d;
else
q<=0;
end
else q<=1;
end
endmodule
ERRORS:
WARNING:Xst:1467 - dffpc.v line 11: Reset or set value is not constant in <q>. It could involve simulation mismatches
ERROR:Xst:899 - dffpc.v line 11: The logic for <q> does not match a known FF or Latch template.
Hi,
I just start to learn HDL and choose to study verilog. I try to write D-FF (74ls74), but it shows some errors. I've seen some D-FF example but those did not include preset and clear.
What wrong with my program? Please help me. Thanks alot.
Following is my program by using Xilinx
module dffpc(d, q, preset, clear, clk);
input d, preset, clear, clk;
output q;
reg q;
always @ (posedge clk or posedge clear or posedge preset)
begin
if (preset)
begin
if(clear)
q<=d;
else
q<=0;
end
else q<=1;
end
endmodule
ERRORS:
WARNING:Xst:1467 - dffpc.v line 11: Reset or set value is not constant in <q>. It could involve simulation mismatches
ERROR:Xst:899 - dffpc.v line 11: The logic for <q> does not match a known FF or Latch template.