Code Monkey home page Code Monkey logo

autochip's Introduction

AutoChip

AutoChip is designed to generate functional Verilog modules from an initial design prompt and testbench using a selected large language model. Errors from compilation and simulation are fed back into the LLM for repair.

NOTES:

AutoChip is currently undergoing significant refactoring efforts to fix existing issues and significantly expand the tool's capabilities. Most existing issues will be resolved in the refactor branch, though it should not be considered stable until it is merged into main.

PaLM support is being modified and should currently be considered deprecated. Bard has been deprecated by Google and has been replaced with Gemini, so the current setup for that language model is no longer valid.

Setup:

Prerequisites

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/shailja-thakur/AutoChip.git
cd AutoChip
  1. Set up a virtual environment (optional but recommended):
python3 -m venv venv
source venv/bin/activate
  1. Install the required python packages:
pip3 install -r requirements.txt

Environment Variables

API Keys (Must be set for the models being used):

  • OpenAI API Key: OPENAI_API_KEY
  • Anthropic API Key: ANTHROPIC_API_KEY

Usage

To use the tool, follow the steps below:

  1. Prepare your initial Verilog design prompt and a testbench file that matches your module's requirements.

  2. Run the tool with the necessary arguments:

./auto_create_verilog.py [--help] --prompt=<prompt> --name=<module name> --testbench=<testbench file> --iter=<iterations> --model=<llm model> --model_id=<model id> --log=<log file>

Arguments

  • -h|--help: Prints this usage message
  • -p|--prompt: The initial design prompt for the Verilog module
  • -n|--name: The module name, must match the expected DUT module name in the testbench
  • -t|--testbench: The testbench file to be run for verification in the feedback loop
  • -i|--iter: [Optional] Number of iterations to be run before the tool quits (default: 10)
  • -m|--model: The LLM to use for Verilog generation. Must be one of the following:
    • ChatGPT3p5
    • ChatGPT4
    • Claude
    • CodeLLama
  • -id|--model_id: [Optional] for model other than CodeLLama, for codellama, model id is the huggingface repository to codellama
  • -o|--outdir: [Optional] Directory to output files to
  • -l|--log: [Optional] File to log the outputs of the model

autochip's People

Contributors

shailja-thakur avatar jblocklove avatar

Stargazers

bjuteer avatar Range avatar Karthik Pandaram avatar  avatar  avatar Parker L avatar  avatar  avatar SujayP avatar Balint Cristian avatar Xu Haohang avatar

Watchers

 avatar Animesh Basak Chowdhury avatar

autochip's Issues

Request: fix `requirements.txt` so that it contains only the required dependencies for this project

It seems like the requirements.txt contains a pip freeze output for someone's entire computer's Python installation. For example, it includes beautifulsoup4, which is not a dependency for this project by any means.

It would be awesome if it could contain just the requirements to install as requirements for this project. The requirements.txt file is not currently installable on Python 3.11 as it is over-contstrained.

Request: Add information on permissions for use of HDLBits problems

Can you please add information about the HDLBits problem set included in this repo? Are they released under the Apache-2.0 license that this whole repo is, or are they under a different license?

Did you obtain them by special permission from the HDLBits creator, or did you scrape them from the site?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.