Você está na página 1de 30

Software Design Document

for the
Computational Engine (Task 1.1)
for the
Tool for Automating Estimation of DSP Resource Statistics for
a!eform Components
Su"mitte# un#er Su"contract $P%1&'()%*(+,&,
An -ntegrate# Tool for SCA a!eform De!elopment. Testing. an#
De"ugging an# a Tool for Automate# Estimation of DSP Resource
Statistics for a!eform Components
/ersion 1.+
Revision History
Version Summary of Changes Date
0.1 (JN) Internal Release (C !ngine) "#1$#0$
1.0 (JN) %&'ate' for (ython Im&lementation 10#1$#0$
1.1 (JN) %&'ate' for ne) &rogram memory *al*ulation 1#11#0+
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
Table of Contents
,a1le of Contents................................................................................................................ii
.isting of 2igures................................................................................................................ii
.isting of ,a1les................................................................................................................iii
1 Intro'u*tion.......................................................................................................................1
1.1 (ro/e*t 3vervie).......................................................................................................1
1.4 Do*ument (ur&ose an' 5oals....................................................................................4
1.6 Do*ument S*o&e........................................................................................................4
1.7 Do*ument 3rgani8ation.............................................................................................6
4 C! 3vervie).....................................................................................................................7
6 %ser Interfa*e....................................................................................................................$
6.1 In&ut Interfa*e............................................................................................................$
6.1.1 Com&onent 2ile 2ormat......................................................................................$
6.1.4 DS( 2ile 2ormat...............................................................................................10
6.1.6 (arameter 2ile 2ormat.......................................................................................14
6.4 3ut&ut Interfa*e.......................................................................................................14
7 Soft)are 9r*hite*ture.....................................................................................................17
7.1 Soft)are Stru*ture...................................................................................................17
7.4 2ile Stru*ture............................................................................................................17
: ;ey <etho's...................................................................................................................1$
:.1 Com&onent Cal*ulation...........................................................................................1$
:.4 V.I= 9'/ustment...................................................................................................40
:.6 String (e>uation) !valuation....................................................................................44
? Su&&ort for .ater %&gra'ing...........................................................................................46
?.1 Ne) DS(s or Com&onents.......................................................................................46
?.4 Su&&ort for 2(59s..................................................................................................46
?.6 Different <etho's for Interfa*ing )ith the (rogram...............................................47
?.7 Different 2ile 2ormats..............................................................................................47
$ Integration into 3ther (a*@ages......................................................................................4:
$.1 Integration via main file han'ling interfa*e.............................................................4:
$.4 Integration via managing engine *lasses..................................................................4:
$.6 Integration )ith a 5%I.............................................................................................4:
$.7 Integration )ith a Cognitive !ngine........................................................................4?
$.: Integration )ith a =aveform (artitioner.................................................................4?
+ Referen*es.......................................................................................................................4$
Listing of Figures
2igure 1A (rimary Com&onents for the B,ool for 9utomating !stimation of DS(
Resour*e Statisti*s for =aveform Com&onentsC................................................................4
2igure 4A Dasi* 3&eration of Com&utational !ngine...........................................................:
2igure 6A Sam&le Com&onent 2ile.......................................................................................+
2igure 7A Sam&le DS( 2ile................................................................................................10
2igure :A Sam&le (arameter 2ile........................................................................................14
ii
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
2igure ?A !Eam&le 3ut&ut 2ile )hen Su**essful...............................................................14
2igure $A !Eam&le 3ut&ut 2ile )hen Su**essful...............................................................14
2igure +A Dasi* 2lo) of Cal*ulation (ro*ess.....................................................................1+
2igure "A V.I= 9'/ustment Cal*ulation..........................................................................41
2igure 10A V.I= &ro*essing for the *ase )here <emory- <ulti&li*ation- an' 9.% *y*les
are all &resent (*ontinue' from 2igure ")..........................................................................44
Listing of Tables
,a1le 1A 2ailure Strings Returne' 1y the C! in the 3ut&ut 2ile........................................14
,a1le 4A 2un*tional Drea@'o)n 1y 2ile.............................................................................1:
,a1le 6A 2ile De&en'en*y Stru*ture <atriE.......................................................................1?
iii
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
1 Introduction
,his Soft)are Design Do*ument esta1lishes the soft)are 'esign for the Com&utational
!ngine (C!) for the B,ool for 9utomating !stimation of DS( Resour*e Statisti*s for
=aveform Com&onents.C ,his 'o*ument has 1een &re&are' in a**or'an*e )ith the
re>uirements of ,as@ 4 of Su1*ontra*t 2(F1"$6+F7604"4 as &art of the &ro/e*t to 'evelo&
B9n Integrate' ,ool for SC9 =aveform Develo&ment- ,esting- an' De1ugging an' a
,ool for 9utomate' !stimation of DS( Resour*e Statisti*s for =aveform Com&onents.C
1.1 Project Overview
,he &ro/e*t aims to 'evelo& an o&en sour*e stan' alone &rogram for estimating the
*y*les- &o)er an' memory re>uire' to im&lement )aveform *om&onents on ar1itrary
&ro*essors )hi*h *an then 1e in*or&orate' into 3SSI!. ,his tool is inten'e' as an ai'
)hen 1eginning a ne) soft)are ra'io (SDR) 'esign or )hen investigating &orting
feasi1ility of an eEisting )aveform to a ne) &latform. ,he intent is to &rovi'e
imme'iately availa1le gui'an*e to ra&i'ly )inno) 'o)n *an'i'ate &latforms to a han'ful
for more 'etaile' systems analysis.
,he stan' alone &rogram *onsists of the follo)ing three &rin*i&le *om&onentsA
Com&utational !ngine (C!)
5ra&hi*al %ser Interfa*e (5%I)
Data files *hara*teri8ing sele*te' )aveform *om&onents (Com&onent 2iles) an'
Digital Signal (ro*essors (DS()
In the envisione' o&eration illustrate' in 2igure 1- the user first 'efines in the 5%I
9 set of )aveform *om&onents (e.g.- filters- mo'ulation#'emo'ulation 1lo*@s)
Re>uisite &arameters for ea*h *om&onent (e.g.- &ermitte' eEe*ution time- 1lo*@
length)
9 set of target DS(s.
2or ea*h *om1ination of DS( an' )aveform *om&onent- the 5%I *alls the *om&utational
engine an' &asses the follo)ing informationA
,he )aveform *om&onent 'efinition file
,he DS( 'efinition file
%serF'efine' &arameters.
%sing metho's first 'es*ri1e' in G1H- the *om&utational engine uses this information to
estimate the follo)ing values if the *om&onent )ere to 1e im&lemente' on the target
DS(A
!stimate' *y*les
!stimate' *om&utational time
!stimate' 'ata memory
!stimate' &rogram memory
!stimate' energy *onsum&tion
1
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
,his information is then &asse' 1a*@ to the 5%I. 9fter all userFs&e*ifie' *om&onent#DS(
&airs have 1een evaluate' 1y su**essive *alls to the C!- the 5%I ta1ulates the follo)ing
five ta1les for ea*h DS(#*om&onent &airA
!stimate' *y*les
!stimate' *om&utational time
!stimate' 'ata memory
!stimate' &rogram memory
!stimate' energy *onsum&tion.
2igure 1A (rimary Com&onents for the B,ool for 9utomating !stimation of DS(
Resour*e Statisti*s for =aveform Com&onentsC
1.2 Document Purpose and Goals
,his 'o*ument serves as the 1lue&rint for the soft)are 'evelo&ment an' im&lementation
of the Com&utational !ngine (C!).
1.3 Document Scope
,his 'o*ument *overs the 'esign of all the C! soft)are *om&onents. ,he 'o*ument
fo*uses &rimarily on the (ython im&lementation of the C! soft)are on a stan'Falone
=in'o)s or .inuE 1ase' system. ,his 'o*ument 'oes not *over 'esign for other
har')are#soft)are &latforms.
S&e*ifi*ally- this 'esign *overs the follo)ing as&e*ts of the C!A
Realisti* estimations. ,he C! )ill estimate the *y*les- *om&utational time- 'ata
memory- &rogram memory- an' energy re>uire' to im&lement ar1itrary )aveform
*om&onents on ar1itrary DS(s.
4
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
!Etensi1ility. ,he C! )ill &rovi'e the *a&a1ility to a**ommo'ate an everF
gro)ing num1er of )aveform *om&onents an' DS(s.
%&gra'a1ility. ,he C! )ill 1e 'elivere' as &art of an o&en sour*e &a*@age )hi*h
*oul' 1e im&rove' u&on 1y later 'evelo&ers.
Intero&era1ility. In a''ition to 1eing in*or&orate' into the stan'Falone 5%I- the
C! is inten'e' to su&&ort integration into the eEisting 3SSI! &artitioning tool an'
the larger ID! &a*@age.
1.4 Document Organization
,he remain'er of this 'o*ument is organi8e' as follo)s. Se*tion 6 'es*ri1es the C! user
interfa*e. Se*tion 7 'es*ri1es the C!Is soft)are stru*ture (ar*hite*ture) an' intera*tion of
&rimary *om&onents. Se*tion : 'es*ri1es the metho's to 1e use' in the &rimary
&ro*e'ures. Se*tion ? &rovi'es suggestions as to ho) the soft)are *oul' 1e u&gra'e' in
su1se>uent releases. Se*tion $ 'es*ri1es ho) the C! *oul' 1e integrate' into other
&a*@ages.
6
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
2 CE Overview
,he *om&utation engine is res&onsi1le for estimating the *y*les- *om&utational time-
energy- &rogram memory- an' 'ata memory )hi*h )oul' 1e use' 1y a s&e*ifie'
&arameteri8e' )aveform *om&onent )hen im&lemente' on a s&e*ifie' DS(. ,he 'esign
of the C! has the follo)ing &rimary goalsA
9**ura*y J )hen &ossi1le- the C! shoul' give the 1est &ossi1le estimate of the
'esire' 'esign &arameters
!Etensi1ility J the C! shoul' su&&ort the use *om&onents an' DS(s not
envisione' )hen first *reate'.
Reusa1ility J *o'e )hi*h s&e*ifies a &arti*ular *om&onent shoul' 1e a1le to 1e
rea'ily reuse' for 'ifferent )aveforms )ith a minimal im&a*t to the user.
,he 1asi* o&eration of the *om&utational engine is illustrate' in 2igure 4. %&on
initiali8ation- the engine evaluates the num1er of in&ut arguments &resent. If : arguments
are 1eing &asse'- the engine o&erates in its normal mo'e )herein another &rogram or a
user has *alle' the *om&utation engine )ith files )hi*h s&e*ify the *om&onent- DS(-
&arameters for the &arti*ular estimation- the out&ut file an' a flag )hi*h in'i*ates if the
results shoul' 1e e*hoe' to the s*reen. =hen an argument is not assigne' 1y the *aller-
the engine assigns the follo)ing 'efault names for these filesA
sam&leK*om&onent.tEt
sam&leK's&.tEt
sam&leK&arameter.tEt
sam&leKout&ut.tEt
,he engine then rea's in the asso*iate' in&ut files (*om&onent- DS(- &arameter)-
&erforms its *al*ulation routines an' &rints the results to the s&e*ifie' out&ut file. ,he
eE&e*te' format for these files is 'o*umente' in Se*tion 6. ,hroughout this &ro*ess- the
engine tests for failure mo'es )hi*h may &revent the engine from su**esfully eEe*uting.
2ailures an' their 'es*ri&tion are &ut in the out&ut file to &rovi'e 'etaile' fee'1a*@ to the
entity )hi*h *alle' the engine. 9 listing of failure strings an' their meanings is ta1ulate'
in Se*tion 6.
7
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
0argin123
Start
Throw
$ailure. E4it
0
5
0argin1+3
0
5
Assign #efault
file names
component6file 1 arg718
#sp6file 1 arg7,8
parameter6file 1 arg7(8
output6file 1 arg7*8
echo6flag 1 arg728
Rea# input files
Success3
Throw
$ailure. E4it
0
5
Calculate
Success3 Print Results
E4it
5
0
echo6flag
113
Print Results
to screen
0
5
0argin123
Start
Throw
$ailure. E4it
0
5
0argin1+3
0
5
Assign #efault
file names
component6file 1 arg718
#sp6file 1 arg7,8
parameter6file 1 arg7(8
output6file 1 arg7*8
echo6flag 1 arg728
Rea# input files
Success3
Throw
$ailure. E4it
0
5
Calculate
Success3 Print Results
E4it
5
0
echo6flag
113
Print Results
to screen
0
5
2igure 4A Dasi* 3&eration of Com&utational !ngine
,o fa*ilitate the goal of eEtensi1ility- many 'ifferent *om&onents an' DS(s must 1e
su&&orte' 1eyon' initial s&e*ifi*ations. ,hus the C! 'oes not maintain an internal
*om&ile' li1rary of *om&onents an' DS(s- 1ut rather &ro*esses s&e*ifi* *om&onents an'
DS(s )hen *alle'. 9s there is great variation 1et)een ho) *om&onents are im&lemente'
an' ho) they ma& to 'ifferent DS(s- a 'ifferent set of *al*ulations effe*tively nee's to 1e
&erforme' for every *om&onentFDS( &air. In general the most involve' *al*ulations an'
most sensitive to variations of DS(s an' *om&onents is the estimates of *y*les. ,o
mitigate this sensitivity- ea*h *om&onent file s&e*ifies a num1er of 'ifferent e>uations
)hi*h the engine )ill &arse an' evaluate )hi*h )ill *olle*tively result in the a&&ro&riate
estimations. .oosely- the engine )ill ma@e an estimate of the total num1er of o&erations
re>uire' to su&&ort the 'esire' *om&onent in'e&en'ent of the DS( an' then form a *y*le
estimate 1y 'etermining ho) many of these o&erations *oul' 1e &erforme' in &arallel.
3n*e arme' )ith a *y*le estimate- estimates of &ro*essing time- &o)er *onsum&tion- an'
memory a**esses are relatively trivial. 9 more 'etaile' eE&lanation of this *al*ulation
routine is given in Se*tion :.
:
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
9nother goal of the engine is to su&&ort *o'e (*om&onent file#DS( file) reuse to
minimi8e the 1ur'en &la*e' on the user. ,o su&&ort this goal- the e>uations use' in the
*om&onent files are varia1le s&e*ifie' e>uations- e.g.- E 4L(yFE) )here E M 6- y M7. In
this manner- the *y*les re>uire' to im&lement a *om&onent *an 1e &arameteri8e' for
many 'ifferent )aveforms. ,his a&&roa*h allo)s the same *om&onent *o'e to 1e reuse'
a*ross )aveforms an' DS(s )ith the user only s&e*ifying a han'ful of &arameters at runF
time (e.g.- filter length or *o'e rate).
Su*h an a&&roa*h re>uires the C! to 1e *a&a1le or rea'ing an' inter&reting e>uations
)ith varia1les (s&e*ifie' in the *om&onent file) an' values (s&e*ifie' in the &arameter
file). ,his means that the most *alle' routine in the C! is the routine )hi*h evaluates
these varia1leFs&e*ifie' e>uations. In fa*t- the vast ma/ority of the e>uations evaluate' 1y
the C! )ill 1e s&e*ifie' in this general fashion )ith only a han'ful of *al*ulations (e.g.-
SI<D *y*le re'u*tion- &o)er estimates- &ro*essing time estimates) )ill 1e har' *o'e'
into the engine. ,he metho' 1y )hi*h the C! &erforms this metho' is eE&laine' in
Se*tion :.
In general- any estimation )hi*h the engine ma@es 1ase' on the &rogramme'
s&e*ifi*ations for the *om&onent an' DS( )ill 1e inferior to a*tually han'F*o'ing an'
measuring the result. So to)ar's the goal of maEimi8ing a**ura*y from availa1le
information- the engine also su&&orts the use of estimations 1ase' on li1rary *o'e )hi*h
has either 1een 'evelo&e' 1y the user or some thir'F&arty ven'or for use on s&e*ifi*
DS(s. ,hus )hen the C! en*ounters a *om&onent#DS( &air for )hi*h a @no)n li1rary
eEists- the C! a1an'ons its normal *al*ulation routine an' instea' uses the e>uations
su&&lie' 1y the li1rary ven'or.
?
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
3 User Interface
,he follo)ing 'es*ri1es the in&ut interfa*e an' out&ut interfa*e for the user interfa*e.
3.1 Input Interace
9s *urrently 'efine'- the C! is *alle' via a file interfa*e )ith the follo)ing argumentsA
component_file_name
dsp_file_name
parameter_file_name
output_file_name
echo_flag.
If no arguments are &asse' to the C!- then the follo)ing 'efault values )ill 1e use'.
component_file_name M sample_component.txt
dsp_file_name = sample_dsp.txt
parameter_file_name M sample_parameter.txt
output_file_name M sample_output.txt
echo_flag = 1
,he follo)ing 'es*ri1es the re>uire' formatting for the *om&onent file- the 's& file- an'
the &arameter file. ,he out&ut file is 'es*ri1e' in Se*tion 6.4.
3.1.1 Comonent File Format
9 *om&onent file shoul' 1e formatte' as illustrate' in 2igure 6 an' 'es*ri1e' in the
follo)ing. 2ailure to a'here to this format )ill result in the C! returning a relevant error
message.
$
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
2igure 6A Sam&le Com&onent 2ile
Com&onent NameA EEEEE
(seu'oF*o'e 2ileA EEEEEEE
(re*isionA 1?
Re>uirementA 4
2iEe' Saturate
Num &arametersA 6
<eaningA
aA in&ut 'ata length
1A *onstraint length
*A rate
,otal 3&erations !>uation
<emory 9rithmeti* 9CS .oo&
Num 3&eration ,y&esA :
<emory
:- 6 a
<ulti&li*ation
:000- 10
9rithmeti*
4L(11L*)L(a1)- 6La 1
9CS
(11L*)L(a1)- * F 1
.oo&
(11L*)L(a1)- *4:La
Su1tra*tive <o'ifiersA 6
(9CS) 9CSA 4LaL1- 6L*
(.oo&) N3.A 4La- 4L1L*
(9rithmeti*) <9CA F4L*- 4
Synergisti* <o'ifiersA 1
(<emory)- 4- 9CS V.I=- target aL1- 6La
.i1rary Co'eA 1
IDA ,<S640?401
Co'e fileA EEEEEE
Cy*lesA (4L1L* a)
DataK<emoryA (4L1L* F a)
(rogramK<emoryA (6L1L* a)
,hese fiel's have the follo)ing restri*tions.
Com&onent NameA 9 string )ithout intervening )hites&a*e *hara*ters. ,he string )ill 1e
'is*ar'e' 1y the C!- 1ut )ill 1e useful for the 5%I.
(seu'oF*o'e 2ileA 9 string )ithout intervening )hites&a*e *hara*ters. ,he string )ill 1e
'is*ar'e' 1y the C!- 1ut )ill 1e useful for the 5%I.
(re*isionA 9n integer s&e*ifying the native 1it fiel' )i'th assume' 1y the *om&onent.
,his )ill 1e a re>uirement teste' 1y the C!.
Re>uirementA 9n integer s&e*ifying &ro*essor re>uirements (other than &re*ision)
assume' 1y the *om&onent. ,his is follo)e' on the neEt line 1y a )hites&a*e 'elimite'
list of re>uirements of length e>ual to the s&e*ifie' integer.
Num &arametersA 9n integer s&e*ifying the num1er of &arameters (varia1les) use' in the
*om&onentIs e>uations.
<eaningA 9 list of strings on se&arate lines formatte' as follo)s.
parameter_nameA description string.
+
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
,he engine is res&onsi1le for &arsing this string to eEtra*t the &arameter names an'
'is*ar' the 'es*ri&tions (useful in the 5%I). Values for these &arameters )ill 1e &asse' to
the engine in a 'ifferent file.
,otal 3&erations !>uationA 9 line )hi*h 'es*ri1es ho) the engine shoul' evaluate its
total o&erations in terms of its &rimary o&erations. ,he varia1le names use' in this
e>uation must 1e further s&e*ifie' as o&eration ty&e names later in this file.
Num 3&eration ,y&esA 9n integer )hi*h s&e*ifies the num1er of o&eration ty&es )hi*h
this *om&onent su&&orts. ,his num1er must 1e at least 6. ,his is follo)e' 1y a listing of
o&eration ty&e varia1le names )ith the o&eration e>uation an' &rogram memory e>uation
follo)ing on the su1se>uent line se&arate' 1y a *omma- e.g.-
operation equation- program equation.
,hese e>uations must 1e &arameteri8e' in terms of &arameters name' in the <eaning
fiel'. !>uations must 1e given for B<emoryC- B<ulti&li*ationC- an' B9rithmeti*C though
the e>uations for ea*h may 1e B0C.
Su1tra*tive <o'ifiersA 9n integer s&e*ifying the num1er of su1tra*tive mo'ifiers )hi*h
)ill alter the results of the e>uations liste' after the Num 3&eration ,y&es fiel'. ,his is
follo)e' 1y lines )hi*h s&e*ify the follo)ing for the num1er of su1tra*tive mo'ifiersA
,arget o&eration ty&e to mo'ify (e.g.- <emory)
Ne*essary DS( *a&a1ility to use this mo'ifier (e.g.- <9C)
9n e>uation )hi*h )ill 1e su1tra*te' from the o&eration ty&e e>uation )hen the
DS( *a&a1ility is &resent. Note that negative values )ill add o&erations to the
e>uation.
9n e>uation )hi*h )ill 1e su1tra*te' from the &rogram memory e>uation )hen
the DS( *a&a1ility is &resent. Note that negative values )ill add o&erations to the
e>uation.
!a*h su1tra*tive mo'ifier line is formatte' as follo)sA
(target_operation_type_name) DSP_capability operations_equation- program_equation

Synergisti* <o'ifiersA 9n integer s&e*ifying the num1er of synergisti* mo'ifiers for the
*om&onent. Synergisti* mo'ifiers are use' for estimations )hi*h are 'e&en'ent on the
simultaneous &resen*e of multi&le mo'ifiers )hi*h a DS( may have.
,his integer )ill 1e follo)e' 1y lines )hi*h 'efine the target o&eration ty&e- the num1er
of synergisti* mo'ifiers )hi*h must 1e &resent to use the mo'ifier ()hiteFs&a*e
'elimite')- an' the mo'ifier e>uation for o&erations an' the mo'ifier e>uation for
&rogram memory. ,his is formatte' asA
(target_operation_type_name)- number, requisite_modifiers, operation_equation, program_equation
"
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
,he synergisti* mo'ifiers are inten'e' to either replace )hatever *al*ulation may have
1een &erforme' &reviously for an o&eration ty&e or to modify the eEisting result. ,his is
su&&orte' via the @ey)or' BtargetC. =hen the synergisti* e>uation 'oes not in*lu'e the
)or' BtargetC- the eEisting result for the o&eration ty&e )ill 1e re&la*e'. =hen BtargetC is
in*lu'e'- the eEisting result )ill su1stitute' into the e>uation in &la*e of the )or'
BtargetC.
.i1rary Co'eA 9n integer )hi*h s&e*ifies the num1er of DS(s for )hi*h li1rary *o'e is
@no)n an' shoul' 1e use' for a more a**urate estimation. ,his is follo)e' 1y a listing of
@no)n li1rary *o'es formatte' as follo)sA
IDA 9 teEt string giving the name of a DS( to )hi*h the li1rary *o'e 1elongs.
Co'e fileA 9 teEt string giving the name of the file )hi*h 'o*uments the li1rary
*o'e. ,his )ill 1e 'is*ar'e' 1y the engine.
Cy*lesA 9n e>uation for the num1er of *y*les re>uire' 1y the DS( as
&arameteri8e' 1y the varia1les liste' in the Meaning fiel'.
DataK<emoryA 9n e>uation for the amount of 'ata memory )or's re>uire' 1y the
DS( as &arameteri8e' 1y the varia1les liste' in the Meaning fiel'.
(rogramK<emoryA 9n e>uation for the amount of &rogram memory )or's
re>uire' 1y the DS( as &arameteri8e' 1y the varia1les liste' in the Meaning fiel'.
3.1.2 !"# File Format
9 *om&onent file shoul' 1e formatte' as illustrate' in 2igure 7 an' 'es*ri1e' in the
follo)ing. 2ailure to a'here to this format )ill result in the C! returning a relevant error
message.
2igure 7A Sam&le DS( 2ile
DS( IDA ,<S640?404
Num1er Ca&a1ilitiesA 4
Saturate 2iEe'
Native (re*isionA 64
Clo*@ Rate (<H8)A 400
(ea@ (o)er (m=)A 4:00
Cy*le Divi'ers
V.I=KflagA 1
V.I=KmaEA :
V.I= <emoryA 4
V.I= 9.%A 7
V.I= <ultA 4
SI<DKflagA 1
<in (re*isionA 1?
Cy*le <o'ifiers
Num1er mo'ifiersA 7
Cir*ularK9''ressing
DitKReversalK9''ressing
9CS
N3.
!a*h of these fiel's have the follo)ing restri*tions.
DS( IDA 9 string giving the name of the DS(. ,his is use' 1y the engine )hen evaluating
if a *om&onent *an ma@e use of @no)n li1rary *o'e in its estimations.
10
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
Num1er of Ca&a1ilitiesA 9n integer s&e*ifying the num1er of *a&a1ilities the DS( has. If
nonF8ero- this )ill 1e follo)e' on the neEt line 1y a series of )hiteFs&a*e 'elimite'
strings listing the DS( *a&a1ilities. ,hese )ill 1e use' 1y the engine to evaluate if a DS(
*an su&&ort the *om&onent as 'esigne'.
Native (re*isionA 9n integer )hi*h 'es*ri1es the native 1itFfiel' )i'th of the &ro*essor.
,his is use' in SI<D *al*ulations an' to evaluate if a DS( *an su&&ort the *om&onent as
'esigne'.
Clo*@ Rate (<H8)A 9 'ou1le )hi*h gives the *lo*@ rate of the DS(. ,his is use' 1y the
engine to *al*ulate eEe*ution time.
(ea@ (o)er (m=)A 9 'ou1le )hi*h gives the &ea@ &o)er *onsum&tion of the DS(. ,his
is use' 1y the engine to *al*ulate energy *onsum&tion.
V.I=KflagA 9n integer ta@ing the values 0 or 1 )hi*h in'i*ate if the DS( shoul' 1e
*onsi'ere' a V.I= &ro*essor. V.I= in'i*ates the a1ility to su&&ort the issuan*e an'
eEe*ution of multi&le simultaneous instru*tions.
V.I=KmaEA 9n integer )hi*h s&e*ifies the maEimum num1er of simultaneous
instru*tions a DS( *an issue. If V.I=Kflag M 0- this value is 'is*ar'e'.
V.I= <emoryA 9n integer )hi*h s&e*ifies the num1er of simultaneous 'ata memory
o&erations )hi*h the DS( su&&orts. 2or the &ur&oses of the C! rea' an' )rite o&erations
are treate' as e>uivalent.
V.I= 9.%A 9n integer )hi*h s&e*ifies the num1er of arithmeti*#shifting units &resent
on the DS( su&&orts. 2or the &ur&oses of the C! shift an' 9.% o&erations are treate' as
e>uivalent.
V.I= <ultA 9n integer )hi*h s&e*ifies the num1er of units *a&a1le of multi&li*ation
&resent on a DS(. 9 <9C unit *ounts as a multi&lier unit- not an 9.% unit.
SI<DKflagA 9n integer ta@ing the values 0 or 1 )hi*h in'i*ate if the DS( shoul' 1e
*onsi'ere' an SI<D &ro*essor. SI<D in'i*ates the a1ility to simultaneously o&erate on
multi&le smaller )or's &a*@e' into a )or' of the native &re*ision. 2or instan*e
&erforming t)o 1?F1it multi&li*ations )ith 4 64F1it )or's.
<in (re*isionA ,he smallest )or' for )hi*h the DS( *an eE&loit SI<D.
Cy*le <o'ifiersA 9 list of strings use' to *hara*teri8e mo'ifiers the DS( has. ,his is use'
1y the C! to 'etermine )hen an e>uation shoul' 1e mo'ifie' for a &arti*ular DS(.
11
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
3.1.3 #arameter File Format
9 *om&onent file shoul' 1e formatte' as illustrate' in 2igure : an' 'es*ri1e' in the
follo)ing. 2ailure to a'here to this format )ill result in the C! returning a relevant error
message.
2igure :A Sam&le (arameter 2ile
9vaila1le !Ee*ution ,imeA 7
aA 40
1A 6
*A :
!a*h of these fiel's have the follo)ing restri*tions.
!Ee*ution ,imeA 9 'ou1le )hi*h 'es*ri1es the time availa1le to eEe*ute a *om&onent.
,his is 'is*ar'e' 1y the C!- 1ut is use' 1y the 5%I.
,his is follo)e' 1y a list of the &arameters an' their values. 9ll &arameter names must
*onform to the &arameters given in the *om&onent file an' there must 1e an e>ual
num1er of &arameters in the &arameter file an' the *om&onent file. (arameter names )ill
1e follo)e' 1y a *olon- )hiteFs&a*e an' then a 'ou1le giving the &arameterIs value. !a*h
&arameter a&&ears on a ne) line.
3.2 Output Interace
,he file out&ut 1y the engine has t)o 'ifferent out&ut formats 'e&en'ing on the su**ess
of evaluating the *om&onent on the engine. If the *om&onent *oul' 1e su**essfully
im&lemente' on the DS(- the out&ut file )ill a&&ear as sho)n in 2igure ?. !a*h string
)ill 1e follo)e' 1y a 'ou1le giving the asso*iate' estimation of the 'esire' &arameter
(*y*les- time- 'ata memory- &rogram memory- energy).
2igure ?A !Eam&le 3ut&ut 2ile )hen Su**essful
Su**ess
!stimate'KCy*lesA EEE
!stimateK,imeA EEE
!stimate'KDataK<emoryA EEE
!stimate'K(rogramK<emoryA EEE
!stimate'K!nergyA EEE
If unsu**essful- the routine )ill return a value of F1 an' the out&ut file )ill a&&ear as
sho)n in 2igure $ (assuming an out&ut file )as s&e*ifie'). ,he first string )ill 1e
B2ailureAC an' then after a )hiteFs&a*e- a string 'es*ri1ing the failure )ill 1e liste'. ,he
varying failure strings an' their meaning are 'es*ri1e' in
2igure $A !Eam&le 3ut&ut 2ile )hen Su**essful
2ailureA failure string
,a1le 1A 2ailure Strings Returne' 1y the C! in the 3ut&ut 2ile
2ailure String Signifi*an*e
Reserved Word, 'target', OtargetI )as liste' as a &arameter )hi*h is for1i''en
14
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
used as parameter name
Insufficient Precision Com&onentIs &re*ision P DS(Is &re*ision
DSP lacks a requirement Com&onent has a re>uirement for )hi*h the DS( 'oes not have
a mat*hing *a&a1ility
o !emor" #lassification No 3&eration ,y&e )ith the name B<emoryC )as foun'
Invalid Parameter ame in
Parameter $ile
(arameter in the &arameter file not foun' in *om&onent file
%perations &ist &acks
!emor"
No 3&eration ,y&e )ith the name B<emoryC )as foun'
%perations &ist &acks
!ultiplication
No 3&eration ,y&e )ith the name B<ulti&li*ationC )as foun'
16
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
$ "oftware %rc&itecture
,he follo)ing &resents a stru*tural vie) of the (C!, engine as im&lemente' in (ython in
terms of the soft)are stru*ture an' the file stru*ture. 2urther 'etails on the 1asi*
&ro*e'ural flo)- user interfa*e- an' 'esign of s&e*ifi* fun*tions are 'o*umente' in
Se*tions 4- 6- an' :- res&e*tively.
4.1 Sotware Structure
,he (C!, engine as im&lemente' in (ython *onsists of the follo)ing o1/e*ts
(res&onsi1ilities)A
Class=ave (han'ling )aveform *om&onent 'ata)
ClassDS( (han'ling DS( 'ata)
Class(ara (han'ling *om&onent &arameteri8ation 'ata)
9''itionally- the follo)ing @ey routines are 'efine' in the soft)areA
Cal*ulate (estimation)
!ngine<ain (initiali8e o1/e*ts- *all fun*tions- han'le errors- out&ut results).
Revie)ing the 1asi* o&eration of the *om&utational engine illustrate' in 2igure 4- the
!ngine<ain han'les all tas@s- eE*e&t for the follo)ing tas@sA
Rea'ing the in&ut files- )hi*h is han'le' 1y the Class=ave- ClassDS(- an'
Class(ara o1/e*ts for the *om&onent- DS(- an' &arameter files- res&e*tively
Cal*ulating results- )hi*h is han'le' 1y the Cal*ulate routine.
4.2 !ile Structure
,he (C!, *om&utational engine is im&lemente' using the follo)ing files
(res&onsi1ilities)A
engine.&y (sour*e *o'e for the *om&utational engine main routine)
engineK)ave.&y (*lass for )aveformK*om&onent han'ling)
engineK's&.&y (*lass for 's& han'ling)
engineK&ara.&y (*lass for *om&onent &arameter han'ling)
engineK*al*ulate.&y (&rimary *al*ulation &ro*e'ures)
!a*h of these files im&lements the fun*tions in'i*ate' an' 'es*ri1e' in ,a1le 4.
17
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
,a1le 4A 2un*tional Drea@'o)n 1y 2ile
2ile 2un*tions (arguments) (ur&ose
engine.&y
StringIn.ist (numKtoKsear*h-
stringKlist-
targetKstring)
2in's in'eE *orres&on'ing to a targetKstring in
a stringKlist
!ngine<ain(file=ave-file(ro*-
file(ara-
out&ut2ileName)
9ttem&ts to ma& the *om&onent 'es*ri1e' in
file=ave onto the DS( 'es*ri1e' in file(ro*
using the *om&onent &arameters store' in
file(ara. Results of this ma&&ing are store' in
out&ut2ileName
engineK*al*ulate.&
y
StringIn.ist (numKtoKsear*h-
stringKlist-
targetKstring)
2in's in'eE *orres&on'ing to a targetKstring in
a stringKlist
Cal*ulate(!C- DS(- &arams) Cal*ulates the *y*les- memory an' energy
usage 1ase' on the *om&onent information
store' in the !stimator Com&onent (!C)- DS(
(DS()- an' &arams..
!valuateString(in&utKstring- .-
varKnames- varKvalues)
!valuates a string (e>uation) )hi*h *ontains
varia1les 1y su1stituting in &asse' in values for
the varia1le names. 9ssumes that
varKvaluesGin'eEH *orres&on's to
varKnamesGin'eEH
9'/ustV.I=(!C- DS(-
*y*leK*lasses)
(erforms the V.I= *al*ulations for the
*al*ulation routine. Initial an' store' results in
*y*leK*lasses.
engineK's&.&y
ClassDS( AA KKinitKK(self-
filename)
Initiali8es a ClassDS( o1/e*t using the 'ata in
filename (see Se*tion 6.1.4)
ClassDS( AA hasK*a&a1ility(self- s) Che*@s to see if ClassDS( o1/e*t has a string in
its *a&a1ilityKlist )hi*h mat*hes the string s.
Returns true if su**essful- false other)ise.
ClassDS( AAhasKmo'ifier(self- s) Che*@s to see if ClassDS( o1/e*t has a string in
its su1tra*tiveKmo'ifiers list )hi*h mat*hes the
string s. Returns true if su**essful- false
other)ise.
engineK&ara.&y
Class(ara AA KKinitKK(self-
filename)
Initiali8es a Class(ara o1/e*t using the 'ata in
filename (see Se*tion 6.1.6)
engineK)ave.&y Class(ara AA KKinitKK(self-
filename)
Initiali8es a Class=ave (*om&onent) o1/e*t
using the 'ata in filename (see Se*tion 6.1.1)
,he engine.&y an' engineK*al*ulate.&y files 1oth 'e&en' on im&orting (in*lu'ing) other
files from the *om&utational engine. ,he 'e&en'en*ies 1et)een all files an' &ython
mo'ules in the *om&utational engine *an 1e visuali8e' as sho)n in the 'e&en'en*y
stru*ture matriE sho)n in ,a1le 6 )here an x in a *ell in'i*ates that the file name' in the
*ellIs ro) 'e&en's on the file name' in the *ellIs *olumn. 9n em&ty *ell in'i*ates that no
'e&en'en*y relationshi& eEists 1et)een the files.
1:
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
,a1le 6A 2ile De&en'en*y Stru*ture <atriE
o
s
s
t
r
i
n
g
m
a
t
h
e
n
g
i
n
e
K
'
s
&
.
&
y
e
n
g
i
n
e
K
&
a
r
a
.
&
y
e
n
g
i
n
e
K
)
a
v
e
.
&
y
e
n
g
i
n
e
K
*
a
l
*
u
l
a
t
e
.
&
y
e
n
g
i
n
e
.
&
y
os
string
math
engineK's&.&y E E
engineK&ara.&y E E
engineK)ave.&y E E
engineK*al*ulate.&y E E E E
engine.&y E E E E E
1?
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
' (e) *et&ods
,he follo)ing are @ey metho's to 1e 'evelo&e' in this &ro/e*t an' 'o*umente' in the
follo)ing su1se*tionsA
Com&onent Cal*ulation
V.I= 9'/ustment
String (e>uation) !valuation
3ther metho's (su*h as 2ile I#3) are *onsi'ere' to 1e suffi*iently 'o*umente' 1y the user
interfa*e 'es*ri&tion in Se*tion 6.
".1 #omponent #alculation
,his metho' is im&lemente' in the file engineK*al*ulate.&y in the fun*tion Calculate.
,his is the &rimary *om&utational metho' of the &rogram. It returns true if su**essful an'
false if it fails. If su**essful it sets the follo)ing valuesA
dou'le c"cles
dou'le computation_time
dou'le data_memor"(
dou'le prog_memor"(
dou'le energ"(
,he 1asi* flo) of the *om&onent estimation routine is sho)n in 2igure +. ,he &ro*ess
1egins 1y first verifying that the target DS( satisfies all re>uirements s&e*ifie' 1y the
*om&onent (s&e*ifi*ally liste' re>uirements an' &re*ision). If su**essful- the &ro*ess then
*he*@s to see if the *om&onent has a li1rary file for the target DS(- there1y ena1ling
*y*leFa**urate estimations )hen @no)n. If a li1rary is @no)n for the target DS(- the
asso*iate' e>uations for *y*les- 'ata memory- an' &rogram memory are then evaluate'.
If no li1rary is @no)n- a longer &ro*e'ure is re>uire'. 2irst- the &ro*ess evaluates the
3&eration ,y&e e>uations to ma@e a ra) estimate of o&erations.
<o'ifiers
,hen the &ro*ess runs through its list of @no)n mo'ifiers an' for ea*h mo'ifier in its list
for )hi*h the DS( is *a&a1le of im&lementing- the DS( evaluates the mo'ifierIs e>uation
an' su1tra*ts the result from the target o&eration ty&e estimate. ,his is then re&eate' for
&rogram memory. ,his ste& mo'els the effe*t of s&e*iali8e' *ir*uits in DS(s su*h as
<9Cs (<ulti&lyFan'F9**umulate) an' SingleF*y*le 1utterfly *ir*uits )hi*h &ermit
multi&le o&erations in a single *y*le.
SI<D
,he &ro*ess then *he*@s to see if the DS( su&&orts SI<D (SingleFInstru*tionF<ulti&leF
Data). =hen a DS( su&&orts SI<D- it is *a&a1le of &ro*essing several smaller &a*@e'
)or's insi'e of its native )or' )i'th. 2or eEam&le a *om&onent 'esigne' for 1?F1it
&re*ision im&lemente' on a 64F1it SI<D DS( *oul' &a*@ 4 1?F1it )or's into ea*h
o&eration. ,o mo'el this effe*t- the &ro*ess *he*@s to ensure that the DS(Is &re*ision is
1$
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
greater than the *om&onentIs &re*ision- an' if so- 'ivi'es all o&eration ty&e *y*le
estimates an' &rogram memory estimates 1y the ratio of the DS(Is &re*ision 'ivi'e' 1y
the larger of the DS(Is minimum &re*ision an' the *om&onent &re*ision. ,his *an 1e
eE&resse' as the follo)ing e>uation.
3&erations M 3&erations # floor(DS(K&re*ision#maE(DS(KminK&re*ision-
*om&onentK&re*ision))
(rogram <emory M (rogram <emory # floor(DS(K&re*ision #
maE(DS(KminK&re*ision- *om&onentK&re*ision))
Satisfies
Re9s3
Start
Throw
$ailure. E4it
0
5
:i" for
DSP3
5
E!aluate c;cles.
mem e9s.
Raw
<perations
0 Appl; Su".
=o#ifiers
Appl; S-=D
Calculate
=emor;
Appl; /:-
Appl;
S;nerg.
(c;cles)
E!aluate
time. energ;
En#
Satisfies
Re9s3
Start
Throw
$ailure. E4it
0
5
:i" for
DSP3
5
E!aluate c;cles.
mem e9s.
Raw
<perations
0 Appl; Su".
=o#ifiers
Appl; S-=D
Calculate
=emor;
Appl; /:-
Appl;
S;nerg.
(c;cles)
E!aluate
time. energ;
En#
2igure +A Dasi* 2lo) of Cal*ulation (ro*ess
<emory
,he &ro*ess then *al*ulates the re>uire' 'ata memory. Data memory is given 1y the
num1er of remaining o&erations of ty&e B<emoryC multi&le' 1y the 1y the DS(Is 1it
fiel' )i'th. ,hese ste&s *an 1e eE&resse' as sho)n in the follo)ing e>uations.
1+
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
Data <emory M <emory *y*les (1efore V.I=) E DS( Dit 2iel' =i'th
V.I=
Note that these memory estimates are &erforme' 1efore a&&lying a'/ustments for V.I=
(VeryFlong instru*tion )or'). ,his is 1e*ause V.I= is the &ro*ess of simultaneously
'is&at*hing an' eEe*uting multi&le instru*tions an' 'oes not alter the num1er instru*tions
use' in the im&lementation nor the num1er of a**esses to 'ata memory. Ho)ever- V.I=
'oes re'u*e the num1er of *y*les re>uire' to im&lement a *om&onent 1y fa*ilitating the
simutaneous eEe*ution of multi&le o&erations. De*ause the im&a*t of V.I= is highly
'e&en'ent on the ty&es of instru*tions use' 1y a *om&onent- the num1ers an' ty&es of
fun*tional units availa1le on the DS(- an' the maEimum num1er of simultaneously
'is&at*ha1le instru*tions- a'/usting *y*les for V.I= is a *om&li*ate' &ro*ess an' is
a''resse' in 'etail in Se*tion :.4.
Synergisti* !ffe*ts
9fter a'/usting the estimate' o&erations for V.I=- the &ro*ess then *onsi'ers the
synnergisti* effe*ts )hi*h o**ur )hen *om1inations of mo'ifiers are &resent. ,hese
mo'ifiers may in*lu'e the *om&onentIs s&e*ifie' mo'ifier list as )ell as if the DS( uses
SI<D an'#or V.I=. 2or ea*h synnergisti* mo'ifier &ossi1ility- there is a set of re>uire'
mo'ifiers- a target o&eration ty&e an' e>uations for a'/usting the *y*le an' &rogram
memory values in that o&eration ty&e. =hen a DS( satisfies all of the re>uire' mo'ifiers-
the asso*iate' synnergisti* e>uations are evaluate'.
%nli@e other e>uations- synergisti* e>uations su&&ort a varia1le name in a''ition to the
&arameter values 'efine' in the *om&onent J BtargetC. =hen BtargetC is not &resent- the
synnergisti* e>uation re&la*es the value in the o&erational ty&e estimate. =hen BtargetC is
&resent- the &revious value for the o&erational ty&e shoul' 1e su1stitute' into the e>uation
an' evaluate'. Note that )hen multi&le synnergisti* e>uations target the same o&erational
ty&e- they are evaluate' in the or'er liste' in the *om&onent file.
Cy*le !stimate
9fter evaluating the synnergisti* mo'ifiers- a *y*le estimate is forme' 1y summing all
o&eration ty&es *orres&on'ing to *y*le estimates.
(rogram <emory !stimate
9fter evaluating the synnergisti* mo'ifiers- a &rogram memory estimate is forme' 1y
summing all o&eration ty&es *orres&on'ing to &rogram memory estimates. ,his is then
multi&lie' 1y the DS( Dit 2iel' =i'th.
2inal Cal*ulations
,he &ro*ess *on*lu'es 1y *al*ulating the re>uire' *om&utation time an' energy
*onsum&tion. Com&utation time is given 1y the num1er of *y*le multi&le' 1y the DS(
*lo*@ rate or
*om&utationKtime M *y*les L DS( *lo*@ rate
1"
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
2or eEam&le 100 *y*les at a *lo*@ rate of 1 <H8 re>uires 100 L 1 eF? M 100 us.
!nergy is *al*ulate' as the &ea@ DS( &o)er *onsum&tion multi&lie' 1y the estimate'
*om&utation time. ,his formulation o&erates un'er the assum&tion that )hile the DS( is
in *al*ulation- it )ill 1e &erforming as many o&erations as it &ossi1ly *an.
energy M *om&utationKtime E (ea@ DS( &o)er *onsum&tion
2or eEam&le 100 us on a DS( )hi*h has a &ea@ &o)er *onsum&tion of 1000 m= is 100
us L 1000 m= M 100 uJ.
".2 $%I& 'djustment
,his metho' is im&lemente' in the file engineK*al*ulate.&y in the fun*tion d!ust"#$%.
=hen a'/usting the estimate' *y*les un'er V.I=- the system shoul' have a ve*tor of
*y*le estimations )ith ea*h element of the ve*tor asso*iate' )ith one of the 'e*lare'
3&erational ,y&es. ,)o elements of this ve*tor must 1e B<emoryC an' B<ulti&li*ationC.
,his &ro*ess *lassifies the remaining o&erations as B3therC )hi*h loosely *orres&on's to
o&erations )hi*h )oul' 1e eE&e*te' to 1e &erforme' 1y 9rithmeti* .ogi* %nits (9.%)
in the DS(s. (2or &ur&oses of this im&lementation- 1arrel shifters are treate' as 9.%s).
9s illustrate' in 2igure "- the &ro*ess 1egins 1y verifying that the target DS( su&&orts
V.I= o&erations (simultaneous eEe*ution of multi&le instru*tions). If su**essful- it then
i'entifies the *y*les asso*iate' )ith the three 1roa' *lassifi*ations (<ulti&li*ation-
<emory- an' 3ther) an' fet*hes the maEimum num1er of V.I= instru*tions the DS(
*an 'is&at*h (store' in d)- the maEimum num1er of simultaneous memory instru*tions-
multi&li*ation instru*tions- an' 9.% (other instru*tions) (store' in '1- '4- '6-
res&e*tively). ,he *y*le *lasses are then a'/uste' 'ivi'ing 1y the *lasses 1y the smaller of
the maEimum num1er of all ty&es of instru*tions an' the maEimum num1er of *lassF
s&e*ifi* instru*tions.
9 6F1it flag ve*tor (C2) is then forme' 1y *he*@ing to see if ea*h *lass of *y*les has
non8ero *y*les (true M 1- false M 0). ,he eight &ossi1le *om1inations are then evaluate' to
'etermine if the DS( *oul' simultaneously su&&ort multi&le *lasses of instru*tions. =hen
no or only one *lass of *y*le is &resent (C2 M 0-1-4-7)- no further a'/ustments are ma'e.
=hen only t)o *lasses of *y*les are &resent (C2 M 6-:-?)- simultaneous eEe*ution of 1oth
*lasses is *he*@e' for feasi1ility. If feasi1le- they are assume' to 1e im&lemente'
simultaneously- there1y re'u*ing the re>uire' *y*les 1y a fa*tor of 4.
40
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
DSP is
/:-3
Start
E4it
0
5
Compute =ult.
=em. an# <ther
C;cles
# 1 ma46/:-
#11/:-6mem
#, 1 /:-6=ult
D( 1/:-6A:>
=em 1 =em ? min(#.#1)
=ult 1 =ult ? min(#.#,)
<ther 1 <ther ? min(#.#()
=em6flag 1 =em?ma4(=em.1)
=ult6flag 1 =ult?ma4(=ult.1)
<ther6flag 1 <ther ? ma4(<ther.1)
C$ 1 *@<ther6flag A ,@ =ult6flag
=em6flag
C$ 1 +.
1.,. or *
E4it
5
C$ 1 (
##1A#,
=em 1 =em ? ,
=ult 1 =ult ? ,
E4it
##1A#,
=em 1 =em ? ,
=ult 1 =ult ? ,
E4it
C$ 1 2
##1A#(
=em 1 =em ? ,
<th 1 <th ? ,
E4it
C$ 1 2
##1A#(
=em 1 =em ? ,
<th 1 <th ? ,
E4it
##1A#(
=em 1 =em ? ,
<th 1 <th ? ,
E4it
C$ 1 B
##(A#,
=ult 1 =ult ? ,
<th 1 <th ? ,
E4it
##(A#,
=ult 1 =ult ? ,
<th 1 <th ? ,
E4it
C$1'
0 0 0 0
E4it
E4it
E4it
0 0
0
5 5 5
2igure "A V.I= 9'/ustment Cal*ulation
=hen all three *lasses of *y*les are &resent (C2 M $) a more *om&li*ate' &ro*ess is
re>uire' as sho)n in 2igure 10. If all three *lasses *an 1e feasi1ly im&lemente'- they are
assume' to 1e im&lemente' simultaneously- there1y re'u*ing the re>uire' *y*les 1y a
fa*tor of 6. If this is not &ossi1le- then the routine attem&ts to fin' the t)o *lasses of
*y*les )ith the largest num1er of *y*les &resent. ,he largest feasi1le &air of *lasses is
assume' to 1e im&lemente' simultaneously- there1y re'u*ing the re>uire' *y*les for
those *lasses 1y a fa*tor of 4.
41
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
C$1'
##1A
#,A#(
=em1=em?(
=ult 1 =ult ? (
<th 1 <th ? (
E4it
R (!ect) 1
rank(mem.
mult. other)
#6R 1
(#1.#,.#()
sorte# "; R
##6R718A
#6R7,8
#6c;cles718 1 #6c;cles718?,
#6c;cles7,8 1 #6c;cles7,8?,
E4it
#6c;cles 1
(=em.=ult.<th)
sorte# "; R
##6R718A
#6R7(8
#6c;cles718 1 #6c;cles718?,
#6c;cles7(8 1 #6c;cles7(8?,
E4it
##6R7,8A
#6R7(8
E4it E4it
#6c;cles7,8 1 #6c;cles7,8?,
#6c;cles7(8 1 #6c;cles7(8?,
5
0
5 5
5 0
0
0
2igure 10A V.I= &ro*essing for the *ase )here <emory- <ulti&li*ation- an' 9.% *y*les
are all &resent (*ontinue' from 2igure ").
".3 String (e)uation* +valuation
,his metho' is im&lemente' in the file engineK*al*ulate.&y in the fun*tion
&'aluateString.
,his metho' is res&onsi1le for evaluating a string )hi*h *orres&on's to one of the
e>uations in use in the *om&onent 'efinition. It is inten'e' to su&&ort the runFtime
evaluation of e>uations )ith ar1itrary varia1le names an' values. ,he 1asi* stru*ture of
the fun*tion ta@es the follo)ing formA
double = !valuateString(string, num_variables, variable_names,
variable_values)
,his metho' evaluates an in&ut string. ,he metho' &arses the in&ut string to re&la*e
varia1les i'entifie' in varia1leKnames list )ith the values ('ou1les) in varia1leKvalues
an' evaluates the resulting e>uation. ,his metho' is >uite *om&li*ate' to im&lement in
C- 1ut is trivial in (ython )hen using the eval() metho'. Dy &assing in the varia1le
numKvaria1les- )e are a1le to )or@ )ith su1stitutions of su1sets of the varia1les. ,his
sim&lifies the han'ling of synergisti* e>uations.
44
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
+ "uort for Later Ugrading
,he (C!, *om&utational engine *an 1e rea'ily eEten'e' to su&&ort a''itional DS(s an'
*om&onents- 2(59s- 'ifferent metho's for interfa*ing )ith the &rogram- an' ne)
*al*ulations.
,.1 -ew DSPs or #omponents
,he (C!, *om&utational engine )as 'esigne' to fa*ilitate the estimation of
*om&utational resour*es for DS(s an' *om&onents not in*lu'e' in its initial 'e&loyment.
,hese *an 1e *reate' sim&ly 1y follo)ing the file formats 'es*ri1e' in Se*tions 6.1.1 an'
6.1.4 to 'es*ri1e the ne) *om&onents an' DS(s in a manner the engine un'erstan's.
,he suggeste' metho' for *reating a ne) *om&onent file is the follo)ing.
1. =rite a 'etaile' 'es*ri&tion of the *om&onent follo)ing the *om&onent &seu'oF
*o'e gui'elines 'es*ri1e' in the (C!, Com&onent Des*ri&tion Do*ument 1eing
sure to *a&ture every o&eration. ,his 'es*ri&tion shoul' 1e &arameteri8e' 1y
)hatever &arameters the *om&onent shoul' su&&ort.
4. Categori8e the o&erations in the &seu'oF*o'e- ensuring that memory an'
multi&li*ation *lasses are use'.
6. Revie) the (C!, DS( Des*ri&tion Do*ument an' i'entify )hi*h su1tra*tive
mo'ifiers a&&ly to the &seu'oF*o'e an' 'efine su1tra*tive e>uations. 9t the same
time 'efine synergisti* e>uations )here *om1inations of effe*ts are not a''itive.
7. Revie) @no)n DS( *o'e li1raries (see the DS( Des*ri&tion Do*ument for
li1raries for an initial listing) an' see )hi*h DS(s a&&ly.
,he suggeste' metho' for *reating a ne) DS( file is the follo)ing.
1. 2in' 'o*umentation on the DS( ar*hite*ture- instru*tion set- &o)er *onsum&tion-
an' *o'e li1raries.
4. 2rom the &o)er *onsum&tion 'o*umentation to fin' a &ea@ &o)er *onsum&tion
estimate.
6. 2rom the instru*tion set- i'entify all instru*tions )hi*h eEe*ute t)o or more
o&erations in a single *y*le. <any eEam&les of this are in*lu'e' in DS(
Des*ri&tion Do*ument. 9lso note if the DS( su&&orts SI<D o&erations for its
multi&li*ation an' 1asi* arithmeti* o&erations. If it 'oes so- then it im&li*itly
su&&orts it for 'ata memory a**esses.
7. 2rom the DS( ar*hite*ture 'o*umentation (an'#or instru*tion 'o*umentation)
i'entify the maEimum num1er of instru*tions )hi*h *an 1e simultaneously
eEe*ute'. ,his is V.I=KmaE. I'entify similar num1ers for 9.%- memory- an'
multi&li*ation o&erations.
:. Revie) the *o'e li1raries to i'entify )hi*h *om&onents shoul' use measure'
num1ers for the DS(. I'entify if *oF&ro*essors eEist (e.g.- a ,ur1o 'e*o'er *oF
&ro*essor). ,hese shoul' 1e treate' as a *o'e li1rary.
,.2 Support or !PG's
9''ing su&&ort for 2(59s to the *al*ulation engine )ill not 1e a straight for)ar'
&ro*ess as the use a ra'i*ally 'ifferent ar*hite*ture than DS(s- 1ut then eEhi1it mu*h less
46
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
variation in &ro*essing fa1ri* 1et)een 2(59s mostly 'iffering in routing stru*tures an'
)hat is em1e''e' into the fa1ri* (some in*lu'e multi&liers- some have full &ro*essors-
an' some have *oF&ro*essors li@e DS(s). Ignoring routing- &la*ement- an' *oF&ro*essor
*onsi'erations- similar resour*es *oul' 1e eE&e*te' to 1e use' )hen moving from one
2(59 to another- 1ut ra'i*ally 'ifferent results )ill 1e seen )hen 'ifferent relative
)eights are given to area- s&ee'- an' memory in the o&timi8ation &ro*esses.
It seems li@ely that a''ing 2(59s )ill suffi*iently 'ifferent that referring to the &ro*ess
as an Bu&gra'eC )oul' 1e mislea'ing. Ho)ever- it seems reasona1le that the same 1asi*
in&ut interfa*e )ith the 5%I *oul' 1e &reserve' (s&e*ifying target &ro*essor- *om&onent-
an' &arameters)- though the out&ut interfa*e might have to *hange (to s&e*ify fa1ri* an'
em1e''e' elements 1eing *onsume' in the ma&&ing an' eliminate &rogram memory).
,.3 Dierent .et/ods or Interacing wit/ t/e Program
It later in*arnations- it may 1e 'esire' to *hange the *urrent engine interfa*e. In general-
this )ill re>uire mo'ifying the main routine.
,he main routine *an 1e eliminate' all together if the *om&onent#DS( files )ere har'
*o'e' as (ython o1/e*ts. ,he interfa*ing entity )oul' then a*t li@e the main routine in
&assing the o1/e*ts to the *al*ulation routine.
,.4 Dierent !ile !ormats
9 se&arate routine is in*lu'e' to han'le the *om&onent- DS(- an' &arameter files.
Changing these formats re>uires that these routines 1e mo'ifie'. Su&&ort for multi&le file
formats *oul' 1e 'efine' 1y im&lementing ne) file han'ling routines for the res&e*tive
'ata sour*es an' then a''ing an a''itional argument to the main routine to s&e*ify file
formats or 1y )riting a master file han'ling routine for ea*h )hi*h auto'ete*ts the file
format 1eing use'.
47
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
, Integration into Ot&er #ac-ages
=hile the engine is 'esigne' to o&erate as a stan'Falone &a*@age- there are t)o relatively
straight for)ar' metho's for integrating the engine into other &a*@ages.
0.1 Integration via main ile /andling interace
,he engine *an 1e easily integrate' into any eEternal &a*@age 1y using the main engine
interfa*e. In su*h a s*enario the eEternal &a*@age *alls the engine )hile s&e*ifying the
*om&onent- DS(- an' &arameter files the engine shoul' use for its estimation an' then
rea's the resulting out&ut file.
,his *an 1e a**om&lishe' 1y using the in&ut interfa*e s&e*ifie' in Se*tion 6.1 an' *alling
a *om&ile' version of the engine or 1y 'ire*tly *alling the main routine from )ithin the
(ython environment. ,his a&&roa*h re>uires the least amount of un'erstan'ing of the
inner)or@ings of the engine.
0.2 Integration via managing engine classes
(ython 1ase' eEternal &a*@ages *an more 'ire*tly interfa*e )ith the engine *o'e an' *an
in fa*t 'ire*tly *all the *om&onent- DS(- &arameter- an' *al*ulation routines. =hen s&ee'
is of *riti*al im&ortan*e (i.e.- )hen realFtime estimates are nee'e')- 'ire*tly *alling these
routines )oul' 1e the &referre' metho'.
In su*h a setu&- the eEternal &a*@age shoul' maintain *om&onent- DS(- an' &arameter
o1/e*ts instea' of *om&onent- DS(- an' &arameter files- 'ire*tly *all *al*ulate routine-
an' then a**ess the results store' in the *om&onent o1/e*t.
0.3 Integration wit/ a G1I
9 5%I )ill ty&i*ally 1e res&onsi1le forA
I'entifying )hi*h *om&onents an' DS(s
5enerating &arameters for the *om&onents
<anaging the files for *om&onents- DS(s- an' &arameter files. ,his is trivial for
*om&onents an' DS(s- 1ut &arameter files nee' to 1e )ritten as they are 'efine'
in the 5%I.
<anaging the *alls to engine in*lu'ing inter&reting an' 'is&laying the results-
&refera1ly allo)ing *om&arisons of results 1et)een ma&&ings of *om&onents
a*ross 'ifferent DS(s.
!ither integration a&&roa*h *oul' 1e use'- 1ut 1e*ause of the nonFrealFtime nature an'
the &ossi1ly mu*h greater set of DS(s that )oul' nee' to 1e manage' than )oul' 1e
eE&e*te' in realFtime a&&li*ations em1e''e' on a ra'io- the sim&ler file interfa*e metho'
a&&ears &refera1le.
4:
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
0.4 Integration wit/ a #ognitive +ngine
Consi'er a *ognitive SDR s&e*ulatively trying 'ifferent &arameteri8ations as gui'e' 1y a
geneti* algorithm. ,o evaluate the fitness of various solutions these novel )aveform
&arameteri8ations are teste' in internal mo'els an' the results measure'. In this *ase- the
ra&i' estimation of the (C!, *om&utational engine is an i'eal mo'el for estimating the
im&a*t of &ossi1le a'a&tations on &o)er *onsum&tion an' to estimate the feasi1ility of
)aveforms generate' 1y the *ognitive engine. De*ause of the *riti*al re>uirement for
s&ee' (nee'e' to tra*@ an' eE&loit ra&i'ly *hanging o&erating *on'itions)- this )oul'
li@ely nee' to 1e 'one via 1y 'ire*tly managing engine *lasses.
Ho)ever- the inherent s&ee' limitations of (ython im&ly that the engine )ill li@ely nee'
to 1e &orte' to a 'ifferent language more amena1le to em1e''e' &ro*essing to ma@e it
suita1le for integration )ith 'e&loye' *ognitive engines.
0." Integration wit/ a &aveorm Partitioner
,he re>uire' eEe*ution time for a )aveform &artitioner falls some)here 1et)een that of
a 'esign 5%I an' that of an em1e''e' *ognitive engine. =hen the &artitioner is &art of a
'esign tool- itIs o&eration is analogous to that of the 5%I- eE*e&t that the set of availa1le
&ro*essors is &re'efine'. In su*h a *ase the main fileFhan'ling interfa*e shoul' 1e use' to
minimi8e 'evelo&ment time. In an em1e''e' system- eEe*ution time is more *riti*al than
*o'eF'evelo&ment time so interfa*ing )ith the engine 1y 'ire*tly managing *ognitive
engine *lasses seems more a&&ro&riate- es&e*ially in light of the fa*t that &otential DS(s
)ill largely 1e un*hange' from instantiation to instantiation an' a uni>ue
&arameteri8ation for ea*h *om&onent )ill alrea'y eEist.
Ho)ever- 1e*ause of the generally long times re>uire' to s)it*h 1et)een )aveforms- this
is li@ely not an a1solute ne*essity.
4?
(C!, Com&utational !ngine Design Do*ument Version 1.1 1#10#0+
James Neel- Cognitive Ra'io ,e*hnologies- ..C /ames.neel0*rt)ireless.*om
. /eferences
G0H J. Neel- (. Ro1ert- J. Ree'- Q9 formal metho'ology for estimating the feasi1le
&ro*essor solution s&a*e for a soft)are ra'io-C SD( )orum *echnical Conference +,,--
&a&er R 1.4F06. 9vaila1le onlineA http://www.sdrforum.org/pages/sdr05/1.!0"e#onfigurable
!0$ardware/1.%0&!0'eel!0et!0al.pdf
4$

Você também pode gostar