Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microblaze based system Simulation in Modelsim(100 Points)

Status
Not open for further replies.

khamitkar.ravikant

Member level 4
Joined
Jul 15, 2008
Messages
78
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,288
Location
India
Activity points
1,798
Can any buddy let me know the procedure how to simulate the Microblaze
based Embedded system in Modelsim SE 6.4 or later and EDK 11.1 also ISE 11.0
any documentation will also do.
but procedure must be clear and there should not be any ambiguity in the doc.

thanks
 

Re: Microblaze based system Simulation in Modelsim(100 Point

Hi,
It is actually pretty straight forward. I have not use ISE 11 but I am sure the procedures are the same.

First of all, you need to change the settings in your EDK tool to generate test benches top level. This is one of the most ridiculous issues in EDK, just right click on the project options in the platform tab and choose project options, then chose the "hdl and choose the tab "HDL and Simulation" and there choose "Generate test bench template".
I have only used behavioral simulation but I believe you can easily do a structural and timing simulation by changing the options.

After it is done, go to the simulation menu and choose "generate simulation HDL files".

If you have not compiled the XILINX libraries, you must do so first before going forward.

In the application tab, choose the software project you want to simulate, right click on it and choose "mark to initialize BRAMS" then re-generate the SW by choosing "build project".

Now, you can run your simulation with the generated top level test bench that is located under simulation/behavioral directory of your project.

You can modify the files or add your own stimuli for busses, blocks etc but BIG warning, if you ever choose the "clean simulation" from the main window of EDK, EVERYTHING under simulation will be DELETED.

I had a lot of problems with simulation of the DDR memory in EDK, but everything else works smoothly.

Let me know if this works for you, or if you still have problems.

Best regards,
/Farhad Abdolian[/b]
 
i was able to do the procedure and simulate the system
but i was not able to simulate in Modelsim SE 6.4
the process not invoked automatically in Modelsim ?
please tell me the inner procedure of Modelsim to do simulation
thanking you.
 

Re: Microblaze based system Simulation in Modelsim(100 Point

Hi Khamitkar,
Thanks for the extra points, I realy didn't need them but thanks anyway.

When you run modelsim you have to follow t he steps described on the screen, first you have to compile (click on c) then you have to hit S for loading the design and then W to setup the waves. It is all described in the "system_setup.do" file that you can modify in case you want to adapt it to your own needs.


Code:
alias h "
echo **********************************************************************
echo **********************************************************************
echo ***
echo ***   Simulation Setup Macros (system_setup.do)
echo ***
echo ***   Because EDK did not create the testbench, the compile and load
echo ***   commands need changes to work with the user-generated testbench.
echo ***   For example, edit the testbench name in the vsim command.
echo ***
echo ***   c   =>  compile the design by running the EDK compile script.
echo ***           Assumes ISE and EDK libraries were compiled earlier
echo ***           for ModelSim.  (see system.do)
echo ***
echo ***   s   =>  load the design for simulation. (ModelSim 'vsim'
echo ***           command with 'system') After loading the design,
echo ***           set up signal displays (optional) and run the simulation.
echo ***           (ModelSim 'run' command)
echo ***
echo ***   l   =>  set up signal list display and launch a list window.
echo ***           ModelSim 'add -list' commands are found in *_list.do
echo ***           scripts. (see system_list.do)
echo ***
echo ***   w   =>  set up signal wave display and launch a waveform window.
echo ***           ModelSim 'add -wave' commands are found in *_wave.do
echo ***           scripts. (see system_wave.do)
echo ***
echo ***   clk =>  generate clock input stimulus
echo ***
echo ***   rst =>  toggle reset ports and simulate
echo ***
echo ***   h   =>  print this message
echo ***
echo **********************************************************************
echo **********************************************************************"


I usually use these do files as a templates for my own, after the initial setup is done and I can see the design is loading well, I usually use an external ModesimProject with a set of command files to generate the proper stimuli and waves for my project(s).

Cheers,
/Farhad
 
Re: Microblaze based system Simulation in Modelsim(100 Point

THANKS FOR EVERYTHING YOU SHARED but now when i run the system file i stuck at 180 ns. as the DCM.VHD file ask for 1 ps resoultion so can u tell me how i can change the resolution to 1 ps in modelsim the error is as follows

Code:
 run -all
# ** Error:  Simulator Resolution Error :  Simulator resolution is set to a value greater than 1 ps.  In order to simulate the DCM, the simulator resolution must be set to 1ps or smaller 
#    Time: 0 ns  Iteration: 0  Instance: /system/clock_generator_0/clock_generator_0/using_dcm0/dcm0_inst/dcm_inst/using_virtex/dcm_inst
# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
#    Time: 0 ns  Iteration: 0  Instance: /system/rs232_dce/rs232_dce/uartlite_core_i/uartlite_tx_i/srl_fifo_i/i_srl_fifo_rbu_f/dynshreg_f_i/inferred_gen
# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
#    Time: 0 ns  Iteration: 0  Instance: /system/rs232_dce/rs232_dce/uartlite_core_i/uartlite_tx_i/srl_fifo_i/i_srl_fifo_rbu_f/dynshreg_f_i/inferred_gen
# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
#    Time: 0 ns  Iteration: 0  Instance: /system/rs232_dce/rs232_dce/uartlite_core_i/uartlite_rx_i/srl_fifo_i/i_srl_fifo_rbu_f/dynshreg_f_i/inferred_gen
# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
#    Time: 0 ns  Iteration: 0  Instance: /system/rs232_dce/rs232_dce/uartlite_core_i/uartlite_rx_i/srl_fifo_i/i_srl_fifo_rbu_f/dynshreg_f_i/inferred_gen
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 0  Instance: /system/ilmb_cntlr/ilmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 0  Instance: /system/ilmb_cntlr/ilmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 0  Instance: /system/dlmb_cntlr/dlmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 0  Instance: /system/dlmb_cntlr/dlmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 0  Instance: /system/mb_plb/mb_plb/gen_shared/i_plb_arbiter_logic/i_wdt/wdt_timeout_cntr_i
# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
#    Time: 0 ns  Iteration: 0  Instance: /system/microblaze_0/microblaze_0/area/data_flow_i
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 1  Instance: /system/ilmb_cntlr/ilmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 1  Instance: /system/dlmb_cntlr/dlmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 2  Instance: /system/ilmb_cntlr/ilmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 2  Instance: /system/dlmb_cntlr/dlmb_cntlr/pselect_mask_lmb
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
#    Time: 0 ns  Iteration: 5  Instance: /system/ilmb_cntlr/ilmb_cntlr/pselect_mask_lmb
# ** Fatal: (SIGFPE) Floating point exception.
#    Time: 180 ns  Iteration: 9  Process: /system/clock_generator_0/clock_generator_0/using_dcm0/dcm0_inst/dcm_inst/using_virtex/dcm_inst/safe_model/determine_clock_delay File: d:/Xilinx/11.1/ISE/vhdl/src/unisims/primitive/DCM.vhd
# Fatal error in Process determine_clock_delay at d:/Xilinx/11.1/ISE/vhdl/src/unisims/primitive/DCM.vhd line 1408
# 
# HDL call sequence:
# Stopped at d:/Xilinx/11.1/ISE/vhdl/src/unisims/primitive/DCM.vhd 1408 Process determine_clock_delay
#

the attached waveform are for simple microblaze based system which only communicates with rs232 ip and nothing else is connected so total 4 external signals two for rs232 and reset and clock.
please help me sorting this problem
 

one more thing how to add or simulate the test program which are written in c language with modelsim . please guide in this regard also.
 

Hi,
You can change the settings of your project by changing the settings inside the modelsim.ini of the main project.

Fro the SW, you just mark the SW as I said earlier, so it is downloaded to the BRAM, it will be the code that will embedded in BRAM initialization when loading the Modelsim.

Cheers,
/Farhad
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top