Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Complete Sensor Guide
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • 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
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Tech Terms
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • White Papers
  • Guest Post Guidelines
  • Advertisers
    • Advertise
    • PR Submissions
    • Eblast Submissions
  • 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

Log in to leave a comment:

Lost your password?

Don't have an account? Register here

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Wide Bandgap Semiconductors
Moving from silicon to GaN or SiC feels like a whole new ballgame, doesn’t it? It isn’t just about faster switching; it’s about managing the layout parasitics and thermal realities that come with that speed. This month’s Tech Toolbox features a curated eBook that tackles these design hurdles head-on.

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 feed: EDABOARD.com Discussions. EDABOARD.com Discussions.

  • Component footprint "centre" to pin 1 ?
  • Leaving your C as C, but Rust-Grade Safety w/C++
  • SOT23-6 with thermal pads
  • ECAL cable position strategy usage
  • DRC in Altium: Regions of application

RSS feed: Electro-Tech-Online.com Discussions Electro-Tech-Online.com Discussions

  • PIC Assembler Coding
  • Ways of handle battery when reaching charge
  • I enjoyed this math puzzle
  • VNA calibration linked causality questions
  • A market plan for a affordable website without advertising (kinky as it might sound)

Featured Tutorials

LoRa and LoRaWAN: A Complete Guide to Wireless Communication

  • Best practices for securing LoRa networks
    Best practices for securing LoRa networks
  • Understanding LoRa architecture: nodes, gateways, and servers
    Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
    Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
    How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
    How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices
    How communication works between two LoRa end-node devices
More Tutorials >

Recent Articles

  • Emerson adds 1.5 GHz oscilloscopes and 6½-digit DMM
  • TASKING introduces unified toolchain for automotive multicore processors
  • Harwin launches custom cable assembly and testing service
  • Renesas introduces 64-bit MPU for four-axis motor control
  • STMicroelectronics GaN drivers handle 60 A in compact LGA

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • 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 © 2026 Arrowfly 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 Arrowfly
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Complete Sensor Guide
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • 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
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Tech Terms
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • White Papers
  • Guest Post Guidelines
  • Advertisers
    • Advertise
    • PR Submissions
    • Eblast Submissions
  • Subscribe