This is the setup appendix to Agentic AI for FPGA Design: How the Loop Works. That article assumes an agent is already installed and signed in. This page covers the part before that: getting Claude Code or OpenAI's Codex CLI onto your machine, pointing it at the companion repository, and starting the first run. It is deliberately basic. Both tools change quickly, so every step links to the vendor's own page, which is the one to trust when this page and that one disagree.
The two tools are close cousins. Both run in a terminal, read the files in the current directory, run commands, and read what comes back. Both also ship as editor extensions and desktop apps, but the terminal is the simplest place to start and the one the loop article assumes. Pick one. The loop is the same in either.
What you need before either tool
- An account. Claude Code needs a Claude Pro, Max, Team or Enterprise subscription, or a Claude Console account with API credits. The free Claude plan does not include it.[1] Codex CLI signs in with a ChatGPT Plus, Pro, Business, Edu or Enterprise account, or with an OpenAI API key.[3]
- A terminal. Any of Bash, Zsh, PowerShell or CMD. On Windows, Claude Code recommends Git for Windows so the agent gets a Bash shell; without it, it falls back to PowerShell.[1] Codex CLI installs natively on Windows through a PowerShell script and also runs inside WSL.[3]
- Git and Python 3.8 or newer. Git to clone the repository, Python to run its script. The script uses only the standard library.
- The HDL tools. Icarus Verilog or GHDL for simulation, Yosys for the generic synthesis check, and Vivado if you want the implementation step. The repository README lists versions and where to get each one. Install these before the agent, because the agent will try to run them.
Claude Code
Install. One command, depending on your shell:[1]
macOS, Linux, WSL: curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell: irm https://claude.ai/install.ps1 | iex
Windows CMD: curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Homebrew (brew install --cask claude-code), WinGet (winget install Anthropic.ClaudeCode) and npm (npm install -g @anthropic-ai/claude-code) also work. The native install updates itself; the package manager ones do not.
Check and sign in. claude --version prints a version number. Then, from any directory, run claude. The first start opens a browser page to sign in with your Claude account; after that the credentials are stored.[2] If the login fails, claude doctor reports what the installation thinks is wrong.
First session. Open a terminal in the project directory and run claude. Type a request in plain language. Before it edits a file or runs a command, Claude Code either asks you or, depending on the permission mode, proceeds and shows you what it did. Shift+Tab cycles the permission mode, and /help lists the session commands.[2] For the first loop run, a mode that asks before running commands is the right one: you see every tool invocation and learn what the agent does with the logs.
Project instructions. Claude Code reads a CLAUDE.md file in the project root at the start of every session. That is where standing rules go, such as which files the agent may not edit. The prompt in the main article carries those rules inline, which is fine for one run; for repeated runs, move them into the file.
Codex CLI
Install. Also one command:[3]
macOS, Linux, WSL: curl -fsSL https://chatgpt.com/codex/install.sh | sh
Windows PowerShell: powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
npm: npm install -g @openai/codex
Homebrew: brew install --cask codex
Running the install script again updates it.
Sign in. Run codex in a project directory. On first start choose "Sign in with ChatGPT" and complete the login in the browser. An API key is the alternative and needs a little more setup, described on the authentication page.[3]
First session. codex opens an interactive session; describe the task the same way. Codex runs commands inside a sandbox and asks for approval before anything that leaves it, with a setting for how much it may do on its own. codex exec "..." runs a single task without the interactive screen and prints the result, which is the form to use from scripts.[3]
Project instructions. Codex reads AGENTS.md from the project root, the same role CLAUDE.md plays for Claude Code.
Point it at the repository
The steps are the same for both tools.
- Clone the companion repository and open a terminal inside it:
git clone https://github.com/bard0-design/fpga_agentic_axi4s_example.git
cd fpga_agentic_axi4s_example
-
Check the tools yourself first. Run
python run.py lintby hand. If it fails because a simulator is missing, fix that now; an agent will spend tokens trying to work around a tool that is not installed, and that is not the failure you want it to learn from. The README explains how to point the script at a tool that is not on the PATH. -
Start the agent in that directory,
claudeorcodex, and paste the prompt block from the main article. The tools to run, the stop condition and the limits are all in it. -
Watch the first run. Approve each command as it comes. The sequence to expect is lint, then simulation, then the mismatch on the partial final word, then a fix, then coverage. When the agent stops and reports, read its summary against the logs in
build/, not instead of them.
Guides and videos from the vendors
The vendors' own material is short and kept current, which is more than this page can promise.
- Claude Code 101 is a free course from Anthropic that goes from installation through the explore, plan, code, commit workflow to
CLAUDE.mdand hooks.[4] - How we Claude Code is a video on the Claude channel showing how Anthropic's own engineers set up a repository with project context files and custom commands.[5]
- Getting started with Codex is OpenAI's own onboarding video: installing the CLI, signing in, and a first task.[6]
None of these mention FPGAs. They do not need to. Once the agent is installed and can run a command in a repository, everything FPGA specific is in the main article and the repository.
References
6 sources
- Anthropic, "Claude Code: Advanced setup": system requirements, install commands per platform, Windows notes, account types, updating.
- Anthropic, "Claude Code: Quickstart": first login, first session, permission modes, essential commands.
- OpenAI, "Codex CLI" documentation and the openai/codex README: install commands, sign in with ChatGPT or an API key,
codex exec, Windows support. - Anthropic, "Claude Code 101": free course on the Anthropic learning platform.
- "How we Claude Code": video on the Claude YouTube channel.
- "Getting started with Codex": video on the OpenAI YouTube channel.
Our FPGA and AI training sets this loop up on your own tools and designs, with the checks and limits in place.
Comments
Loading comments...
Leave a Comment