Question

Consider the circuit in Figure 1. It is a 4-bit (QQ2Q3) synchronous counter which uses four T-type flip-flops. The counter in
The counter is accomplished using the statement: Q prelab: complete the following Verilog code)l Design a submodule 8 bit cou
Consider the circuit in Figure 1. It is a 4-bit (QQ2Q3) synchronous counter which uses four T-type flip-flops. The counter increases its value on each positive edge of the clock if the Enable signal is asserted. The counter is reset to 0 by setting the Clear signal low. You are to implement an 8-bit counter of this type Enable T Q Clock Clear Figure 1. 4-bit synchronous counter (but you need to implement 8-bit counter in this lab) Specific notes: n You should build a T flip-flop module tfliplfop (tff is a reserved key word, so it cannot be used as module name) first, and then instantiate 8 times to create 8-bit counter with module name conter8 2 Modify the 4 bi bcd to 7 segment display module BCD2LEDS from lab 2 to display 0 to F (instead of 0 to 9 for BCD numbers) with module name hex2seg7. Create two instances of hex2seg7 to display the 8-bit counter state Q7 Q6... Q0 in double hex digits. One hex for Q7-4, and another for Q3-0 3) Use SW for Enable, SW[0] for Clear, KEY[0] for clock. ) The output of left TFF is Qlo] (LSB). s) Counter state Q[7:0] also goes to red led display LEDR [7:0] 6 QI7:0] should go through two 7-seg display so that the output of the 8-bit counter can be display on HEX1 and HEX0 as 00 to FF.
The counter is accomplished using the statement: Q prelab: complete the following Verilog code)l Design a submodule 8 bit counter module counter8new(resetn, clk,en, Q); input resetn, clk, en output reg [7:0] Q // always block for 8 bit counter with asynchronous low active reset // and synchronous high active enable always @ (posedge clk, negedge resetn) if Cresetn) //low active /l reset else if (en) //lcount up by 1 else /no change endmodule Design the top module module lab3part2(SW, KEY,LEDR.HEXI, HEXO) input [1:0] SW://SW] as enable, SW[0] as input [0:0] KEY; I/ KEY[O] as clock output reg [6:0] HEXI HEX0; to display 8 bits //(2 hex numbers) on two7 seg display output [7:0] LEDR:/ to display counter state on wire [7:0] Q:intermal signals for counter state assign LEDR-Q:/ optional: to have counter LEDR state on LEDR directly // instantiate 8 bit counter couner8new UO(...); instantiate display module twice hex2seg7 U1..); hex2seg7 U2..);
0 0
Add a comment Improve this question Transcribed image text
Answer #1

e Siqn . nome . tfP async- vest File ame sync - veset. v. . .. fonction . T flip-flop asyn ceset Code:Dee pak kunay Tala asynaways Cposedge elkqe end else H (dota) tegiv

Add a comment
Know the answer?
Add Answer to:
Consider the circuit in Figure 1. It is a 4-bit (QQ2Q3) synchronous counter which uses four T-typ...
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
  • Can anyone solve this? i dont understand? verilog 1. (30 pts) Design a mod-6 counter. A...

    Can anyone solve this? i dont understand? verilog 1. (30 pts) Design a mod-6 counter. A mod-6 counter updates its output per clock rising edge according to the following sequence: 000, 001, 010, 011, 100, 101 (then repeat the pattern....). en is enable control (synchronous high active), resetn is reset control (asynchronous low active signal to reset counting sequence to 000) Complete the following Verilog code: en module mod6(clock, resetn, en, z); zI2:0] clock resetn Endmodule

  • Objective: In this lab, we will learn how we can design sequential circuits using behavioral mode...

    Just need the code for the random counter,Thanks Objective: In this lab, we will learn how we can design sequential circuits using behavioral modelling, and implementing the design in FPGA. Problem: Design a random counter with the following counting sequence: Counting Sequence: 04 2 9 168573 Design Description: The counter has one clock (Clock), one reset (Reset), and one move left or right control signal (L/R) as input. The counter also has one 4bit output O and one 2bit output...

  • Design C-1 (modulo-10 up-counter): Using the behavioral VHDL coding, create an up-counter to count upward. The...

    Design C-1 (modulo-10 up-counter): Using the behavioral VHDL coding, create an up-counter to count upward. The up counter has the following control inputs En.reset, CLK. The counting outputs are Q0, O1, Q2. and O3 reset clears the outputs of the counter to 0. En enables the counting when En-1. When En-0, the counter stops. The counter sequentially counts all the possible numbers and loops again, from 0 to 9, back to 0 and 9, etc Design C-2: Ten-second Counter with...

  • Use the Quartus Prime Text Editor to implement a structural model of the 4-bit data register show...

    Use the Quartus Prime Text Editor to implement a structural model of the 4-bit data register shown above in a file named reg_4bit.sv. Specify the 4-bit data register’s module according to the interface specification given in the table below. Port Mode Data Type Size Description RST in logic 1-bit Active high asynchronous reset CLK in logic 1-bit Synchronizing clock signal EN in logic 1-bit Synchronous clock enable D in logic vector 4-bits Synchronous data input Q out logic vector 4-bits...

  • please answer question 4 (all parts of question4 please) will rate! 3. (30 pts) Design a 2-bit Gray code generator that ropetitively delivers the sequence 00301911-10-00when the input signal UP-...

    please answer question 4 (all parts of question4 please) will rate! 3. (30 pts) Design a 2-bit Gray code generator that ropetitively delivers the sequence 00301911-10-00when the input signal UP- 1,or in reverse order 009 10기け01 →00→ when UP-0. Your design should include an asynchronous low. active reset operation: the FSM goes to 00 state when a reset signal is applied In addition to the state output z[1). 2[0]. there is a carry/borrow output bit e which is I when...

  • Problem 8 (Lab, 20 points) (1) Write a VHDL module implementing a synchronous 16-bit counter. A...

    Problem 8 (Lab, 20 points) (1) Write a VHDL module implementing a synchronous 16-bit counter. A "reset signal resets the counter to 0. An "en" signal enables the counter modification. An "up signal indicates whether the counter must be incremented (1)/decremented (0). (2) The output of the module is the value of the signal, represented as 16 bits wide. Using output timing diagram to verify your coding results.

  • Q3. Synchronous Counter Figure 8.3(a) shows a modulo-8 synchronous up-counter (Modulo-8 because this counter can count...

    Q3. Synchronous Counter Figure 8.3(a) shows a modulo-8 synchronous up-counter (Modulo-8 because this counter can count only from 0 to 7 with its 3 bits qo, q1 and 92.). Treat each gray cell in the figure as a component and write generic VHDL codes to create a modulo-2N counter, where N is the number of flip-flops required. Use nominal mapping for this problem while instantiating components. When the asynchronous reset signal rst is high, the counter is set to 0...

  • Use the Quartus Prime Text Editor to implement a behavioral model of the D flip-flop described ab...

    Use the Quartus Prime Text Editor to implement a behavioral model of the D flip-flop described above in a file named d_flops.sv. Specify the D flip-flop’s module according to the interface specification given in the table below. Port Mode Data Type Size Description RST in logic 1-bit Active high asynchronous reset CLK in logic 1-bit Synchronizing clock signal EN in logic 1-bit Synchronous clock enable D in logic 1-bit Synchronous data input Q out logic 1-bit Current/present state Qbar out...

  • Use a behavioral Verilog model to design a 3-bit fault tolerant up-down counter. For each flip-fl...

    Use a behavioral Verilog model to design a 3-bit fault tolerant up-down counter. For each flip-flop (FF) include asynchronous reset and preset signals. Refer to Example 4.3 on page 160 for an example of a single FF with both reset and preset signals as well as with an enable signal. For this project, you don't need to use FFs with enables. You don't also need not-q (nq) in this assignment. Use active-high signals for reset and present signals. The example...

  • Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter load...

    Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter loads the "0000" state if reset is low. The counter should start and end with this state. Write a testbench to verify the correctness of the 4-bit Johnson counter. The testbenclh should have a clock with a period of 20ns and a reset signal. The testbench should store the 4-bit binary outputs of the counter in a file, which will be used to provide...

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