|
- Method resolution order:
- ApplicationTestCase
- unittest.TestCase
- __builtin__.object
Methods defined here:
- __call__(self, result=None)
- Overloaded to handle user request if interactive.
- activateFile(self, win=None, page=None)
- Activate a given design window.
If no window is given, return currently active window.
If page is given, activate selected sidebar page.
Input Parameters:
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
String page (default None) - sets current page of the design window sidebar, ex: "Hierarchy" or "Behaviors" or "Channels"
- addProject(self, win=None)
- Adding file to project.
Input Parameters:
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- allocateBus(self, category, busType, busName=None, parameterList=[], win=None)
- Allocate a Bus.
Allocate a Bus of given type in the given database category
(case sensitive, exact match).
Assign the given name to the Bus (use default name if None).
If bus has parameters, can assign values by supplying a list of tuples [(PARAMETER_NAME, PARAMETER_VALUE), ...].
* Note, parameter name comes from the Busses' assoc param key, which should be in the database. If that is not supplied, the
parameter name must be EXACTLY as written in dialog (param's desc), i.e. "Bus Size:", including the colon - exact match is done
to prevent situations like "Bus Size 12" & "Bus Size 1"
* Special case for parameterList: if user passes in None, guitester is explicitly told to not wait for a parameter dialog.
This is a special case where an item is parametrizable but no dialog shows up (refer to "Motorola_DSP56600" from PE's)
- allocateBusList(self, busList, win=None)
- Allocate a Bus List. Like def allocateBus(), but provided for convenience and demoing.
- allocateCE(self, category, ceType, ceName=None, parameterList=[], win=None)
- Allocate a CE.
Allocate a CE of given type in the given database category
(case sensitive, exact match).
Assign the given name to the CE (use default name if None).
If CE has parameters, can assign values by supplying a list of tuples [(PARAMETER_NAME, PARAMETER_VALUE), ...].
* Note, parameter name comes from the CE's assoc param key, which should be in the database. If that is not supplied, the
parameter name must be EXACTLY as written in dialog (param's desc), i.e. "Bus Size:", including the colon - exact match is done
to prevent situations like "Bus Size 12" & "Bus Size 1"
* Special case for parameterList: if user passes in None, guitester is explicitly told to not wait for a parameter dialog.
This is a special case where an item is parametrizable but no dialog shows up (refer to "Motorola_DSP56600" from PE's)
- allocateCEList(self, ceList, win=None)
- Allocate a CE List. Like def allocateCE(), but provided for convenience and demoing.
- allocatePE(self, category, peType, peName=None, parameterList=[], win=None)
- Allocate a PE.
Allocate a PE of given type in the given database category
(case sensitive, exact match).
Assign the given name to the PE (use default name if None).
If pe has parameters, can assign values by supplying a list of tuples [(PARAMETER_NAME, PARAMETER_VALUE), ...].
* Note, parameter name comes from the PE's assoc param key, which should be in the database. If that is not supplied, the
parameter name must be EXACTLY as written in dialog (param's desc), i.e. "Bus Size:", including the colon - exact match is done
to prevent situations like "Bus Size 12" & "Bus Size 1"
* Special case for parameterList: if user passes in None, guitester is explicitly told to not wait for a parameter dialog.
This is a special case where an item is parametrizable but no dialog shows up (refer to "Motorola_DSP56600")
- allocatePEList(self, peList, win=None)
- Allocate a PE List. Like def allocatePE(), but provided for convenience and demoing.
- assignLinkParameters(self, linkList=None, assignLinkWarnings=True, enableFinalCheck=True, win=None)
- Assign Link Parameter.
Adds to Link Parameters dialog
(case sensitive, exact match).
Input Parameters:
linkList - list of dictionaries in the format [{"bus": BusName, "link": LinkName, "address": HexAddress, "interrupt": Interrupt}, ...]
ex: [{"bus": "CBus", "link": "HW", "address": "0xFFF", "interrupt": None, "period": "10"},
{"bus": "CBus", "link": "L1c", "address": None, "interrupt": "slaveINT0", "period": "10"}]
bool assignLinkWarnings (default TRUE) - enables or disables warning that an address has already been assigned
bool enableFinalCheck (default TRUE) - enables or disables final check warning that there are busses with no assignable addresses when needed
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- assignPriority(self, priorityItem, currentPage)
- assignScheduleList(self, schedBehList, currentPage)
- compileDesign(self, win=None)
- Compile a design.
Input Parameter:
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- findItem(self, itemName, win=None, page=None)
- Search for items in the sidebar.
Finds and returns list of items matching criteria.
If no page is given, search in the current sidebar tab.
- generateCCode(self, issInt=False, peBox=None, cFile=None, hFile=None, win=None)
- Generate C Code.
Input Parameters:
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
bool issInt (default FALSE) - FALSE = VP integration, TRUE = ISS integration
String peBox (default None = first behavior) - name of behavior
String cFile (default None = automatically generated default file) - name of C code file
String hFile (default None = automatically generated default file) - name of C header file
- getNextBusItem(self, number=None)
- getNextCEItem(self, number=None)
- getNextPEItem(self, number=None)
- importAnnotations(self, designBox=None, archSyn=(True, True, True, True), sched=(True, True), netSyn=(True, True, True), commSyn=(True, True), rtlSyn=(True, True, True), override=False, win=None)
- Imports annotations for files.
Input Parameters:
String designBox (default None = Currently selected design) - Source design
archSyn (default all selected) - 4-tuple of bools (PE Allocation, Behavior mapping, Variable mapping, Channel mapping)
sched (default all selected) - 2-tuple of bools (Static Scheduling, Dynamic Scheduling)
netSyn (default all selected) - 3-tuple of bools (CE allocation, Bus allocation, Connectivity)
commSyn (default all selected) - 2-tuple of bools (Bus mapping, Link parameters)
rtlSyn (default all selected) - 3-tuple of bools (RTL allocation, RTL binding, RTL scheduling)
override (default is unselected) - bool for replacing existing annotations
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- importFile(self, name, maximize=False)
- Import source file.
Returns the handle to the design window (or None in case of error).
Input Parameters:
String name - filename to import, ex: "typical.sc"
bool maximize (default FALSE) - maximizes the design window
- isolateItem(self, name=None, win=None)
- Isolates an item.
If no name is given, map the currently selected items.
If the name is a list, select that item first.
If the name is a string, find all matching items and map.
- mapBus(self, chName, busRoute=None, win=None)
- Maps channels to bus route in the hierarchy tree of the design window.
chName: item to find for bus mapping
busRoute: list of dictionaries showing route
in the format of (e.g.):
[ {"bus": "Bus0", "protocol": None},
{"bus": "Bus1", "protocol": 0},
{"bus": ["Bus0", "IntBus"], "protocol": None},
{"bus": ["Bus1", "IntBus"], "protocol": [1]}
]
- mapPE(self, peName, name=None, win=None)
- Maps items to PEs in the hierarchy tree of the design window.
If no name is given, map the currently selected items.
If the name is a list, select that item first.
If the name is a string, find all matching items and map.
- newProject(self)
- Start new project.
- openFile(self, name, maximize=False)
- Opening file.
Returns the handle to the design window (or None in case of error).
Input Parameters:
String name - filename to open, ex: "typical.sir"
bool maximize (default FALSE) - maximizes the design window
- openProject(self, fileName=None)
- Open project.
If no file name is given, will pop up dialog.
- refineArchitecture(self, behRefine=True, delays=True, varRefine=True, chanRefine=True, separateVarRefine=True, win=None)
- Run architecture refinement.
Input Parameters:
bool behRefine (default TRUE) - Behavior Refinement
bool delays (default TRUE) - Behavior Refinement (insert average delays)
bool varRefine (default TRUE) - Variable Refinement
bool chanRefine (default TRUE) - Channel Refinement
bool separateVarRefine (default TRUE) - sub-option for varRefine, "separate variable interfaces"
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- refineCommunication(self, tlm=False, flattening=True, generateMapping=True, mappingTableName='', win=None)
- Run architecture refinement.
Input Parameters:
bool tlm (default FALSE) - FALSE = Pin-accurate model, TRUE = Transaction-level model
bool flattening (default FALSE) - Flattening and interrupt hoisting
bool generateMapping (default TRUE) - Generate mapping table
str mappingTableName (default "", which means leave the default name) - Name of file for mapping table
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- refineNetwork(self, grouping=True, data=True, ces=True, packetSize=None, flattening=True, transactions=True, merging=True, win=None)
- Run architecture refinement.
Input Parameters:
bool grouping (default TRUE) - Channel groupings
bool data (default TRUE) - Data conversion
bool ces (default TRUE) - CE insertion
Int packetSize (default None) - Custom Packet Size, if None - uses whatever is current default
bool flattening (default TRUE) - Flattening and packeting
bool transactions (default TRUE) - Aligned transactions
bool merging (default TRUE) - Message merging
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- refineScheduling(self, topBox=None, staticScheduling=True, rtos=True, win=None)
- Run scheduling refinement.
Input Parameters:
String topBox (default None - will choose first available) - Top Level Combobox entry
bool staticScheduling (default TRUE) - Static Scheduling
bool rtos (default TRUE) - RTOS Refinement
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- removeBus(self, name, win=None)
- Remove a Bus
Remove a bus from the design.
Input Parameters:
String name - Bus Name
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- removeCE(self, name, win=None)
- Remove a CE
Remove a CE from the design.
Input Parameters:
String name - CE Name
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- renameBus(self, nameOld, nameNew, win=None)
- Rename a Bus
Assign the given name to the Bus.
Input Parameters:
String nameOld - Old Bus Name
String nameNew - New Bus Name
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- renameCE(self, nameOld, nameNew, win=None)
- Rename a CE.
Assign the given name to the CE.
Input Parameters:
String nameOld - Old CE Name
String nameNew - New CE Name
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- renameDesign(self, name, win=None)
- Rename design in project.
Input Parameters:
String name - new filename for design
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- renamePE(self, peNameOld, peNameNew, win=None)
- Rename a PE.
Assign the given name to the PE.
Input Parameters:
String nameOld - Old PE Name
String nameNew - New PE Name
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- saveFile(self, win=None, name=None)
- Saving file.
If no design window handle is given, use currently active window.
If not path is given, save window under its assigned file name.
Returns the design window handle (or None in case of error).
Input Parameters:
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
String name (default None = Will overwrite current file) - filename to save as, ex: "typicalSpec.sir"
- saveProject(self, fileName=None)
- Save current project.
If no file name is given, will pop up dialog.
- scheduleBehaviors(self, peName, schedList=[], dynamicType=None, priorityList=None, win=None)
- Schedule Behaviors. Handles scheduling for pre- and post-Architecture Refinement.
Input Parameters:
String peName - name of tab to use for scheduling - only one PE is scheduled at a time for ease of parameter passing
schedList (optional, if not using, set schedList = []) - list of tuples in the format [(Behavior, Command), ...]
ex: [("fa0", SCHED_FLATTEN), ("fa1", SCHED_SERIALIZE_TREE), ("ha1", SCHED_SERIALIZE)]
possible values for Command: SCHED_SERIALIZE, SCHED_SERIALIZE_TREE, SCHED_FLATTEN, SCHED_FLATTEN_TREE, SCHED_RESTORE, SCHED_RESTORE_TREE
* can also be [] if not serializing/flattening
dynamicType (optional, defaults to None) - name of scheduling type for current pe: None, SCHED_ROUND_ROBIN, SCHED_PRIORITY_BASED
priorityList - list of behavior priorities (will only be used if dynamicType is set to SCHED_PRIORITY_BASED)
written as [(Behavior, Priority), ...]
ex: [("fa0", 1), ("fa2", 3), ("fa3", 2)]
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- selectItem(self, nameList, reset=False, win=None, page=None)
- Select and return an item in the sidebar.
Returns the item at the given location in the hierarchy.
The location is given as a list if (instance) names.
The item is also selected and becomes the current item.
Optionally, any previous selection can be reset in the process.
If no page is given, search in the current sidebar tab.
- setCompilerPreferences(self, includePath=None, importPath=None, libraryPath=None, libraries=None, defines=None, undefines=None, options=None, vLevel=None, wLevel=None)
- Set Compiler Preferences.
Set the paths/options for compiler settings under Edit->Preferences
Input Parameters:
String includePath (default = None #means no changes) - Include Path; to set to nothing, includePath = ""
String importPath (default = None #means no changes) - Include Path; to set to nothing, importPath = ""
String libraryPath (default = None #means no changes) - Include Path; to set to nothing, libraryPath = ""
String libraries (default = None #means no changes) - Include Path; to set to nothing, libraries = ""
String defines (default = None #means no changes) - Include Path; to set to nothing, defines = ""
String undefines (default = None #means no changes) - Include Path; to set to nothing, undefines = ""
String options (default = None #means no changes) - Include Path; to set to nothing, options = ""
int vLevel (default = None #means no changes) - Include Path; to set to nothing
int wLevel (default = None #means no changes) - Include Path; to set to nothing
- setConnectivity(self, connList, win=None)
- Assign Connectivity.
Add Connectivity entries of given type in the connectivity list
(case sensitive, exact match).
Input Parameters:
connList - list of tuples in the format [(PE, Port, Bus, [Connection, ...]), ...]
ex: [("HW", "Port0", "Bus3", ["slave"]), ("CE0", "MBus", "MEM", ["master", "slave"])]
* if the port does not already exist, it will be added automatically if the pe supports it
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- setDatabasePreferences(self, editPEDbPath=None, editCEDbPath=None, editBusDbPath=None, editRTLDbPath=None)
- Set Database Preferences.
Set the paths/options for database settings under Edit->Preferences
Input Parameters:
String editPEDbPath (default = None #means no changes) - PE Database Path; to set to nothing, editPEDbPath = ""
String editCEDbPath (default = None #means no changes) - CE Database Path; to set to nothing, editCEDbPath = ""
String editBusDbPath (default = None #means no changes) - Bus Database Path; to set to nothing, editBusDbPath = ""
String editRTLDbPath (default = None #means no changes) - RTL Database Path; to set to nothing, editRTLDbPath = ""
- setPluginsPreferences(self, editArchSynPath=None, editSchedSynPath=None, editNetSynPath=None, editCommSynPath=None, editRTLSynPath=None)
- Set Plugins Preferences.
Set the paths/options for plugin settings under Edit->Preferences
Input Parameters:
String editArchSynPath (default = None #means no changes) - Architecture Synthesis Path; to set to nothing, editArchSynPath = ""
String editSchedSynPath (default = None #means no changes) - Scheduling Synthesis Path; to set to nothing, editSchedSynPath = ""
String editNetSynPath (default = None #means no changes) - Network Synthesis Path; to set to nothing, editNetSynPath = ""
String editCommSynPath (default = None #means no changes) - Communication Synthesis Path; to set to nothing, editCommSynPath = ""
String editRTLSynPath (default = None #means no changes) - RTL Synthesis Path; to set to nothing, editRTLSynPath = ""
- setTopLevel(self, behavior, win=None)
- Set top-level item.
Input Parameters:
String behavior - set behavior to top level
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- setUp(self)
- Set up test environment.
- showChannels(self, on=True, win=None)
- Toggle showing of channels.
Input Parameters:
bool on (default TRUE) - shows channels (default) or hides channels if set to FALSE for design
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- showVariables(self, on=True, win=None)
- Toggle showing of variables.
Input Parameters:
bool on (default TRUE) - shows variables (default) or hides variables if set to FALSE for design
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- simulateDesign(self, win=None)
- Simulate a design.
Input Parameter:
DesignWindow win (default None = Currently Active Window) - DesignWindow instance
- slotAssignLinkMain(self)
- Opens main Link Dialog and selects bus tab.
- slotBusAllocationCheckParameter(self)
- Checks to see if we have a parameter dialog. If so, set values (if given) and close window.
- slotBusAllocationMain(self)
- Opens main Bus Allocation Dialog and clicks Add button.
- slotBusAllocationMainDone(self)
- Rename Bus and close Bus Allocation Dialog.
- slotBusAllocationSelectCategory(self)
- Opens Bus Allocation Add Dialog and selects a Category.
- slotBusAllocationSelectItem(self)
- Selects a bus allocation item and goes back to main bus allocation window.
- slotBusCERemoveMain(self)
- Opens main Network Allocation Dialog and Removes Bus/CE.
- slotBusCERenameMain(self)
- Opens main PE Allocation Dialog and Renames PE.
- slotCEAllocationCheckParameter(self)
- Checks to see if we have a parameter dialog. If so, set values (if given) and close window.
- slotCEAllocationMain(self)
- Opens main CE Allocation Dialog and clicks Add button.
- slotCEAllocationMainDone(self)
- Rename CE and close CE Allocation Dialog.
- slotCEAllocationSelectCategory(self)
- Opens CE Allocation Add Dialog and selects a Category.
- slotCEAllocationSelectItem(self)
- Selects a CE allocation item and goes back to main CE allocation window.
- slotChooseInterrupt(self, currentBus, linkName)
- Chooses PE from list
- slotChoosePE(self)
- Chooses PE from list
- slotChooseRoute(self)
- Chooses Route from list
- slotConnAllocationMain(self)
- Opens main Allocation Dialog at Connectivity Tab.
- slotConnAllocationMainDone(self)
- Close Allocation Dialog.
- slotConnAllocationSetConnectivity(self)
- Adds to Connectivity list with the supplied connectivity.
- slotGenerateCCode(self)
- # -- Begin Generate C Code
- slotGenerateCCodeConfirm(self)
- slotGenerateCCodeDone(self)
- slotImportAnnotations(self)
- Opens import annotations dialog.
- slotPEAllocationCheckParameter(self)
- Checks to see if we have a parameter dialog. If so, set values (if given) and close window.
- slotPEAllocationMain(self)
- Opens main PE Allocation Dialog and clicks Add button.
- slotPEAllocationMainDone(self)
- Rename PE and close PE Allocation Dialog.
- slotPEAllocationSelectCategory(self)
- Opens PE Allocation Add Dialog and selects a Category.
- slotPEAllocationSelectItem(self)
- Selects a pe allocation item and goes back to main pe allocation window.
- slotPERenameMain(self)
- Opens main PE Allocation Dialog and Renames PE.
- slotRefineArchConfirm(self)
- slotRefineArchDone(self)
- slotRefineArchitecture(self)
- slotRefineCommunication(self)
- slotRefineCommunicationConfirm(self)
- slotRefineCommunicationDone(self)
- slotRefineNetwork(self)
- slotRefineNetworkConfirm(self)
- slotRefineNetworkDone(self)
- slotRefineSchedConfirm(self)
- slotRefineSchedDone(self)
- slotRefineScheduling(self)
- slotScheduleBehaviors(self)
- Opens Scheduling Dialog.
- slotSetCompilerPreferences(self)
- Opens main preferences dialog, sets Compiler settings and closes.
- slotSetDatabasePreferences(self)
- Opens main preferences dialog, sets Database settings and closes.
- slotSetPluginsPreferences(self)
- Opens main preferences dialog, sets Plugin settings and closes.
- tearDown(self)
- Clean up test environment.
Methods inherited from unittest.TestCase:
- __init__(self, methodName='runTest')
- Create an instance of the class that will use the named test
method when executed. Raises a ValueError if the instance does
not have a method with the specified name.
- __repr__(self)
- __str__(self)
- assertAlmostEqual = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) is usually not the same
as significant digits (measured from the most signficant digit).
- assertAlmostEquals = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) is usually not the same
as significant digits (measured from the most signficant digit).
- assertEqual = failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertEquals = failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- assertNotAlmostEqual = failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) is usually not the same
as significant digits (measured from the most signficant digit).
- assertNotAlmostEquals = failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) is usually not the same
as significant digits (measured from the most signficant digit).
- assertNotEqual = failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- assertNotEquals = failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- assertRaises = failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
- Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- assert_ = failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- countTestCases(self)
- debug(self)
- Run the test without collecting errors in a TestResult
- defaultTestResult(self)
- fail(self, msg=None)
- Fail immediately, with the given message.
- failIf(self, expr, msg=None)
- Fail the test if the expression is true.
- failIfAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) is usually not the same
as significant digits (measured from the most signficant digit).
- failIfEqual(self, first, second, msg=None)
- Fail if the two objects are equal as determined by the '=='
operator.
- failUnless(self, expr, msg=None)
- Fail the test unless the expression is true.
- failUnlessAlmostEqual(self, first, second, places=7, msg=None)
- Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) is usually not the same
as significant digits (measured from the most signficant digit).
- failUnlessEqual(self, first, second, msg=None)
- Fail if the two objects are unequal as determined by the '=='
operator.
- failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
- Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- id(self)
- run(self, result=None)
- shortDescription(self)
- Returns a one-line description of the test, or None if no
description has been provided.
The default implementation of this method returns the first line of
the specified test method's docstring.
Data and other attributes inherited from unittest.TestCase:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'TestCase' objects>
- list of weak references to the object (if defined)
- failureException = <class exceptions.AssertionError>
- Assertion failed.
|