Home
unclassified
Contents
1. 4 5 REAL TIME MONITOR FACILITIES The OBA Target Machine and the virtual target too is to be considered as a quite bare micro controller board It does not give any multi thread support from any real time monitor multi threading is actually not a need for achieving a most efficient OBA design However in the special case of multi threading considered an educational goal students that want to explore a multi threaded design may ever and can only rely on such support taken directly from host OS API Windows NT or from language runtime library Visual C The alternate idea of writing their own real time scheduler is unrealistic and deprecated since micro controller modeled in the virtual target has not been led up to emulation of registers and doesn t allow for programming of context switching Nevertheless the following primitive is introduced for convenience as a useful tuning facility since hardware threads related to interrupt handlers are implemented as host machine software threads for actual execution on the host machine It suspends the calling thread for the time specified by the parameter leaving free the CPU resource for other threads Q static void idleWait int delayInMillisecond 4 6 OBA SPECIFIC BSP BOARD SUPPORT PACKAGE The two enum types below provide symbolic names respectively identifying interrupts and related interrupt masks that are relevant to the user of the OBA Target M
2. OBA Testbench dedicated to the project for the use of this testbench see OBA Testbench Software User s Manual SUM the OBA Virtual Target libraries and include files a UML tool such as Rose Rhapsody Objecteering or StP an office automation tool such as Office StarOffice Thal s Universit Coop ration XXXX 56 699 445 508 A A4 6 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 4 PROGRAMMING INFORMATION 4 1 DESCRIPTION OF CLASS OBATARGETMACHINE This class is a software simulation of the OBATarget hardware of the SateDrive project lt should be considered as some kind of a virtual micro controller board coming along with its BSP Board Support Package that gives access to the target resources Note There is no need nor possibility to create instances of this class as it represents something unique and external to the application software C Q private OBATargetMachine Class cons
3. have special semantics e Instance cannot be created it is not a software entity but the software representation of a hardware entity e an InterruptHandler see below can be loaded in it or transfer the contents of another interrupt vector slot or also reset it i e unset its interrupt handler Warning After resetting an interrupt vector slot a hit of the corresponding interrupt will stall the program unless the corresponding bit in the enable mask register had been cleared o class InterruptVectorSlot public void operator InterruptHandler void operator const InterruptVectorSlot amp overriding implicit one void reset private Thal s Universit Coop ration XXXX 56 699 445 508 A A4 8 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 InterruptHandler interruptHandler bool enabled bool autoReset bool connected InterruptVectorSlot you cann
4. THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 2 REFERENCED DOCUMENTS IRS Interfaces Requirements Specification of Safe Drive Subsystem 31 000 100 506 SUM OBA Testbench Software Virtual Target API Programming Manual 56 699 445 108 Thal s Universit Coop ration XXXX 56 699 445 508 A A4 5 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 3 SOFTWARE PROGRAMMING ENVIRONMENT The development host platform hardware and software used by students is a PC with Windows NT the C programming language with Visual C from Microsoft as the development tool the specific testbench called
5. disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 address of the buffer containing the driving station state word a static void controlPanelInterruptWordAddress address of the buffer containing the control panel interrupt word OBA to Cruising automobile a static void throttleCommandWordAddress address of the buffer containing the throttle command word OBA to Driver a static void displayBufferAddress address of the buffer containing the display message Q static void ledCommandByteAddress address of the buffer containing the led command byte 4 3 INTERRUPTS The target micro controller board is able to manage interrupts an interrupt is nothing more than a register offset in a register set called the interrupt vector that has special execution semantics a typedef unsigned Interrupt a define lastSlotOffset 15 define interruptCardinal lastSlotOffset 1 static InterruptVectorSlot interruptVector interruptCardinal Each register in the interrupt vector is called an interrupt vector slot the micro controller is able to manage as many interrupts as there are slots in the interrupt vector An interrupt vector slot is a simulation of a very special hardware register and so
6. need visibility on the target resources 5 4 LIBRARIES Each application that need access to a target typically OBA shall link with the static library of the Virtual Target API SOBA_VTS OBAVirtualTarget lib Thal s Universit Coop ration XXXX 56 699 445 508 A A4 13 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 5 5 RESTRICTIONS OF USE 5 5 1 NO USE OF GLOBAL STATIC DATA The C programming language does not provides means to determine the order of initialization of global static data On its side however the class OBATargetMachine as mimicking a classical Operating System API makes use of such global static data enforcing uniqueness of corresponding system resources On the application side OBA programmers also may wish to make use of global static data They are allowed to do so but as a consequence they must be very careful NOT to make their global static data depend on any OBATargetMachine feature for initi
7. 28 08 2012 SOFTWARE PROGRAMMER S MANUAL SPM FOR THE Virtual Target API OF CSCI OBA Virtual Target Supplies for Windows NT CONTRACT No E011007 CDRL SEQUENCE No 7b Prepared for THALES Universit Coop ration Buc Prepared by Byzance Informatique Grigny Authenticated by Approved by Thal s Universit Byzance Informatique Coop ration Date Date NUMERO DOCUMENT DOCUMENT _ FORMAT THALES UNIVERSITE COOPERATION 56 699 445 508 1 1 6 XXXX Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 CHANGES REVISION DESCRIPTION p1 Thal s Logo CDRL N All pages CSCI N D Boucon D Boucon D Jeanjean D Boucon pane ds PR A spas lee 17 01 2002 28 02 2002 Thal s Universit Coop ration XXXX 56 699 445 508 A A4 2 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are propert
8. ES c ccccccccssecesscecsseeecsaeeecseecseeeecsaeeecsaeseeeeesseescaaeesesaeseeeecsaeesesaeeeesaeesees 11 4 6 OBA SPECIFIC BSP BOARD SUPPORT PACKAGE ccccccssccsssccssesecseeceseeecesecaeeecseeeseeecsseesenseeseeeeens 11 5 PRAGTICAL WS Birt e nt ann 2 TR Tran ands chou nn eau ane Date ous aa a aaa aea aa a aa aaae E ah Ea AASE aaa iaa 13 5 1 PRIVATE PARTS OF ObaTarget Machine sidad ci a dd diia a ad 13 5 2 SHORT HANDS FOR CONVENIENCE era e atarate aara e raana raara aa Eae ae AE aa aan a AE AERE Eai 13 5 3 INCEUDE FIEE ccoo EE E E EAA E 13 5 4 LIBRARIES A SE A a OR 13 5 5 RESTRICTIONS OF USE 020 A E IA E a la 14 5 5 1 NO USE OF GLOBAL STATIG DATA sicesiscccesisdeassccisdeeesiesesseccis a a e aea aE a a Ea a e O TEE 14 Be NOTES 2 15 Thal s Universit Coop ration XXXX 56 699 445 508 A A4 3 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 1 SCOPE 1 1 IDENTIFICATION CSCI OBA Virtual Target Supplies OBA
9. _VTS Identification Number 56 699 445 The Virtual Target API is one of the parts of this CSCI 1 2 CSCI OVERVIEW The CSCI OBA Virtual Target Supplies OBA_VTS is intended to give a simulation environment for a student s development project named OBA software This complete environment OBA_VTS for executing and testing OBA software is a kind of virtual target built upon the operating system of the workstation used for OBA software development It allows for running the OBA software on a development host machine instead of the real target The Virtual Target API is the description of the programming interface between the OBA software and the OBA Testbench 1 3 SYSTEM OVERVIEW The system is the complete set of necessary materials for the pedagogical software development project made by teams of students including this CSCI 1 4 DOCUMENT OVERVIEW This document is intended for OBA programmers i e students lt explains them how to make use of OBA target resources within their programs It defines an application programming interface level of theses resources This document gives details about the data and function calls of the API and explains their correct and necessary usages Thal s Universit Coop ration XXXX 56 699 445 508 A A4 4 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de
10. achine i e which is bound to some specific devices The symbolic name of each indicate to OBA programmers which is the related environment device These names and the values they represent came from interfaces design decisions written in an Interface Design Document that is outside the scope of this case study a enum Interruptld IT_timer 5 IT_drivingStation 14 IT_controlPanel 15 Q enum InterruptMaskId atTimerInterrupt 0x0020 2 5 atDrivingStationInterrupt 0x4000 2 14 Thal s Universit Coop ration XXXX 56 699 445 508 A A4 11 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 atControlPanelInterrupt 0x8000 2 15 allObaRelatedInterrupts atTimerInterrupt atDrivingStationlInterrupt atControlPanelInterrupt Thal s Universit Coop ration XXXX 56 699 445 508 A A4 12 16 Ce document et les informations qu il contient son
11. alization This is especially true for objects that must not perform any OBATargetMachine Call in their invoked constructor nor in the constructor of any subobject or base class thereof at any level of depth Warning Failure to do so leads to unpredictable execution behaviour The safer way is avoid unnecessary global static objects However there is a broad chance to need such a dangerous feature in a normal OBA application Whenever an object absolutely needs global scope in a file or externally among files the classical solution is to declare a global static pointer instead of the object then create the needed object through the pointer by dynamic allocation in the main or later on that is at a point where all global static initializations are certainly over then use reference declarations to rename the resulting created objects wherever convenient Thal s Universit Coop ration XXXX 56 699 445 508 A A4 14 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF
12. crite de THOMSON CSF SPM 28 08 2012 6 NOTES Not Used Thal s Universit Coop ration XXXX 56 699 445 508 A A4 15 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM APPENDIX A 28 08 2012 APPENDIX A Not Used Thal s Universit Coop ration XXXX 56 699 445 508 A A4 16 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF
13. ice routine block to differentiate interrupts treatment 4 3 2 ENABLING DISABLING INTERRUPTS Interrupt Mask Registers are very special hardware registers used as an array of bits where each bit is a Boolean indicator for the corresponding interrupt interrupt value equal to the index of the bit in the array The application programmer can enable desired interrupts after assign them an interrupt handler as described above The interrupt enable mask register should be used to do that as explained below e When a bitis set in the interrupt enable mask register the matching interrupt is enabled e When the bitis cleared this interrupt is disabled Thal s Universit Coop ration XXXX 56 699 445 508 A A4 9 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 Initially the address in each slot points to invalid address code In order to prevent interrupts from hitting the program before safe interrupt handlers are set all interr
14. ot add hardware y 4 3 1 BASIC SEMANTICS The basic special semantics of each slot are the followings e When an interrupt occurs the micro controller senses some data bus lines that are interpreted as the offset of a desired slot this offset is the interrupt identity e The slot content is interpreted as an interrupt handler i e the address of an executable routine that expects one parameter routine handled by Interrupt handlers are also called interrupt service routines or ISRs e The micro controller then suspends normal program execution and calls the ISR passing it the interrupt i e the slot offset as parameter Note This call is performed in a context that is different from normal program execution e Whenever the ISR returns the normal program execution resumes exactly where it was suspended so an ISR should always return An interrupt handler is the address of the code to be executed when the interrupt hit At a C programming level the interrupt handler is a pointer to a function that need a parameter of type Interrupt and return nothing Q typedef void InterruptHandler Interrupt After writing your own ISR assign each relevant slot as in following example void myISR Interrupt ObaTargetMachine interruptVector IT_timer myISR Same interrupt service routine can be used for different interupts the interrupt value can then be used inside the interrupt serv
15. t confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 5 PRACTICAL USE 5 1 PRIVATE PARTS OF ObaTargetMachine Reading anything in the private parts of this class is a user loss of time as usual Moreover the private parts simulates mechanisms normally implemented by hardware that are not soft changing 5 2 SHORT HANDS FOR CONVENIENCE There is a set of exported shorthand for convenience these clauses and names provides direct visibility on BSP stuff allowing the programmer not to worry about forgetting the boring qualifier and scope operator prefix o typedef OBATargetMachine OTM gt Q using OTM 1T_timer E Q using OTM IT_drivingStation o using OTM 1T_controlPanel O using OTM atTimerlInterrupt Q using OTM atDrivingStationlInterrupt Q using OTM atControlPanelInterrupt o using OTM allObaRelatedInterrupts 5 3 INCLUDE FILE Header file OBATargetMachine h is the file to be included in each application source file that
16. tructor is made private to deter instantiation compulsions since OBATargetMachine is an all static class so conceptually a single object by itself To get access to this single object just use include OBATargetMachine h and then call static member functions using class scope operator e g OTM setPeriodicTimer 200 10 4 2 PORTS Communications with sensors and actuators in the physical environment are done through ports by reading from and writing to related buffers The ports are grouped by interfaces refer to Safe Drive Interfaces Requirements Specification IRS for detailed layout Cruising automobile to OBA Q static void pulseCounterWordAddress address of the buffer containing the pulse counter word Q static void throttleResponseWordAddress address of the buffer containing the throttle response word Driver to OBA o static void drivingStationInterruptWordAddress address of the buffer containing the driving station interrupt word Q static void drivingStationStatewordAddress Thal s Universit Coop ration XXXX 56 699 445 508 A A4 7 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor
17. upts are initially disabled any hit is then ignored Warning Trying to enable an interrupt will stall the program if the interrupt is hit before assign an interrupt handler to the corresponding interrupt vector slot There is also an auto reset mask register e When a bit is set in the auto reset mask the corresponding handler is removed and its slot is turned back to stalling code address after the next hit of the corresponding interrupt e When that bit is cleared the same interrupt handler remains in the slot after performance Initially for each interrupt the handler is permanent cleared bit Interrupt mask values can be handled using bitwise operators like amp or There is some universal mask values defined as constants o typedef unsigned InterruptMask Q static const InterruptMask allInterrupts Q static const InterruptMask nolnterrupt the initial value for both masks 3 Interrupt masks are to be applied upon the interrupt mask register of the target using the assignment operator a class InterruptMaskRegister public void operator InterruptMask itm InterruptMaskRegister Q typedef InterruptMaskRegister ItMReg short hand for convenience The 2 interrupt mask registers implemented in OBATargetMachine are e the enable interrupt mask register which indicates which interrupts are enabled e the a
18. uto reset interrupt mask register which indicates which interrupts are auto resettable o static InterruptMaskRegister enabledInterruptsRegister o static InterruptMaskRegister autoResetInterruptsRegister 4 4 TIMER The OBA target have a unique built in timer so the virtual target gives only the same unique one This timer send an interrupt named TT_timer after a latencyInMillisecond delay the virtual target on which the calling program is running receives one TT_timer interrupt every periodInMillisecond Thal s Universit Coop ration XXXX 56 699 445 508 A A4 10 16 Ce document et les informations qu il contient sont confidentiels et sont la propri t exclusive This document and the information it contains are property of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 Executing actions on timer interrupt needs to assign it an interrupt handler and to enable this interrupt Warning There is actually no way to stop the timer after having started it a static void setPeriodicTimer int periodInMillisecond int latencyInMillisecond
19. y of THOMSON CSF and de THOMSON CSF Ils ne doivent tre communiqu s qu aux personnes ayant en conna tre confidential They shall not be reproduced nor disclosed to any person except to those having et ne peuvent tre reproduits ni divulgu s toute autre personne sans l autorisation pr alable a need to know them without prior written consent of THOMSON CSF crite de THOMSON CSF SPM 28 08 2012 TABLE OF CONTENTS AAA A de a ei a nn nan 4 1 1 IDENTIFICATION ata e PR RE nt 4 1 2 CSGCIOVERVIEW exes ne fee ie Sn es ns on Lite a ei ci o o ed ot E Ad 4 1 3 SYSTEM OVERVIEW coca ne men ten OE ee eae 4 1 4 DOCUMENT OVERVIEW inter ne a tee RER Nue tee En id 4 2 REFERENCED DOCUMENT Ga a aea aaae ii id del aiding cies 5 3 SOFTWARE PROGRAMMING ENVIRONMENT ccscccssecssseeessecesssecessanenseeeenseeecsanseseanenseaesseesessansnseenenseeeess 6 4 PROGRAMMING INFORMATION ccesccccssecssseeesseeeseesesnaeenseeeeneeeesnaeenseeeenseeeseaeseseaesnseaeenseeessaeesnaesnseenenseseneas 7 4 1 DESCRIPTION OF CLASS OBATARGETMACHINE uiscccccsssscecesseecececeneeececceceecsceneaeeeseneaeeeseneeeeesensaesesensaeeessnaaeens 7 4 2 PORTS AA A A A A e A a DO e Te sth 7 4 3 INTERRUP ES A rata 8 4 3 1 BASIE SEMANTIOS orrie rna e a aa a ati 9 4 3 2 ENABLING DISABLING INTERRUPTS c cccccccccscccsececssesecseeceeeeecsaeesesseseeeeeceseescsaeescaeessseeesaeesesaeeeseeeees 9 AA TIME Rc A A A A ee ee a 10 4 5 REAL TIME MONITOR FACILITI
Download Pdf Manuals
Related Search
unclassified unclassified meaning unclassified banner unclassified vs cui unclassified cover sheet unclassified excavation unclassified arc unclassified marking unclassified army declassified documents unclassified stickers unclassified balance sheet unclassified vs classified unclassified information training unclassified clarion police calls unclassified header army unclassified felony in virginia unclassified misdemeanor ohio unclassified misdemeanor oregon unclassified pay nevada unclassified jobs nevada unclassified misdemeanor ny unclassified pay bill nevada unclassified positions state of nevada unclassified misdemeanor kansas unclassified misdemeanor delaware
Related Contents
FIT-36 SERVICE rev1.2doc X.509 Certificate Generator User Manual instructions for use PAGE GABARIT - Le Soir d`Algérie CHOISIR SONT QUADS? Plaisirs différents Gable Homesheds Drehtorsteuerung ST 51 Copyright © All rights reserved.
Failed to retrieve file