Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

VHDL Tutorial 3: Using MAX+II to compile, simulate & verify a VHDL program

By Ashutosh Bhatt December 18, 2022

In the previous two tutorials, we learned about VHDL basics and programs. Next, we’ll simulate and verify the VHDL programs. 

To edit, compile, execute (simulate), or verify a VHDL program, there are requirements including software tools, such as:

  • ISE from XILINX
  • ModelSim from Mentor Graphics
  • Riviera from Aldec
  • Quartus-II from Altera etc. 

All of these are commercial simulators. Here, we are going to use Altera’s MAX+II VHDL simulator, which is designed for educators and students.

To begin, follow the step-by-step procedure to build and simulate the VHDL program for any digital circuit using MAX+II.

Step 1
Open MAX+II software from the start menu. The following screen will appear on your computer screen:

Step 2:
Create a new file from the file menu -> new. A new dialog box will open. From here, select the text editor file and click OK.

This will open the text editor in which you can write the VHDL program.

Step 3:
Let’s start with the simple program of half adder. Write the following code in the editor area and click save.

ENTITY half_adder IS
   PORT ( a, b : IN BIT;
          sum, carry : OUT BIT);
END half_adder;
ARCHITECTURE half_adder_arch OF half_adder IS
     BEGIN
          sum <= a xor b;
          carry <= a and b;
END half_adder_arch;

Step 4:
Save the program file by clicking the save button (or file menu – > save). The save dialog box will appear. Select the proper directory and folder (for example, here it is:  E:\vhdl_programs\half_adder)

Note: it’s advisable to create a new folder for every new VHDL program in the directory. Also, there should NOT be any space (“ “) in the complete path for the VHDL program. 

Give the file the same name as the entity name, “half_adder” and select the .vhd extension as per this screenshot. 

After you’ve saved your work, you’ll see that all of the keywords, such as “ENTITY”, “IS”, “ARCHITECTURE”, etc. are all highlighted.

Step 5:
Next, you will have to set this project to an active one. To do so, go to file – > project – > set project to current file.

You will notice that the MAX + plus II will set the project to the current file as half_adder.

Step 6:
Now compile the file from the MAX+PLUS II – > compiler. The compiler will appear on the screen. Press start to begin the compilation.

When the compilation is complete, it should indicator 0 errors and 0 warnings. Simply click OK to complete the compilation.

Step 7:
Now we have to create one more file that’s a waveform editor file, which will provide us with the results as input-output waveforms. To create the waveform editor file, go to MAX+II – > waveform editor.

It will open the following waveform editor window:

Step 8:
Right-click on the blank area. Then, from the pop-up menu, select the “enter node from SNF”.

The new dialog box will appear. First, select “list” and then the ‘=>’ button before clicking OK.

You will see all of the input-output signal waveforms. The ‘a’, ‘b’, ‘sum’ and ‘carry’ will appear on the waveform editor window similar to this image.

Here, the ‘xx’ lines indicate the output signals that you cannot edit. But you can edit the ‘a’ and ‘b’ input signals.

Step 9:
Next, zoom out of the waveform by pressing the zoom out button on the left-hand side of the screen.

Now enter the values of ‘a’ and ‘b’ as ‘1’ and ‘0’ by selecting the area (simply press and hold the mouse button down to select the area). Be sure to select the value 1 or 0 from the left-hand side.

Set the 1 or 0 values of ‘a’ and ‘b’ as you wish. Make all four of the combinations 00, 01, 10, and 11 as shown here:

Step 10:
Save the waveform file. By default, its name will be “half_adder.swf”. Click OK.

Step 11:
Next, go to the MAX+II – > simulator to simulate the work here.

Click start on the simulator dialogue box. When the simulation is successful, the dialogue box will appear as 0 errors and 0 warnings.

Step 12:
Click OK and open the wavefrom editor file to verify the result of the half adder.

This procedure must be followed to edit, compile, simulate, and verify all of the VHDL programs.

The next tutorial will deal with the simulation of different digital circuits in the VHDL when using MAX + II.

You may also like:

  • VHDL
    VHDL Tutorial 1: Introduction to VHDL

  • What is an SoC?

  • What is electronic design automation?

  • What are field-programmable gate arrays (FPGAs)?

  • SPI: What is the Serial Peripheral Interface Protocol?

  • What is ASIC?

Filed Under: Tutorials, VHDL, VHDL

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Voltage mode pushpull is a nonsense SMPS?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe