I have a basic bistable code, i compile it without any errors, but when i whant to add waveforms after i hit run(f9), my altera program doesn't do anything... Here is my code:
module bistable(input a,
input rst,
input ck,
output reg out);
always@(posedge ck)
if(!rst) out<=0;
else out<=a;
endmodule
Test module:
module test();
reg a;
reg ck;
reg rst;
wire out;
bistable bis(.a(a),.ck(ck),.rst(rst),.out(out));
initial begin
ck=0;
forever ck=~ck;
end
initial begin
a=1;
rst=0;
#14 rst=1;
#20 rst=0;
#10;
$stop;
end
endmodule
I did programs without clock and my waveforms appeared very well, but that's not what I think is the cause of my problem.
Thanks in advance for any help!