Question
*in SystemVerilog
Problem1: 1) Study the clock divider lecture. 2) Implement the following designs in Systemverilog and simulate the SV design with a simulator a) Divide by 8 with 50% Duty Cycle b) Divided by 5 with 50% Duty Cycle
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1: Divide by 5 clock

module clk_divn(clk,reset, clk_out);

input clk;

input reset;

output clk_out;

reg [2:0] pos_count, neg_count;

wire [2:0] r_nxt;

always @(posedge clk)

if (reset)

pos_count <=0;

else if (pos_count ==4) pos_count <= 0;

else pos_count<= pos_count +1;

always @(negedge clk)

if (reset)

neg_count <=0;

else if (neg_count ==4) neg_count <= 0;

else neg_count<= neg_count +1;

assign clk_out = ((pos_count > (5>>1)) | (neg_count > (5>>1)));

endmodule

2 : DIVIDE by 8 circuit verilog code

module clk_div (clk,reset, clk_out);

input clk;

input reset;

output clk_out;

reg [2:0] r_reg;

wire [2:0] r_nxt;

reg clk_track;

always @(posedge clk or posedge reset)

begin

if (reset)

begin

r_reg <= 0;

clk_track <= 1'b0;

end

else if (r_nxt == 3'b100)

begin

r_reg <= 0;

clk_track <= ~clk_track;

end

else

r_reg <= r_nxt;

end

assign r_nxt = r_reg+1;

assign clk_out = clk_track;

endmodule

Add a comment
Know the answer?
Add Answer to:
*in SystemVerilog Problem1: 1) Study the clock divider lecture. 2) Implement the following designs in Systemverilog...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Clock Divider ​​​​​​ can i get some simple explanation ( what I'm suppose to understand from this) my lecturer explains it but I honestly don't understand what statements he's trying to ma...

    Clock Divider ​​​​​​ can i get some simple explanation ( what I'm suppose to understand from this) my lecturer explains it but I honestly don't understand what statements he's trying to make my understanding : there's a frequency input of 512 Mhz, since we know 8 bit counter can count up to 256, it will do it once before it rolls overload (???) can someone please clarify and point out the important facts that i should be undertanding please and...

  • Clock Divider ​​​​​​ can i get some simple explanation ( what I'm suppose to understand from...

    Clock Divider ​​​​​​ can i get some simple explanation ( what I'm suppose to understand from this) my lecturer explains it but I honestly don't understand what statements he's trying to make my understanding : there's a frequency input of 512 Mhz, since we know 8 bit counter can count up to 256, it will do it once before it rolls overload (???) can someone please clarify and point out the important facts that i should be undertanding please and...

  • 2. A digital clock signal is basically a square wave signal with 50% duty cycle. The...

    2. A digital clock signal is basically a square wave signal with 50% duty cycle. The frequency of the clock can be anything as needed by the digital circuit that is using it. Clock is used for timing and synchronization of digital circuits. Many times, there is a requirement to slow down the frequency of clock to a certain level and this can be done using clock frequency dividers EE200 Digital Design Laboratory Manual (reducing the frequency of clock or...

  • 3. Let us continue to study the keyboard experiment from the first lecture (last slide of Lecture 1). Let y be the...

    3. Let us continue to study the keyboard experiment from the first lecture (last slide of Lecture 1). Let y be the amount of time used to type up a manuscript. Note that y depends on the keyboard, the manuscript, whether the manuscript has already been typed once and experimental error. Let ,1A and ,1B denote the effects of keyboard A and B respectively. T, denote the effect of manuscript i for i = 1, .. , 6 and denote...

  • Study the following circuit and corresponding waveforms: a) D Q Clock CLK Q Undefined 01 02...

    Study the following circuit and corresponding waveforms: a) D Q Clock CLK Q Undefined 01 02 Undefined Q Undefined Undefined Undefined Identify the waveforms that correspond to Qa, Qb and Qc. Provide the name of the components that produce Qa, Qb and Qc. (Note: one answer is none of the above.) (6 marks) b) Study the following circuit: D D D CLK CLK CLK CLK Explain why this will not implement a shift register. Your answer should include a waveform...

  • A non-pipelined processor has a clock rate of 1 GHz and an average instruction takes 9...

    A non-pipelined processor has a clock rate of 1 GHz and an average instruction takes 9 cycles to execute. The manufacturer has decided to design a pipelined version of this processor. For this purpose, the instruction cycle has been divided into five stages with the following latencies: Stage 1 – 2.0 ns,Stage 2 – 1.5 ns, Stage 3 – 1.0 ns, Stage 4 – 2.6 ns, Stage 5 – 1.9 ns. Each stage will require an extra 0.4 ns for...

  • D Question 3 1 pts Which of the following characteristics of observational study designs is TRUE?...

    D Question 3 1 pts Which of the following characteristics of observational study designs is TRUE? O They are a kind of experimental study O They study existing information only O There is no control group O They must have a cross-sectional rather than a longitudinal design

  • 2. A. For each of the following epidemiological designs (first column) mention (fill in Column to...

    2. A. For each of the following epidemiological designs (first column) mention (fill in Column to Column)                 Type of Design (1) Typical Exposure -Outcome Assessment Sequence (2) Key Identifying Characteristics (3) Give an Example of a Study Appropriate for This Type of Design (4) Cross-Sectional Case-Control Prospective Cohort Control Experimental B. State the main differences between the following study designs:                 i. Observational and experimental studies                 ii. Retrospective cohort and prospective cohort studies                 iii. Cohort and case-control...

  • A shift operation is often used to implement either multiply-by-power-of-2 or divide-by power-of-...

    A shift operation is often used to implement either multiply-by-power-of-2 or divide-by power-of-2 operations. For example, 0010 x4 1000. This multiplication can be achieved by shifting 0010 by 2 bits to the left. Likewise, 10004 0010, which can be obtained by shifting 1000 to the right by 2 bits. As multipliers are more "expensive" in terms of area and power consumption, multiplication by shifting is preferred if applicable. Sometime, the multiplier does not have to be power-of-2. For example, 0010...

  • A consumer preference study compares the effects of three different bottle designs (A, B, and C)...

    A consumer preference study compares the effects of three different bottle designs (A, B, and C) on sales of a popular fabric softener. A completely randomized design is employed. Specifically, 15 supermarkets of equal sales potential are selected, and 5 of these supermarkets are randomly assigned to each bottle design. The number of bottles sold in 24 hours at each supermarket is recorded. The data obtained are displayed in the following table. Bottle Design Study Data A B C 16...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT