Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

how to constraint the gated clock in the Timequest?

i need to use gated clock in my design, and like following:

module prac (

a,

b,

rst_n,

out

);

input a;

input b;

input rst_n;

output out;

reg out;

wire c;

assign c = a && b;

always @ (posedge c or negedge rst_n)

begin

if (!rst_n)

out <= 1'b0;

else if (c == 1)

out <= ~out;

end

endmodule

i know that using gated clock is not recommanded in sync design,but i need to do,and i don't know how to constraint the gated clcok, somebody help me?

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    O.K. can you tell about the expected a and b timing? Of course, if minimum H and L pulse widths are guaranteed for (a && b), there's probably no problem

    --- Quote End ---

    when a && b == 1, it will keep at least two period---40ns, and a && b == 0,it will keep at least 10us.

    and a,b maybe flip high at the same time, that is uncertain.