Question

Verilog code and wave. Please explain :)

§ If you use flipflops, you might need to handle ‘setup time’ for the flipflop. Also, you might need to initialize all input signals.

Problem 3 [20 ptsl Design a testbench for 6-bit subtractor. Use at least 10 test cases. Submit your codes and test results (w

0 0
Add a comment Improve this question Transcribed image text
Answer #1


sub.v C:/Users/Ramesh/project_8/project_8.srcs/sources_1/new/sub.v timescale 1ns / 1ps Company: Engineer: /Create Date: 03/23С:/Users/Ramesh/project-8/project-8.srcs/sources_1/new/sub-sibit.v 12/Description: 13// 14 Dependencies: 15// 16 / Revision:Name 1,000,000 ps 1,000,001 ps 1,000,002 ps L,000,003 ps L,000,004 ps 1,000,005 ps 1,000,006 ps 1,000,007 ps 1,00 000001 00000 0 1-0 A B

Add a comment
Know the answer?
Add Answer to:
Verilog code and wave. Please explain :) § If you use flipflops, you might need to handle ‘setup ...
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
  • Write a Verilog program to implement and test a subtractor. The program should have three modules....

    Write a Verilog program to implement and test a subtractor. The program should have three modules. The first module, called cfulladder implements a one bit subtractor with two 1-bit outputs, S and Cout, and three one bit inputs A, B, Cin. You have to use always keyword to implement this combinational circuit. The second module, called sub4 implements a four bit subtractor by instantiating 4 cfulladder modules. It has the same inputs and outputs but now the S, A, and...

  • Design an 8-bit full adder using Verilog (Use only 1-bit full adders). Write the design code,...

    Design an 8-bit full adder using Verilog (Use only 1-bit full adders). Write the design code, test-bench code of it, and test your design with six inputs. Note: Only use Verilog to design 8-bit full adder.

  • I need help doing the code using Verilog modelsim Design a 32-bit register using the D...

    I need help doing the code using Verilog modelsim Design a 32-bit register using the D Flip-Flop from part (1) so that it has the following features: (a) The Register has these ports Outputs: Q[31:0] Inputs: D[31:0] CLK is the clock signal EN is a synchronous signal for enabling the register. When EN is asserted at the sensitive edge of the CLK, the input D is loaded into the register. RESET We will leave this input unconnected, but will define...

  • please give the verilog code and explain in the form of comments. Part I Consider the...

    please give the verilog code and explain in the form of comments. Part I Consider the circuit in Figure 1. It is a 4-bit synchronous counter (text Section 5.9.2) that uses four T-type flip- flops (text Section 5.5). The counter increments 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 b signal low - it is an active-low asynchronous clear. You are to implement...

  • Use as few 3-input NOR gates as possible to design a bubble detector circuit for 8-bit thermomete...

    Use as few 3-input NOR gates as possible to design a bubble detector circuit for 8-bit thermometer code. An n-bit thermometer code represents an integer m, with m 1s followed by (n-m) 0s. 1-bit bubble is an error in coding when a solitary 0 (or 1) is found in between two 1s (or 0s). What is the size of your circuit in terms of the number of NOR gates used? Give a gate level schematic diagram for your circuit. Implement...

  • I just need the answer of #4 (Area, power, and delay analysis) P1 left shift 2...

    I just need the answer of #4 (Area, power, and delay analysis) P1 left shift 2 adder/subtractor Og - Yine code - Yu3 V2 mux sel x 2x stage 1+1 left shift 2 adder/subtractor 71+2 code mux sel ох 2x stage i Figure 1. Booth multiplier architecture 1. 6x6 Booth multiplier In this lab, you will first design a VHDL project for an 6x6 Booth multiplier in Xilinx Vivado. You optimize the multiplier for speed because Booth's multiplication algorithm is...

  • 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...

  • I need the following in verilog. Attached is also the test bench. CODE // Design a...

    I need the following in verilog. Attached is also the test bench. CODE // Design a circuit that divides a 4-bit signed binary number (in) // by 3 to produce a 3-bit signed binary number (out). Note that // integer division rounds toward zero for both positive and negative // numbers (e.g., -5/3 is -1). module sdiv3(out, in); output [2:0] out; input [3:0]   in; endmodule // sdiv3 TEST BENCH module test; // these are inputs to "circuit under test" reg...

  • You will use Quartus II to build an 8 bit arithmetic logic unit that performs the...

    You will use Quartus II to build an 8 bit arithmetic logic unit that performs the following functions: Control Value Function                                000 Copy In1 to theResult unchanged 001 Copy In2 to theResult unchanged 010 Add In1 to In2 011 Subtract In2 from In1 100 And In1 and In2 101 Or In1 and In2 110 Shift left In1 by 1 bit 111 Shift right In1 by 1 bit You are allowed to use either gates/logic schematic, or else Verilog. We suggest...

  • Describe situations when you might need to use encryption or secret codes. How important would it...

    Describe situations when you might need to use encryption or secret codes. How important would it be to have enough understanding of the subject of cryptography to assess the strength of the code you used?

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