Having a Conversation With Your Design Using AI Digital Twins

Ari Mahpour
|  Created: July 1, 2024  |  Updated: July 19, 2024
Having a Conversation with your Design using AI Digital Twins

As ubiquitous as AI seems to be these days, there is an equal amount of confusion about how to best leverage the technology. In articles such as Using ChatGPT to Analyze Your Test Data and Using Generative AI to Write and Run Embedded Code we’ve seen how AI, such as ChatGPT, can assist us in not just analyzing data but also writing code for us. For electrical engineers, the analysis and code-writing components of Generative AI can be helpful but not always game-changing. In this article we’re going to build a custom GPT that enables us to “have a conversation with our design.” We’ll create a “Digital Twin” of the Arty A7 evaluation board in ChatGPT, giving us the ability to design, troubleshoot, and work with the board using an AI assistant.

What is a Digital Twin?

A digital twin is a virtual model that mirrors a real-life object. By creating this digital counterpart, we can simulate and test the object's behavior without needing the physical item. For the Arty A7 evaluation board, having a digital twin means you can troubleshoot, design, and work with the board virtually, without having to handle the actual hardware first. This makes the process more efficient, allowing for thorough testing and design adjustments. Obviously, the sky's the limit in terms of how accurate your model is and how easy it is to interact with. For the sake of brevity and simplicity we’re going to be building a pretty primitive digital twin of the Arty A7 that can assist us with design questions and troubleshooting

A Simple Digital Twin using RAG

Retrieval-Augmented Generation (RAG), most famously known by the paper entitled Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, is a methodology where a large language model (LLM) is used in conjunction with on-hand data (versus data learned within the model). For example, if I ask an LLM what the price of my house is, it may or may not be able to accurately answer that question. If I provide it “context” with, let’s say, my most recent property tax bill it should be able to figure that out pretty easily (since it’s, more or less, just using natural language processing). In a nutshell, RAG uses the same concept by providing context to the LLM to generate a higher-quality response. While it’s hard to know exactly what proprietary systems are using as their backend it’s pretty safe to assume that a RAG-like approach is pretty common for building a digital twin with AI.

Building a Custom GPT with Context

As we’ve seen in Building an AI Lab Assistant and Using Generative AI to Write and Run Embedded Code, you can write Custom GPTs to interact with web servers and control instruments but they can also contain context to act as digital twins. The setup is actually very simple. Using the paid plus version of ChatGPT I can create a custom GPT by clicking on “Explore GPTs” on the left sidebar and then clicking on the “Create” button in the top right corner. Note: At the time of writing this article the navigation to create a custom GPT had changed almost 3 times within the last 6 months. You may want to consult OpenAI’s documentation on how to create a custom GPT if these instructions are outdated.

Once I’ve navigated to the page that gives me the option to create a custom GPT I’m ready to input all my parameters and supply my “context.”

Setting up the Custom GPT

Figure 1: Setting up the Custom GPT

You’ll notice that I’ve given my custom GPT a name, description, a set of basic instructions, and a “Knowledge” set of files. These files are comprised of my Arty A7’s:

  • Schematic design 
  • Various datasheets of chips on the board
  • Sample VHDL code
  • FPGA Design constraint file

I can, of course, provide even more data such as the bill of materials, other design documents, and even more datasheets but this seemed good enough to prove out my concept.

So what can it do?

To perform a quick reference lookup from our digital twin I can save a couple seconds here and there by asking it about components on the board. For example:

Querying a datasheet

Figure 2: Querying a datasheet

And the data it pulled from the datasheet seems to match (though it can sometimes interpret tables in PDFs incorrectly):

Specifications taken from datasheet

Figure 3: Specifications taken from datasheet

While trivial, this does save some time, especially if you’re using the voice version of ChatGPT. We can also tell our custom GPT that the oscillator is not functioning properly and ask his for troubleshooting suggestions tailored to the specific part:

Troubleshooting the Oscillator

Figure 4: Troubleshooting the Oscillator

Depending on your skill level, this information may or may not be helpful to you. We can take it a bit further and ask it to help us, for example, troubleshoot why the flash memory is not responding. A more complex response will involve the datasheet specs (similar to the oscillator) but also references to the code and pin constraints. Providing the prompt with even more context, such as your modified code, will give it a better chance of uncovering your issue. These examples, while somewhat trivial, demonstrate the capability and power of using LLMs and RAG to very quickly build a digital twin. The process of setting up the custom GPT literally took 5 minutes (and most of that was due to upload times). This is only the beginning of the digital twin age and I am sure we’ll be seeing many more breakthroughs in the coming years.


In this article, we explored the concept of digital twins and how to create a custom GPT to work with and troubleshoot the Arty A7 evaluation board. By leveraging AI, we can interact with our designs virtually, saving time and increasing efficiency. The steps to set up your own custom GPT are straightforward and can be done quickly. Now that you understand the basics, it's time to experiment and see the benefits for yourself. Dive in, create your digital twin, and start optimizing your design and bring-up process today!

About Author

About Author

Ari is an engineer with broad experience in designing, manufacturing, testing, and integrating electrical, mechanical, and software systems. He is passionate about bringing design, verification, and test engineers together to work as a cohesive unit.

Related Resources

Related Technical Documentation

Back to Home
Thank you, you are now subscribed to updates.