DigiTekXplorer
Home
Capstone Project
abCore16 Folder
  • abCore16 Project
  • Instruction Set
  • Our Toolchain
  • abCore16 User Guide
  • FPGA Implementation
AI Case Studies
UART Design Folder
  • UART Design
RP Pico Folder
  • Raspberry Pi Pico
  • Pico VGA Project
  • Pico Audio Project
Android App Folder
  • Android App Development
  • BLE Basics
  • Android Studio
  • BLE App User Guide
  • The Gemini Prompt
FPGAs
Coding Basics
Embedded Systems
Basic Concepts
DigiTekXplorer
Home
Capstone Project
abCore16 Folder
  • abCore16 Project
  • Instruction Set
  • Our Toolchain
  • abCore16 User Guide
  • FPGA Implementation
AI Case Studies
UART Design Folder
  • UART Design
RP Pico Folder
  • Raspberry Pi Pico
  • Pico VGA Project
  • Pico Audio Project
Android App Folder
  • Android App Development
  • BLE Basics
  • Android Studio
  • BLE App User Guide
  • The Gemini Prompt
FPGAs
Coding Basics
Embedded Systems
Basic Concepts
More
  • Home
  • Capstone Project
  • abCore16 Folder
    • abCore16 Project
    • Instruction Set
    • Our Toolchain
    • abCore16 User Guide
    • FPGA Implementation
  • AI Case Studies
  • UART Design Folder
    • UART Design
  • RP Pico Folder
    • Raspberry Pi Pico
    • Pico VGA Project
    • Pico Audio Project
  • Android App Folder
    • Android App Development
    • BLE Basics
    • Android Studio
    • BLE App User Guide
    • The Gemini Prompt
  • FPGAs
  • Coding Basics
  • Embedded Systems
  • Basic Concepts
  • Home
  • Capstone Project
  • abCore16 Folder
    • abCore16 Project
    • Instruction Set
    • Our Toolchain
    • abCore16 User Guide
    • FPGA Implementation
  • AI Case Studies
  • UART Design Folder
    • UART Design
  • RP Pico Folder
    • Raspberry Pi Pico
    • Pico VGA Project
    • Pico Audio Project
  • Android App Folder
    • Android App Development
    • BLE Basics
    • Android Studio
    • BLE App User Guide
    • The Gemini Prompt
  • FPGAs
  • Coding Basics
  • Embedded Systems
  • Basic Concepts

DigiTekXplorer - AI Case Studies

Case Studies in AI-Accelerated Engineering

AI-Accelerated Engineering with Gemini 2.5 Pro

We showcase three projects developed in collaboration with AI, demonstrating its power to accelerate the design and implementation of complex systems. The projects span Android application development, computer architecture, and FPGA design. These case studies highlight the capabilities of Google's Gemini 2.5 Pro in a practical engineering context.


1. B_Bot: BLE Android Control Application

I developed a custom Android application to wirelessly control the B-Bot rover via Bluetooth Low Energy (BLE). Using a combination of Android Studio and Google's Gemini Pro, I accelerated the development lifecycle.


Tools:

Android Studio 2024.3.1

Gemini 2.5 Pro


  • AI Collaboration: Gemini was instrumental in generating the initial boilerplate code for Android's BLE services and characteristics. It also helped debug complex asynchronous callbacks and provided alternative implementations for the user interface layout in XML, allowing for rapid prototyping.


2. abCore16: Custom 16-bit Microprocessor Ecosystem

The abCore16 project is a complete 16-bit microprocessor ecosystem written entirely in Python. It features a custom CPU architecture and a comprehensive software development toolchain built within a PyCharm environment.


The ecosystem enables software development for the abCore16 CPU through two distinct compilation paths:

  1. A simple, direct-to-assembly language.
  2. A more powerful, C-like high-level language (SSL). This language supports modern programming constructs including functions with local variables, if/else, for, and while loops, and global one-dimensional arrays.


The toolchain provides a seamless workflow from high-level code to execution:

  • A PLY-based C-like Compiler parses the source, builds an Abstract Syntax Tree (AST), and generates assembly code.
  • An Assembler converts the assembly code into 16-bit binary machine code.
  • A Simulator executes the binary code on a detailed model of the abCore16 CPU, providing cycle-by-cycle logging and state inspection.
  • A Disassembler can reverse-engineer the binary back into human-readable assembly for verification and debugging.


The project serves as a practical, hands-on platform for exploring and implementing concepts in computer architecture and compiler design.


Tools:

PyCharm 2025.1.1

Gemini 2.5 Pro


  • AI Collaboration: This project was a deep partnership with Gemini Pro. I used it as an architectural consultant to define the instruction set and addressing modes. The AI then generated foundational Python code for the assembler and the CPU's fetch-decode-execute cycle in the simulator, which I then integrated and refined.


3. abUART: FPGA-Based UART and Testbench in SystemVerilog

Yes, Gemini 2.5 Pro can generate Hardware Description Language (HDL) code for FPGA implementation. Currently, there is a huge demand for FPGA developers so the ability to design systems for FPGA implementation is a practical as well as incredibly useful skill.


I designed, implemented, and verified a Universal Asynchronous Receiver/Transmitter (UART) module for FPGAs using SystemVerilog.  The UART was verified in Vivado’s simulation environment.  The design was taken from design entry all the way to bitfile generation for a Digilent Arty S7-50 FPGA development board.


Tools:

AMD (Xilinx) Vivado 2024.2

Gemini 2.5 Pro


  • AI Collaboration: My workflow involved using Gemini to translate high-level requirements into a functional design. The AI generated the initial SystemVerilog code for the receiver/transmitter state machines and the baud rate generator.  Subsequently, it created a comprehensive testbench to verify the module's functionality, drastically reducing the time required for verification.

AI Collaboration Framework: A Guide to Efficient Prompting

Four Key Phases in Efficient Prompting

Think of the AI, Gemini 2.5 Pro, as a technical co-pilot and infinitely patient talented developer instead of just a code generator. It's brilliant at executing well-defined tasks, but it relies on you, the project architect and senior developer, to provide the vision, context, and quality control.


Your process can be broken down into four key phases.


Phase 1: The "Architect" Phase - Specification and Scaffolding

This is the most critical phase. A clear specification leads to useful code. Your goal is to give the AI a complete "blueprint" of what you want to build.  In this context, scaffolding means the process where the architect provides temporary support to the AI as it learns new concepts or skills for the design task. The support is gradually reduced as the AI becomes more proficient.  In other words, the architecture guides the AI in the direction of the desired outcome. 


How to Write the Prompt:


Assign a Role: Start the prompt by giving the AI an expert persona. This primes the model to access the most relevant information and adopt the correct terminology.


"Act as an expert Android developer specializing in Bluetooth Low Energy."

"You are a computer architect. We are designing a 16-bit microprocessor from scratch."

"Assume the role of a senior FPGA design engineer specializing in SystemVerilog."


Define the Scope and Constraints: Clearly state the boundaries of the project.


Technology Stack: "This will be written in Python 3.9.", "The target IDE is Android Studio using Kotlin.", "The HDL is SystemVerilog for a Xilinx Artix-7 FPGA."


High-Level Goal: "I am building a C-like compiler for a custom 16-bit CPU.", "I need a UART module that can transmit and receive 8-bit data with one start bit and one stop bit."


Key Constraints: "Do not use any external libraries.", "The design must be synthesizable.", "Focus on clarity and add extensive comments."


Provide a Detailed Specification: This is what you must do in an iterative process. Break down the project into its core components.


For Software/HDL: Define functions, classes, modules, inputs/outputs (I/O), and state machines.

For Architecture: Define the instruction set architecture (ISA), register file, memory map, and addressing modes.


Example: "Design a SystemVerilog UART receiver module named 'uart_rx'. It needs the following ports: clk, reset, rx_in (serial input), data_out (8-bit parallel output), and data_valid (a single-cycle pulse). It should operate based on a state machine with states: IDLE, START, RECEIVING_DATA, and STOP."


Pro-Tip: Before asking for the full code, ask the AI to outline the plan first.

"Based on the spec above, provide a step-by-step plan for implementing this. List the modules/classes we'll need and the order in which we should build them."


Phase 2: The "Coder" Phase - Generation and Implementation

Once you have a solid plan, you can ask for code.


How to Write the Prompt:


Be Specific and Modular: Don't ask for the entire, massive project at once. Ask for one component from your plan.

"Based on our plan, please write the Python code for the 'Assembler' class. It should have a method called 'parse_instruction' that takes a line of assembly code as a string and returns a 16-bit machine code integer."


Reference the Context: Remind the AI of the key design decisions made in Phase 1.

"Now, generate the SystemVerilog code for the 'uart_rx' module we defined. Remember to use the 16x oversampling clock we discussed for detecting the start bit."


Phase 3: The "Compiler Whisperer" Phase - Syntax and Integration Debugging

This is a tight, iterative loop. You act as the bridge between the AI and the ground-truth of a tool’s Integrated Development Environment (IDE).  In this context, "ground-truth" refers to the objective, undeniable reality of what happens when your code is processed by the actual development tool. It is the final, non-negotiable verdict from the compiler, interpreter, synthesizer, or simulator.


How to Write the Prompt (The "Error Sandwich" Method):


This is the most effective debugging prompt format. You "sandwich" the error message between the context and the problematic code.


Context: State the tool and the goal. "I am using Vivado to synthesize the SystemVerilog code you provided, and I'm getting a syntax error."


The Error Message: Copy and paste the exact error message from your tool. This is crucial as it contains line numbers and specific keywords the AI can use. "The error is: [Synth 8-27] procedural assign not supported [...] on line 42."


The Code Snippet: Paste the relevant lines of code around the error. Don't paste the whole file unless it's small. "Here is the code around line 42:" followed by the code block.


The Question: Ask for an explanation and a solution. "Please explain what this error means and provide the corrected code."


Phase 4: The "Detective" Phase - Functional and Logic Debugging

This is harder than syntax debugging because the code runs but doesn't do what you want.


How to Write the Prompt:


State the Goal: "We are now debugging the functionality of the abCore16 simulator."


Describe the Expected Behavior: "When I execute the 'ADD R1, R2' instruction, I expect the value in register R2 to be added to register R1, and the result stored in R1."


Describe the Observed (Wrong) Behavior: "However, what I'm observing is that the value from R2 is overwriting R1, not being added to it. The original value of R1 is lost."


Provide the Relevant Code: Paste the function or module responsible for the logic. "Here is my 'execute_instruction' function in Python."


Ask for Debugging Strategies: This is where you leverage the AI's power to suggest troubleshooting steps.

"Can you analyze this code for a potential logic error?"

"What's the best way to debug this? Suggest some print statements I can add to trace the values of R1, R2, and the ALU output during execution."

"Can you write a SystemVerilog testbench snippet that specifically tests this failing corner case?"


By following this four-phase framework, you systematically guide the AI from a high-level concept to a fully debugged, functional implementation, making the entire development process faster and more robust.

Key Benefits of an AI-Assisted Development Workflow

The Human-AI Partnership: A New Paradigm for Technical Development

In today's fast-paced technology landscape, the complexity and scope of engineering projects are constantly increasing. The key to not just keeping up but innovating is to leverage cutting-edge tools effectively. My work demonstrates that Artificial Intelligence is not merely a code-generation utility; it is a true collaborative partner that transforms the entire development lifecycle.


By adopting a structured, iterative workflow between the developer and AI, it's possible to accelerate timelines, enhance code quality, and confidently tackle ambitious projects that would otherwise be impractical. This document outlines the core benefits realized through this powerful human-AI partnership.


1. Drastic Time Compression & Overcoming Knowledge Barriers

The most significant impact of AI collaboration is the ability to develop sophisticated projects in domains where the developer has little to no prior experience. This dismantles traditional learning barriers and dramatically compresses project timelines.


Case Study: The Android BLE Application

  • The Challenge: To develop a custom Android application to control a rover via Bluetooth Low Energy (BLE). This required deep expertise in both the Kotlin programming language and the complex BLE protocol, neither of which I was familiar with.
  • Traditional Estimate: A conservative timeline for self-learning and development was approximately 8 months.
  • AI-Assisted Result: By leveraging an AI partner for code generation, live debugging, and on-demand explanations, a fully functional prototype was developed and communicating with the hardware in just 14 days.
  • The Impact: This represents a greater than 95% reduction in development time, transforming a high-risk, long-term project into a successful short-term sprint. It is a testament to the AI's ability to act as a seamless translator for new languages and frameworks.


2. On-Demand Subject Matter Expertise

The AI serves as a personalized, infinitely patient learning tool. It provides deep-dive tutorials on complex technologies like Bluetooth Low Energy and Real-Time Operating Systems (FreeRTOS) precisely when needed. It can instantly explain the purpose and functionality of any code snippet, which is critical for understanding the overall application workflow and making informed architectural decisions.


3. Enhancing Code Quality and Reliability

A successful project requires more than just functional code; it requires code that is robust, maintainable, and thoroughly tested.

  • Code Refactoring & Best Practices: The AI acts as an automated code reviewer, taking functional code and refactoring it to improve readability, efficiency, and adherence to industry best practices. This ensures the final product is of a higher professional standard.
  • Automated Test Generation: To ensure reliability, the AI can generate a comprehensive suite of unit tests or a hardware verification testbench.  This is critical for covering edge cases and corner cases that a human might overlook, leading to a more robust and dependable final design.


4. Comprehensive Debugging Assistance

The AI partner proves invaluable throughout the entire debugging process, adeptly handling both simple and complex issues.

  • Syntax Correction: It can instantly identify and correct compiler or interpreter errors by analyzing snippets of code alongside the tool's specific error messages.
  • Functional Debugging: It assists in the more challenging task of diagnosing logical errors. The AI can suggest strategic locations for diagnostic print statements and help trace data flow to pinpoint the root cause of unexpected behavior.


5. Strategic Planning & Architectural Brainstorming

Beyond implementation, the AI serves as a high-level strategic partner. It is an excellent tool for brainstorming future project phases, evaluating the trade-offs of different technical approaches, and exploring novel architectural possibilities. This ensures the project's design is not only functional for today but also forward-looking and scalable for tomorrow.


6. Full-Spectrum Documentation & Content Generation

A project's value is limited if it isn't well-documented. The AI was utilized as a technical writer to produce a wide range of project materials, including high-level project descriptions, detailed User Guides, and compelling content for webpages. This ensures the work is accessible, maintainable, and clearly communicated to any audience.


By integrating this human-AI partnership into my workflow, I have found it possible to work faster, learn more effectively, and build more ambitious and higher-quality projects than ever before. It is a paradigm shift that redefines what a single developer can accomplish.

Links to AI Projects

B_Bot: BLE Android Control Application

Android app development.

Learn More

abCore16: Custom 16-bit Microprocessor Ecosystem

abCore16 16-bit microprocessor development.

Learn More

abUART: FPGA-Based UART and Testbench

abUART: FPGA-Based UART and Testbench

abUart FPGA development.

Learn More

Copyright © 2025 DigiTekXplorer - All Rights Reserved.


Powered by

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

Accept