Software
Design Document
for
the
Graphical
User Interface (GUI) (Task 1.2)
for
the
Tool
for Automating Estimation of DSP Resource Statistics for Waveform Components
Submitted
under Subcontract FP-19738-430292
An
Integrated Tool for SCA Waveform Development, Testing, and Debugging and a Tool
for Automated Estimation of DSP Resource Statistics for Waveform Components
Version
1.0
Revision
History
|
Version |
Summary
of Changes |
Date |
|
0.1
(BL) |
Internal
Draft |
|
|
0.2
(BL) |
Internal Release |
|
|
0.3
(JN) |
Edited
to Reflect Changes |
|
|
10
(JN) |
Edited
for Final Submission |
|
1.2 Document
Purpose and Goals
2.2 Data
Management and Display
2.3 Calculation
Parameterization Support
2.4 Engine
Calculation Control
2.4.2 GUI
Control on Calculation Engine
2.5 Calculation
Result Collection, Display and Storage
4.1 Graphical
Display Base Library
6 Integration
into Other Packages
Figure 1: GUI main window
display
Figure 2: Component
property display window
Figure 3: Component item
selection display and control
Figure 4: Calculation routine management interface
Figure 5: Calculation
result display window
Figure 6: PCET GUI
functional block diagram
Table 1: Functional
Breakdown by File
Table 2: File Dependency
Structure Matrix
This Software Design Document documents the software design
for the Graphical User Interface (GUI) for the ˇ°Tool for Automating Estimation
of DSP Resource Statistics for Waveform Components.ˇ± This document has been
prepared in accordance with the requirements of Task 2 of Subcontract
FP-19738-430292 as part of the project to develop ˇ°An Integrated Tool for SCA
Waveform Development, Testing, and Debugging and a Tool for Automated
Estimation of DSP Resource Statistics for Waveform Components.ˇ±
The project developed an open source stand alone program for estimating the cycles, power and memory required to implement waveform components on arbitrary processors which can then be incorporated into OSSIE. This tool is intended as an aid when beginning a new software radio (SDR) design or when investigating porting feasibility of an existing waveform to a new platform. The intent is to provide immediately available guidance to rapidly winnow down candidate platforms to a handful for more detailed systems analysis.
The stand alone program consists of the following three principle components:
In the envisioned operation illustrated
in Figure 1, the user first defines in the GUI
For each combination of DSP and waveform
component, the GUI calls the computational engine and passes the following
information:
Using methods first described in [1],
the computational engine uses this information to estimate the following values
if the component were to be implemented on the target DSP:
This information is then passed back to
the GUI. After all user-specified component/DSP pairs have been evaluated by
successive calls to the CE, the GUI tabulates the following five tables for
each DSP/component pair:

Figure 1: Interaction of primary components for the ˇ°Tool for Automating Estimation of DSP Resource Statistics for Waveform Componentsˇ±
This document provides a detailed description of the software
design and implementation of the Graphical User Interface (GUI) subsystem for
the tool for automating estimation of DSP resource statistics for waveform components.
This document covers the design of the
complete GUI subsystem
and its software components. The
document describes the GUI functionality and software architecture, it
also describes the software
implementation of the GUI on a stand-alone Windows or Linux based
system. This document does not
cover GUI design for other
hardware/software platforms.
Specifically, this design covers the
following aspects of the GUI:
The remainder of this document is organized as follows.
Section 2 gives an overview of the GUI subsystem. Section 3 describes the GUIˇŻs
software structure and its functional components. Section 4 explains the implementation
methods used in all the key processing procedures in the GUI. Section 5
provides suggestions on how the GUI could be upgraded in subsequent releases.
Section 6 describes how the GUI could be integrated into other packages to form
the PCET overall system.
This section gives an overview of the PCET GUI.
The
purpose of the GUI is to provide a user friendly graphical interface to
automate and control the processing cost calculation of the engine, generate
and manage a library of target waveform component and DSP processor
specification data files, and provide an easy interface to between the GUI and
the calculation engine to load the input data to and collect the output data
from the engine. The GUI also provides post-processing of the engine output
data to support analysis.
The
GUI subsystem mainly includes the following four types of functionalities:
(1) Data management and display;
(2) Calculation parameterization, display and editing;
(3) Automation of calculation engine control, routine management interface;
(4) Calculation result collection and post-processing support.
The
GUI provides a straightforward way of viewing the stocked waveform components
and DSP processor data. The main window of the GUI is shown in Figure 1.

Figure 1: GUI Main Window
Display
On
the left plane of the GUI main window there are lists of components known to
the GUI, which includes the names of all the waveform components and DSP
processors stocked in the system database. Clicking on a component or DSP will
toggle its selection property with selection indicated by highlighting. By
default, all DSPs are selected and no components are selected. Clicking
After
double-clicking a component, on
each of them a hierarchical component list will spread for the use to pick a
specific component belonging to its own group and dependency. Each component
name listed in that box can be selected and activated to show its detailed
description. ThereˇŻs a specification data file associated with each component
stocked in the system data library. With a double-click on the selected
component name, the component data file will loaded and a new property window
will pop up to show the specifications contained in the file. Figure 2 is a
screen shot of a property window for waveform component waveform_XXX002.

Figure 2: Component property display window
Note that the property display window is only for viewing
the component specifications, so it does not support editing on the component
data. In later versions of the GUI, it may be updated to an editable window for
special kinds of components.
For a
selected pair of waveform component and DSP processor, a specific parametric
set is formulated to control the engineˇŻs calculation. Such parameterization
approach defined to instantiating a specific round of calculation is detailed
in SDD_engine_v_1_0.doc. This
document details how parametric control of the calculation engine is supported
with a clearly defined interface (API) and can be managed by the user through
graphical interface.
The
GUI provides an easy way of managing the parametric configuration set of the
engine. At the right plane of the main window shown in Figure 1, calculation
parameters are listed with their meanings and values. The PCET system is
designed to store the calculation configurations into the parameter profile
data file that is to be loaded to control the engine. By the pushbutton ˇ°Loadˇ±,
the GUI supports two modes of loading such parameter profiles, one is to locate
the library of the parameter files, and upon the selection of a specific file
by the user; the other is to help the user to look up and then load the target
parameter file corresponding to the waveform component selected by the user.
For either case, the GUI loads the file and displays all the parameters onto
the parameter-display zone; and let the user to edit their values as needed. By
the pushbutton ˇ°Saveˇ±, the GUI takes current specified values of the edited
parameters and stores them back to the file, so that the parameter profile is
updated and to be loaded to the engine to change its running mechanism. The ˇ°Resetˇ±
button will discard the changes you made and reload the last-saved profile
data.
The main reason of GUI development is to provide a user-friendly
interface of controlling the calculation engine, while still maintain the
modularity of the system. The GUI follows the exact interface defined by the
engine. At the same time, it provides a routine to automate the configuration
and call to the engine. The user only needs to give the top-level settings from
the GUI.
As currently defined, the calculation engine is called via a
file interface with the following arguments:
component_file_name
dsp_file_name
parameter_file_name
output_file_name
debug_flag_value
Detailed
explanation of these files is given in SDD_engine_v_1_0.doc.
The engine maintains its independence with the standard ASCII file interface,
so that it can also be called stand-alone with a command line. Every time it is
called, one round of calculation is performed by the engine for one specific
waveform component, one specific DSP processor module, and one specific
parameter configuration.
The GUI provides the engine all the files it needs for
calculation. The GUI also helps the user to manage these files through
graphical display. In the central plane of the GUI main window shown in Figure
3, there are two selection list boxes for the user to pick the waveform
components and DSP processors for the engine to perform calculation. The
waveforms and DSPs to be calculated are picked from the comprehensive component
Tree List on the left of the main window. The ˇ°addˇ± button click will add the
selected item in the Tree List into the selection box, and the ˇ°removeˇ± button
click will delete the selected item in the selection box. The GUI feeds these
waveform and DSP files to the calculation engine as well as the parameter
profile upon userˇŻs editing (at the right plane of the main window).
The upper and lower selection boxes are for waveform
components and DSP processors respectively. If a waveform item in the Tree List
is selected and the ˇ°addˇ± button of the DSP selection box is clicked, the GUI
will give a warning and no item will be added into the DSP selection box.

Figure 3: Component item selection display and
control
With the GUI, a user can pick multiple waveform components
and DSPs of interest for the engine to calculate. Since the engine only
supports one round of calculation per call, the GUI needs to provide a routine
to call the engine iteratively with different configurations. Within a routine the
engine is called with a specific set of waveform, DSP, and parameter settings
for each round of calculation. And the result of each round of engine call is
recorded by the GUI. When the whole routine is finished, all the results are
tabulated and displayed in GUI, and can be saved for future analysis.

Figure 4: Calculation routine management interface
The GUI also provides an easy way for user to save the
routine configurations into routine files so that they can be reused later
without redo the multiple selections and configurations again. Figure 4 shows
the save/load interface of the routine management provided. When a routine file
is loaded, its contained waveform components and DSP processors will be shown
in the waveform/DSP selection boxes, which are to be sent to the engine for
calculation.
Once the target waveform and DSPs are picked and parameters
are set, user can click the ˇ°calculationˇ± button to kick off the calculation
routine. At each round of engine call during the loop, an output ASCII file is
generated by the engine (detailed output file description is given by SDD_engine_v_1_0.doc) and picked by the
routine. The GUI stores the output data of each round and gathers them into
multiple tables. When all the calculations are done, a result window will show
up displaying all the collected output data in forms of tables, shown in Figure
5.
In the result window there are 5 tables, each of which contains
a specific performance cost estimation metric for all the waveforms components
and DSPs included in the calculation routine. Such data tables provide an easy
way to compare between different waveforms components and DSPs. Besides
displaying collected calculation results, the processing cost of all the
waveform components associated to each processor is summed up and displayed as
well at the final column on each of the five tables. This is to help the user
to get an idea of overall cost of a waveform (typically including multiple
components) running on a processor.
Upon File¨¤Save menu selection on the window, these tabulated
data can be saved to ASCII files for future analysis. A standard file save
dialog will pop up for the user to specify the location and the name of the
file to be saved.

Figure 5: Calculation result display window
This section gives a structural view of the PCET GUI as
implemented in Python in terms of the software structure and the file structure.
The key code implementation methods are further detailed in section 4.
The PCET GUI subsystem consists of the following modules (Responsibilities):
A functional block diagram of the PCET GUI is shown in
Figure 6.

Figure 6: PCET GUI functional block diagram
The PCET GUI subsystem is implemented in Python language, using
the following
Files (Responsibilities):
Each of these files implements the functions described in Table
1.
Table 1: Functional Breakdown by File
|
File |
Functions (arguments) |
Purpose |
|
pcet.py |
Class PetApp :: OnInit(wx.App) |
Initialize wxPython based frames and global window objects; Activate main window to top level in the operating system. |
|
|
||
|
frame_main.py |
Class MainFrame
:: __init__
(parent_window, control_id, title_string, window_size) |
Initialize main window; Setup layout of different display and control zones. |
|
MainFrame ::
CreateParaEdit () |
Setup parameter display and editing plane in the main window; Handles ˇ°saveˇ± and ˇ°resetˇ± events by calling OnParaSave() and
OnParaReset() methos. |
|
|
MainFrame :: OnParaSave(event) |
Open a standard file save dialog; Save user editing on the selected file from file save dialog. |
|
|
MainFrame ::
OnParaReset(event) |
Discard unsaved changed made by the user; Reload the last saved parameter profile. |
|
|
MainFrame :: CreateTree() |
Search GUI backend profile and load all stock waveform components and
DSPs; Create a tree list data structure including all stock components and
maintain their inherent dependency relations; Bind tree item activation (double-click) event with
OnTreeItemActivated() method; Bind tree item selection (single-click) event with
OnTreeItemSelChanged() method. |
|
|
MainFrame :: OnTreeItemActivated(event) |
Load the data file of the double-clicked tree item; Open a new window to display the property data file. |
|
|
MainFrame :: OnTreeSelChanged(event) |
Currently reserved empty for future update. |
|
|
MainFrame :: CreateStatusbar() |
Add a status bar to the main window, currently reserved empty for
future update. |
|
|
MainFrame :: CreateManubar() |
Add a menu bar to the main window; Currently include: 1.
File
menu list (open-profile, exit) 2.
Process
menu list (calculate) 3.
Help
menu list (help, about) Menu item ¨¤ event method: Open-profile ¨¤ OnOpenProfile() Exit ¨¤ OnExit() Calculate ¨¤ OnCalc() Help ¨¤ OnHelp() About ¨¤ OnAbout() |
|
|
MainFrame :: CreateToolbar() |
Add a iconized toolbar to the main window, currently reserved empty
for future update. |
|
|
MainFrame :: OnExit(event) |
Open a Yes/No dialog for the user to confirm; If yes, PCET application exit; If no, application resume where it was
before the OnExit() event was triggered. |
|
|
MainFrame :: OnHelp(event) |
Will open another Help window displaying help documentation,
currently reserved empty for future update. |
|
|
MainFrame :: OnAbout(event) |
Open a new window showing the ˇ°aboutˇ± information of the PCET
software tool; Instantiates the AboutFrame class. |
|
|
MainFrame :: OnOpenProcFile(event) |
Pop up a standard file-open dialog box; Open a DSP processor specification file upon userˇŻs selection; Feed the file to the DispProperty() method. |
|
|
MainFrame :: OnOpenWaveFile(event) |
Pop up a standard file-open dialog box; Open a waveform component specification file upon userˇŻs selection; Feed the file to the DispProperty() method. |
|
|
MainFrame :: DispProperty(event) |
Open a new display window to show the content of the input file. |
|
|
MainFrame :: OnOpenResult(event) |
Pop up a standard file-open dialog box; Open a
result file upon userˇŻs selection; Load the file and parse the
content of the data into tables; Open a new
result display frame and feed the parsed data tables onto the display. |
|
|
MainFrame :: OnTreeSelectionChanged(event) |
Reserved for future development. |
|
|
MainFrame :: OnTreeItemActivated(event) |
Callback upon the double-click on the item in the GUI tree list box; Get the item name of the activated item and extract its related file
path and name; Feed the file into MainFrame::DispProperty(). |
|
|
MainFrame :: OnWaveItemActivated(event) |
Callback upon the
double-click of the selected item in the GUI
waveform selection box; Load the
selected waveform's parameters
and their values in the corresponding parameter file by calling MainFrame::LoadParaFile(); Display parameters onto the parameter edit zone by calling MainFrame::FillParaGrid(). |
|
|
MainFrame :: OnParaLoad(event) |
Callback on parameter load button; Load data files associated to the selected item in the GUI tree list box; Load the
selected waveform's parameters
and their values in the corresponding parameter file by calling MainFrame::LoadParaFile(); Display parameters onto the parameter edit zone by calling MainFrame::FillParaGrid(). |
|
|
MainFrame :: LoadParaFile() |
|
|
|
MainFrame :: FillParaGrid() |
Extract parameter data and
fill them into the grid of the GUI parameter edit zone. |
|
|
MainFrame :: OnParaSave(event) |
Callback on ˇ®SaveˇŻ button in the GUI parameter edit zone; Pop up a dialog box to confirm saving; Save the current edited content back to the target parameter file. |
|
|
MainFrame :: OnParaReset(event) |
Callback on ˇ°Resetˇ± button in the GUI parameter edit zone; Discard all the unsaved edits on the parameters and reload the last
saved parameter values. |
|
|
MainFrame :: OnWaveAdd(event) |
Callback on ˇ°Addˇ± button in the GUI waveform item selection zone; Get the waveform item selected in the GUI tree list box and add it
into the waveform item selection box; Duplicated selection will be discarded. |
|
|
MainFrame :: OnWaveRmv(event) |
Callback on ˇ°Removeˇ± button in the GUI waveform item selection zone; Remove the selected waveform item in the waveform selection box; Do nothing when the box is empty. |
|
|
MainFrame :: OnProcAdd(event) |
Callback on ˇ°Addˇ± button in the GUI processor item selection zone; Get the processor item selected in the GUI tree list box and add it
into the processor item selection box; Duplicated selection will be discarded. |
|
|
MainFrame :: OnProcRmv(event) |
Callback on ˇ°Removeˇ± button in the GUI processor item selection zone; Remove the selected processor item in the processor selection box; Do nothing when the box is empty. |
|
|
MainFrame :: OnRoutineLoad(event) |
Callback on ˇ°Loadˇ± button in the GUI routine control zone; Pop up a file-open dialog box; Upon the userˇŻs selection, open the routine file and load its
contained list of waveform and processor items into waveform and processor
selection boxes in the GUI item selection zone. |
|
|
MainFrame :: OnRoutineSave(event) |
Callback on ˇ°Saveˇ± button in the GUI routine control zone; Get the waveform and processor lists from the GUIˇŻs waveform and
processor selection boxes and generate a routine file with these lists; Pop up a file-save dialog box; Save the routine file upon the userˇŻs specification of file path and name. |
|
|
MainFrame :: OnRoutinRemove(event) |
Callback on ˇ°Removeˇ± button in the GUI routine control zone; Clear the contents in the waveform and processor list in the GUIˇŻs
waveform and processor selection boxes. |
|
|
MainFrame :: OnCalc(event) |
Callback on ˇ°Calculateˇ± button in the GUIˇŻs calculation control zone; Start the calculation routine; Collect the results of all rounds of engine calculation by calling
MainFrame::GetOutputData() method; Open a new result window and load result data to the window, by calling
result.py module. |
|
|
MainFrame :: GetTreeItemText() |
Extract the string of the selected item in the GUI tree list box. |
|
|
MainFrame :: GetOutputData() |
Main routine of calling the calculation engine; Manage loading configuration set for each round of the calculation; Collect data from each round of calculation; Tabulate all collected data when the whole routine is finished; Report the result data tables. |
|
|
|
||
|
frame_property.py |
PropertyFrame :: __init__() |
PropertyFrame class generator method; Create property display window; Contains a text display box to display the content (ASCII) of the
property file. |
|
|
|
|
|
frame_about.py |
AboutFrame :: __init__() |
AboutFrame class generator method; Create display window of ˇ°aboutˇ± information of the PCET software
system; Contains a display box that can display a html file format. |
|
AboutFrame :: OnOK(event) |
Callback on the ˇ°OKˇ± button in the ˇ°aboutˇ± display window; Upon the click on ˇ°OKˇ± button, this ˇ°aboutˇ± window will be closed,
and the instantiated class object will be destroyed. |
|
|
|
||
|
frame_result.py |
Grid :: __init__() |
Grid class generator method; Create a data grid to hold table data; Specify display settings of the created grid to be ready to be loaded
into result window. |
|
ResultFrame :: __init__() |
ResultFrame class generator method; Create a result window to display calculation outcome; Create a menubar by calling ResultFrame::CreateMenubar() method; Crate a notebook control object by calling
ResultFrame::CreateNotebook() method; Take in the calculation routine configuration to form the table
settings for display. Form a multi-page display zone with each page displaying one grid
that filled by one data table, by calling ResultFrame::FillGrid() method. |
|
|
ResultFrame :: CreateMenubar() |
Create a menubar; Contains file save and print options. |
|
|
ResultFrame :: CreateNotebook() |
Create the notebook control object; Contains multiple pages, each page contains a grid used to display
one result data table from the calculation routine. |
|
|
ResultFrame :: FillGrid() |
Fill the display grid with a data table. Set the grid display format according to the dimension and content of
the data table. |
|
|
ResultFrame :: OnSave() |
Callback on ˇ°File¨¤Saveˇ±
in the menubar; Pop up a file-save dialog for the user to specify file path and name; Save all the data tables into ASCII format and write into the file. |
|
|
ResultFrame :: OnPrint() |
Callback on ˇ°File¨¤Printˇ±
in the menubar; Print the data tables; Currently not implemented, reserved for future development. |
|
|
ResultFrame :: OnClose() |
Callback on ˇ°Closeˇ± icon in the window or ˇ°File¨¤Closeˇ± in the menubar; Close the window, destroy the ResultFrame class object, and clear all
its contained data memory. |
|
|
|
|
|
|
profile.py |
Contains all Global data entries used between GUI objects; Contains all supporting data library entries used to interface GUI
subsystem and system database. |
|
The calling dependencies between each files are illustrated
in Table2 below:
Table 2: File Dependency Structure Matrix
|
|
os |
string |
wx |
Profile.py |
Frame_result.py |
Frame_property.py |
Frame_about.py |
Engine.py |
Frame_main.py |
Pcet.py |
|
os |
|
|
|
|
|
|
|
|
|
|
|
string |
|
|
|
|
|
|
|
|
|
|
|
wx |
|
|
|
|
|
|
|
|
|
|
|
profile.py |
x |
|
|
|
|
|
|
|
|
|
|
frame_result.py |
x |
x |
x |
x |
|
|
|
|
|
|
|
frame_property.py |
x |
|
|
|
|
|
|
|
|
|
|
frame_about.py |
x |
|
|
|
|
|
|
|
|
|
|
engine.py |
x |
x |
x |
|
|
|
|
|
|
|
|
frame_main.py |
x |
x |
x |
x |
x |
x |
x |
x |
|
|
|
pcet.py |
|
|
x |
|
|
|
|
|
x |
|
The GUI subsystem uses the display base library wxPython
software package to implement the display windows and control widgets. wxPython
is an open source software package that provides the Python API for C++ display
base library wxWidgets, which is also an open source software package that lets
developers create cross-platform GUI applications such as Win32, Mac OS X,
GTK+, X11, Motif, WinCE, and more using one codebase.
By using wxPython API, PCET GUI provide native look and feel
at different operating system. This is because wxWidgets uses the platform's
own native controls rather than emulating them. Check http://www.wxwidgets.org/
and http:// www.wxpython.org/
for more details.
The GUI subsystem is designed to be a ˇ°wrapperˇ± for the PCET
calculation engine. In other words, it is an overlay on top of the engine to
enable the user to manage data, configure calculations, and automate batched
engine processing.
The data interface between GUI and engine follows the
definition of the engine input and output data format described in Section 2.4.
Standard ASCII text files are used to pass data between the GUI and engine,
which makes the PCET system operable in both Windows and Unix based platforms
without any change.
To provide the GUI with seamless control of the engine, the GUI
is implemented in Python, which is the same with engine implementation. By
putting GUI and Python in the same operating environment, the configuration and
control over the engine can be simplified to a set of functional calls and
class object accesses.
To be defined in a later release of this document.
How to support comments
Soft coded directories
Different data formats
Display Confidence levels
Parameter File error trapping
Local cache for edited stuff
Text file editing
Post processing
results (e.g., sort by time, power, memoryˇ)
To be defined in a later release of this document.
[1]
J. Neel, P. Robert, J. Reed, "A formal methodology for estimating
the feasible processor solution space for a software radio,ˇ± SDR Forum
Technical Conference 2005, paper # 1.2-03. Available online: http://www.sdrforum.org/pages/sdr05/1.2%20Reconfigurable%20Hardware/1.2-03%20Neel%20et%20al.pdf