ChipInventor AI Assistant

Building a funcional ALU

Hello everyone! In this tutorial we’ll focus on how the AI assistant in the ChipInventor platform can streamline your design process. We’ll demonstrate these features by building a functional ALU, but our main goal is to highlight the powerful capabilities of the AI tool and how it simplifies development steps, offering intelligent suggestions and enabling you to quickly prototype digital circuits without getting lost in the details. Let’s explore how AI can transform your design experience!

So, after logging in, click New Project on the navigation bar, and fill in the project details:

Click Create Chip to create the project.

Important: The desired ALU must be capable of performing fundamental 16-bit arithmetic and logic operations, including addition, subtraction, increment, decrement, AND, OR, and NOT. In addition, it must support control signals (zx, nx, zy, ny, f, no) to handle the input data (x, y) and select the appropriate operation, providing consistent outputs for each function.

Using AI to Create the ALU

Let’s create your project using the help from AI, follow these steps:

Create a 16-bit ALU in Verilog with inputs x, y (constant values) and control signals (zx, nx, zy, ny, f, no) to zero/invert the operands and select between AND, OR, addition, and subtraction, using a case block to define the operations. The output should reflect the result adjusted by the no signal. Include a top module that instantiates the ALU.

Configuring and Testing the ALU

Now, you have to configure and test if your project is working the right way. 

3. Connect the ALU outputs to the output blocks to capture the results

Simulating the Project

zx

nx

zy

ny

f

no

Saída (out)

1

0

1

0

1

0

0

1

1

1

1

1

1

1

1

1

1

0

1

0

-1

0

0

1

1

0

0

x

1

1

0

0

0

0

y

1

0

1

1

1

1

!x

1

1

0

1

1

1

!y

1

0

1

0

1

1

-x

1

1

0

0

1

1

-y

1

0

1

1

1

0

x+1

1

1

0

1

1

0

y+1

1

0

1

1

0

1

x-1

1

1

0

1

0

1

y-1

0

0

0

0

1

0

x+y

0

1

0

0

1

1

x-y

0

0

0

1

1

1

y-x

0

0

0

0

0

0

x&y

0

1

0

1

0

0

x|y

Validate the ALU's behavior for each control configuration.

Note: If you need to check the detailed logic, click on the corresponding wire to view the signals in real-time.

Synthesizing the Project

After testing and validating the ALU through simulation, you can move on to the synthesis stage, where the generated code (HDL) is converted into a physical representation (logic gate networks, blocks, etc.). To do this:

3. In the end, you will have an optimized version of your project, ready for advanced layout and manufacturing steps should you decide to implement it in real hardware.

Wrapping Up

Congratulations! You have learned how to configure and test a functional ALU using ChipInventor. Now you know how to:

Final Challenge: Use the functions learned to create and test new logic circuits, such as a multiplexer or a full adder. Take advantage of ChipInventor's potential to expand your knowledge and consolidate your learning.