Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12590 Discussions

Nios II and Hardware/Software co-simulation

Altera_Forum
Honored Contributor II
1,141 Views

Hello, 

 

I am interested in comparing the performance of the Nios II processor, with and without a custom instruction that I have developed, when running some benchmarking software algorithms. 

 

I do not own a development board that is compatible with the Nios II. I was wondering if anone had any experience of using the Modelsim simulation method within Quartus II 4.1 to attempt to simulate the Nios II running my software. Is this method practical and reliable in anyone's experience? 

 

Thanks, 

 

Paul
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
334 Views

Modelsim provides 100% accurate results for the processor performance. If you are interested in measuring performance with and without custom instructions this should suffice. Notice that I didn't say you have 100% accurate system performance since the DRAM models included with the kit are not cycle-accurate. This only affects your performance if your program has a high DRAM bandwidth. 

 

If you are using Nios II IDE, make sure you check the box on the system libraries project page to compile for modelsim.
0 Kudos
Altera_Forum
Honored Contributor II
334 Views

Thanks, 

 

Do you have any idea of the time that modelsim should take in order to simulate on a modern PC? Is it practical? My software benchmark should take quite a few seconds to run if FPGA hardware were actually to be used, and I need to run the benchmark quite a few times. I may also need to debug some code. 

 

Paul
0 Kudos
Altera_Forum
Honored Contributor II
334 Views

Hello Paul, 

 

Just a note if you are testing memory, it is not practical to R/W a large chunck of memory, say over 2 Mbytes while runinng Modelsim PE, this would take about an hour. There is a another version of Modelsim, SE I believe runs faster. Better to test small areas of code or preload parts of memory for your test, while being sensitive to how long memory accesses take while running a simulation. 

 

 

-Baycool
0 Kudos
Reply