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

How to compile, simulate, and verify a Verilog program using MAX+II-Part 3

By Ashutosh Bhatt March 17, 2025

In the previous two tutorials, we covered the basics of Verilog and explored several example programs using different modeling styles. In this tutorial, we will focus on how to simulate and verify Verilog programs.

To edit, compile, execute (simulate), or verify a Verilog program, you will need a software tool like Xilinx’s ISE, Mentor Graphics’ ModelSim, Aldec’s Riviera, or Altera’s Quartus-II, among others. These are commercial simulators. For this tutorial, we will use Altera’s MAX+II, a VHDL simulator particularly suited for educators and students.

Follow these step-by-step instructions to build and simulate a Verilog program for any digital circuit using MAX+II:

Step 1. Launch the MAX+II software from the Start menu. The following screen will appear on your computer.

Step 2. Create a file (File Menu → New) and a new dialog box will open. Select text editor file and click OK.

This will open the text editor where you can write our Verilog program.

Step 3. Let’s begin with a simple half-adder program.

module half_adder(a,b,sum,carry);
  input a,b;
  output sum,carry;
    xor(sum,a,b);
    and(carry,a,b);
endmodule

Write this code in the editor area and save it

Step 4. To save the program, click the save button (or go to File → Save). A save dialog box will appear. Select the appropriate directory and folder (e.g., E:\verilog_programs\half_adder).

It’s recommended to create a new folder for each Verilog program. Also, avoid using spaces (” “) in the complete path of the program. Name the file the same as the module name, “half_adder,” and choose the .v extension. Refer to the following figure for guidance.

Once saved, you’ll see all of the keywords, such as “module,” “endmodule,” etc., are highlighted.

Step 5. Now, let’s set this to an active project. Go to File → Project. Set the project to the current file.

Note that MAX+PLUS II automatically sets the project name to match the current file. In this case, it’s half_adder.

Step 6. Compile the file by navigating to MAX+PLUS II → Compiler. The compiler window will appear. Press the Start button to initiate the compilation process.

When the compilation is complete, it shows “0” errors and “0” warnings. Click OK to finish the compilation.

Step 7. Next, we must create a waveform editor file to visualize the input and output waveforms. This displays the simulation results.

To create the waveform editor file, go to MAX+PLUS II → Waveform Editor.

The following waveform editor window should open.

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

A new dialog box will appear. First, select List, then click the ‘⇒’ button. Press OK to confirm your selection.

You’ll see all of the input and output signal waveforms (“a,” “b,” “sum,” and “carry”) appearing on the waveform editor window.

Here, the “xx” lines indicate the output signals, which cannot be edited. However, it’s possible to edit the “a” and “b” input signals.

Step 9. Zoom out of the waveform by pressing the minimizer icon (labeled “Zoom out” below) on left-hand side.

Enter the values “a” and “b” as “1” and “0” by selecting the appropriate areas (press and hold your mouse button to select). You can elect the values “1” or “0” from the let-hand side.

Set the “1” or “0” values of “a” and “b” as desired. Then, make all four combinations “00,” “01,” “10,” and “11” as shown here.

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

Step 11. For the simulatation, go to MAX+II → Simulator.

 

Click Start on the simulator dialogue box. The dialogue box appears as “0” errors and “0” warnings if the simulation is successful.

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

This is the step-by-step procedure to edit, compile, simulate, and verify any Verilog program.

In the upcoming tutorials, we’ll focus on simulating various digital circuits in Verilog using MAX+PLUS II.

 

You may also like:


  • What is Verilog, its features, and design flow?- Part 2

  • What are the fundamentals of Verilog programs?-Part 1

  • How to design a digital circuit using VHDL

  • What are the top tools for developing embedded software?

  • What is an embedded system?

Filed Under: Tutorials
Tagged With: max+II, simulate, software, tutorial, verilog
 

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: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

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

  • Identification of a 6 pin smd chip (sto-23-6) marked E2
  • Dynacord enter protect
  • IGBTs without negative gate drive
  • Need suggestions in task NI6363 retrigger (analog trigger)
  • Monte-Carlo simulation error on ADE-XL

RSS Electro-Tech-Online.com Discussions

  • Faulty heat air gun (dc motor) - problem to locate fault due to Intermittent fault
  • Fun with AI and swordfish basic
  • Does US electric code allow branching ?
  • Sump pit water alarm - Kicad 9
  • turbo jet fan - feedback appreciated.

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How IoT network topologies work
  • The top five AI startups to watch in 2025
  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz

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