Instantiate the necessary primitive logic gates in Verilog and connect them in a way that implements a circuit which can perform addition.
Given that the length of the input and output are both 1-bit. 2 input and 2 output. No carry in bit.
Prior to writing any code, it is crucial to have a well-defined and precise design specification for the circuit you intend to implement.
Design Note:
Specify the number of input, output, and internal wire connections required for the circuit.
Determine the bit width or vector length for each input, output, wire, and array signal in the design.
Identify any existing Intellectual Property (IP) cores or pre-designed modules that can be reused or integrated into the overall circuit implementation.
Create a comprehensive testbench that can thoroughly verify the functional correctness of the design by applying a comprehensive set of test cases and monitoring the expected outputs.
Organize your project by creating a directory that includes the following files:
System architecture diagram and expected waveform files to document the design specifications.
Register Transfer Level (RTL) files: These Verilog code files should contain the top-level module as well as all required submodules.
Testbench file(s): Utilized by the simulator to apply test vectors and capture the circuit's output responses for verification.
Constraint file(s): Specify the pin mapping and timing constraints for the target FPGA board.
Project(prj) directory: Contain the Vivado project files and configuration settings for synthesis and implementation.
Note:
There is rarely a single, unique approach to meet a given set of design specifications. As an engineer, you should continuously expand your knowledge and practical experience to explore alternative methods and optimizations that can enhance the quality, efficiency, or performance of your circuit designs.
Note:
The concatenation operator "{ , }" combines (concatenates) the bits of two or more data objects. The objects may be scalar (single bit) or vectored (muliple bit). Mutiple concatenations may be performed with a constant prefix and is known as replication.
Utilize constraint files to map the ports of your RTL (Register Transfer Level) design to the physical I/O pins of the target FPGA device.