Upload
darkmasterzorc
View
53
Download
0
Embed Size (px)
Citation preview
This documen
This m
nt is under revisi
manual is Rep
ion. Your feedba
Departmen
ECEDig
for the exproduction
ck is valuable! P
ntofElectric
E124italCircu
xclusive un for any
Sp
lease send your
calandCom
LabMuitsand
use of regother pur
ring2014
comments to Mo
mputerEngin
ManuadSystem
istered strpose is p
ohamed Ahmed:
neering
alms
udents in rohibited.
m2sadek@uwat
the cours.
terloo.ca
se.
1 Introdu1.1 Fie1.2 Alt1.3 DE
1.3.1 1.3.2
1.4 VH2 Lab 1 –
2.1 Pre2.2 VH
2.2.1 2.2.2
2.2.22.2.2
2.2.3 2.2.4 2.2.5 2.2.6 2.2.7
2.3 De2.4 Po
3 Lab 2 –3.1 Pre3.2 La3.3 Po
4 Lab 3 –4.1 Pre4.2 Sc4.3 La4.4 Po
5 Lab 4 –5.1 Pre5.2 La
5.2.1 5.2.2 5.2.3
5.3 Po6 Lab 5 –
6.1 Pre6.2 La6.3 Sim6.4 Po
7 Append
ction eld Programmera Quartus
E2 FPGA boLight Emit7-Segmen
HDL basics – Design entelab
HDL design ePin assignAdding VH
2.1 Underst2.2 Underst
CompilingSimulationTiming anProgrammTest the d
esign your owost-lab – Combinatioelab b requireme
ostlab – Combinatioelab hematic desb requireme
ostlab – Sequential elab b requireme
Step 1: CrStep 2: TrSimulation
ost-lab – Sequential elab b requirememulation ost-lab dix I – DE2 p
ECE124
mable Gate s-II FPGA deard periphertting Diodes nt display
try using Alte
entry using Anment HDL codes tanding VHDtanding the V
g the design n alysis
ming the FPGdesign on DEwn circuit – C
onal circuits;
ent – ALU VH
onal circuits;
sign entry usent – EC sch
circuits; Tra
ent reating a seqraffic Light Cn
circuits; Adv
ent
pin assignme
LabManualhttps://ece.u
Table
Arrays (FPGesign softwarals (LEDs)
era Quartus-
Altera Quart
DL structure VHDL code for the FPG
GA E2 board Car-Controll
; Arithmetic L
HDL design
; Elevator Co
sing Altera Qematic desig
affic Light Co
quence of syController
vanced TLC
ent file
‐DigitalCircwaterloo.ca/~
2
of Conte
GAs) re
-II
us-II
A
er
Logic Unit -
ontroller – S
Quartus-II gn
ontroller – V
ynchronized
C – VHDL de
cuitsandSyst~ece124/
ents
VHDL Desig
Schematic de
HDL design
events
esign
tems
gn
esign
3 4 5 5 6 6 6 7 7 7 7 8 8 8 9 9
11 12 12 12 13 14 14 14 16 17 17 17 18 19 20 21 21 21 23 24 25 26 26 26 28 28 29
1 Introd
TheLabExpexperiment
1. Apre2. A th
debu3. Afin
labr4. Abso
room5. You
resu
Eachworkst
1. Altermult
2. Alter
Inthissectio
duction
perimentsarhasseveralp
elabwillinclree‐hour labuggingisdonnalreport,onreportswillloolutely no fomwillbeclosmustmakealtinagrade
tationinthe
ra DE2 BoatitudeofperiraQuartus‐II
onyouarego
ECE124
redoneingrparts:
ludemateriaboratory sesne.neday(24‐Hoosemark10ood or drinksedafterhouareasonableofINComple
ECE124lab
rd housingipheralcompIFPGADesig
oingtobebri
LabManualhttps://ece.u
roupsoftwo
altoread,andsion during
our)afteryo%perday.T
k in the laboursiftheruleeattemptattete.
isequipped
a Cyclone IponentsgnSoftware
ieflyintrodu
Figure1
‐DigitalCircwaterloo.ca/~
3
.Findalabp
dacircuittowhich help
ourdemo,regThereisaLatratories. Doescannotbefthelabsino
with:
II Field Prog
cedtheon‐b
TheDE2board
cuitsandSyst~ece124/
partnerass
design.is available
gardingthegte‐Submissionot leave thfollowed.ordertopass
grammable
boardcompo
d
tems
oonaspossi
, progress is
guidelinesinonDropBox.he doors or
sthecourse.
Gate Array
nents.
ible.Eachlab
s demonstra
thelabman.windows op
Failuretod
(FPGA) chi
boratory
ated, and
nual.Late
pen. The
osowill
p and a
1.1 Field
A FPGA is afunction.Malookuptheatosolveequmemoryblo
As not all erequiringsigin a particubetweenCLB
d Program
a Field ProgranyFPGAssianswertoequations;but tcks.
equations hagnalstoberoular FPGA, dBs,andhow
ECE124
Figure
mmable Ga
rammable Gimplyusesmquationsof4thishasbee
ave as littleoutedbetwedepends upowelladesign
LabManualhttps://ece.u
e2 FPGAbloc
ate Arrays
ate Array; bmallblockso4or5variabln replacedw
as 4 variabentheCLBs.n the speedncanbe"laid
‐DigitalCircwaterloo.ca/~
4
ckdiagramofD
s (FPGAs
basically an aofmemory,cles.InthepawithCLB'sa
bles; typicalJusthowmud of CLBs, thdout"oropti
cuitsandSyst~ece124/
DE2board
s)
array of gencalledCLBs(ast,AND&Oas theyarem
designs wiluchcircuitryhe amount oimized.
tems
neric gates t(CombinatioRgateswoumore flexible
ll be spreadythereis,andof resources
to perform analLogicBlldbeintercoeandcanbe
d over severdhowfastits for routing
any logicocks), toonnectedusedas
ral CLBs;willrun,g signals
NewerFPGAmultipliersabuilt.
Configurablememorybloconfiguredbflexiblesinceare differenhardwarereallowhardw
1.2 Alter
Quartusisathehardwarthefollowing
Desioo
Desimust
o
o
o Circu
requsimuagainappe
Timtiminbeinspee
Progthe doutp
1.3 DE2
The DE2 boSDRAM,SRA
Asare tailoreandadders,
e interconneocks for thebyuploadingeitisabletont that micrealizedbythwaretobebu
ra Quartu
fullFPGAderedesignandgstages:
ignEntry:alo Hardwaro Schemat
interconncreatedh
ignCompilatperformcoo Analysis
downanthatdesig
o Placeanthrought
o AssembluitSimulatiuired. The sulator is fednst time toearontheciringAnalysisngconstraing able to baedsupdesigngrammingthdesign. Theputs
FPGA bo
oard is equipAMandflash
ECE124
ed forspecifwhichruna
ects are provCyclone II Fgaprogrammorealizediffeoprocessorshechipbypriltwithnear
us-II FPGA
esignsoftwardtargetingit
lowsthedesreDescriptitic Entry: bnectsimplechardwaremoation:OncetmpilationwhandSynthedmapped tognlogicisimndRoute: actheprogrammly:aprogramion:Inorderimulation stwith the dthe circuit urcuitoutputss: It gives antscanbemeallpark how fntime.heFPGA:Incircuit can
oard perip
pped with pmemorychi
LabManualhttps://ece.u
ficcircuits.Tat250MHz,a
vided betweFPGA).The lomingfiletoterentdigitalcor microco
rogrammingrlythespeed
A design s
resuite.Itaitforacertain
signertoenteionLanguagby connectincomponentsodulesthedesignhahichwilltakeesis:AHDLoo thedevicemplementedvctualplacememableintercmmingfileisrforadesigntep ensuresesign descriunder test. Tsaswaveformn accurate inet.Electronicfast a design
thisstepthebe physicall
pherals
peripherals tips,SDcards
‐DigitalCircwaterloo.ca/~
5
TheCycloneallowingultr
en the chipogic, circuitrtheFPGAchcircuitsbyupontrollers beit.Sinceharofsoftware
software
dsthedesignnAlteraFPG
erahardwarge:suchasVHng blocks osuchassimp
asbeenspecethedesignorschematicresources (viatheavailaentofdesignconnectiontaproducedsonertoverifytthat the ci
iption files aThe simulatomsalsoagainndication ofccircuitsalwnworkswith
eprogramminly tested aft
hat can be usocket,audio
cuitsandSyst~ece124/
IIFPGA,whra‐fastdigital
resources (ry, and interhip.Thispropploadingadecause the drdwareisalwdevelopmen
nerthroughAchip.Thed
redesignspeHDLorVerilof ranging cplelogicgat
cifiedandenthroughvaricfileisanaly(CLBs, flip floableresourcenoncertainakeplaceintothatitcanbthefunctionaircuit operatand waveforor then pronsttime.f how fast thwayshavesphout having
ngfileisuploterwards by
used to creaoCODEC,VGA
tems
hich is inourlsignalproc
(CLBs, hardwrconnects inpertymakesifferentprogdesigner iswaysfastertnt.
thedifferentdesignproce
ecificationusog(weuseVcomplexity.tes,ortointe
nteredintothioussteps:yzedandtheops,memoryesonthetargndevice resothisstepbeuploadedtalityoftheirtes in the erms describiduces the lo
he circuit runpeedrequiremtobuild and
oadedtothey applying in
ate various aAdigitaltoo
r labs,hashcessingcircu
waremultiplthe architecstheFPGAcgrammingfilable to chathansoftwar
tstagesofdeessproceeds
sing:VHDL)It can beerconnectpr
hetool,thed
ehardwareisy elements,getchipourcesandro
totheFPGAcrdesignsimuexpected maing the inpuogic values t
ns, and if spmentstobedmeasure it
eFPGAchiptnputs and ob
applicationsoutputconve
ardwareuits tobe
liers andcture arechipverye.FPGAsange thereFPGAs
escribingthrough
used toreviously
designer
sbroken.. etc) so
outing it
chipulationisanner. Aut valuesthat will
peed andmetandt greatly
torealizebserving
such asertorand
many othersinputsandth
1.3.1 Ligh
LEDs are ellamps.TheA
1.3.2 7-Se
A7‐segmenLEDdisplaybinarynumb
The 7‐segmnumbers0tuniquelydis
1.4 VHD
VHDLisalathenconvertwomainlanasSystemCup tables (Scomplexandprovidedexcan't undersdesignwilldcircuitryand
s. For the puhefollowing
ht Emittin
ectronic comAlteraDE2bo
egment dis
tdecoder tasothataperber.
ent displayto9,andlettsplaynumber
DL basics
anguageusedtsthisintoanguagesinuandrecentlySELECTstatedwasoriginamplesandstand how tdowhatyouddesign.
ECE124
urposes of thperipherals
ng Diodes (
mponents whoardhasman
splay
akesan inpursoncansee
is so calledtersAtoF,crsandthatis
dbyahardwacircuittobese;theotherySystemVeriement), counallydesignestickwithwhe CAD tooluexpect.Bec
LabManualhttps://ece.u
he labswe afordisplayin
(LEDs)
hich can emnyoutputsb
t, typicallyaanumberor
because it ianbedisplaswhytheyar
waredesigneebuilt.VHDLrbeingVeriloilog.Basiccintersand flipdforthesimwhatyouknol will createcauseofthis,
‐DigitalCircwaterloo.ca/~
6
are only usinngoutputs:
mit light withutyouwillo
a4bitbinaryrletterasop
is 7 bar shaayed.Sevensreusedform
ertodescribLishelpfulfog.Anarrayrcuitconstrup‐flopsare smulationofmowwillworkthe circuit w, it isvitalth
cuitsandSyst~ece124/
ng switches
hmuch greaonlyusetheL
ynumber, apposedtotry
aped LEDs asegmentsistmanycalculat
ethebehaviforthedesignofotherlanguctssuchastraight forwmostanythink.Themostwithin the Fhatyouhave
tems
andpushbu
ter efficiencLEDs.
andcorrectlyyingtointerp
arranged in stheminimumtororelectro
iorofhardwnofdigitalcguagesisbecAND,OR,NO
ward.TheVHng.WeencoubasicruleofFPGA; then ieanundersta
uttons for su
y than incan
ydrivesa7‐prettheorigi
such a waymnumberwonicdisplays
ware.Asynthcircuits,andcomingpopuOT(gates)aHDL languageurageyoutofVHDListhit's unlikelyandingofba
upplying
ndescent
segmentinal4bit
that thewhichcans.
hesistoolisoneofularsuchandlook‐e isveryousethehat ifyouthat theasic logic
2 Lab 1
Thegoaloftcircuitentrythe FPGA toQuartusorFthecircuit.
2.1 Prela
No prelab wmultiplexercircuit topeequipmenta
1. Desi2. Simu3. Prog4. Mod
2.2 VHD
Tostarttheicon (use Veinformationworkingdirunique, logiprojectthatforthecreatbyclickingofromavailab6.Onceyou'
2.2.1 Pin
Pinassignmthe FPGA chresourcesanoutputs canexactlyyouruse differenassignment.shouldmakearecomplexdesignandmisdone.
1 – Design
thislabsessiyandsimulao verify thatFPGAsisnec
ab
work is neccircuit haserformadiffandthelabex
gnentryofaulatethecircgramtheFPGifytheprovi
DL design
softwareclicersion 9). Toas you wishectoryforyocal, directormustbethetionofthedonNext. Inpbledevices.Inveselectedt
assignmen
entistheprhip availablendthedesig be exportedrpinsaregoint DE2 boarSinceeachpesurethetoxtousesothmapsittoac
ECE124
n entry us
ionistogaintionandthethe circuitwessary;altho
cessary for tbeen providferent task.Txperiments.
aVHDLcodecuitstocheckGAandcheckdedcircuitto
entry usin
ckStarttheno create a ph. Create a nourproject.Yry name whisamenameairectory.Pagpage3youmnparticulartthecorrectp
nt
rocesswhiche on the harncanbebuid to any piningtobeexprd peripheraperipheral isolexportsouhepinsassigncertainphysi
LabManualhttps://ece.u
sing Alte
nexperienceenmodifyingworks in haoughexperie
the first paded. After thThe lab startLab1iscom
forasmalldkthattheyopkthattheharoprovidene
ng Altera
nselecttheproject selectnew projectYoushoulduich describesasyourtoplge2thenallomust select ttheDE2boarartyoushou
mapstheinrdware boariltanywherens on the chportedandarals such assconnectedurinputsandnmentfilegiicalpinname
‐DigitalCircwaterloo.ca/~
7
ra Quartu
withtheAltgtheprovideardware. Noncewithbas
rt, the introhe self‐guidetswith a br
mposedoffou
digitalcircuitperatecorrecrdwareimplewfunctional
Quartus-
programgrout File ‐>Newt called Lab1use“N:\ECEs your projeeveldesigneowsyoutoatheAlteraFPrdusesaFBuldselectFin
nputandoutprd. As mentioeonthechipip. Pin assigrenecessaryLEDs, buttophysicallytodoutputstoivesalogicale.Youcanop
cuitsandSyst~ece124/
us-II
teraQuartusedcircuits.Tprior expersicdigitallog
oduction, ofd introductiief introducturpartsinwh
tctlyementationflity,simulate
-II
upAltera.ThwProjectW1. In projectE124\Lab1"ect. Next youentity(Lab1addVHDLfilPGA familyCGApackagenishinorder
putsignalsooned earlierpintheplacegnments actyastheperipons and swioacertainptheperipherlnametoeacpenthesupp
tems
FPGAdesignThestudentwiencewith dgicwillenabl
this lab exion the studtion to the lhichyouwill
functionscore&testitand
henclickonWizard andt wizard pagorsomethinu must selec1).ThenclickestoyourpCyclone II, awith672pinrtoskipthen
ofyourdesigr the chip haeandrouteas constrainpheralsareatches we mpinintheFPGralswetargechpintobepliedfiletose
nsoftwarewwillbeprogrdigital designleonetound
xperiment. Adent will moaboratory rol:
rrectlydsubmitare
theAlteraQthen enterge 1 you mungsimilar;crct the namekonNextandroject.SkiptandEP2C35ns,andspeenextpage.
gntophysicaas a vast amstep.Theinpnts to speciflreadypre‐w
must go throGAontheboetforuse.Piusedthrougeehowthism
withbothrammingn, Alteraderstand
A simpledify thisoom, the
eport
uartusIIas muchust set areatinga of yourdsayyesthisnow5F672C6edgrade
alpinsofmount ofputsandfywherewired.Toough pinoard,weinnamesghoutthemapping
Download tprojectdirecpinassignm
For the Altedefault is toshipped). ToclickonDevClickOKtwi
2.2.2 Add
Youmayusethe“lab1.vhonProject‐>Addandthe
2.2.2.1 Un
VHDLiscasstructuresto
1. Entiordebits)
2. Archentitthat
Therearetw
1. Beha2. Stru
exam
2.2.2.2 Un
Understandidesignunitports (key ainsensitiveaDE2board.green LEDscommented.
he suppliedctory.Clickoentfile(DE2
era DE2 FPGo ground uno change thivice&PinOpicetocloseth
ding VHDL
eaVHDLord”filefrom>Add/RemoeOK.
nderstandin
einsensitiveodescribead
ty:itdeclareesignunit)aisdeclaredihitecture: thtyhasnoinfoistheroleof
wowaystode
avioral:wheuctural:whermpleifyoubu
nderstandin
ingthegiven(single entitand sw) andand identicalWeareusins respectivel.Ifyoustillc
ECE124
pin assignmonAssignme2_pins.csv),w
GA board, unnused pins (tis setting cliptionsthenhewindows.
L codes
Schematic(BwebsiteandoveFilesinP
ng VHDL st
e.Forthisredesignunit(
esthedesignassociatedwintheentity.he architectuormationabofthearchitec
escribethefu
eretherelatireyoucanuuiltanadder
ng the VHD
nVHDLcodety and architd 2 output pl to thoseonngthose logicly. Analyzeannotfigure
LabManualhttps://ece.u
ment file (Dents‐>Imporwhichyou've
nused pins sthis reducesck onAssignselecttheUn
BlockDiagradaddthisfilProject,find
tructure
easonmanyc(hardwarebl
nunitnameawithit.Eachp.ure specifiesouthowthectureassocia
unctionality
onbetweensepreviouslyrunityoucan
DL code
ewillhelpytecture). “Laports (ledr anes in thepicalnames inthe code aoutacertain
‐DigitalCircwaterloo.ca/~
8
E2_pins.csv)rtAssignmesavedtoyou
should all bes noise andnments‐>SenusedPinst
am)designinetoyourproandselectth
codersusealock):
andtheportportname,ty
s the actualhardwareblatedwiththe
ofacertainb
inputandouycreatedennuseit,asa
ou intheupab1” is the toand ledg). Nnsassignmenordertomnd try to fnlineaskfor
cuitsandSyst~ece124/
from coursents,thencliurworkingd
e left as inpuis what oneettings thentabandchan
nyourprojeojectdirectoheVHDLfile
alllowercase
s(whichareype(inputo
functionalitlockusestheentity.
block:
utputisdeclantitiesinyourcomponent,
pcoming labsop level entiNotice that thent filesandapour inputfamiliarize yrhelp.
tems
se web siteickonthe[..directoryand
uts tri‐statede should doselect theD
ngethevalue
ct.Forthispory.Toadditeonyourloca
e.VHDLlang
einputsandoroutput)an
ty of the eneinputstop
aredusinglordesignunitindesigning
s.Thegivenity for thedhe names oaresimilarts tothekeyyourself wit
and save it.]toselectthdclickOK.
d. Unfortunafor a produDevice categetoInputtri
partoflab,dottotheprojealdirectorya
guageusestw
outputsofthndwidth(nu
tity. Noticeproducetheo
ogicalequatiotascomponegamicroproc
codeconsistesign. It hasf the portsto thenameys,switches,th VHDL, it
in yourhesaved
ately theuct to begory andi‐stated.
ownloadect,clickandclick
womain
heentityumberof
that theoutputs‐
ons.ents.Forcessor.
tsofones 2 inputare caseesontheredandis fully
2.2.3 Com
To compileCompilationmostlyduewindow youmessages toresolve themexpected. Ifdivinethepralmostevery
The followinVerilog)circ
Analselecanda
Fittepins,or thTabl
Asse
2.2.4 Sim
Altera Quarstimulusisaisnotinterainputandou
TosimulateTo do thisWaveformFclickandselandselectPtheseinputpPins:Outpudefault,thenTo assign pperiod for echoosingintofinputswil
mpiling the
the designn or use “Cttopinswhicu will see seo see the dem. Prudent uthereareanroblemandfypinontheF
ng steps arecuitintoafile
lysis&Syntcted FPGA. Padders;ander:Thisplace,andoptimizhousands ofes).embler:Conv
mulation
tus‐II comesappliedaswaactive,andsoutputpinsan
yourcircuitclick on FilFile.ThatwilectInsertNins:Inputapinssw(0),sut (ledg[0], lnclickOK.Foeriodic valueach signal (tervalsthatillbegenerat
ECE124
e design fo
n and maketrl+L” or thechhavebeeneveral tabs.tails. You shusers shouldnyerror(s),cfixit.ExpectFPGAandyo
doneby theewhichisus
thesis:ThisPartswhichsometimesmesthepartszesthelayouCLBs (Comb
vertsthefitt
s with a simaveforms,anocanbequitndinternalre
t,avectorwae‐>New theillopenafileNodeorBusandthenclicksw(1),sw(3)ledg[1], ledrorsimulationes, right clicTable 1). Itncreasebyaed(Figure3)
Tab
InpuPeri
LabManualhttps://ece.u
or the FPG
e a programe arrow buttndefinedbuYou can clichould alwaysd also checkcompilationtoseemanyouwillbewa
e software tedtoprogra
stage conveare availablemultipliersanwithinanFPutfortheusebinational Lo
eddesignint
mple simulatndthentheseslowfordeegisters.
aveformFileen select theetypicallycaandthenclicktheListbu,andkey(0)r[0]) but thisnyouneedtck on a signwill switchafactorinpo).
ble1 Inputsig
uts sw[0]iod 50ns
‐DigitalCircwaterloo.ca/~
9
GA
mming file fton on the tutarenotbeck onWarns check thek theWarniwillbestopywarningsberned,atleast
o convert thamtheFPGA:
erts thedesige are typicalndothercomPGA,connectergoals(typiogic Element
toafilewhic
tor which isimulationisebugging.Ita
emustbecree VerificatioalledWavefockontheNouttontoshowtotheSelecs is not necetosetaserienal and seleceach signaloweroftwo(
nalsclockassi
sw[1] sw100ns 20
cuitsandSyst~ece124/
for the FPGtoolbar. Youeingused.Nening or CritError and Cng messageppedandoneecauseofthetonce,forea
he schematic:
gn intopartslly flip flops,mplexsupportsthemtogecallyspeed).ts), LEs (Log
chcanbeuse
s limited byrunandthealsodoesno
eated.Thisson/Debuggirm1.vwf.InodeFinderbwallinputpictedNodescessary as thesof‘0’sor‘1ct Value‐>Clbetween ‘0’(2 _ _
ignments
w[3] key[0]0ns 400ns
tems
GA click onwill see aroear thebottoticalWarninCriticalWars if the desiecanreadthepinassignmachonethat
c circuit and
swhichare,memory blrtparts.therandtot.Adesignmagic Elements
edtoprogram
its graphicaoutputanaly
otallowonet
specifiestheng Files tabtheleftwindbutton.Inthins.Clickoncolumn.Youhe simulator1’stoinputslock and theand ‘1’ at a
),allpo
n Processingound 100momof theQung or Errorrning messaign isn't woheerrormesmentfileasitisnotconne
/orHDL (e.g
availablewilocks, look‐u
theinputanayrequirehus) or LUTs (
mtheFPGA.
al nature. Thyzed.Thesimtoviewanyt
inputstotheb and selectdowofthatfhefiltertabsthe">"arrowcouldrepeatadds all ou(inputtestpen set the foa certain inteossiblecomb
g‐>Startmessages;uartus II or Infoages andrking asssage(s),tdefinescted.
g. VHDL,
ithin theup tables
doutputundreds,Look‐Up
he inputmulationthingbut
ecircuit.t Vectorfile,rightscrollupwtoaddtthisfortputs bypattern).followingerval. Bybinations
Don’tforgettheseassignonlysuitable“AND” logicinstance,thebutforamocreatingyou
Figu
Therearetw
Funcinfor
Timintonece
Now,youcavalueto1ussimulationfseethesimusimulation.
Rememberf
tohit“Ctrl+nments,allpoeforautomagates are eeValue‐>Coorecomplexcurvectorwav
ure3 Exhaus
wotypesofsi
ctional: Thirmation(i.e.ing: TiminganFPGA,toessarytodete
anrunthesi(default).Thfilejustcreatulatoroutput
from“lab1.vh
ECE124
+W”orrightossiblecombatedtestingoeasy to verifuntValuelecircuitonewveforminput
tivetestinput
imulation:
is is a verifgatedelays)simulationuestimateaccermineifad
mulatorbychenSelectTited.Thenclict.Hit“Ctrl‐W
hd”code(lin
LabManualhttps://ece.u
clickinthewbinationstotorwheretherfy. One canetsyougothwouldtestspts,youshould
t generationfo
fication of tincluded.uses informacuratetimedesigncanme
clickingonPimingasSimckonStart.WW”,orrightcl
e45)thatfo
‐DigitalCircwaterloo.ca/~
10
waveformwtheinputswireareafewcforce inputshroughallpopecificcombidsavethere
rfunctionF(X
the basic fu
ation aboutdelaysforsigeetthespeed
Processing‐>mulationmodWaituntilitickandchoo
rexample:“l
cuitsandSyst~ece124/
windowandsillbegeneratcombinations to values oossibleinputnationsofinesultingfilein
X0,X1,X2,X3)=
unctionality
the circuit dgnals.Thissidrequiremen
>SimulatorTde.FortheSifinishesandoseZoom‐>F
ledg(0)=sw
tems
selectZoom‐ted(anexhanstovisuallyother than ats‐asdoestnputs,notallntoyourpro
~X0&~X1&~
of the circ
design, andhimulationisnts.
Tool.SettheimulationIndthenclicktFitinWindo
w(0)|sw(1)
‐>FitinWinaustivetest),ycheck.The“a periodic wherandomm.Whenyouaojectdirector
~X2&X3
cuit with no
how the circslower;but
eEndsimulnputfieldseltheReportbowtoviewth
)”.
ndow.Bywhichis“OR”andwave. Formethod‐aredonery.
o timing
cuit is fititisalso
lationatlectyourbuttontoheentire
Fortimingsthe circuit, onoticethattUnderViewsimulation.
Sometimes,modeandtha functionalverifyitsfun
2.2.5 Tim
Timing analindicationofalwayshavehavingtobu>ClassicTimsignalisatth11ns.Other
Bydefault,a
tpd: Tcomb
F
simulation,yor theway tthereisanapw, or via the
afunctionalhenclickonGsimulation,
nctionalitym
ming analys
lysis can onfhowfastthespeedrequuildandmeamingAnalyzhetopofthetabsprovide
allpathsinth
This is thebinationallo
ECE124
Figure4 Timi
oumaynotithat simulatipproximatelymagnifying
simulationiGenerateFuyouwillnot
matcheswith
sis
ly be run afhecircuitrunuirementstoasureitgreatzerToolandelist.Thisisteyoutimede
hecircuitget
time requireogic
LabManualhttps://ece.u
ng‐modesimu
cethatthereion isdoneay10nsdelayglass icons,
salsorequirunctionalSit seeany timtheVHDLco
fter a designns,andifspebemetandtlyspeedsupdclicktheStthetimedelaelaysformor
analyzedan
ed for a sign
‐DigitalCircwaterloo.ca/~
11
ulationreportf
earesomevand canbegybetweenthyouwill fin
redineachlamulationNemedelay.Heode.
n is successfeedandtiminbeingabletpdesigntimtartbutton.Cayfrom"P2Precomplexci
ndlisted.The
nal to go fr
cuitsandSyst~ece124/
forLab1.vhdd
verynarrowgenerally ignheinputschad zoom cont
ab.Youmustetlisttabtoere isasamp
fully implemngconstraintoballparkhme.TorunthClickontheP"(PintoPinircuitswithf
erearetwoca
om an inpu
tems
design
spikes.Thesnored for thiangingandthtrols. Zoom
tSelectFuncgeneratethepleresultof
mented andntscanbemehowfastadeheanalyzer,ctpdtabandnn).Youlikelyflip‐flops.
ategoriesto
ut pin to an
seareglitcheis course.Yoheoutputscout to show
ctionalasSimenecessaryfa timingsim
it gives anet.ElectronicesignworksclickonPronotethattheyhaveavalue
consider:
output pin
esduetoou'll alsochanging.w the full
mulationfiles.Formulation,
accurateccircuitswithoutcessing‐eslowestearound
through
tco:Fclockwhicslowdata
Toquicklygcase tpd").Frwhichisn'tvcircuits woumultipliersw
2.2.6 Prog
Make sure tprogrammerprogrammer“Currentlysfile in the lisbuttoninord
2.2.7 Test
Nowthedes
Turn(che
TurnVHD
2.3 Desi
Foryourdeandoutputs
SignalTyp
Inputs
Outputs
Forregistersksignal tranch each datawestsumforforclockedd
gettiminginfromthisanaveryfastcomuld also worwhichworka
gramming
that the powrtoolcanberisselected.electedhardsthasachecdertoprogra
t the desig
signcanbete
n on/off SWckwithVHDnon/offSW1DLcodeinlab
ign your o
mo,modifytaredefined
pe SignalNGasClutchBrakeOverrid
sGasConBrakeCo
ECE124
andflip‐flopnsition.Alsopamust be prtCOplusanydataandthis
formation,clalysisonecamparedtothrk at the samat250MHza
the FPGA
wer to the Fefoundunde.ClickonHadware”saysUckmark in tamtheFPGA
gn on DE2
estedonFPG
W0 and SW1DLcodeinlab1,SW3andKb1.vhd)
own circui
the“lab1.vhdinbelowtab
Tab
Name Assi
detrol Lontrol L
LabManualhttps://ece.u
ps,thisisthepayattentioresent (setupassociatesescanbeimpo
ickontheReansee that the3+GHzspeme speed, allowingforr
A
FPGA boarderTools‐>PrardwareSetUSB‐BlastertheboxundeA.
board
GAboard.Ver
inputs, to vb1.vhd)KEY0inputs
it – Car-C
d”codetomble.
ble2 Car‐Contr
ignedPortKEY[0]KEY[1]KEY[2]SW[1]LEDG[0]LEDR[0]
‐DigitalCircwaterloo.ca/~
12
etimerequirntothetSU tp) before thtuptimes.Nortantinrea
eportbuttonhecircuitwoeedofmoderand this FPGreal‐timeHD
is on (the rrogrammer.tupandselec[USB‐?].Nexer“Program/
rifythefunct
verify the fu
toverifythe
Controller
makeitsfunc
rolcircuitIOd
MasterswitWhenON (WhenON (
cuitsandSyst~ece124/
redforanoutable.That the clock tranotethatwe'val‐worlddesi
nandnotethouldworkarncomputerGA has otherTVimagema
red button i.YouwillnectUSB‐Blastxt,ensureth/Configure”,
tionalityrega
unctions beh
efunctionbe
ctionasanau
definition
De
tchtoshutdlogic‘1’), acclogic‘1’), the
tems
utputtobecotable lists thnsition. So thveneglectedgns.
hefirstrowiatamaximums.However,r resourcesanipulation.
in the uppeeedtomakester,ifnecesshatforyourpandthen ju
ardingtothe
hind outputs
ehindoutput
utomotiveco
escription
downthecarcelerationisebrakesare
omevalidafe lengthof the worst casdtheholdtim
informationmspeedof>muchmoresuch as add
r right cornsurethatthesary.Ensureprojectthe“Lustclickont
e“lab1.vhd”f
s LEDG0 and
tLEDR0(ch
ontroller.Th
giventotheengaged
ftertheatimesforse is themeofthe
("Worst‐>90MHz;complexders and
ner). TheecorrectthattheLab1.sof”theStart
file:
d LEDG1
eckwith
heinputs
motor
Considerthe
Thebeco
Notephys
MakRem
Add Add Add
“Bra
2.4 Post-
Download,pCar‐Controlday (24 houinclude:
1. Ascathe“
2. Implthem(Too
3. Fully4. Timi
test)wave
5. Allp
efollowingg
pushbuttonsome‘0’whene thatsomeksicaldamagee sure that
moveextrapoabrakesafetaclutchsafeanenginesakeControl”.
-lab
printandfilldesignonscurs) after th
anof thecom“totallogicellementationmanddebuggols‐>Netlistycommentedingsimulatio.Putadescreform(showpost‐labrepo
ECE124
uidelinesiny
s(KEY[3:0])pressed.keys (KEY[3).Replaceththe inputsortsandsignatysothattheetysothatthafetysothat
Figure
outthe“Labcheduleddate end of the
mpleted“Lablements”intprocedure,gingtechniquViewers‐>RdVHDLcodeonwaveformription(i.e. twonlyfourtortsshouldbe
LabManualhttps://ece.u
yourdesign.
ontheDE2
:0])orswitchemwithothand outputsalsfromthee“Brake”beie“Clutch”bethe“Overrid
e5 Car‐Contr
b1Submissionte.Thensube demo sess
b1Submissioheform.design deciues(2pagesRTLViewer)e.Usemeaninmforthecircutruthtable)bofivedifferenesubmitteda
‐DigitalCircwaterloo.ca/~
13
Atypicalblo
boardarein
ches(SW[17erones.s you needdesign.ingON,turnseingON,turnde”beingON
rolcircuitbloc
nForm.pdf”fbmit thepostsion. The sub
onForm”as t
sions, encoumax).Don’t.ngfulnamefouitshowingtbelowthewntcases).asPDF.
cuitsandSyst~ece124/
ockdiagram
nverted.The
7:0])donot
are in the V
soffthe“Gasnsoffthe“GaN,turnsoffth
ckdiagram
formandhavt‐labreportbmitted repo
thereport fr
untered probforgettoinc
oryoursignathatthecircuwaveformto
tems
foryourdes
eyare ‘1’wh
workproper
VHDL code
sControl”.asControl”.he“GasContr
veitwhenyoonthedroport for Car‐C
rontpage.Do
blems or bucludetheRTL
als.uitworksinshowyouru
signisalsosh
enNOTpres
rlysometim
ENTITY dec
rol”andturn
oudemonstrp‐boxonLEAControl desi
on’t forget to
ugs with solLviewofyou
allcases(exunderstandin
hown.
ssedand
es (have
claration.
nsonthe
rateyourARN,oneign must
o fillout
lution tourcircuit
xhaustivengofthe
3 Lab 2
ThegoalistThis isbasiccompletelyc
3.1 Prela
Firstdownlothetopofthandfunctionvaluesinhex
3.2 Lab r
CreateanewFPGA to wasection2.2.theVHDLco
Now,foryouaredefinedfollowallins
SignalType
Inputs
Outputs
Yourdesign
Considerthe
SW[7signisigni
2 – Combi
tobuildasimcally a calcucombination
ab
oadthe“lab2hefile,anewn(ARCHITECxadecimalfo
requireme
wproject foratch its funcTestthecircode.
urdemo,moinTable3.Ystructionsin
e SignalNOperand1Operand2OperatorOperation
issupposed
efollowingg
7..0] and SWificant bitsificantbits.
ECE124
inational
mpleVHDLclatorwhichal.
2.vhd”codefentityforasCTURE).Inthrmat.
ent – ALU
rLab2andationality. Focuitwithdiff
difythecodeYoumayusesection2.2.
Name A12
nResult HEX
toimplemen
SW[17..1600011011
uidelinesiny
W[15..8] rep(LSB) for th
LabManualhttps://ece.u
l circuits;
circuittochocanperform
fromwebsitseven‐segmehislab,wew
U VHDL d
addthe“lab2or every VHDferentcombi
ein“lab2.vhdeothermea
Table3 ALUd
ssignedPorSW[7..0]SW[15..8]SW[17..16]X2,HEX1,HEX
ntasimpleca
Table4 A
6] OperatoANDORXORADD
yourdesign.
present the ihe first and
‐DigitalCircwaterloo.ca/~
14
; Arithme
oosebetweenmmultipleop
teandopenentisdefinedwillinstantiat
design
2.vhd” file toDL design einationsof in
d”tomakeitningful signa
designIOdefin
rt8‐bitin8‐bitin2‐bitin
X0 9‐bitou
alculatorwit
ALUoperations
or DLogicalALogicalOLogicalXBinaryA
Atypicalblo
inputs fromsecond ope
cuitsandSyst~ece124/
etic Logic
nvariouscalperationswi
itacontextd.Trytoundtethisentity
otheprojectntry, you nenputsignalv
tsfunctionasalnames in
nition
puttobedisputtobedisputtobedisutput result t
thfourpre‐d
s
DescriptionAND of8‐bitOR of8‐bitinXOR of8‐bitiADD of8‐biti
ockdiagram
m most signierands. Here
tems
c Unit - V
lculationsanithnomemo
sensitiveederstanditsIOymultipletim
t.Aftercompeed to followvaluesandc
sanALU.Thyourdesign
CommentsplayedonHsplayedonHsplayedonLEtobedisplay
definedopera
inputsnputsinputsinputs
foryourdes
ficant bit (Me, SW[7] an
VHDL De
ndlogicalopeory, i.e. the c
itororQuartOmapping(Emestodispla
piling,progrw all instruccheckitsoutp
heinputsandn.Again, you
EX5andHEXEX7andHEXEDR[17..16]yedonLEDR[
ations.
signisalsosh
MSB) downnd SW[15] a
esign
erations.circuit is
tusII.AtENTITY)aybinary
amyourctions inputwith
doutputsneed to
X4X6
[8..0] too
hown.
to leastare most
Theresuread8‐inpThisblan
Signaarch
SimuorSWFiletogetMSB
Toaandt
Insteitmamore
AWHinsaearliconccarrydeco
Noteconc
TheinVHtypestd_l
In tomore
resultisdisplt, while HEdableonthebputoperandsistheonlyckinginputtoals are interitecturebefoulationforthW)butaddione can grother,selecttandLSBofyssignvaluesthenuse“Vaeadoflookinakesmore seintuitiveteHENstatemeampleVHDLier, HEX2 oncatenationofyandshouldoders.ThisisethatifthercatenationismostdifficulHDLsignals(which ar
logic_vector
otal, about1ethanthisST
ECE124
playedonHEEX0 shows thboard.Notics.That’sbeccaseinwhichoblankorturrmediate vaorethe“beginhislabhassoindividualwup them togthemandtheyourgroupedtoinputopealue‐>Arbitrngattherawsense to lookesting.Remementcanbeusfile“lab2.vhdnly displaysfAandBtodproduceatheheartofresultisdeclnotonlyreqltpartwillbemustbedecre originallyrtype.Youm
R<=st
5 lines of VHTOP,andtalk
Figure6
LabManualhttps://ece.u
EX2,HEX1anhe least signethatweareauseadditiohHEX2willrnitoff.lues that mn”statementmeextracom
wires(e.g.KEgether.Onebenpressrighdvariable;aserandsandoraryValue",7‐segmentok at the LEDmbertodispsedinsteadod”.Thismultthe carry oastringof412bit resulf theprojectaaredasa12quiredonlyfoetheaddopeclared inuny in logicalmayusestate
td_logic_vec
HDL code arktothelabs
6 Atypicalblo
‐DigitalCircwaterloo.ca/~
15
ndHEX0.HEXnificant hexeusing3hexnoftwo8‐bdisplay1ins
must be declat.mplications.EY[0)andwhbundle of 8htclickandcsyouneedtooperators,fir“Value‐>RaoutputsinthDR[8..0] valulaytheoperaofanIFstatetiplexershouout value in4zerosandtlt.This resulandwilltake‐bitsignal,aoradditionberationwhilesigned typel type std_mentlikethi
tor(unsigne
re required ttaff.
ockdiagramfo
cuitsandSyst~ece124/
X2showsthedigit of thexdigitstodibitnumberscsteadofbein
ared using “
Donotaddthentheyarewires canbchoose"GrouoorderthemrstgroupthendomValueesimulatorre (group theationresultoementtoimpuldbetakenin ADD operthenperformlt canbeusee5linesofVHalloperationsbutalsoforaletheresulth.Weneedto_logic_vectoistorecasts
ed(A)+uns
tobewritte
orALUdesign
tems
emostsignife result. Thisisplaytherescancausecangblank.To
“signal” stat
thevectorforeadded, inthbe labeled asuping‐>Groumcorrectly.emwithmeaes”or“Valuereport(theyem togetheronLEDR[8..0plementamuintoconsideration. Thismingadditioned todrive tHDLcode.smustprodullotheroperhas9bitsanorecast theor) and thesignals:
signed(B))
n. If yourde
ficanthexdigs makes yousult,thoughrry(9thbit)toblankHEX2
tement in th
rtheinputs(heVectorWs "A". To group".Takeca
ningfulsignae‐>CountVaarenotmear) to have fa0].ultiplexerasration.Asmecan be achin.Thiswillpthe3 seven
uce12bitrerationstoo.dforbinarysignals touen recast a
esign is takin
gitoftheur resultwehavetooccur.2usethe
he VHDL
(e.g.KEYWaveformoupwireareabout
alnamesalue”.aningful),ster and
wehaveentionedieved bypreservesegment
esults.So
additionnsignedagain to
ngmuch
3.3 Postl
Download, pscheduleddendofthede
1. Scan“tota
2. Implthem
3. Fully4. Func
waveyoudistitestsallpfor pdoinfore
lab
print and fiate.Thensuemosession.
nof completeallogicelemelementationm,debuggingycommentedctional simueformsexplahavedesignenguishoneoscriticalcaseossiblecasesproper operagafullexhauenoughnumb
ECE124
ill out the “bmitthepos.Thesubmitt
ed “Lab2Subents”andtheprocedure,techniquesadVHDLcodeulation wavaining severaedisworkinoperationfroes‐thelimits‐givesampation. The goustivetestofberstogivec
Figure
LabManualhttps://ece.u
“Lab2Submisst‐labreporttedreportm
bmissionFoeWorstCasedesign deciandRTLviewe.veform withaldifferent sg.Forinstanomanotherotswherethinplesforcriticoal is to havfallpossibleconfidenceth
7 Samplefun
‐DigitalCircwaterloo.ca/~
16
ssionForm.pdonthedrop
mustinclude:
rm”as the rSpeed(ns)tsions, encouwofyourcir
coveragescenarios fornce,testingworifanyoperngsmaybreacalcasesofeve a simulatiinputs.Itshhatthecircui
nctionalsimula
cuitsandSyst~ece124/
df” from anp‐boxonLEA
report fronttpdintheformuntered probcuit(2pages
for criticalr eachoperawiththeinpurationinpartak(i.e.overfeachoperatioion to proveouldprovetitisfullyfunc
ationoutput
tems
nd demonstrARN,oneday
page.Don’tm.blems or busmax).
cases. Maration.Youmutssetto0dticularisfullyflow).Donotonandexplae that the cirthatalloperactional.
rate your dey(24hours)
forget to fill
ugs with sol
rk your simmustprove thdoesnotallowyworking.Otprintwaveainhowyourcuitworks;ationsworkc
esign onafterthe
l out the
lution to
mulationhatwhatwonetoOftenoneformsofcheckedwithoutcorrectly
4 Lab 3
ThegoaloftwrittencircuK‐mapsallocontrolaneonlythreeflForsafety,whastobedis
4.1 Prela
Topreparefshouldbe thcircuitsrequ
4.2 Sche
In this lab,wElevatorConassignmentusing the scFile.Primitigate. Click oprimitivessgnd (grounddrawwirescanbepainftotheoutsiddoubleclickon theschemProperties tschematicsh
3 – Combi
thislabsessuitdescriptiowsonetomelevator.Theloors01,10,wheneveryosabled.
ab
forthislabthhenused touiredasgates
ematic des
wefirstcreantroller.Tosfileandtosechematic ediveparts(ANon it and theuchasgatesdor logic ‘0’youwillneefulasyouwildeworldyouonthemandmaticabovetab assign ahowninFigu
ECE124
inational
ionistodesonintoaTrumakethedescircuithasand11)anduhave00as
hestudentshbuildK‐Maps.
sign entry
ateasimplestart,createetunusedpinitor. Click onND,OR,otheren expand ths.Youwillal’)aswellasedtousethelldiscover.Duwillalsonedusethestan(documentename. That
ure8:
Figur
LabManualhttps://ece.u
l circuits;
signtwosimuthTableistignsmallerafourinputstdtwooutputsaninputfor
houldreduceps. Extract lo
using Alt
projectusinaprojectandnstoinputtrn File‐>Newrgates)canbheLibrarieslsoneedtouvcc (highoOrthogonaDrawwiresinedtousethendardnamesed inAppendsometimes
re8 Lab3.bdf
‐DigitalCircwaterloo.ca/~
17
; Elevator
plecircuitsuthebasisofthandfaster.Ytodefinecurtstoenablereitherthec
ethedesignogical expres
tera Quart
g theschemdnameitLari‐stateinsew and selectbeenteredvs item to revusethepinar logic ‘1’).TlNodeToolnpiecestomeinputandos(e.g.sw[0],dixA).DoNresults in a
f‐Schematicd
cuitsandSyst~ece124/
r Control
usingtruththiscircuitdeYouaretoderrentandrethemotoracurrentand/
descriptionsssions from
tus-II
maticeditoraab3,repeatthection2.2.1.PtDesign FileviatheSymbvealprimitivandotherpThestoragelfromthetomakethetaskoutputpinprledg[0])whOTrightcliccircuitwhic
designfile
tems
ller – Sch
tablesandKesign.Optimiesignandimquestedfloondshowthe/orrequeste
stotruthtabtheK‐Maps
and thenmohesamestepProceedbyaes‐>BlockDbolToolwhives. Expandrimitivessuprimitives ioolboxonthekeasier.Tocrimitives.Tohichisdefineckonawirech does noth
hematic d
K‐Maps.Tranizingthedesmplementacors(wewilleup/downddfloor(s),th
bles.Thetrutand realize
odify it to impstoimportaddingthescDiagram/Schchlookslike that to revechas input,include flip‐feleft.Drawinconnectnetsonameyourdinyourpineornode,anhing. Now, d
design
slatingasignwithcircuit toconsiderdirection.hemotor
thtablesthe two
mplementthepinschematichematiceanANDeal logicoutput,flops.Tongwiresorwirespinsjustnoutfile,nd in thedraw the
Compilethisproper inpuzoomandvi
4.3 Lab r
For your deoutputsare
SignalTyp
Inputs
Outputs
DesigntwoNANDgateshelpyoutomaretwoway
1. Usinusing
2. Startwith
Consideringforthefourtesting.
Considerthe
sdesignandutvaluesascewthewhol
requireme
emo,modifydefinedinth
pe SignalNCurrentNextFloEnableDirectio
versionsoft.NotethatKminimizeadystodesignt
g only 2‐inpganygatesatingwithdesh2‐inputNAN
oneofabovinputsandL
efollowingg
ECE124
ddownloadiclockperiodsesimulation
ent – EC s
the “lab3.bdheTable5.
Tab
Name AssigFloor SWor SW
Ln LE
thiscircuitoK‐mapshelpdesignwherehecircuit:
putNAND gaavailablefortsigningacircNDequivalen
eapproacheLEDsfortheo
uidelinesiny
LabManualhttps://ece.u
ttotheFPGsforallpossnwith“Ctrl+W
schematic
df” file toma
ble5 Car‐Contr
gnedPortW[1..0]W[3..2]EDG[0]EDR[0]
oneusinganyyouminimizeyouarerest
ates exclusivtheseconddcuitwith2‐innts
s,startthesoutputs.Sim
Figure9 3
yourdesign.
‐DigitalCircwaterloo.ca/~
18
AfortestingsiblescenariW”.
design
ake it operat
rolcircuitIOd
Description
WhenON(loDefinemovi
ytypesof2‐zeacircuitwtrictedtouse
vely for the fdesignnputlogicga
chematicedimulateyourd
3‐floorelevato
cuitsandSyst~ece124/
g.Ifyouhaveios(asdone
te as an elev
definition
n
ogic‘1’),theingdirection
‐inputlogicgwithanytypeeaspecificg
first design a
atesofanyty
itortobuilddesignsandu
or
tems
etime,simuinprevious
vator contro
motoristurn(upwards:‘
gatesandtheofgates,bugatetype(e.g
andminimiz
ypesandthen
yourtwodeuploadittot
ulateitbyset labs).Reme
oller. The inp
rnedon‘1’,downwar
heotheronlyutitwillnotg.NAND,NOR
zingwires an
nreplacingt
esignsusingsheFPGAfor
ttingtheemberto
puts and
rds:’0’)
y2‐inputtdirectlyR).There
nd gates
thegates
switchesphysical
You K‐Ma
this,canbhardyour
4.4 Postl
Download, pscheduleddendofthede
1. Scanthe“
2. Implthem
3. Discu(yougates
4. Howrequtoo‐
5. Incluexpr
6. Sche7. Simu
poinrequ
canfindascapsshouldbfor theNANbeoptimizedd tominimizrLabReport.
lab
print and fiate.Thensuemosession.
nofcomplete“numberofglementationm,debuggingussionofexpudon'tneedtsasbeingindw does the auiredforeach‐astheyallhude the trutressionsfortematicprintsulationwavetsand identuirements).D
ECE124
hematicinvebeusedtomiNDonlydesidfor.Onemaebothat the.
ill out the “bmitthepos.Thesubmit
ed“Lab3Subgates”and“nuprocedure,techniquesapandabilityotoactuallyimdicatorsofrell NAND desh?Note:Thihadtobewirth table forthetwocircuscreenfortheforms for thtifywhat theDemonstrate
LabManualhttps://ece.u
erterintheQinimizetheegn,withoutaychoosetoesametime
“Lab3Submisst‐labreportttedreportm
missionFormumberofwirdesign deciandRTLviewofthedesignmplementtheliability.sign comparslabusedtoedup.Whichr the elevatuits.etwocircuithe two circue inputsreprthatyoucan
‐DigitalCircwaterloo.ca/~
19
Quartussoftwelevatorcirclotsofexperodesignfort.Wesugges
ssionForm.pdonthedrop
mustinclude:
m”asthefrores”inthefosions, encouwofyourcirn if the4th fle4thfloorex
re to the othobebuiltanhwouldbemtor controlle
tsuits showingresentandwninterpretth
cuitsandSyst~ece124/
warecalledNcuitsize.Noterience.Notetheminimumt trying this
df” form anp‐boxonLEA:
ontpageofyoormfordemountered probcuit(2pagesloor isaddedxtralogic).Co
her design?ndsoyoushmorereliableer, K‐maps
that theywwhytheoutphesimulation
tems
NOTunderprethattherethat therea
mnumberof several tim
nd demonstrARN,oneday
ourreport.Donstratedcirblems or busmax).dandeffectonsiderthen
HowmanyouldcountAe?and how y
work in all caputsarecorrnwaveforms
rimitives‐>isnoeasywaremanythif wiresORgaesand inclu
rate your dey(24hours)
Don’tforgettrcuit.ugs with sol
of thatonrenumberofw
gates and wALLgates‐ i
you deduced
ases (pleaserectaccordins.
logicwaytodoings thatates‐it'sudeall in
esign onafterthe
tofillout
lution to
eliabilitywiresand
wires arenverters
d logical
e circle 4ng to the
5 Lab 4
Thegoaloftcontrolstwotest,twoclo
The standartheir valuebcounter,youclock.IfyouthespeedoffrequencydaccurateifySoforaccuratoacertainnterminalwhperiodofyomoduluscou
Inthislabyodependsonyourarchite
The Label_SensitivitsignalsthatwProcess,shsynthesismi
4 – Sequen
thislabistootrafficlightckdividersu
rdway to imbyoneonevunoticethatlookatthesf theoriginaivideby2N+youneedaclatetimingornumber(termhich isequalourclocktoduntersgener
F0=5T0=2
Fig
ouneedtoimtheinputsaecturetoimp
Label_namBegin . . . End proce
_name can bty_Lististhwilltriggerehouldappearismatch.
ECE124
ntial circu
designatraftsonaninterusingmodulu
mplement a cvery rising/fthefirstbitosecondbityoalclock.Thus1whereN islocksignalwrclockdivisiminalcounttohalf thepdeterminethatedfroma5
50MHz20ns
gure10 Binar
mplementseandwhattheplementflip‐f
me: Proces
ess;
be any namhelistofsignexecutionofr inthesens
LabManualhttps://ece.u
uits; Traf
fficlightconrsectionusinusandbinary
clock dividerfalling edgeofthecounteouwouldfindsNthbit in ts thebitposwithprecisefonamoduluvalue)andthperiodofyoheterminalv50MHzinput
25‐bitBinar÷33,554,43
25‐bitModul÷25,000
ryandModulus
quentiallogiecurrentstatflopsandoth
ss (Sensiti
me like applnals/variabletheProcessitivity list.M
‐DigitalCircwaterloo.ca/~
20
ffic Light
trolsystemangastatemaycounters.
r is to use aof its inputer(LSB)toggdittogglingthecounteroitionstartingfrequencybeuscountercahenresetstoourdesiredovalue.Figuretclock.
ryCounter32=2^25
lusCounter0,000
sclockdivider
icinVHDL.Steor"memohermemorye
ivity_List
le, orange, ees/inputsthas insidetheMissingsigna
cuitsandSyst~ece124/
t Control
asasequentachine.First
a binary counclock signalglesinthepeathalfspeedoutput isacg frombit0ecausethedanbeused.Aoinitialvalueoutputclocke10showso
F~1.49HzT~0.67s
F=1HzT=1s
rsby25‐bitco
Sequentiallogory"is.Thisrelements.
t)
etc. exceptattheProcesimulator.Tals fromthe
tems
ller – VHD
tialcircuitwiyouwilllear
nter. Binary. If you conseriodofhalf‐dofthefirstclock in freq0.ThebinaryivisorisalwAmoduluscoe.Ittogglestk.Thusyounoutputsoftw
5
25,000,000
3
16,777,216
unters
gichas"memrequiresaPR
reserved naess issensithus,anysignsensitivity li
DL desig
ithclock.Therntoimplem
counters insider ann‐bi‐speedofthebitwhichmeuencyof inpycounter iswaysinpoweounterincremheclocksignneed tocalcuwo25‐bitbin
50,000,000 × T0
× T0
33,554,432 × T0
× T0
mory"andthROCESSstru
ames in VHtiveto.Thesenalthatisreaistcausesim
gn
esystemmentand
ncrementit binaryeoriginaleans1/4putclocknotveryroftwo.mentsupnalattheulate thenaryand
heoutputucturein
HDL. Theearetheadinthemulation‐
The key stastatement.
InVHDL,stanextstatedclock the cuworthmentimaydeclarestateandne
5.1 Prela
In this lab edesigningthII. Browse tdividercircucouldbefursequentiallo
5.2 Lab r
There are twhardware.T
5.2.1 Step
Createanewneedtofollocompile,procheckitsfun
Now, modifrepeatedlyofollowedbyTheinputsaAgain,youn
GFLASH2s
0 1
G
atement to im
atemachinesependingonurrent state iioningthatsanewtypeixtstate.
ab
experiment,hewholecircthe VHDL couitsandstudrtherdividedogicdesigns
requireme
wo steps forhesecondst
p 1: Creati
wprojectforowallinstruogramthedenctionwithth
fy the “lab4.ongreenandsolidpatternandoutputsaneedtofollow
2 3
Green LED ON,
ECE124
mplement fl
sarebuiltinn thecurrentis assigned tometimesyoinyourarchi
it is importacuitatonce.Fode carefullydyhowtheydby10.Trytatementsin
ent
r this lab. Thtepiswhatyo
ing a seque
Lab4andaductionsinsecevice,etc.TeheVHDLcod
vhd” file todredLEDs.Tnfor5seconaredefinedinwalltheinstr
GSOLID5s
4 5
Red LED OFF
Figu
LabManualhttps://ece.u
ip flops or s
nsideaprocetstateandothevalueofourdecisionitectureand
ant to designFirstdownloy and try towork,howtoextractthnVHDL.
he first stepouwilldemo
ence of syn
ddthe“lab4.vction2.2,i.e.estthecircuide.Donottry
make a seqhepatternstndsandthennTable6.Yoructionsprov
5 6
ure11 Seque
‐DigitalCircwaterloo.ca/~
21
sequential lo
essblock.Acothersignalsthenext stacanbestayinthendeclare
n andbuild yoadthe“lab4understandtochangethheembedded
is just to geonstrateand
nchronized
vhd”filetoth,importpinitwithdifferytosimulate
quencer to gtartswithafnthesameseoumayuseovidedinsect
RFLASH3s
7 8
encertimingdi
cuitsandSyst~ece124/
ogic, is the
casestatemes(inputsor tate (determinnginthesametwosignals
your circuit4.vhd”filefroall statemenhefrequencydstatemach
et you familwillbemark
d events
heproject.Fassignmentrentcombinathedesigna
generate theflashinglightequencewithothermeanintion2.2.
9 10
Red LED ON
iagram
tems
IF (rising_e
entcanbeustimeevents)nedby the cmestate.Tonofthistype
incrementalomwebsiteants in the filyofthesystehineinthisc
liarizedwithkedfor.
ForeveryVHfile,setunuationsof inpatthismome
e followingtonagreenhdifferentdungfulsignaln
RSO6
11 12
N, Green LED O
edge (clock)
sedtodeterm).On theedgcase statemenameyoursttokeepyour
lly.DoNOTandopenbyle. Look at temclock,ancodeandund
h creating se
DLdesignenusedpinstoputsignalvant.
pattern (FigLEDfortwourationsonrnamesinyou
OLID6s
13 14
OFF
)) THEN
minethegeof theent). It istatesyourcurrent
attemptQuartusthe clockdhowitderstand
equential
ntry,youtri‐state,luesand
gure 11)secondsredLED.rdesign.
15
Sig
Start your dmachine.Keyour designsignals(stat
UseLE
User LE
Trytobuild
1. Amo2. Amo3. The
curre
G G R R
gnalTypeInput
Outputs
design witheepthebinarn. You mustenumberan
er Red LEDsEDR[17:0]
Green LEDsEDG[8:0]
therequired
odulusclockodulusclock1Hz clock wentstatedet
GFLASH:theGSOLID:theRFLASH:theRSOLID:the
ECE124
T
SignalNamInputClockGreenLEDRedLEDClock1HzBClock1HzMClock10HzStateNumbStateCounte
modulus 10ry1Hzclockbe able to indcounter)o
LED
LEDG[8],
Figure12 At
dcomponent
dividertocrdividertocrwill drive atermineswhi
greenLEDigreenLEDiredLEDisflredLEDisO
LabManualhttps://ece.u
Table 6 Sequenc
me Assig CLO
LELED
in LEMod LEMod LEer Her H
0Hz and 1Hzkoutputforymplement thonSeven‐Seg
T
DR[11]
, LEDG[2:0]
typicalblockd
tsonebyone
reatea10Hzreatea1Hzccounter toichLEDsare
sflashingatsON,whilerlashingat10ON,whilegre
‐DigitalCircwaterloo.ca/~
22
cer circuit IO de
gnedPort DOCK_50 5EDG[8] GDR[11] REDG[2] 1EDG[1] 1EDG[0] 1HEX0 4HEX2 4
z clock dividyourdemo.Fhe sequencegmentdisplay
YourTLC Design
FPGA
diagramforas
etogenerate
clockfromtlockfromthdetermine tONorOFF.
10Hz,whileredLEDisOF0Hz,whilegreenLEDisOF
cuitsandSyst~ece124/
efinition
Description50MHzon‐boGreenlightpRedlightpat1Hzoutputf1Hzoutputf10Hzoutput4‐bitinterna4‐bitinterna
ders. Use thiFigure12sher FSM in foystodebugy
CLOCK_50
HEX4, HEX0
PORT
PIN
sequencerdes
thetimingd
theboard's5he10Hzclockthe time ofYourstatesc
redLEDisOFF.reenLEDisOFF.
tems
noardclockpatterntternfrombinarycfrommodulutfrommodulalstatenumbalstatecount
is 1Hz clockhowsatypicour states. Dyourcircuit.
7‐Seg
ign
diagraminFi
50MHzclockk.transitions bcanbedefine
OFF.
OFF(likeamb
counteruscounterluscounterberter
k to drive yocalblockdiagDisplay your
50MHz
gment Display
igure11:
input.
between staedas:
berstate).
our stategramforinternal
DE2
(x8)
ates. The
5.2.2 Step
Afterbuildindiagram, yocontrollerin
The traffic lreal traffic lthemwitha
G P S
As shown indurations (isecondsof“G
p 2: Traffic
ng the simplou are nowntransportat
ightactsnorightsystemsflashingred
Go:‐thegrePrepareToSStop:‐ther
n Figure 14,i.e. 6 secondGo”stateint
ECE124
c Light Co
le statemachrequired totionsystemli
rmallyasass.Aswedonlightinourd
eenLEDisONStop:therredLEDisO
the traffic lds, 2 secondthismode,th
Figure 14
LabManualhttps://ece.u
ontroller
hineand tes extend theikeFigure13
EW S
ensor
A
00
Figure13 Tra
simplesequen’thaveyellodesign.Youm
N.FirsttwosedLEDisflaN.
light controls and 8 sechegreenLED
Traffic Li
‐DigitalCircwaterloo.ca/~
23
sting that ite designed s3.
NS Sensor
afficLightSyst
encer, to tranowororangmaydesignit
secondsisflashingat10H
ller switchesonds respecDisflashing.
ight Controll
cuitsandSyst~ece124/
is functioninsequencer to
NS Sensor
B
EW
S
tem
nsitbetweeneLEDsonotinthreesta
ashingat10HHztowarndr
s between abctively) cont
ler Timing D
tems
ng accordingo implement
07
EW
Sen
sor
ngreen,ambourevaluatioatesas:
Hzforturninriverstobep
bove statestinually. Not
Diagram
g to thegivet a real traf
berandredonboard,we
gleftcars.preparedtos
with the pree that in th
n timingffic light
lights inereplace
stop.
edefinede first 2
Theinputsa
SignaIn
Out
Consider theFigure12.
Ifyotodethat
Flip‐PROora
Theregisautorisin
Be swork
Tryt Note
usingyoua
Dispdesig
5.2.3 Sim
Inordertoscountvaluecycles inyocount to "00exactly10Hz
Another wa50MHzclock
andoutputsf
alType Signput Inp
tputs
GreRedGreRedCloCloStaSta
e following g
urPROCESSebug!Each Iisdeepands‐flops are logOCESSstatemcounter.ThePROCESSstster. Anythinmaticallylatngedgeoftheure that thekasexpectedtominimizete that your Qgtheclockdareabletoselayinternalgn.
mulation
simulateyouforyourfirsur simulatio0000000000zand1Hzclo
ay of simulatktothestate
ECE124
fortheexten
gnalNameputClockeenLEDNSdLEDNSeenLEDEWdLEDEWock1Hzock10HzateNumberateCounter
guidelines in
ShasnestedIF statementslowatthelegic elementsment.ThisisueD‐typeflip‐tatement,asng within thtched.SoA<eclock. sensitivity ld.thenumberQuartus simdivisor).Youreeyourdesigstatenumbe
urdesignbetmoduluscons togenera0000000000ocksinsimul
ting your deemachine.Pl
LabManualhttps://ece.u
dedtrafficlig
Table 7 TLC
AssignedCLOCK_LEDG[8LEDR[1LEDG[7LEDR[0LEDG[1LEDG[0HEX0HEX2
n your desig
IFstatementtbuildsa2xeast.Forthisswhich canusedtocreaflopistheongiven in the
he clock edg<=Bwillaut
list includes
ofstatestomulation hasrboardtestagnrunningoerandtransi
foreprogramounterincloateonecycle00001" andlationwavefo
esign is comeasenoticet
‐DigitalCircwaterloo.ca/~
24
ghtlogicare
circuit IO defin
Port50 50MH8] Green1] Redl7] Green0] Green1] 1Hzo0] 10Hz
4‐bit4‐bit
gn. A typical
tsthenthere1multiplexescircuityounstore informteflipflopssneprimarilyesampleVHDe detectiontomaticallyla
sallsignals
minimuminyto employ tanddemoshntheboard.itioncounter
mmingtheFockchain(10eof10Hzclothen find aorms(Figure
mpletely bypthatthisstra
cuitsandSyst~ece124/
shownbelow
nition
DeHzon‐boardnlightpatterightpatternnlightpatternlightpatteroutputfrommzoutputfrominternalstatinternalstat
block diagr
esultingharderandnestinneverneedmmation. In thsothatinforusedinFPGADLcode,mustatement Iatchasignal
s ‘read’bya
yourdesign.the 50MHz phouldemployr.Theyare i
FPGAdevice,0Hz)toskipock from50proper cloce15).
passing the categyisonlyt
tems
w:
escriptionclockrnfornorth/fornorth/sornforeast/wrnforeast/wmoduluscoummoduluscotenumbertecounter
ram for your
dwarewillbeng IF statemmorethanashe sample VmationcanbAs.ustbeusedtF (rising_edlA,whichis
aprocess or
provided byythedivided
ingreathelp
youshouldfromwaiting0MHz.Youcack period for
clock dividertosimulatey
/southboundouthboundswestboundswestboundsunterounter
r design is s
eadisasteramentsbuildssingleIFstatHDL code yobestoredin
tobuildacodge clock) Tsetequalto
r simulation
the board (d(slow)clock
pfordebugg
changethegfor5,000,0ansetyourr CLOCK_50
r and providyourdesign.
ds
hown in
andhardacircuittement.ou see amemory
unterorTHEN isBatthe
will not
(withoutksothat
gingyour
terminal000clockterminalto have
ding the
F0=50MH
b
5.3 Post-
Download, pscheduleddendofthede
1. Scan2. Don’
ford3. Impl
encoviewreve
4. Fully(ENT
5. Funcdesirandh
N.B. Sav
10Hz
z
Forybypassthisdi
-lab
print and fiate.Thensuemosession.
nofcomplete’tforgettofidemonstratedlementationounteredprow of your ciralsallregistey commenTITY+ARCHIctional Simured.Pleasetrhowthisisr
ve your work
ECE124
zClockDivi÷5,000,000
yoursimulatiividerorredu
Fig
ill out the “bmitthepos.Thesubmit
ed“Lab4Subilloutthe“Tdcircuit.procedure,oblemsorburcuit (4 pagersandstatented VHDLTECTURE).lationWaverytocoveraelatedtothe
k in a separa
LabManualhttps://ece.u
ider
F
ionsuceitslength
gure15 Clock
“Lab4Submisst‐labreportttedreportm
missionFormTotallogicele
design decisugswith soluges max). UseswithinaciL code.
forms: Simuandexplainwerequiremen
ate project fi
‐DigitalCircwaterloo.ca/~
25
F1=10Hz
h
kgenerationsc
ssionForm.pdonthedrop
mustinclude:
m”asthefroements”and
sions, statemution to themse Tools‐>Nrcuit.Do not
ulationmustwhathappennts.
ile, you will
cuitsandSyst~ece124/
1HzCloc÷
cheme
df” form anp‐boxonLEA:
ontpageofyod“WorstCase
machine diagm,debugginetlist Viewe
include
be done tonsinyourwa
need it again
tems
ckDivider÷10
nd demonstrARN,oneday
ourreport.eSpeedPara
gramwith trng techniquesers‐>StateM
the Seve
prove that taveformsat
n in lab-5.
F2=1
rate your dey(24hours)
ameters”int
ransition consandRTL aMachine Vi
enSegment
the designwdifferenttim
1Hz
esign onafterthe
theform
nditions,andStateewer. It
design
works asmepoints
6
This lab is acontrollerdewilladda‘NWest).
6.1 Prela
Think of adduplicatingt
Instead, thinstate.Inthis
6.2 Lab r
In the nightalways greereaches(attanothergreegreen‐ambedefault sideswitches(SWFigure16co
Theinputsa
Lab 5 –
an extensionevelopedinlNightmode’t
ab
dding the nithehardwar
If day_mo The c Else -- N The c End if ;
nk ofmethodmethodthe
requireme
tmode the tn for it if ththeendofamen‐amber(or‐red periodto decide foW[15:14])oomparesthet
andoutputsf
ECE124
Sequenti
n to the harlab‐4wasfortothesystem
ight mode iearea.Inoth
ode then
code you de
Night-mode
code you de
ds that distisamehardw
ent
traffic light chere is no camberlightpenlysolidgreds for both sor transitionntheboard.twomodeso
fortheexten
LabManualhttps://ece.u
ial circuit
dware thatrnormalopemthatsomeh
in a way thherwords,do
eveloped i
e
eveloped i
inguish day‐mwareisusedi
controller haar on the otheriod),ifnoeen)periodfsides. For thn between stWhentheswofdayandnig
dedtrafficlig
‐DigitalCircwaterloo.ca/~
26
ts; Advan
you developeration,let’schowgivespr
hat you emponotimplem
in lab-4
in lab-4 mo
mode fromninbothdaya
as a defaulther side.Whcarisdetectforthedefauhismode, wetates. ThesewitchisON,ight.
ghtlogicare
cuitsandSyst~ece124/
nced TLC
ped in lab‐4.callit‘Daymrioritytoone
ploy all circmentitliketh
odified to
night‐modeandnightmo
(priority) sidhen the timetedonthenoultside,othee use car desensors canitindicatest
showninTa
tems
C – VHDL
. If you imagmode’,theninedirection(N
uit developehis:
o work in n
when the tiodes.
de (SW [16] to switch lion‐defaultsierwiseitactsetection sens be implemethepresence
able8.
L design
gine the tranthislabsesNorth‐South
ed in lab‐4
night-mode
me comes to
) that trafficights (amberde,thesysteslikedaymosors outputentedusingofacaront
ffic lightsionyouorEast‐
without
e
o switch
c light isr to red)emstartsodewithfor non‐ON/OFFthatside.
Signal
Inpu
Outp
Considerthe
Wormod
Incochan
Thesidedispl
Theincre
Dispdesig
Type Sig
uts
InpuOperDefaCarSCarS
puts
GreeRedGreeRedStateStateWaitWait
efollowingg
stapproach:e,andahardrporate thenged.Onlythwait‐counterand car‐detlay.state‐counteementswithilayinternalgn.
ECE124
Figur
T
gnalNameutClockrationModeaultSideSensorNSSensorEWenLEDNSLEDNSenLEDEWLEDEWeNumbereCountertCounterNStCounterEW
uidelinesiny
:Duplicatingdwarethatonnightmodeetransitioncrincrementstection senso
er is reset tinastate,anstatenumbe
LabManualhttps://ece.u
e16–TrafficL
Table 8 – TLC
AssignedCLOCKSW[1SW[1SW[1SW[1LEDGLEDR[LEDGLEDRHEXHEX
S HEXW HEX
yourdesign.
gthecircuitnlyworksatwith your cconditionsars(countsupor is on for
o 0h once tdresetstozeerandtransi
‐DigitalCircwaterloo.ca/~
27
LightControlle
C circuit IO defi
dPortK_50 50M17] ‘0’:d16] ‘0’:N15] Car14] Car[8] Gree[11] Red[7] Gree[0] GreeX0 4‐biX2 4‐biX4 4‐biX6 4‐bi
areabyconsnightmode.current lab‐4rerequiredtstarting0h)the same sid
the system eeroineachnitioncounter
cuitsandSyst~ece124/
erTimingDiag
inition
DMHzon‐boardday,‘1’:nighNS,‘1’:EWdetectionsedetectionseenlightpattedlightpatternenlightpatteenlightpatteitinternalstaitinternalstaitinternalwaitinternalwa
structingah.4 design. Thtobechangeonlyifthelde otherwis
enters a newnewstate.r.Theyare i
tems
gram
Descriptiondclockht
ensoroutputensoroutputernfornorthnfornorth/sernforeast/ernforeast/atenumberatecounteraitcounterfoaitcounterfo
hardwaretha
he number od.ightisredfoe itmust be
w state. In o
ingreathelp
forNSbounforEWbounh/southbounsouthbound/westbounds/westbounds
orNSboundorEWbound
atonlywork
f states need
orthecorrese reset to 0h
other words
pfordebugg
dndndssss
sds
ksatday
d not be
spondingh on the
s, it only
gingyour
6.3 Simu
Similartolasameprocedmodeaswel
6.4 Post-
Download, pscheduleddendofthede
1. Scanthe “circu
2. Implencoviewreve
3. Fully(ENT
4. Funcdesirshowcarsbe spoin
ulation
ab‐4,youwilldureandgenllasday‐mod
-lab
print and fiate.Thensuemosession.
nofcomplete“Total logicuit.lementationounteredprow of your ciralsallregistey commenTITY+ARCHIctional Simured.Youneewthedifferesensorvalueshown. Pleastsandhowt
ECE124
lneedtochanerateasimude.
ill out the “bmitthepos.Thesubmit
ed“Lab5Subelements” a
procedure,oblemsorburcuit (4 pagersandstatented VHDLTECTURE).lationWavedtoshowthntscenarioss)usingnume try to covthisisrelated
LabManualhttps://ece.u
angetheVHDulationwave
“Lab5Submisst‐labreportttedreportm
missionFormand “Worst
design decisugswith soluges max). UseswithinaciL code.
forms: Simuhatbothnighthatcanhap
merouswavever and expldtotherequ
‐DigitalCircwaterloo.ca/~
28
DLcodeslighformthatpr
ssionForm.pdonthedrop
mustinclude:
m”asthefroCase Speed
sions, statemution to themse Tools‐>Nrcuit.Do not
ulationmusthtmodeandppeninnighforms.Finallain what hairements.
cuitsandSyst~ece124/
htlyinorderrovesthecirc
df” form anp‐boxonLEA:
ontpageofyoParameters”
machine diagm,debugginetlist Viewe
include
be done todaymodewhtmode(difflythewaitcoappens in yo
tems
rtodothesicuitisworkin
nd demonstrARN,oneday
ourreport.D” in the form
gramwith trng techniquesers‐>StateM
the Seve
prove that tworkasdesirferentdefaulountersfuncour waveform
mulation.Fongproperly
rate your dey(24hours)
Don’tforgettm for demo
ransition consandRTL aMachine Vi
enSegment
the designwred.Alsoyoultsidesanddctionalityshoms at differe
ollowtheinnight‐
esign onafterthe
tofilloutnstrated
nditions,andStateewer. It
design
works asuneedtodifferentouldalsoent time
Name
SW[0]
SW[1]
SW[2]
SW[3]
SW[4]
SW[5]
SW[6]
SW[7]
SW[8]
SW[9]
SW[10]
SW[11]
SW[12]
SW[13]
SW[14]
SW[15]
SW[16]
SW[17]
HEX0[0]
HEX0[1]
HEX0[2]
HEX0[3]
HEX0[4]
HEX0[5]
HEX0[6]
HEX1[0]
HEX1[1]
HEX1[2]
HEX1[3]
HEX1[4]
HEX1[5]
HEX1[6]
HEX2[0]
HEX2[1]
HEX2[2]
HEX2[3]
ECE124
7 Appen
Location
PIN_N25
PIN_N26
PIN_P25
PIN_AE14
PIN_AF14
PIN_AD13
PIN_AC13
PIN_C13
PIN_B13
PIN_A13
PIN_N1
PIN_P1
PIN_P2
PIN_T7
PIN_U3
PIN_U4
PIN_V1
PIN_V2
PIN_AF10
PIN_AB12
PIN_AC12
PIN_AD11
PIN_AE11
PIN_V14
PIN_V13
PIN_V20
PIN_V21
PIN_W21
PIN_Y22
PIN_AA24
PIN_AA23
PIN_AB24
PIN_AB23
PIN_V22
PIN_AC25
PIN_AC26
LabManualhttps://ece.u
ndix I – D
Name
HEX2[4]
HEX2[5]
HEX2[6]
HEX3[0]
HEX3[1]
HEX3[2]
HEX3[3]
HEX3[4]
HEX3[5]
HEX3[6]
HEX4[0]
HEX4[1]
HEX4[2]
HEX4[3]
HEX4[4]
HEX4[5]
HEX4[6]
HEX5[0]
HEX5[1]
HEX5[2]
HEX5[3]
HEX5[4]
HEX5[5]
HEX5[6]
HEX6[0]
HEX6[1]
HEX6[2]
HEX6[3]
HEX6[4]
HEX6[5]
HEX6[6]
HEX7[0]
HEX7[1]
HEX7[2]
HEX7[3]
HEX7[4]
‐DigitalCircwaterloo.ca/~
29
DE2 pin a
Location
] PIN_AB2
] PIN_AB2
] PIN_Y24
] PIN_Y23
] PIN_AA2
] PIN_AA2
] PIN_Y26
] PIN_Y25
] PIN_U22
] PIN_W24
] PIN_U9
] PIN_U1
] PIN_U2
] PIN_T4
] PIN_R7
] PIN_R6
] PIN_T3
] PIN_T2
] PIN_P6
] PIN_P7
] PIN_T9
] PIN_R5
] PIN_R4
] PIN_R3
] PIN_R2
] PIN_P4
] PIN_P3
] PIN_M2
] PIN_M3
] PIN_M5
] PIN_M4
] PIN_L3
] PIN_L2
] PIN_L9
] PIN_L6
] PIN_L7
cuitsandSyst~ece124/
assignme
Nam
6 HEX7
5 HEX7
KEY[
KEY[
25 KEY[
26 KEY[
LEDR
LEDR
2 LEDR
4 LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDR
LEDG
LEDG
LEDG
LEDG
LEDG
LEDG
LEDG
LEDG
LEDG
CLOC
CLOC
tems
ent file
me Loc
7[5] PIN
7[6] PIN
0] PIN
1] PIN
2] PIN
3] PIN
R[0] PIN
R[1] PIN
R[2] PIN
R[3] PIN
R[4] PIN
R[5] PIN
R[6] PIN
R[7] PIN
R[8] PIN
R[9] PIN
R[10] PIN
R[11] PIN
R[12] PIN
R[13] PIN
R[14] PIN
R[15] PIN
R[16] PIN
R[17] PIN
G[0] PIN
G[1] PIN
G[2] PIN
G[3] PIN
G[4] PIN
G[5] PIN
G[6] PIN
G[7] PIN
G[8] PIN
CK_27 PIN
CK_50 PIN
cation
_P9
_N9
_G26
_N23
_P23
_W26
_AE23
_AF23
_AB21
_AC22
_AD22
_AD23
_AD21
_AC21
_AA14
_Y13
_AA13
_AC14
_AD15
_AE15
_AF13
_AE13
_AE12
_AD12
_AE22
_AF22
_W19
_V18
_U18
_U17
_AA20
_Y18
_Y12
_D13
_N2