reg InPulseQ;
reg InPulseQQ;
电线RisingEdgeDetected;
总是@(posedge Clock)
开始
InPulseQ 以下为原文
input InPulse;
reg InPulseQ;
reg InPulseQQ;
wire RisingEdgeDetected;
always @ ( posedge Clock)
begin
InPulseQ <= InPulse; // register for input synchronization
InPulseQQ <= InPulseQ; // one clock cycle delay
end
assign RisingEdgeDetected = InPulseQ && ~InPulseQQ; // single cycle pulse when rising edge detected
// NOTE: Clock freq must be high enough to capture InPulse;
// in UCF or Planahead, specify pin number (and IO standard) for InPulse input pin
SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.