Question

In: Computer Science

Short Verilog Answers: a) (1 pt) What is the purpose of using “reg”? How different is...

Short Verilog Answers: a) (1 pt) What is the purpose of using “reg”? How different is it from “wire”? b) (1 pt) What do you mean by blocking and non-blocking statements in Verilog? How are assignments done in blocking and non-blocking statements? c) (2 pts) Given the logic circuit as follows, use Data Flow Modelling to design this circuit using Verilog.

Solutions

Expert Solution

a)  reg elements can be used as output within an actual module declaration. But, reg elements cannot be connected to the output port of a module instantiation. Thus, a reg can drive a wire as RHS of an assign statement. On the other way round, a wire can drive a reg in as RHS of a procedural block.

b)  Blocking Statements: A blocking statement must be executed before the execution of the statements that follow it in a sequential block. In the example below the first time statement to get executed is a = b followed by

Nonblocking Statements: Nonblocking statements allow you to schedule assignments without blocking the procedural flow. You can use the nonblocking procedural statement whenever you want to make several register assignments within the same time step without regard to order or dependence upon each other. It means that nonblocking statements resemble actual hardware more than blocking assignments.

Example - Blocking

  module blocking (clk,a,c); input clk; input a; output c; wire clk; wire a; reg c; reg b; always @ (posedge clk ) begin b = a; c = b; end endmodule

Example - Nonblocking

  module nonblocking (clk,a,c); input clk; input a; output c; wire clk; wire a; reg c; reg b; always @ (posedge clk ) begin b <= a; c <= b; end endmodule

Note :- please explain part c properly.


Related Solutions

Please, Complete the following information, with short answers: - Revenue Cycle: - What is its Purpose?...
Please, Complete the following information, with short answers: - Revenue Cycle: - What is its Purpose? What are its Resources? What are its Documents? What are its Reports? What is its Information? What are its Activities? What are its Sub-Processes? Diagram the Process with the Input & Outputs?
Please, Complete the following information, with short answers: - Expenditure Cycle: - What is its Purpose?...
Please, Complete the following information, with short answers: - Expenditure Cycle: - What is its Purpose? What are its Resources? What are its Documents? What are its Reports? What is its Information? What are its Activities? What are its Sub-Processes? Diagram the Process with the Input & Outputs?
What is the purpose by using different analytical tools to measure the financial statement?
What is the purpose by using different analytical tools to measure the financial statement?
Question No.1: [LO1 ~ LO3] ] Give the short answers of the following questions. 1. What...
Question No.1: [LO1 ~ LO3] ] Give the short answers of the following questions. 1. What is Quantitative Analysis in Business? 2. Identify the steps of the Quantitative Analysis approach. 3. What is the Transportation Model Problem? 4. Identify any three possible problems in the quantitative analysis approach. 5. Give the names of methods to solve transportation problems
1. How is the short-run different from the long run? What is the main theoretical difference?...
1. How is the short-run different from the long run? What is the main theoretical difference? Use graphs to illustrate. 2. Do you think the ongoing COVID-19 pandemic is a short-run fluctuation? If so, can the Fed take up policies to mitigate its negative impact on the economy? Explain. (Hint: What is the nature of this shock? Is it a demand or supply shock? Or, is it different than a regular demand or supply shock the policymakers need to think...
Please, I need correct answers. Thank you, Short Answers 1-Why does it matter how and when...
Please, I need correct answers. Thank you, Short Answers 1-Why does it matter how and when a company recognizes revenue? 2-Why is determining when to recognize revenue more difficult under accrual accounting vs. cash accounting?
1. Discuss 6 different pain scales and their purpose. Pain scale Purpose What type of patient...
1. Discuss 6 different pain scales and their purpose. Pain scale Purpose What type of patient does this scale work best on? Define the Difference generalized and focused assessment discuss when an assessment is conducted
1. Different types of bone marrow transplant and pt teaching. 2. You’ve given nitroglycerin, what is...
1. Different types of bone marrow transplant and pt teaching. 2. You’ve given nitroglycerin, what is your expected therapeutic action on different vital signs, if applicable?
why adjusting entries and closing entries are needed. What is their purpose? How are they different?...
why adjusting entries and closing entries are needed. What is their purpose? How are they different? (no handwriting)
what is the purpose of using the chi-square test and how can it be of value...
what is the purpose of using the chi-square test and how can it be of value in business and science?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT