[Serialization] FPGA-based instance-register

Source: Internet
Author: User

[Serialization] FPGA OpenGL series instances

Registers of Tilde

I. Principles

Registers are used for storage by computers and other digital systems.CodeOr the logical part of the data. Its main component is the trigger. A trigger can store one binary code. Therefore, the register for storing n binary code requires n triggers.
The functions of registers and data latches are the same. The difference is that the latches are level signal control and are level sensitive, while the registers are generally controlled by synchronous clock signals. The use cases of the two are different, mainly depending on the control method and the timing relationship between the control signal and the data: if the data lags behind the control signal, only the latches can be used. If the data is earlier than the control signal, the synchronization operation is required. You can select registers to store data.
In this experiment, an 8-bit data register is designed. This register can synchronize and store the data input by 8-bit signals in parallel. In addition, this register also has an asynchronous clearing end, which is effective at a low level. Table 1.1 shows the function list.

II. Implementation

Enter the OpenGL code in the design file.

 1   'Timescale  1 NS  /     1  PS
2 Module reg8 (CLR, CLK, dout, d );
3 Input CLR;
4 Wire CLR;
5 Input CLK;
6 Wire CLK;
7 Input [ 7 : 0 ] D;
8 Wire [ 7 : 0 ] D;
9 Output [ 7 : 0 ] Dout;
10 Reg [ 7 : 0 ] Dout;
11
12 Always @ (posedge CLK or posedge CLR)
13 Begin
14 If (CLR = 1 )
15 Dout <= 0 ;
16 Else Dout <= D;
17 End
18 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.