The VHDL architecture in a Vivado project is the body that tells synthesis what each entity actually does. To create one, make or open an entity (the block's interface), then add architecture of is ... end architecture; in the same design file or a new one, and fill the declarative and statement regions with your signals, components, and concurrent logic. A successful architecture compiles with no syntax errors and elaborates against its entity. The steps below assume a Vivado Design Suite project with a VHDL source set, and they work the same way whether you write the code by hand or generate a starter template through the tool.
The word "create" hides a few meanings here, so this guide covers the whole path: writing a new architecture from scratch, adding a second architecture to an existing entity, and using Vivado's own template and Wizard features so the skeleton is correct before you type any logic. It also covers the structural, dataflow, and behavioral styles you can mix inside one architecture, because that choice is what most often trips up beginners.
Prerequisites Before You Type architecture
You need three things in place or the architecture has nothing to attach to.
First, a Vivado project with VHDL as a target language. If the project was created with Verilog as the default, you can still add VHDL files, but mixed-language simulation needs a VHDL-capable simulator or the Vivado Simulator, and the file-type setting should be VHDL when you create the source.
Second, a defined entity. The entity names the ports and generics—the block's public interface. An architecture can't exist without an entity name that matches exactly, including capitalization, since VHDL is case-insensitive but tools and readability benefit from consistency.
Third, a text editor workflow. You can write the file in Vivado's built-in editor, add an existing file with Add Sources → Add or create design sources, or generate a template through Tools → Create and Package New IP or the language templates panel (Tools → Language Templates). None of these require a license beyond what Vivado already provides for standard synthesis.
A useful sanity check before proceeding: your design hierarchy should show at least one entity, and the source file should be added to the project rather than sitting on disk unregistered. Vivado will not synthesize a file it hasn't been told about.
Writing the Architecture Skeleton
The minimal architecture has two regions: the declarative part (before begin) and the statement part (after begin). Here is the smallest useful skeleton:
Line by line:
architecture rtl of my_entity is — rtl is the architecture name, chosen by you; my_entity must match an entity exactly. signal internal_flag : std_logic; — declarations, which may include signals, constants, types, subtypes, components, functions, and procedures. Nothing here executes; it only defines names. begin — starts the concurrent statement region. The assignment <= is a signal assignment, and the when ... else form is a conditional signal assignment, a concurrent statement. end architecture rtl; — closes the unit. The trailing name is optional and is often omitted for brevity.
A frequent mistake is putting executable logic before begin. Declarations belong in the declarative region; statements belong after begin. Vivado's parser will reject a signal assignment placed above begin, and the error often points at a confusing token rather than saying "wrong region."
Another early trap: naming the architecture the same as a reserved word or giving it a name with a hyphen. VHDL identifiers must start with a letter and may contain letters, digits, and underscores. Hyphens are subtraction, so arch-1 is interpreted as arch - 1 and fails.
Numbered Workflow: Building and Validating an Architecture in Vivado
Prerequisite: a project with an entity already defined and the file added to the design sources.
1: Open or create the design file. In the Sources panel, double-click the VHDL file containing your entity, or use File → New File and select VHDL. If you are creating a fresh file, include the entity in the same file unless you plan to split interface and body across files.
2: Copy the entity port list exactly. In practice, you will re-type or paste the entity's port names into your signal references. If the entity has clk, rst, din, dout, use those names, not clock or data_in. Name mismatches are the top cause of elaboration errors.
3: Insert the architecture header. Write architecture of <entity_name> is. Use a descriptive name such as rtl, behavioral, or structural; the name appears in reports and is required if a single entity has multiple architectures.
4: Declare internal signals. For every wire you need between sub-blocks or between a register and an output, add a signal declaration. Use std_logic for single bits and std_logic_vector(N-1 downto 0) for buses, where N is the width. For example, signal count : unsigned(7 downto 0); needs library ieee; use ieee.numeric_std.all; at the top of the file.
5: Choose your implementation style. Decide whether the architecture will be dataflow (concurrent assignments), structural (component instantiations and port maps), behavioral (a process with sequential statements), or a mix. Most real designs mix dataflow for data paths and behavioral for control logic, which is legitimate and common.
6: Write the statements after begin. For behavioral logic, write process(clk) and house your sequential statements inside; for structural logic, instantiate components with port map. See the style sections below for the exact patterns.
7: Add library and context clauses if missing. The architecture itself needs ieee.std_logic_1164 for std_logic types and ieee.numeric_std for arithmetic on vectors. These clauses go before the entity, not inside the architecture, but they apply file-wide.
8: Run syntax and elaboration checks. In Vivado, use Tools → Run Synthesis or, faster, open the file and use the error markers in the editor. A quick alternative is Report → Check Syntax on the source file. If elaboration fails, the message log names the entity and line, which narrows the problem to a port name, type, or missing declaration.
9: Confirm success. Succeeded looks like this: the Messages panel shows no errors, synthesis completes with "Synthesis finished," and the elaborated design opens with your architecture's signals visible in the hierarchy. If synthesis runs but your outputs are constant, check that your assignments actually drive the ports you think they do—Vivado optimizes away unused internal signals, which is not an error but often surprises newcomers.
10: Stop here and get help if Vivado reports a mismatched port array (width mismatch in a port map), a missing component declaration, or a simulation-vs-synthesis mismatch that you cannot trace after two rounds of narrowing. Persistent width and numeric-type conflicts are where experienced help saves hours.
If the syntax check reports "design unit not found" for your entity, the architecture header name does not match the entity. Fix the header before changing any logic—this is a naming problem, not a logic problem.
Three Ways to Fill the Architecture: Dataflow, Structural, and Behavioral
The architecture's contents decide the style. These are not mutually exclusive architectures; they are patterns inside one.
Dataflow. You express logic as concurrent signal assignments that read naturally as equations:
When the condition depends on a select, use with ... select or when ... else. This style suits combinational logic, decoders, and bit-slicing. It is synthesizable in Vivado without a process, and it reads well when the equation is short.
Structural. You instantiate lower-level entities and connect them with port map. It makes the design hierarchy explicit:
Structural code is the right choice when you already have verified sub-blocks or when a lab or team mandate requires instance-based hierarchy. It requires the referenced entity to be in the project, or the component declaration to be written in the architecture's declarative region. Using entity work.name avoids the separate component declaration and is generally preferred in Vivado projects.
Behavioral. You write a process with sequential statements: if, case, for, and signal or variable assignments. This style models registers, state machines, and anything with memory or ordered events:
Mixing is normal: a dataflow multiplexer feeding a behavioral register and a structural sub-IP inside the same architecture is a typical FPGA block. The style does not change the architecture header; only the statements differ. When in doubt, choose behavioral for sequential logic and dataflow for wiring and arithmetic.
Using Vivado Tools to Generate the Architecture Template
Vivado can write most of the boilerplate for you, which cuts down on naming and syntax errors. Two routes matter.
Language Templates. Open Tools → Language Templates, expand VHDL → Constructs and choose a template such as "Architecture" or "Process." Copy the template into your file and replace the placeholder names. This is the fastest way to get correct if rising_edge(clk) and case syntax, and it avoids typing errors in reserved words.
Create and Package New IP (or the IP Catalog). When you create a custom IP with the wizard, Vivado generates an entity and an architecture with standard clock and reset conventions, plus optional AXI interfaces. If you are building a reusable block, starting from this wizard is more reliable than hand-writing the skeleton, because the generated architecture already contains the required library clauses and port defaults.
New source via Add Sources. Selecting Add or create design sources and choosing VHDL produces an entity-only file by default, and you add the architecture. Some versions also offer an architecture template option; if offered, it is a safe starting point. Either way, the critical check is that the generated entity name and your architecture header agree.
These tools don't decide your logic. They guarantee the container is valid so the debugging effort goes into the design, not the punctuation.
Generating Multiple Architectures for One Entity
VHDL allows more than one architecture per entity, which is useful for comparing a behavioral model against an RTL implementation, keeping a simulation-only version, or maintaining an area-focused and a speed-focused variant. The tool selects which architecture to use at elaboration time.
In Vivado, the default is the last architecture analyzed, but you should not rely on file order. For simulation, the simulator's elaboration options usually let you bind a specific architecture. For synthesis, Vivado synthesizes the architecture that ends up bound to the entity in the elaborated design; with multiple architectures present, the standard approach is to control binding explicitly rather than assuming which one wins. If you use multiple architectures, give each a distinct name (rtl, rtl_fast, sim_only) and add a comment at the top of each explaining its purpose and limitations (for example, "not synthesizable, uses file I/O").
A subtle failure: a simulation-only architecture that uses non-synthesizable constructs can be picked up by synthesis if binding is ambiguous. Vivado will then report errors that seem unrelated to your logic. The fix is to scope the architecture with configuration or to keep simulation-only files out of the synthesis source set (use Properties on the file and mark it as simulation-only).
Common Errors and How to Tell Them Apart
The symptoms below are distinct, and the cause usually follows directly.
Syntax error at begin. Often a misplaced declaration or a missing semicolon on the previous line. Check that no signal declaration appears after begin.
"Entity not found" or "design unit not found." The architecture header's entity name doesn't match, or the file is not in the project. Confirm the file appears under Design Sources, not just in the directory pane.
"Width mismatch in port map." A vector on the port map has a different length than the formal port. Count the bits; Vivado reports the expression and the expected width, so trust the numbers over your mental model.
Logic synthesizes but outputs are tied or optimized away. Signals are declared but never driven, or an output port is never assigned. This isn't an error—Vivado prunes unused logic. Assign every output in at least one branch.
Simulation works, hardware does not. A classic process sensitivity or initialization issue. Combinational processes need every input in the sensitivity list, or use process(all) where supported (VHDL-2008). Registers need rising_edge(clk) rather than clk'event and clk = '1' if you want the standard pattern, though both synthesize. A behavioral architecture that initializes signals in a declaration may simulate correctly and not map to a power-on condition on hardware; explicit resets are the reliable pattern.
Type conflict in arithmetic. You cannot add an integer to a std_logic_vector directly. Use numeric_std types and conversions (to_unsigned, unsigned(...)) or to_integer when the result needs to be an integer. Confusing signed and unsigned produces subtraction errors that look like bit-width bugs.
Start with reversible checks: re-run syntax, compare the entity and architecture names character by character, and comment out sub-blocks one at a time to isolate a failing port map. If those clear the issue, the remaining class of problems—numeric type mismatches and simulation-synthesis inconsistency—is where a second pair of eyes or the vendor documentation for the specific Vivado version is the right next step.
A Complete Worked Example
Here is a small, self-contained design to show the full file. It is a 4-bit counter with an enable and a synchronous reset:
What to notice. The file has library clauses before the entity—they must be present for std_logic and unsigned to resolve. The architecture declares one internal signal. The process is purely sequential, respects the clock edge, and gives reset priority. The final assignment converts the internal unsigned to the port's std_logic_vector type; skipping this conversion is a common error because the two types are not interchangeable.
Expected result after synthesis: a 4-bit register with a reset and an enable, and no inferred latches. A successful check: the synthesis report lists four flip-flops and no warnings about incomplete assignments. If it lists eight, check that you haven't accidentally declared two counters or duplicated a process.
Structural Variant with a Sub-Component
To show how structure fits the same entity, this architecture replaces the behavioral adder with an instantiated incrementer:
This requires an inc4 entity with din and dout ports in the project. If it is missing, Vivado reports during elaboration that the design unit work.inc4 cannot be resolved. That is the structural style's main prerequisite: every referenced entity must exist.
Components, Generics, and Where Each Belongs
The architecture's declarative region is where component declarations go if you use the older component/port map style instead of entity work.name. For new Vivado code, prefer direct entity instantiation and skip component declarations—it's fewer lines and enforces interface matching at elaboration.
Generics are declared in the entity, not the architecture. From inside the architecture you reference them by name, and they can parameterize widths, depths, and initial values. For example, an entity with generic (width : integer := 8) lets the architecture write signal reg : std_logic_vector(width-1 downto 0);. Do not redeclare a generic inside the architecture; the compiler will flag a duplicate.
Constants declared in the architecture are local, non-port parameters—good for state encodings and fixed coefficients. Types and subtypes declared here are local too, which keeps package clutter down for one-file designs.
FAQ
Can an architecture be in a different file from its entity?
Yes. VHDL design units are independent, and the binding happens by name at analysis and elaboration. Keeping them in one file helps readability; splitting is acceptable, and Vivado will analyze both as long as both files are in the source set.
Does the architecture name matter for synthesis?
Not to the logic, but it matters for reporting and for choosing between multiple architectures. Pick a stable, descriptive name and keep it consistent in project documentation.
Why does my behavioral process simulate but not synthesize?
The most common causes are non-synthesizable constructs (wait for, file I/O), missing signals in a combinational sensitivity list, or variable-to-signal confusion. Start by checking that the process is either clocked or sensitivity-complete. If the code uses advanced VHDL-2008 features, confirm the Vivado version and the file's language setting support them; features added across versions behave differently, so check the specific version's synthesis support rather than assuming the latest documented syntax works unchanged.