Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) (1.5 marks) The following Verilog code consist of an error. Find the error and show how you can fix it module reg_2b_lda_ldb (q,a,b,lda, 1db,

image text in transcribed

a) (1.5 marks) The following Verilog code consist of an error. Find the error and show how you can fix it module reg_2b_lda_ldb (q,a,b,lda, 1db, clk) parameter N2i input [N-1:0] a, b; input lda, ldb, clk output N-1:01k always (posedge clk) if (lda1'b1) begin q = a; end else begin if (ldb1'bl) q-bi end endmodule b) (3 marks) Draw a circuit that implements the previous Verilog code (assuming the error is irrelevant) using gates and D-CE flip-flops. c) (3 marks) Show how your circuit can be simplified if Ida ldb 1'bl can never occur. Use MUXes and D-CE flip-flops in your simplified circuit. a) (1.5 marks) The following Verilog code consist of an error. Find the error and show how you can fix it module reg_2b_lda_ldb (q,a,b,lda, 1db, clk) parameter N2i input [N-1:0] a, b; input lda, ldb, clk output N-1:01k always (posedge clk) if (lda1'b1) begin q = a; end else begin if (ldb1'bl) q-bi end endmodule b) (3 marks) Draw a circuit that implements the previous Verilog code (assuming the error is irrelevant) using gates and D-CE flip-flops. c) (3 marks) Show how your circuit can be simplified if Ida ldb 1'bl can never occur. Use MUXes and D-CE flip-flops in your simplified circuit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

Has the priority order been provided by someone else?

Answered: 1 week ago