LACE: Large Language Model Aided Multi-Agent Framework for Agile RISC-V Instruction Extension
LACE is an LLM-aided multi-agent framework that automates the translation of natural-language RISC-V instruction extension intents into verified RTL code and compiler-agnostic checks, significantly improving generation accuracy and reducing integration rework across diverse cores.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine the world of computer chips as a massive, bustling city where every building is a tiny processor, and the "instructions" are the laws that tell the buildings how to move, calculate, and talk to each other. For decades, these laws were set in stone by a small group of architects, making it hard for new, specialized tasks to get built in. But then came RISC-V, a new kind of city planning that lets anyone add their own custom laws to the rulebook. This is like giving every homeowner a toolkit to build a secret slide or a rocket launcher in their backyard. However, there's a catch: every house in this city is built slightly differently. A slide that works perfectly in one house might collapse in the next because the plumbing or wiring is different. Figuring out how to build these custom features for every single house without hiring a team of expert engineers for each one has been a slow, messy, and frustrating puzzle.
Enter LACE, a new digital assistant designed to solve this headache. Think of LACE as a super-smart, multi-person construction crew powered by artificial intelligence. Instead of a human engineer staring at blueprints and trying to guess where to cut a wire, LACE listens to a simple description like "I want a slide that spins left" and figures out exactly how to build it inside any specific house. It doesn't just guess; it uses a team of specialized AI agents. One agent translates your idea into a rough sketch, another finds the exact spot in the house's blueprints where the change needs to happen, and a third agent double-checks the work to make sure the house doesn't catch fire. The paper shows that this team can successfully build these custom features in about 73 out of 100 tries on their first attempt, a huge jump from the near-zero success rate of just asking a single AI to do it alone.
The Problem: Building Custom Slides in Different Houses
In the world of computer chips, specifically the open-source RISC-V family, engineers often want to add "Instruction Set Extensions" (ISAX). You can think of these as custom instructions that make the chip super-fast at specific tasks, like decoding video or encrypting data. It's like adding a turbo button to a car. The problem is that while the idea of the turbo button is simple, actually installing it is a nightmare. Every RISC-V chip is built with a slightly different internal structure (microarchitecture). What works in one chip might break another.
Traditionally, if you wanted to add a custom instruction, you needed a human expert to manually look at the code for that specific chip, find the right wires, and rewrite them. This is slow, expensive, and prone to errors. If you changed the chip design even a little, your custom instruction might stop working, and you'd have to start over. Existing automated tools tried to help, but they often required the user to know too much about the hardware or failed when faced with a chip they hadn't seen before.
The Solution: LACE, the AI Construction Crew
The paper introduces LACE (Large Language Model Aided Multi-Agent Framework for Agile RISC-V Instruction Extension). Instead of relying on one giant AI to do everything, LACE uses a team of smaller AI agents working together, much like a construction crew with a foreman, a blueprint reader, and a safety inspector.
Here is how the team works:
- The Translator (Agent 1): You tell the system what you want in plain English, like "Rotate the bits in this number to the left." The Translator turns this into a list of high-level "operations," like "Read the number," "Shift it," and "Write it back." It doesn't worry about the specific chip yet; it just understands the idea.
- The Task Planner (Agent 2): This agent looks at the specific chip you are using. It knows that some chips are like single-lane roads (simple) while others are like complex highways (pipelined). It takes the high-level idea and breaks it down into specific tasks, like "Add a new sign to the traffic light" or "Change the timing of the stop signal."
- The Librarian (Agent 3 & 4): This is the "Retrieval-Augmented Generation" (RAG) part. The chip's code is a massive library with millions of lines. The Librarian doesn't read the whole book; it uses a smart search system to find the exact few pages where the change needs to happen. It builds a map of the code so the team knows exactly where to dig.
- The Builder (Agent 5): This agent writes the actual code (HDL) to make the changes. It's like the worker actually cutting the wire and soldering the connection.
- The Inspector (Agent 6): Before the job is done, the Inspector checks the work. It runs tests to make sure the new feature works and, crucially, that it didn't break anything else. If it finds a mistake, it tells the Builder exactly what went wrong, and the Builder tries again. This loop continues until the code is perfect.
What They Found: A Big Leap Forward
The researchers tested LACE on five different custom instructions (like a bit-rotation tool, a memory loader, and a sine-cosine calculator) across four different types of RISC-V chips. These chips ranged from simple, non-pipelined designs to complex, multi-stage pipelines.
The results were striking. When they tried to use a standard AI (a single agent) to do the job, it almost always failed, getting the code right less than 12% of the time for complex chips. But with the LACE team working together, the success rate jumped to an average of 72.8%. In some cases, like the simple bit-rotation task, LACE got it right 100% of the time.
The paper also looked at the cost of adding these features. They simulated the chips using TSMC 28nm technology. They found that adding these custom instructions increased the chip's size (area) by about 10% and slowed down the speed (frequency) by less than 10% in most cases. For more complex tasks, the cost was higher, but the team noted that LACE's performance was comparable to what a human expert would achieve using existing tools like SCAIE-V.
Why This Matters
LACE suggests that we are moving toward a future where adding custom features to computer chips is as easy as describing them in English. It bridges the gap between the high-level ideas of software developers and the low-level reality of hardware engineers. By using a team of AI agents that can search, plan, build, and check their own work, LACE reduces the need for manual, error-prone coding.
The paper is careful to note that this is a simulation and synthesis study, not a physical chip built in a factory yet. They also acknowledge that fully automating the "verification" part (making sure the chip is safe) still requires some human effort to set up the testing tools. However, the results show that this multi-agent approach is a powerful step forward, making it possible to adapt custom instructions to new, unseen chip designs with much less effort than before. It turns a process that used to take days of expert work into something that can happen in a fraction of the time, opening the door for more specialized and efficient computer chips in the future.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.