Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter1: A First Program Using C#
Section: Chapter Questions
Problem 10RQ: The C# method that produces a line of output on the screen and then positions the cursor on the next...
icon
Related questions
Question

Need explanation of this code..that is explain the code and how it works

Verilog
module testbench2 ();
reg a, b, c;
wire y;
// instantiate device under test
sillyfunction dut (a, b, c, y);
// apply inputs one at a time
// checking results
initial begin
a = 0; b = 0; c = 0; #10;
if (y !== 1) $display(“000 failed.");
C = 1;
if (y !== 0) $display(“001 failed.");
b = 1; c = 0;
#10;
#10;
if (y !== 0) $display(“010 failed.");
c = 1;
#10;
if (y !== 0) $display(“011 failed.");
a = 1; b = 0; c
= 0; #10;
if (y !== 1) $display(“100 failed.");
c = 1;
#10;
if (y !== 1) $display("101 failed.");
b = 1; c = 0;
#10;
if (y !== 0) $display(“110 failed.");
C = 1;
if (y !== 0) $display(“111 failed.");
#10;
end
endmodule
Transcribed Image Text:Verilog module testbench2 (); reg a, b, c; wire y; // instantiate device under test sillyfunction dut (a, b, c, y); // apply inputs one at a time // checking results initial begin a = 0; b = 0; c = 0; #10; if (y !== 1) $display(“000 failed."); C = 1; if (y !== 0) $display(“001 failed."); b = 1; c = 0; #10; #10; if (y !== 0) $display(“010 failed."); c = 1; #10; if (y !== 0) $display(“011 failed."); a = 1; b = 0; c = 0; #10; if (y !== 1) $display(“100 failed."); c = 1; #10; if (y !== 1) $display("101 failed."); b = 1; c = 0; #10; if (y !== 0) $display(“110 failed."); C = 1; if (y !== 0) $display(“111 failed."); #10; end endmodule
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Computing Algorithms
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,