0% found this document useful (0 votes)
88 views2 pages

Verilog Quiz # 1

The document describes three ways to model a 2:1 multiplexer in Verilog: 1) Using gate-level modeling with OR, AND, and NOT gates. 2) Using continuous assignment statements to assign the output. 3) Using an "always" procedure block with an if-else statement to assign the output based on the select line value. The document is written in Chinese and English and appears to be a quiz asking to implement the 3 approaches to model a 2:1 multiplexer in Verilog.

Uploaded by

Chetan Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views2 pages

Verilog Quiz # 1

The document describes three ways to model a 2:1 multiplexer in Verilog: 1) Using gate-level modeling with OR, AND, and NOT gates. 2) Using continuous assignment statements to assign the output. 3) Using an "always" procedure block with an if-else statement to assign the output based on the select line value. The document is written in Chinese and English and appears to be a quiz asking to implement the 3 approaches to model a 2:1 multiplexer in Verilog.

Uploaded by

Chetan Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Verilog Quiz # 1

Use Verilog to describe the 2:1 multiplexer as shown in the following figure.

1. Use gate-level modeling.


module mux2_1 (SEL, A, B, OUT)

OR
(

input SEL, A, B;
) ;

output OUT ;
NOT (

endmodule

) ;

2. Use continuous assignment


statements.

AND

module mux2_1 (SEL, A, B, OUT)

(
) ;

input SEL, A, B;
output OUT ;

AND

assign Out

=
) ;

;
endmodule

3. Use an "always" procedure block.


module mux2_1 (SEL, A, B, OUT)
input SEL, A, B;
output OUT ;
reg OUT ;
always
@(
) begin
if (SEL)

;
else

;
end
endmodule

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy