In Part 1 of the Getting Started tutorial you accomplished the following tasks:
The following is a summary of the concepts and tasks you will learn in Part 2:
In this session, you will extend the model developed in Part 1 of the tutorial. Previously, you placed a value of 1.0 for the mean time_distribution parameter in the Traffic block and 2.5 as the upper-bound value for the execution time parameter. This simple method of parameter definition is sufficient for a single run of a simulation, but not sufficient when multiple simulations must be run each with different parameter settings. What is required is a mechanism to modify all the important parameters of the simulation from a single location. In C++ or SystemC code, you would provide something like the following in the main or top file:
Master = new Master("Processor", 4, 0x4c, false, 300);
The above textual statement represents a single location for the definition of (parameter) values for the instance Master. VisualSim offers a graphical method to perform the same operation. In this case, one would instantiate two global simulation parameters - the "mean of the input rate" and the "upper-bound of the execution time".
A name and associated value is provided for the two parameters. We will start with the model from Part 1.
Figure 1: System Block Diagram
The implementation in VisualSim of Figure 1 along with its global parameters is shown in Figure 2.
Figure 2: VisualSim model with Parameters
Now associate the two parameters in Traffic and Expression blocks respectively as shown in Figure 3.
$VS/VS_AR/doc/Training_Material/Tutorial/WebHelp/Tutorial/Getting_Started/Part2.xml
Figure 3-1: Using parameters in the Transaction_Source block
Figure 3-2: Using parameters in the Expression List block
Run the simulation with the different parameters- Run 1, Run 2, and Run 3 and review the results after each simulation run. Run the simulation with the parameters defined in Run 1. After the simulation completes and you review the results, double-click the two parameters, modify their values for the next run, and re-run the simulation. Repeat until you have completed the following three Runs.
Run 1: Input_Rate = 1.0 ; Execution_Time = 2.5
Run 2: Input_Rate = 0.8 ; Execution_Time = 2.0
Run 3: Input_Rate = 0.5 ; Execution_Time = 2.5
The Input_Rate is the transaction rate. The upper bound of the Execution_Time is the longest time the system takes to process the transaction.
Also try additional experiments using other values for the Input_Rate and Execution_Time parameters.
The results from Run 1, Run 2, and Run 3 are shown in Figures 4-1, 4-2, and 4-3, respectively.
Figure 4-1: Latency plot from Run 1
Figure 4-2: Latency plot from Run 2
Figure 4-3: Latency plot from Run 3
Congrats
You have just created the second model in VisualSim!!!
Review this model. Now, we can move to Part 3 of this Lab.