ࡱ> &(b  ( ~0http://www.microsoft.com2http://www.microsoft.com/f$http://www.msn.com&http://www.msn.com/>*Hardware and Software$Contents$Contents>*Hardware and Software$Contents$Contents>*Hardware and Software$Contents>*Hardware and Software$Contents$Contents$Contents$Contents$Contents$Contents$ContentsJ/ 0|DArialBlackmantts 0De0}fԚBlackmantts 0 DTimes New Romantts 00DWingdingsRomantts 0@DArial Blackmantts 0" B .  @n?" dd@  @@`` LD`    2121  21  *   0AAPff3f@8g%h& ʚ;U_8ʚ; g4jdjd 0ppp@ <4dddd@k 0ts<4BdBd@k 0ts^0___PPT10 pp___PPT9? $O  =- %Targeting Handel-C for the DE2 Board &.8Presented by Vincent Lai Supervised by Professor Cheung9P98 dAimProgram the DE2 board in a C-based language A Library of drivers that support the hardware on the DE2 board A Manual and instructions for using the Library AchievementsFPGA design framework Program in Handel-C Hardware synthesis in Quartus II A library targeting the DE2 system Drivers: PS/2, RAM, VGA Interface with VHDL componentsL5#75#7n Contents6Hardware & Software Development Demonstration Summary vHardware and Software`Hardware Altera DE2 board Software Quartus II DK Design Suite Programming Language Handel-C VHDLt     Altera DE2 BoardA Development board with a Cyclone II FPGA Memory Flash memory SRAM SDRAM VGA Switches PS/2 Mouse 16x2 LCD module 7-Segment Displays & LEDs B2ZZCZ2CeWhat is Handel-C?a C-based language not a hardware description language: it supports abstractions common for software programmers Reasonably complex system can be design easily High level yet allow description of sequential and parallel logic Contents6Hardware & Software Development Demonstration Summary *7 o Development TimelinejLibrary ComponentsaLibrary file: .hcl Header file: .hch VHDL Functions Components PS/2 mouse Video Driver LCD module&?#?#lLibrary file .hclGenerated by using DK Library project Create a .hcc file containing macros Compile the project to obtain the .hcl file Example macro procedure: mHeader file .hch,Describe the macros in the library Example: &,,Interfacing with VHDLTSome functions are written in VHDL It is useful to interface with VHDL code Example:|,Example User s Program  6in the  sample code folder  kDesigning with the Library?t DifficultiesTiming of the RAM Using the SRAM as a frame buffer 640x480 24-bit colour  921600 byte 640x480 16-bit colour  614400 byte 640x480 8-bit grayscale  307200 byte Storing a raw image in the 1M-byte Flash memory63n03n0q ResultsRA library with the desired drivers A detailed Manual and instructions Sample codesContents6Hardware & Software Development Demonstration Summary 27 Contents6Hardware & Software Development Demonstration Summary 7. s Future DevelopmentComplete the development of drivers for the DE2 board Portable between Devices Useful functions Image processing FIFO for the SDRAM 6`$`$ AchievementsFPGA design framework Program in Handel-C Hardware synthesis in Quartus II A library targeting the DE2 system Drivers: PS/2, RAM, VGA Interface with VHDL componentsL5#75#7/pw     0` fff33` 3KI3ff` 33ff` /p` 3%*3|` Jy3fff3f` 3ff3̙` 33ff33` DDyq3f` ̙3n` w3ff` }ff>?" dd@,?nKd@ P nA@F`d n?" dd@   @@``PR"   @ ` `2p>>   N (    6P #" ``   b*  T X  "X  Nd#" `P FA   6d#" `U DA   S ("UY H    c $"YW H     c $"YU H     c $" H     S f#" `SV DA    S 8f"Y H     c $f"X H    <( f #" `  ` f T Click to edit Master title style! !$  0 f " `p f RClick to edit Master text styles Second level Third level Fourth level Fifth level!     S  6Df #" `^ ` f `*    Bf" `* H  0޽h ? }ff80___PPT10. 07  PixelE % 0 E(  R T   "  TPfd #"   FA   c $4f "9)e  DA Jb e  # "e   S f"ie  DA   S pf"9) DA   S f"0 DA    S @f"?e  DA    S f") DA    S f"?G DA    S xf"oG DA    S f"9G DA   S Hf"iA DA   S f"A? DA   6f #" `` ` f `*    6j #" ``  f b*    6dj #" `` ` j d*    0j "P   j T Click to edit Master title style! !  0 j " P  j W#Click to edit Master subtitle style$ $H  0޽h ? }ff80___PPT10. 07"% 0 2(    0Oj :8  j Z*   0Tj r 8 j \* d  c $ ??p  j  0Wj   j RClick to edit Master text styles Second level Third level Fourth level Fifth level!     S  6]j ):a  j Z*   6aj )r a j \* H  0gL ? 3380___PPT10.<#G& 0 0*(  x  c $jP   j r  S Lj , j H  0޽h ? ZX^mo___PPT10i.e+D=' = @B + % 0 @0(  x  c $Dj  `  j x  c $yj `p j H  0޽h ? 33___PPT10i.#i+D=' = @B +0 % 0 ` \0(  \x \ c $f  `  f x \ c $f `p f H \ 0޽h ? }ff80___PPT10.  % 0 0 Q(  r  S Dj  `  j r  S j `p j %  <Pjm- ?| Hardware & Software | Development | Demonstration | Summary |@ @x             0 0# 0&3 06=H  0޽h ? }ff___PPT10i.V@iF+D=' = @B + % 0  U(  x  c $$j  `  j x  c $jYY j   <0jm- ?| Hardware & Software | Development | Demonstration | Summary |6@ +?  H  0޽h ? }ff___PPT10i.V@iF+D=' = @B +I % 0  ,I(  ,r , S  j  `  j r , S j/ j  , <jm- ?| Hardware & Software | Development | Demonstration | Summary |6@ +?  H , 0޽h ? }ff80___PPT10.*@œ8 % 0 PU(  x  c $H   `   x  c $  `p    <jm- ?| Hardware & Software | Development | Demonstration | Summary |6@ +?  H  0޽h ? 33___PPT10i.<+D=' = @B + %  0  <](  <x < c $  `   x < c $, `p  % < <`"m- ?| Hardware & Software | Development | Demonstration | Summary |@ @x             0 0# 0&3 06=H < 0޽h ? }ff___PPT10i.V@iF+D=' = @B + % 0  )(  r  S D(  `    p 3 "Z ? CCrC[_5٢"rn,;٢"=H; -_HL~t Om-_S{ `p T  c $X99 ?p~ ( NG28HI28o_s181288i~ & NGdHHIdHo_s181286 J   TG28HI28o _s181274    TG28HI28o _s181275[    TGdHHIdHo _s181276:  TG28HI28o _s181277`"  `/ _s181278#"  p rWeek 1  Getting familiar with the DE2 board and Handel-C&: 4"  `p2 _s181279#"  p Week 2  Research in building a library in Handel-C and writing simple VHDL functions&V PH"   `8 _s1812803"   :pZ  TWeek 3  Use Handel-C to program the board&+ %j" ! `= _s1812813"    p  vWeek 4 to week 8  Developing Drivers (writing and testing)&< ,L" " `C _s1812823"    p  XWeek 9  Writing the Manual and Instructions&- 'v" % ZG_s1812853"   J pi tWeek 10  Preparing the Demos and finishing off the Manual&; 4 ; " ' Z4M_s181287#"  p Week 11  Trying to add a camera to the DE2 board with the written drivers&K D K  ) <dRm- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ?o ! "!%"&'%( }ff___PPT10i.U"+D=' = @B +I % 0 I(  r  S q  `   r  S q `p    <rm- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ? }ff80___PPT10.CJK % 0 (  r  S }  `   r  S \~ `p  W  < 7 macro proc DE2SetLEDGs(mask) { interface bus_out() LEDG(mask) with {data={"Y12","Y18","AA20","U17","U18","V18","W19","AF22","AE22"}}; }     <,m- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ? }ff80___PPT10.D Vm % 0 m(  x  c $L  `   x  c $$ `p    <7V  Ntypedef signal unsigned 9 DE2_LEDG_MASK; extern macro proc DE2SetLEDGs(mask);O O('   <xm- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ? }ff80___PPT10.D V % 0 ]U 0(  0r 0 S 䣢  `   r 0 S  `p   0 6觢 YI  6 interface LCD_DISPLAY(unsigned 1 LCD_RS, unsigned 1 LCD_E, unsigned 1 LCD_RW, unsigned 8 DATA_BUS) LCD(unsigned 1 re_set=key0.in, unsigned 1 clk_50Mhz = clk_in.in, unsigned 256 Hex_Display_Data=line) with {vhdl_type="std_logic_vector"};  0 <@m- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H 0 0޽h ? }ff80___PPT10.. % 0 aY@ (  r  S ܷ  `     6໢P S :set clock = external "N2"; #include "DE2.hch" void main(void) { DE2_SW_MASK SW; do { DE2SW(SW); //read inputs from the toggle switches DE2SetLEDRs(SW); //shows the status of the switches on LEDs } while(1); }   r  S   `p    <m- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ? }ff80___PPT10.f  % 0    (  r  S Ϣ  `    p   "B)F1 ݶ? ]s]sݠX]s)%<ݠXUTy*Қ<y*<,]C> T  c $X99?p ~  NGHIo_s177174  ~  NG}HI}o_s177172Z  ~  NG}HI}o_s177168:~  NGHIo_s177166"  Zx֢_s177160#"  p KInclude the DE2 Library "   Zڢ_s177163#"  p GProgram in Handel-C X"  Z_s1771673"   :pZ  ^Compile in DK  Outputs: EDIF file & tcl script0 0)"  Z4_s1771713"    p  n:Run the tcl script and Compile the EDIF file in Quartus II; ; "  Z@_s177173#"   p  g3Simulate or Download the design on to the DE2 board4 4  <m- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ?O   }ff___PPT10i.Dph۟+D=' = @B +I % 0  I(  r  S H  `   r  S  `p    <(m- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ? }ff80___PPT10.0 % 0 ` I(  r  S $  `   r  S  `p    <m- ?| Hardware & Software | Development | Demonstration | Summary |6@  ?  H  0޽h ? }ff___PPT10i.bP7U+D=' = @B + %  0  D](  Dx D c $  `   x D c $ `p  % D <m- ?| Hardware & Software | Development | Demonstration | Summary |@ @x             0 0# 0&3 06=H D 0޽h ? }ff___PPT10i.V@iF+D=' = @B + %  0 0 L](  Lx L c $x   `   x L c $P! `p  % L <*m- ?| Hardware & Software | Development | Demonstration | Summary |@ @x             0 0# 0&3 06=H L 0޽h ? }ff___PPT10i.V@iF+D=' = @B +I % 0  I(  r  S 0  `   r  S 0 `p    <\5m- ?| Hardware & Software | Development | Demonstration | Summary |6@ 6?  H  0޽h ? }ff80___PPT10.d U % 0 p `U(  `x ` c $=  `   x ` c $> `p   ` <7m- ?| Hardware & Software | Development | Demonstration | Summary |6@ 6?  H ` 0޽h ? }ff80___PPT10.  0 ,(  ^  S ?p   j  c $@oj   j " H  0gL ? 3380___PPT10.$G  0 @ ,(  ^  S ?p     c $0    " H  0gL ? 3380___PPT10.^9O?( 0  8(  d  c $?p     s *l    " H  0gL ? 3380___PPT10.^9O?( 0  @8(  @d @ c $?p    @ s *}    " H @ 0gL ? 3380___PPT10.^9O?( 0  H8(  Hd H c $?p    H s *    " H H 0gL ? 3380___PPT10.^9O?( 0 @ P8(  Pd P c $?p    P s *x    " H P 0gL ? 3380___PPT10.^9O?r !M F̵d O.`g &7j{~uThs v 'Y|\c`Dt =Ro1Oh+'0 ( H T ` lx(Restoring Minority Game with Evolution terryPixelVincent CF Lai68Microsoft PowerPoint@@@R@0S7{G$g   "  y--$xx--'---$xx----$xx----$xx----$xx----$xx----$x x ----$ x x ----$ x x ----$ x x ----$ xx ----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$xx----$x x ----$ x!x! ----$!!x"x"!----$""x#x#"----$##x$x$#----$$$x%x%$----$%%x&x&%----$&&x'x'&----$''x(x('----$((x)x)(----$))x*x*)----$**x+x+*----$++x,x,+----$,,x-x-,----$--x.x.-----$..x/x/.----$//x1x1/----$11x2x21----$22x3x32----$33x4x43----$44x7x74----$77x;x;7----$;;x>x>;---'}--$II--'--$ > II> >--'--$((((--'--$''22'--'}--$>II>>--'--$''(2(2'--'--$(33((--'}--$(3 3 ((--'--$(3(3(((--'--$ 3 >>3 3--'--$3>>33--'@Arial-. 2 19Targeting Handel."Systemp7-@Arial-.  2 1- .-@Arial-.  2 1C .-@Arial-. "2 >?for the DE2 Board .-@Arial-. 2 P Presented by.-@Arial-. 2 U Vincent Laiy.-@Arial-. 2 ` Supervised by.-@Arial-. 2 fProfessor Cheung.-՜.+,D՜.+,    -On-screen Show Arial sөTimes New Roman Wingdings Arial BlackPixel&Targeting Handel-C for the DE2 Board Aim Achievements ContentsHardware and SoftwareAltera DE2 BoardWhat is Handel-C? ContentsDevelopment TimelineLibrary ComponentsLibrary file .hclHeader file .hchInterfacing with VHDLExample Users ProgramDesigning with the Library? DifficultiesResults Contents ContentsFuture Development Achievements  Fonts UsedDesign Template Slide Titles(T\ _PID_HLINKS _TemplateIDAhlhttp://www.microsoft.com/http://www.msn.com/272,4,Hardware and Software282,7,Contents284,18,Contents272,4,Hardware and Software282,7,Contents284,18,Contents272,4,Hardware and Software282,7,Contents272,4,Hardware and Software282,7,Contents283,17,Contents284,18,Contents283,17,Contents284,18,Contents283,17,Contents283,17,ContentsTC010721191033&_0Vincent CF LaiVincent CF Lai  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`acdefghijklmnoqrstuvwyz{|}~Root EntrydO)Current UserxSummaryInformation(bPowerPoint Document(DocumentSummaryInformation8p