Question

1. Write the equivalent gate level HDL for the code given below and Simulate it. module...

1. Write the equivalent gate level HDL for the code given below and Simulate it.

module example(w,x,y,z,a,b,c,d);

input a,b,c,d;

output w,x,y,z;

wire w,x,y,z;

assign w = (a&b)|(a&(~c)&(~d));

assign x = (~b&c)|(~b&d)|(b&(~c)&(~d));

assign y = c^d;

assign z = d;

endmodule

Homework Answers

Answer #1

code:

output :

raw_code:


module example(w,x,y,z,a,b,c,d);
input a,b,c,d;
output w,x,y,z;
wire w,x,y,z;
wire bn,cn,dn;
wire m1,m2,m3,m4,m5; //declaring internal wire

not no1(bn,b); //negotiations of b,c,d
not no2(cn,c);
not no3(dn,d);

and a1(m1,a,b); //computing w
and a2(m2,a,cn,dn);
or o1(w,m1,m2);

and a3(m3,bn,c); //computing x
and a4(m4,bn,d);
and a5(m5,b,cn,dn);
or o2(x,m3,m4,m5);

xor x1(y,c,d); //computinig y

buf b1(z,d); //computing z

endmodule

***do comment for queries and rate me up*****

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Problem 4 - 5 Pts] Verilog [Part 4.1 - 5 Pts] What does the Verilog code...
Problem 4 - 5 Pts] Verilog [Part 4.1 - 5 Pts] What does the Verilog code below do? Provide as much detail as possible and provide informative descriptions/labels for the 4 input/outputs. module mystery (W, X, Y, Z); input W, X, Y; output Z; reg [7:0] P; always @ (posedge W or posedge X) begin if (X) P = 8'b00000000; else P = {P[6:0], Y); end assign Z = P[7]; endmodule
The following Verilog module implements module xyz(In,C,Out); input In,C; output Out; wire x,y,In1,Out1; nand n1 (x,In,...
The following Verilog module implements module xyz(In,C,Out); input In,C; output Out; wire x,y,In1,Out1; nand n1 (x,In, C), n2 (y,In1,C), n3 (Out,x,Out1), n4 (Out1,y,Out); not nt (In1,In); endmodule a 2x1 multiplexor b D latch c D flip-flop d RS flip-flop e JK flip-flop
Analyze the following Verilog code and write down its output as pictured in the code. module...
Analyze the following Verilog code and write down its output as pictured in the code. module blocking; reg [0:7] A, B; initial begin: init1 A = 1; #1 A = A + 1; // blocking procedural assignment B = A + 1; $display("Output 1: A= %b B= %b", A, B ); A = 1; #1 A <= A + 1; B <= A + 1; #1 $display ("Output 2: A= %b B= %b", A, B ); end endmodule
1.    Given the following segment of code: (If there is nothing output, write None.) int x;...
1.    Given the following segment of code: (If there is nothing output, write None.) int x; int y; cin >> x; cin >> y; while (x > y) {     x -= 3;     cout << x << " "; } cout << endl;        a.    What are the output and final values of x and y when the input is 10 for x and 0 for y? [2, 2, 2]               Output                                                                                                                                                                                                    x = ______________                                                                                                                                                                                                   ...
Use case statement to implement an 8:1 mutiplexer Verilog HDL module called mux8 with inputs s[2:0],...
Use case statement to implement an 8:1 mutiplexer Verilog HDL module called mux8 with inputs s[2:0], D[7:0] and output Y. write a testbench for the function.
C++ code Please: 1. Write a function to find the first occurrence of a given letter...
C++ code Please: 1. Write a function to find the first occurrence of a given letter in a string, return the index. If not found, return -1. (2’) Input example: str = "Hello World!" find(str, 'e') Input example: str = "a random string" find(str, '3') Output example: 1 Output example: -1
Python: Provide code and result Given 4 values x, y, s, and t. Write a one-line...
Python: Provide code and result Given 4 values x, y, s, and t. Write a one-line command to check if x > y or s > t. If yes, the code should output "True" We try to define a function in Figure 2, please identify two problems with the code. Write an inline if statement to assign x the value 1 if the variable y = 'female' and assign x the value 0 if the variable y = 'male'. The...
Let Y ∼ Unif(1, 5) R1. Write code in R that will simulate the setup in...
Let Y ∼ Unif(1, 5) R1. Write code in R that will simulate the setup in question 3a, and hence, allow you to roughly check your answer. 3a. If you generate 5 random numbers based on Y , what is the probability you’ll get more (numbers greater than 4) than (numbers less than or equal to 4)? R2. Write code in R that will simulate the setup in question 3b, and hence, allow you to roughly check your answer. 3b....
a. Sketch the transistor level schematic of a single domino gate that implements the function Y...
a. Sketch the transistor level schematic of a single domino gate that implements the function Y = (A•B•C) + D. The dynamic section of the domino gate should use a foot transistor. (4 points) b. If the output must drive a load of 240 units of capacitance and the input may present a load of 30 units of capacitance, what is the path effort for a rising transition from input A to output Y (3 points) e. What is the...
For 6-7, convert the C code to equivalent MARIE code. You may reference literal values using...
For 6-7, convert the C code to equivalent MARIE code. You may reference literal values using an immediate datum mode as in #1, or assume the value is in a variable of the same name (e.g., one). 6) scanf(“%d”, &x); z=0; for(i=0;i<x;i++)                 scanf(“%d”, &y); if(y==0) z++;                 }                 printf(“%d”, z);
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT