Solution:
First, you need to convert the. BDF schematic file to a standard description file supported by third-party EDA tools such as OpenGL. In Quartus, keep *. BDF is in the active window status. Run the [file]/[Create/update]/[Create HDL design file for current file] command. In the pop-up window, select the file type as "maid, output *. V top-level file.
Below is a specific solution from: http://www.wlu.ca/science/physcomp/nznotinas/altera_reference/Quartus_ModelSim_schematic.shtml query:
Quartus II and Modelsim-Altera-using schematic designmanually forcing inputs in Modelsim-Altera
Reference:Quartus®II Introduction Using schematic designs [PDF, 41pp, 2012]
Note:I strongly recommend that every Quartus project have its own directory.
On your home system, installing Quartus II web edition will also install Modelsim®-Altera®Starter Edition.
- UseSchematic entryTo enter the logic digoal.
- UseFile | New Project WizardTo set up the working directory, project name, top level design entity (shocould be same as project name) and select a device to program (select any max7000s or cyclone or Cyclone II device ).
- UseFile | newTo open a new file. FromDevice design filesWindow selectBlock digoal/schematic File. Remember to useFile|SaveTo rename the project from block1.bdf (default name) to the project name.
- Use symbols fromPrimitivesLibrary. After drawing your schematic, remember to add input and output symbols and assign names to the pins.
- CompileThe circuit for a functional simulation by selectingProcessing | start|Start Analysis & ElaborationFrom the menu. Fix any errors.
- [Optional] You can see the minimized circuit structure by selectingTools|Netlist viewers|RTL Viewer.
- To configure Quartus II (the design and programming package) to work with Modelsim-Altera (the simulation package ):
- Configure Quartus II to work with Modelsim-AlteraIn Native link mode:
- Note: This step is done once (persistent ).
- OnToolsMenu, clickOptions. The Options dialog box appears.
- InCategoryList, selectEDA tool options.
- ForModelSim-Altera, Type the path or browse to the directory containing Modelsim-Altera. The directory shocould be located under the Altera directory, e.g. C:/Altera/12.0/modelsim_ase/win32aloem
- SelectOK.
- Configure nativelink settings:
- Note: This is done once per project and the information is stored with the project information.
- SelectAssignments|Settings. The Settings dialog box appears.
- In the category list, selectEDA tool settings|Simulation. The simulation page appears.
- In the Tool Name List, selectModelSim-Altera. [Do not turn on run gate-level simulation automatically after compilation.]
- Format for output netlist shoshould defaultVHDLAnd the output directorySimulation/Modelsim. [Select/enter if necessary.]
- SelectMore EDA netlist writer settingsAnd change the following options:
- Turn onGenerate netlist for functional simulation only.
- SelectOK.
- Convert the schematic dimo-into VHDL code for simulation.
- ModelSim requires that the system be specified in an HDL (hardware Definition Language); we will be using VHDL
- Have the schematic open and then selectFile|Create/update|Create HDL design file from current file.
- In the pop-up window, select file typeVHDLAnd the file name will show the name and path of the file. the VHDL File and the BDF file have the same name but different extensions (for example, if your BDF file is example. BDF, the VHDL File Created is example. vhd ).
- Add the VHDL File to the project and compile for Simulation.
- Open the VHDL File UsingFile|Open. Then add it to the project usingProject|Add current file to project.
- Note: The VHDL File has three parts:
- The library definitions includingWorkWhere your project will be stored,
- The entity definition which is a wrapper that defines the inputs and outputs to the design component, and
- The architecture which defines what your component does.
- Remove the BDF file from the project (system can't handle two source files for the same circuit) by selectingProject|Add/Remove files in ProjectAnd then selecting the BDF file andRemove. Note that this does not delete the file (and we do not want to delete the file ).
- Compile the circuit for a functional simulation by selectingProcessing | start|Start Analysis & elaboration.
- Launch the Modelsim Simulator.
- SelectTools|Run EDA simulation tool|Eda RTL simulation. Modelsim will display Splash Screen. Modelsim will load libraries and compile the project. The transcript pane at the bottom of the screen indicates the scripts that have been run (or are running ).
- SelectSimulate|Start SimulationTo put Modelsim in simulator mode. The start simulation window opens.
- The START simulation window contains extends tabs. The design tab lists the designs available for simulation; most are system libraries. At the top of list will beWork(Default name for the library containing your program), expand work by selecting the '+ '. all components in your design will be listed, select the component (or the top component in a hierarchical design ). if appropriate, turn off optimization. selectOK.
- Then the left hand side of the screen shoshould now containSimTab that displays the design units in your circuit and the supporting libraries. When a design unit is selected inSimTab, the corresponding signals are shown inObjectsWindow on the right hand side of the screen. signals that are preceded with a plus (+) sign indicate a bus (a group of wires with common function ).
- Open waveform window and add signals to be simulated.
- For each signal that you want to add to the simulation, right click on the signal name inObjectsWindow and selectAdd|To wave|Selected Signal. Typically, you wowould want to add all inputs and outputs. A waveform window will appear in the work area.
- Alternatively, you can add a range of signals at once by selecting the 1st signal and then, while holding down the <shift>, select the last signal in the range. then right click in the selected signal region and selectAdd|To wave|Selected Signals. A waveform window will appear in the work area.
- When all signals are selected, expand the wave window.
- If the wave window is not floating The Modelsim main screen, use the top left icon inWaveWindowUndockThe window. Expand the detached window.
- Enter signal values using force.
- To enter a signal value on a step by step basis, select an input signal and right click on the pop-up; selectForceAndValueEnter EITHER 0 or 1 .[KindShocould beFreeze,DelayShocould be0,Cancel afterShocould be blank.] do this for all input signals.
- In the tool icons, find the window that contains the period of the signal, e.g. 100ns. immediately to the right of that window will beRun simulationIcon (looks like a page with a blue down arrow beside it). SelectRun simulation. You shoshould see the inputs that you entered and the outputs from your system on the waveform. the period of the run will correspond to the time in the period window. all signals shoshould be green. if any signals are red, then one or more of the inputs was not specified.
- Change one of the input signals. Select an input signal and right click on the pop-up; selectForceAndValueChange the 0/1 to 1/0. SelectRun simulation.
- Repeat until all combinations have been tested.
- Immediately to the left of the signal period window isRestart simulationIcon. SelectingRestartWill erase all signal values entered.