Assignment 1 Graph

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

COL719SynthesisofDigitalSystems

ISemester201617
Assignment1:NetlistandGraphs
SubmissionDeadline:11August2016,23:55PM

TheobjectiveofthisassignmentistolearnabouttheGraphdatastructure,anduseittomodela
gatelevelnetlist.

1. Readanetlistintoagraph.ThefirsttaskistowriteaC++programforreadinganetlistinto
agraphdatastructure.Assumethatthenetlistisgivenbytheuserinafilethatyouwillread
intoyourprogram.Theformatofthenetlistisasfollows:

AXYZ
XPQ
BYP

Thefileconsistsofasetoflines,eachlinespecifyinganet/wireconnectingonesourceand
ansetofdestinationsasfollows.
<source><dest1><dest2><dest3>...
Inthenetlistabove,AXYZmeansthattheoutputofgateAisconnectedtotheinputsof
gatesX,Y,andZ.ThepresenceofYintwodifferentdestinationlists(lines1and3)means
thatYhastwoinputsoneconnectedtoA,andtheothertoB.Primaryinputsaremodelled
asjustadummygatewithnoinput.Primaryoutputsarerepresentedbygatesthatarenot
connected to any other input. Note that we are assuming that each gate has only one
output.
2. Printnetlistproperties.Forthenetlistthatisnowstoredinyourgraph,printthefollowing:
a. thesetofprimaryinputs
b. thesetofprimaryoutputs
c. thesetofinternalgates(whichisjustthesetofgatesthatareneitherprimaryinputs
norprimaryoutputs).
d. thegatecount(excludeprimaryinputs).
3. Perform Timing Analysis. A timing analysis of the netlist should report the critical path,
consisting of the maximum number of gates on any path between a primary input and
primaryoutput(includingboth).Traverseyourgraphandreportthecriticalpath.

NOTES:

1. Makeyourownassumptionsifyouseeambiguitiesinthespecificationanywhere.
2. Rememberthattheobjectivehereistofamiliariseyourselfwiththesoftwareandlibrary
packages.Efficiencyofthetiminganalysisisoflowerpriority.However,thealgorithmneeds
tobecorrect.
3. UsetheMoodlesystemtopostqueriessothatweanswerthesamequestiononlyonce.This
modeofinteractionispreferredtoemail.Wewillanswergeneralinstallationrelatedqueries
onlywithin5daysoftheassignmentbeingposted.Wewontansweranyqueriesinthelast
3daysbeforetheassignmentdeadline(remember:makeyourownreasonable
assumptions).

InstructionsforusingtheOGDFGraphPackage
LokeshSiddhu,TeachingAssistant

1. InstallationInstructionsforOGDF:
Linkhttp://www.ogdf.net/doku.php/tech:installgcc
2. StartupExamples:
Linkhttp://www.ogdf.net/doku.php/tech:howto:manual
InthisexampleinsteadofusingGMLformatoutput,useSVGformat.Use
GraphIO::drawSVG(GA,manual_graph.svg).

3. HowtorunaprogramwithOGDFlibrariesincluded:
(AssumingOGDFinstallationlocationtobe/home/siddhulokesh/sem4/TA/OGDF)
g++I/home/siddhulokesh/sem4/TA/OGDF/includeO2test.cppotest
L/home/siddhulokesh/sem4/TA/OGDF/_releaselOGDFlCOINpthread

You might also like