FPGA, CPLD, and ASIC solutions from Altera
  • Download Center
  • Literature
Sign in/register
myAltera Account
Welcome
  •   myAltera
  •   Logout
  • Products
    • Devices
    • Design Software
    • Intellectual Property
    • Development Kits/Cables
    • Design & Support Services
    • Literature
  • End Markets
    • Automotive
    • Broadcast
    • Computer & Storage
    • Consumer
    • Industrial
    • Medical
    • Military
    • Test & Measurement
    • Wireless
    • Wireline
  • Technology
    • DSP
    • External Memory
    • Embedded Processing
    • Transceivers
    • Parallel I/O
    • Signal Integrity
    • System Integration
  • Training
    • Training Courses
    • University Program
    • Webcasts & Videos
    • Demonstrations
    • Events Calendar
  • Support
    • Design & Support Resources
    • Knowledge Database
    • Devices
    • Design Software
    • Intellectual Property
    • Development Kits/Cables
    • Design Examples
    • Downloads
    • User Communities/Forums
    • mySupport
  • About Altera
    • About Us
    • Environmental
    • Customer Successes
    • Partners
    • Newsroom
    • Investor Relations
    • Jobs
    • Contact Us
  • Buy Online
    • Devices
    • Design Software
    • Development & Education Kits
    • Cables & Programming Hardware
    • Intellectual Property
  • Entire Site
  • Part Number
  • Knowledge Database
  • Support & Technical Docs
  • Forums & Wiki
Username:  
Password:  
 
Forgot my username or password
Don't have myAltera account? Register Now.
Enter your email address:


Home > Support > Knowledge Database > Support Solution

Solution ID: rd12022005_271
Last Modified: Dec 13, 2005
Product Category: Embedded
Product Area: Hardware Development
Product Sub-area: Simulation

Problem

Why do I not see any activity on the processor bus when simulating a VHDL Nios® II processor design in the ModelSim® tool?

Solution

When simulating the VHDL reference designs that ship with the Nios II development kit the input clock to the system will drive an 'X' instead of logical values. This causes simulations to fail as the processor remains in a reset state. Verilog designs are not affected by this problem.

The processor clock is driven via a phased locked loop (PLL). The corresponding <PLL module name>.vhd file instantiates a lower level module called altpll<PLL module name>. The setup_sim.do script generated by the SOPC Builder tool incorrectly compiles the <PLL module name>.vhd file before altpll<PLL module name>.vhd. To correct this problem modify the setup_sim.do script to compile altpll<PLL module name>.vhd before the <PLL module name>.vhd file.

The PLL also requires a simulator resolution of picoseconds whereas the setup_sim.do script uses a resolution of nanoseconds. Modify the setup_sim.do script to use a resolution of picoseconds by changing the following lines:

if { [ vsimAuth ] == "ALTERA" } {
alias _vsim {vsim +nowarnTFMPC -L lpm -L altera_mf -L sgate test_bench } } else {
alias _vsim {vsim +nowarnTFMPC test_bench } }

to read:

if { [ vsimAuth ] == "ALTERA" } {
alias _vsim {vsim -t ps +nowarnTFMPC -L lpm -L altera_mf -L sgate test_bench } } else {
alias _vsim {vsim -t ps +nowarnTFMPC test_bench } }

After saving the setup_sim.do script rerun the script in ModelSim by typing:

do setup_sim.do

You can then rerun the simulation and the pll will correctly drive the input clock port.

Note that SOPC Builder generation overwrites the setup_sim.do file. Therefore, you should make a backup copy of the modified setup_sim.do file.


Feedback

     This solution answers my question:
Strongly Disagree
   
Strongly Agree
 
  1 2 3 4 5  
     This solution was easy to find:          
Strongly Disagree
   
Strongly Agree
 
  1 2 3 4 5  

    Please provide additional feedback to improve support solutions:


Altera does not warrant that this solution will work for the customer's intended purpose and disclaims all liability for use of or reliance on the solution.


  • Altera Troubleshooters
    • Overview
    • Licensing
    • Simulating with ModelSim
    • Timing Analysis
    • PLL Loss of Lock
    • FPGA Configuration
    • JTAG Config & ISP
    • PFL Troubleshooter
    • Jam, JBC and SVF
    • Usage Guidelines
    • Optimization Advisor
    Please Give Us Feedback
    Products | End Markets | Technology | Training | Support | About Altera | Buy Online
    Jobs | Investor Relations | Contact Us | Site Map | Privacy | Legal Notice
    Copyright © 1995-2010 Altera Corporation. All Rights Reserved.
    Altera Forum
    Altera
    Forum
    Twitter
    Twitter
    RSS
    RSS
    Facebook
    Facebook
    Flickr
    Flickr
    YouTube
    YouTube
    Email Updates
    Email
    Updates