tutorial
CIF Peripheral Model - SimpleTimer 96 CoMET Version 5.9 – Tutorial initialization Instance Data structure and stores the module id and pathname
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 97 Events and Responses in Behavioral Code We can now review the Event and R
CIF Peripheral Model - SimpleTimer 98 CoMET Version 5.9 – Tutorial Declarations, Definitions and Instance Data Instance data stores the state of
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 99 #define TIFR_SET_1 0x01 #define TIFR_SET_2 0x02 #define TIFR_SET_
CIF Peripheral Model - SimpleTimer 100 CoMET Version 5.9 – Tutorial The default output section appears as follows: /* ** Output handles */ /* co
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 101 CODE ENDS Declaring Instance Data Callback Handles and Callback Data Str
CIF Peripheral Model - SimpleTimer 102 CoMET Version 5.9 – Tutorial Creating the Behavioral Functions We will add all behavioral code for the Si
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 103 ** Do nothing if in reset. */ if (IP->InReset) return; /*
CIF Peripheral Model - SimpleTimer 104 CoMET Version 5.9 – Tutorial if (IP->regMTR[MTR_ix] > Count) MatchTicks = IP->regMTR[MTR
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 105 ** Parameters ** p ** Pointer to a tTimerCallbackData stru
CoMET Version 5.9 – Tutorial 7 Introduction This tutorial covers creating: • a standalone C project • a CIF Virtual System Prototype Conventi
CIF Peripheral Model - SimpleTimer 106 CoMET Version 5.9 – Tutorial return; /* ** Setup the next match. */ SetupNextMatch(pCallbackDat
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 107 IP->BusClock = AmpiClockInitSlavePortView("BusClock", "
CIF Peripheral Model - SimpleTimer 108 CoMET Version 5.9 – Tutorial Modify module and version information function CoMET generates a call to pri
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 109 case StdLogicH: /* ** Deassert all outputs. */ IP->InRe
CIF Peripheral Model - SimpleTimer 110 CoMET Version 5.9 – Tutorial ** Description: ** Reads a device register. This function assumes that al
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 111 Data = IP->regTIFR; #ifdef _DEBUG AmpiStreamPrintf(DEBUG_MSG,
CIF Peripheral Model - SimpleTimer 112 CoMET Version 5.9 – Tutorial { This function is called by the BusWrite and BusUntimedWrite functions. T
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 113 #ifdef _DEBUG AmpiStreamPrintf(DEBUG_MSG, "%s: Write data %#0
CIF Peripheral Model - SimpleTimer 114 CoMET Version 5.9 – Tutorial CODE ENDS At this point it is appropriate to perform another build. See Buil
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 115 VSP and SimpleTimer Block Diagram The SimpleVSP project with an instanc
CIF Peripheral Model - SimpleTimer 116 CoMET Version 5.9 – Tutorial Creating the SimpleTimer1 instance in the Virtual Platform In the CoMET Work
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 117 Creating the IrqNet To add the IrqNet, right click the Virtual Platform
CIF Peripheral Model - SimpleTimer 118 CoMET Version 5.9 – Tutorial CoMET opens the Fabric Module dialog, Port Connect tab. Port Or Net Name:
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 119 The final connections for the VirtualPlatform are as follows: Check th
CIF Peripheral Model - SimpleTimer 120 CoMET Version 5.9 – Tutorial Setting the SimpleTimer1 Base Address with a pcx Parameter Override Rebuild
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 121 #include "vastdef.h" #include "tspi.h" #include &quo
CIF Peripheral Model - SimpleTimer 122 CoMET Version 5.9 – Tutorial tWord32 interruptsReceived = 0; int main(void) { printf("Testin
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 123 case MTR_1: *mtr1Ptr = time; break; case MTR_2: *mtr1Ptr
CIF Peripheral Model - SimpleTimer 124 CoMET Version 5.9 – Tutorial break; } } void disableMtr(tInt8 mtrId){ tWord32 *terPtr = (tWord
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 125 Adding the Target Image After compiling the target code, you add the Tar
CoMET Version 5.9 – Tutorial 9 Standalone C - Hello World Overview This tutorial covers a simple CoMET project, to compile and run a standalone
CIF Peripheral Model - SimpleTimer 126 CoMET Version 5.9 – Tutorial /Top/VirtualPlatform1/VastGpStdLogic01 VaST GP Standard Logic 0 Module v3
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 127 • debug output from the SimpleTimer1 module instance lines beginning w
CIF Peripheral Model - SimpleTimer 128 CoMET Version 5.9 – Tutorial Metrix Output A Metrix trace shows the timing and details of instructions ex
Standalone C - Hello World 10 CoMET Version 5.9 – Tutorial Creating a new workspace and project Choose File/New Workspace. Workspace dialog
Standalone C - Hello World CoMET Version 5.9 – Tutorial 11 Workspace: Hello dialog: Project panel: Select General Project Name: T
Standalone C - Hello World 12 CoMET Version 5.9 – Tutorial Navigating the Workspace and Project CoMET creates the new workspace and project and d
Standalone C - Hello World CoMET Version 5.9 – Tutorial 13 Creating a Source File Choose File/New File, or press Ctrl-N, or click the b
Standalone C - Hello World 14 CoMET Version 5.9 – Tutorial The file now displays with the file name as the window title, and with C syntax color
Standalone C - Hello World CoMET Version 5.9 – Tutorial 15 Adding the File to the Project In the Workspace window, open the Hello1 project,
Standalone C - Hello World 16 CoMET Version 5.9 – Tutorial hello1.c appears in the Workspace window, Hello1 project, Source Files folder. Adding
Standalone C - Hello World CoMET Version 5.9 – Tutorial 17 Project dialog: Configuration tab: Properties group: Type: Select VcConApp if
Standalone C - Hello World 18 CoMET Version 5.9 – Tutorial Select Project Properties from the context menu. In the Project dialog, Project
Standalone C - Hello World CoMET Version 5.9 – Tutorial 19 Executing the Compiled Project When the project is successfully built, you can ex
CoMET Version 5.9 – Tutorial 21 CIF Module - SimpleVSP Overview This tutorial demonstrates how to build a Virtual System Prototype (VSP) and si
CIF Module - SimpleVSP 22 CoMET Version 5.9 – Tutorial Constructing a VSP in CoMET CoMET manages a group of projects within a Workspace. To const
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 23 SimpleVSP Project Block Diagram The SimpleVSP project This tutorial demonstrates: •
CIF Module - SimpleVSP 24 CoMET Version 5.9 – Tutorial • Using the Modules Window • Adding ports and nets • Connecting ports and nets • Using
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 25 Creating a New Workspace and VSP Project Choose File/New Workspace. Workspace dia
CCooMMEETT Version 5.9 TTuuttoorriiaall Document Version No: 1.0
CIF Module - SimpleVSP 26 CoMET Version 5.9 – Tutorial Workspace: SimpleVSP dialog: Project panel: Select Fabric Project Name: Type Si
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 27 Project: SimpleVSP1 dialog: Fabric Module panel: Module Class: Select Virtual S
CIF Module - SimpleVSP 28 CoMET Version 5.9 – Tutorial Viewing the Workspace, Project and .fmx File CoMET creates the new workspace and project a
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 29 Creating a Virtual Platform Module Project Choose Workspace/Add New Project Workspac
CIF Module - SimpleVSP 30 CoMET Version 5.9 – Tutorial Project: VirtualPlatform dialog: Fabric Module panel: Module Class: Select Virtual Pla
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 31 Choosing an .fmx View in the Document window. Open the VirtualPlatform.fmx file in t
CIF Module - SimpleVSP 32 CoMET Version 5.9 – Tutorial Adding Module Instances to the Virtual Platform Refer to the SimpleVSP Project Block Diagr
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 33 Adding a Module Instance by Drag and Drop Click on the ARM926EJS icon in the Modul
CIF Module - SimpleVSP 34 CoMET Version 5.9 – Tutorial It is possible to edit, search and process the XML directly, but the CoMET SEE tools are
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 35 Adding a Module Instance by Copy and Paste, XML Tree View Choose XML Tree View in
© Copyright 1997 – 2005 VaST Systems Technology Corp. All rights reserved The copyright owner of CoMET hereby disclaims all warranties relating to
CIF Module - SimpleVSP 36 CoMET Version 5.9 – Tutorial Adding a Module Instance by Copy and Paste, XML Table View Choose Logic Connection View
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 37 Using the method of your choice, add a module instance of VastGpStdLogic0 to the V
CIF Module - SimpleVSP 38 CoMET Version 5.9 – Tutorial Creating an Array of Module Instances For the ARM926EJS VPM three memory blocks are requir
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 39 Fabric Module dialog, Parameter tab, Properties panel Name: Type NumberOfMemoryBlock
CIF Module - SimpleVSP 40 CoMET Version 5.9 – Tutorial The VirtualPlatform.fmx XML Tree Display shows the new parameter. Now we alter the Generi
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 41 Fabric Module dialog, Module Instance tab, Properties panel: Number Of: Type NumberO
CIF Module - SimpleVSP 42 CoMET Version 5.9 – Tutorial Viewing the Fmx Report Save the fmx file (press Ctrl-S) and open the Fmx Report: To view t
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 43 Adding Nets and Port Connections The ports of devices at the same level of the module
CIF Module - SimpleVSP 44 CoMET Version 5.9 – Tutorial Fabric Module dialog, Net tab, Properties panel: Name: Type StdBus1Net Type: Select
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 45 Referring to the SimpleVSP Project Block Diagram, page 23, this net must be connected
CoMET Version 5.9 – Tutorial i Contents Introduction...
CIF Module - SimpleVSP 46 CoMET Version 5.9 – Tutorial Adding an Instance Port connection, Bus Connection View Open the VirtualPlatform.fmx Bu
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 47 VirtualPlatform.fmx XML Tree View: Repeat the process to add a StdBus1Net port con
CIF Module - SimpleVSP 48 CoMET Version 5.9 – Tutorial Adding Clock Connections using the Clock Connection View Open the VirtualPlatform.fmx C
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 49 Right click InstBusClock and choose Add Port Connection Fabric Module dialog, Po
CIF Module - SimpleVSP 50 CoMET Version 5.9 – Tutorial Scroll down to the Nets entry in the Summary section. The Nets Summary shows a table wit
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 51 In XML Tree View add the Net StdLogic0Net. Right Click Nets and choose Add Net. Fa
CIF Module - SimpleVSP 52 CoMET Version 5.9 – Tutorial Adding Ports Referring to the SimpleVSP Project Block Diagram, page 23, the VirtualPlatfor
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 53 Fabric Module dialog, Port tab, Properties panel: Name: Type PlatformClock Typ
CIF Module - SimpleVSP 54 CoMET Version 5.9 – Tutorial The VirtualPlatform.fmx XML Tree View shows the new ports. Now we connect the VirtualPlat
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 55 For the next procedure you can use either the VirtualPlatform.fmx Logic Connection Vi
Contents ii CoMET Version 5.9 – Tutorial Prerequisites...
CIF Module - SimpleVSP 56 CoMET Version 5.9 – Tutorial Checking Connections You can check connections against your block diagram using the Virtua
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 57 Building the VirtualPlatform The VirtualPlatform must be built before it is added to
CIF Module - SimpleVSP 58 CoMET Version 5.9 – Tutorial Building a Project Choose Workspace/Build, or click the tool bar Build button The Out
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 59 Adding a VirtualPlatform Module Instance to the VSP We now add and instance of the Vi
CIF Module - SimpleVSP 60 CoMET Version 5.9 – Tutorial Fabric Module dialog, Module Instance tab Instance Name: Type VirtualPlatform1. The name
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 61 The SimpleVSP1.fmx file now contains VirtualPlatform1, an instance of the VirtualPla
CIF Module - SimpleVSP 62 CoMET Version 5.9 – Tutorial Connecting the SimpleVSP Module Instances We now connect the module instance ports. Becaus
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 63 stage we want to alter the number of memory blocks we can do it at this level. For th
CIF Module - SimpleVSP 64 CoMET Version 5.9 – Tutorial One message indicates that CoMET has built the platform config (Prototype Configuration)
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 65 The VirtualPlatform GenericMemory1 array size is specified by the NumberOfMemoryBloc
Contents CoMET Version 5.9 – Tutorial iii Adding a Target Image...
CIF Module - SimpleVSP 66 CoMET Version 5.9 – Tutorial We can now edit the start address and memory size of these blocks to suit our VPM. This is
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 67 Creating and Compiling Target Code This tutorial does not cover compiling target code
CIF Module - SimpleVSP 68 CoMET Version 5.9 – Tutorial /* define any additional handers required for your specific VPM */ /*********************
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 69 Adding a Target Image We now add the target image to the SimpleVsp1 project. In the
CIF Module - SimpleVSP 70 CoMET Version 5.9 – Tutorial Project dialog: Click OK. The target image node appears under the Target Test node. Simu
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 71 Unconnected Ports When you run a project, CoMET checks the integrity of the model. It
CIF Module - SimpleVSP 72 CoMET Version 5.9 – Tutorial Debugging a Simulation CoMET allows you to debug both target code and hardware modules du
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 73 Debug Options dialog. H/W Model: Choose Debug ARM926EJS (or other VPM): Choos
CIF Module - SimpleVSP 74 CoMET Version 5.9 – Tutorial Obtaining a Value Change Dump The standard VCD format output is a useful tool for analysis
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 75 The SimpleVSP1.pcx displays the BusMonitor parameter with value Enabled. Bus signals
Contents iv CoMET Version 5.9 – Tutorial Determining When a Match Occurs...94 T
CIF Module - SimpleVSP 76 CoMET Version 5.9 – Tutorial Analyzing the VCD Events such as the reset and memory reads can be identified. Any VCD vi
CIF Module - SimpleVSP CoMET Version 5.9 – Tutorial 77 Obtaining a Metrix Trace If you have the Metrix option, you can create a Metrix Confi
CoMET Version 5.9 – Tutorial 79 CIF Peripheral Model - SimpleTimer Overview This tutorial demonstrates to how construct a Peripheral Model and
CIF Peripheral Model - SimpleTimer 80 CoMET Version 5.9 – Tutorial You are familiar with viewing and editing an .fmx file. This is covered in
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 81 Specification • The SimpleTimer is a 32 bit general purpose timer • The
CIF Peripheral Model - SimpleTimer 82 CoMET Version 5.9 – Tutorial Registers The SimpleTimer requires registers to enable and configure the timer
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 83 Timer Enable Register (TER) The Timer Enable Register (TER) is a 2-bit r
CIF Peripheral Model - SimpleTimer 84 CoMET Version 5.9 – Tutorial Timer Interrupt Enable Register (TIER) The Timer Interrupt Enable Register (TI
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 85 Ports The SimpleTimer has the following ports: • Bus – connects to the
Contents CoMET Version 5.9 – Tutorial v Metrix Output...
CIF Peripheral Model - SimpleTimer 86 CoMET Version 5.9 – Tutorial Event Responses for SimpleTimer From the specification we can prepare the foll
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 87 Creating the SimpleTimer Project Open CoMET Choose File/Open Works
CIF Peripheral Model - SimpleTimer 88 CoMET Version 5.9 – Tutorial Project: SimpleTimer dialog: In the Module Class field, choose Peripheral
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 89 Editing the SimpleTimer fmx file CoMET creates a CIF Peripheral Model pro
CIF Peripheral Model - SimpleTimer 90 CoMET Version 5.9 – Tutorial Adding Ports Ports provide the input to and output from the Peripheral Mode. T
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 91 The fmx file shows the ports as follows. Adding Tasks Tasks handle the i
CIF Peripheral Model - SimpleTimer 92 CoMET Version 5.9 – Tutorial Add the following PortOrNetView elements to the fmx file. Name Type MatchInte
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 93 Adding Behavioral Code We now implement the behavioral code associated wi
CIF Peripheral Model - SimpleTimer 94 CoMET Version 5.9 – Tutorial Consequently, the code modeling the GTR (General Timer Register) behavior calc
CIF Peripheral Model - SimpleTimer CoMET Version 5.9 – Tutorial 95 The CIF Peripheral Model Template The SimpleTimer project source files ar
Kommentare zu diesen Handbüchern