[Serialization] FPGA-based instance-D Trigger

Source: Internet
Author: User

[Serialization] FPGA OpenGL series instances

D Trigger of OpenGL

I. Principles

A trigger is a logic circuit that can store one-bit binary code. It has two complementary outputs. Its output state is not only related to the input, but also to the original output state.
D-trigger is one of the triggers and the most widely used one. Its characteristic equation is

The logical functions are shown in Table 1.1,

 

II. Implementation

In the design file, enterCode

 1   'Timescale  1  NS  /    1  PS
2
3 Module dflipflop (Q, CLK, reset, set, D, qN );
4
5 Input CLK;
6 Wire CLK;
7 Input reset;
8 Wire reset;
9 Input set;
10 Wire set;
11 Input D;
12 Wire D;
13
14 Output Q;
15 Reg Q;
16 Output Qn;
17 Wire Qn;
18
19 Assign Qn = ~ Q;
20
21 Always @ (posedge CLK or negedge set or negedge reset)
22 Begin
23 If ( ! Reset)
24 Q <= 0 ;
25 Else If ( ! Set)
26 Q <= 1 ;
27 Else Q <= D;
28
29 End
30 Endmodule

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.