|Examples: MP System|
|To download zipped file for this design use this link: mp_system.zip|
|Open downloaded mp_system.gbl project file in GBL Designer. The project contains the following four modules:|
|Processor module contains 3 registers:
|Arbiter contains two fibers
|Memory controller simulates access to RAM. In this example RAM consists of 256 8-bit words. RAM is filled with random numbers on system reset.|
|Test module contains two processors, arbiter, memory controller, and
Set Trace File property for test module to save traces to the selected file. After you build and run test module open the trace file in Tracer. You will see waveforms similar to the picture below. Due to the fact that different compilers implement random number generators differently you may observe different waveforms.
You can modify this example to use threads instead of fibers. You will need to apply proper locking for shared resources. Also due to non-deterministic nature of threads the results will vary on each run.
|Traces generated when using Visual Studio 2010 compiler.|