Write Verilog code in the style shown in Figure 5.51 that represents a ring counter. Your code
Question:
Write Verilog code in the style shown in Figure 5.51 that represents a ring counter. Your code should have a parameter n that sets the number of flip-flops in the counter.
Transcribed Image Text:
module shiftn (R, L, w, Clock, Q); parameter n = 16; input [n-1:0] R; input L, w, Clock; output reg [n-1:0] Q; integer k; always @(posedge Clock) if (L) Q<=R; else begin for (k = 0; k< n-1; k=k+1) Q[k] <= Q[k+1]; Q[n-1] <= w; end endmodule
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (6 reviews)
Here is an example Verilog code for a shift register mod...View the full answer
Answered By
Mary Boke
I have teached the student upto class 12th as well as my fellow mates.I have a good command in engineering,maths and science.I scored 90+ marks in 10th and 12th in maths.
0.00
0 Reviews
10+ Question Solved
Related Book For
Fundamentals Of Digital Logic With Verilog Design
ISBN: 9780073380544
3rd Edition
Authors: Stephen Brown, Zvonko Vranesic
Question Posted:
Students also viewed these Computer science questions
-
Write Verilog code for the boundary scan cell of Figure 10-14(b). Rewrite the Verilog code of Figure 10-21 to use this boundary scan cell as a component in place of some of the behavioral code for...
-
Write Verilog code for the following circuit. Assume that the gate delays arenegligible. (a) Using concurrent statements. (b) Using an always block with sequential statements. No latches should be...
-
Write synthesizable Verilog code that will generate the given waveform (W). Use a single always block. Assume that a clock with a 1 μs period is available as an input. -43 s -29 s+ -43...
-
?? Helen's investment of $500 has grown, at a rate of 13% compounded annually, for 45 years. What is the value of her investment today?
-
Consider the data in Table P-3 where X = weekly advertising expenditures and Y = weekly sales. a. Does a significant relationship exist between advertising expenditures and sales? b. State the...
-
The set of IP addresses from 29.18.0.0 to 19.18.128.255 has been aggregated to 29.18.0.0/17. However, there is a gap of 1024 unassigned addresses from 29.18.60.0 to 29.18.63.255 that are now suddenly...
-
Use of the term economic cost may be contrasted with use of the term accounting cost.The term cost is used in different contexts (and by different individuals) with different meanings. It is...
-
Assume the following data for Lusk Inc. before its year-end adjustments: Journalize the adjusting entries for the following: a. Estimated customer allowances b. Estimated customer returns? Unadjusted...
-
You can download data for questions 1 and 2 from finance.yahoo.com. Download to a spreadsheet the last three years of monthly adjusted stock prices for Coca-Cola (KO), Citigroup (C), and Pfizer...
-
A point charge q1=-4.00nC is at the pointx=0.600 meters, y=0.800 meters, and a second point charge q2=+6.00nC is at the point x=0.600 meters, y=0 meters. (A) Calculate the magnitude E of the net...
-
Write Verilog code that represents a modulo-12 up-counter with synchronous reset.
-
A ring oscillator is a circuit that has an odd number, n, of inverters connected in a ring like structure, as shown in Figure P5.5. The output of each inverter is a periodic signal with a certain...
-
The three forces are applied to the bracket. Determine the range of values for the magnitude of force P so that the resultant of the three forces does not exceed 2400 N. 3000 N 90%- Prob. 2-38 800 N...
-
Assume you have established System performance budgets and margins. Describe how would you allocate them to Products, Subsystems, Assemblies, and so on, verify traceability, and maintain intellectual...
-
Why is competitive advantage important to sport organizations?
-
Name five sport governing bodies.
-
How does the selection of a sample differ between the classical variables sampling and PPS sampling? What are the potential implications of this difference on the detection of understatements in the...
-
What are the challenges of establishing performance budgets and margins and how should you document and control them?
-
In this problem, we use a MATLAB simulation to "solve" Problem 2.4.4. Recall that a particular operation has six components. Each component has a failure probability q independent of any other...
-
What is the maximum volume of 0.25 M sodium hypochlorite solution (NaOCl, laundry bleach) that can be prepared by dilution of 1.00 L of 0.80 M NaOCl?
-
Write down a Verilog module implementation of a 2-to-4 decoder (and/or encoder).
-
Given the following logic diagram for an accumulator, write down the Verilog module implementation of it. Assume a positive edgetriggered register and asynchronous Rst. In Adder 16 16 Out Load Clk...
-
Section 3.3 presents basic operation and possible implementations of multipliers. A basic unit of such implementations is a shift - and-add unit. Show a Verilog implementation for this unit. Show how...
-
Direct materials Fixed manufacturing overhead costs Sales price Variable manufacturing overhead Direct labor Fixed marketing and administrative costs Units produced and sold during the quarter...
-
Provide documentation of a step by step training plan for a beta fish. What will be the primary reinforcer? How will you cue the behavior? What schedule of reminforcement will you use. What is the...
-
On May 1, Soriano Company reported the following account balances along with their estimated fair values: Items Carrying Amount Fair Value Receivables Inventory Copyrights Patented technology Total...
Study smarter with the SolutionInn App