[Serialization] FPGA-based instance of the Tilde-HDL series-data selector

Source: Internet
Author: User

[Serialization] FPGA OpenGL series instances

Data Selector Based on OpenGL

I. Principles

Data selection refers to transferring data from multiple channels to the unique public data channel after selection. The logical circuit that enables data selection is called a data selector. It acts as a single-knife, multi-Throw Switch with multiple inputs.

Table 1.1 select a data selector truth table

II. Implementation

In the design file, enterCode

 1   'Timescale  1  NS  /     1 PS
2
3 Module mux8_1 (Y, A, D0, D1, D2, D3, D4, D5, D6, D7, G );
4
5 Input [ 2 : 0 ];
6 Wire [ 2 : 0 ];
7 Input D0;
8 Input D1;
9 Input D2;
10 Input D3;
11 Input D4;
12 Input D5;
13 Input D6;
14 Input D7;
15
16 Input g;
17 Wire g;
18
19 Output y;
20 Reg y;
21
22 Always @ (G or a or D0 or D1 or D2 or D3 or D4 or D5 or D6 or D7)
23 Begin
24 If (G = 1 )
25 Y <= 0 ;
26 Else
27 Case ()
28 3 ' B000: Y = D0;
29 3 ' B001: Y = D1;
30 3 ' B010: Y = d2;
31 3 ' B011: Y = D3;
32 3 ' B100: Y = D4;
33 3 ' B101: Y = D5;
34 3 ' B110: Y = D6;
35 3 ' B111: Y = D7;
36 Default : Y = 0 ;
37 Endcase
38 End
39
40 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.