Docsity

Hardware Design Methodologies - Lecture Slides | CIS 371, Study notes of Computer Science

Toggle sidebar
bg1
CSE 372 (Martin/Roth): Introduction 1
CIS 372
Compuer Organization and Design Lab
Prof. Amir Roth
Unit 0: Introduction
CSE 372 (Martin/Roth): Introduction 2
Computer Organization and Design
• CIS 240: computer organization …
• How a computer works
• Hardware: instruction sets, datapath & control, integer arithmetic
• Software: ā€œassembly languageā€ (LC3 / LC4), C
• CIS 371: … and design …
• How a computer works fast! And using little power!
• Focus on hardware: pipelining, caches, speculation, wide issue,
multiprocessing, multithreading, virtualization, etc.
• CIS 372: … lab
•Build an LC4 processor! Run programs (maelstrom) on it!
CSE 372 (Martin/Roth): Introduction 3
Actual Hardware
• We’ll use FPGAs (Field Programmable Gate Array)
• Also called Programmable Logic Devices (PLDs)
• An FPGA is a special type of programmable chip
• Conceptually, contains a grid of gates
• The wiring connecting them can be reconfigured electrically
• Using more transistors as switches
• Once configured, the FPGA can emulate any digital logic design
• Synthesis tool converts gate-level design to configuration
• Uses
•Hardware prototyping (what ā€œweā€ are doing)
• Low-volume special-purpose hardware
• New: computational offload
CSE 372 (Martin/Roth): Introduction 4
In Our Lab: Digilent XUP-V2P Boards
• Program FPGA to run p37x
• ā€œThe projectā€
• Hook up keyboard
• And VGA
• Game on!
• Boards have many features
• Use some for debugging
• LEDs, switches
• Others, not at all
• Ethernet, flash reader
• 256MB SDRAM, audio in/out
• Can boot Linux!
pf3
pf4

Partial preview of the text

Download Hardware Design Methodologies - Lecture Slides | CIS 371 and more Study notes Computer Science in PDF only on Docsity!

CSE 372 (Martin/Roth): Introduction 1

CIS 372

Compuer Organization and Design Lab

Prof. Amir Roth

Unit 0: Introduction

CSE 372 (Martin/Roth): Introduction 2

Computer Organization and Design

• CIS 240: computer organization …

  • How a computer works
  • Hardware: instruction sets, datapath & control, integer arithmetic
  • Software: ā€œassembly languageā€ (LC 3 / LC 4 ), C

• CIS 371: … and design …

  • How a computer works fast! And using little power!
  • Focus on hardware: pipelining, caches, speculation, wide issue, multiprocessing, multithreading, virtualization, etc.

• CIS 372: … lab

  • Build an LC 4 processor! Run programs (maelstrom) on it!

Actual Hardware

• We’ll use FPGAs (Field Programmable Gate Array)

  • Also called Programmable Logic Devices (PLDs)

• An FPGA is a special type of programmable chip

  • Conceptually, contains a grid of gates
  • The wiring connecting them can be reconfigured electrically
    • Using more transistors as switches
  • Once configured, the FPGA can emulate any digital logic design
  • Synthesis tool converts gate-level design to configuration

• Uses

  • Hardware prototyping (what ā€œweā€ are doing)
  • Low-volume special-purpose hardware
  • New: computational offload

In Our Lab: Digilent XUP-V2P Boards

• Program FPGA to run p37x

  • ā€œThe projectā€

• Hook up keyboard

• And VGA

• Game on!

• Boards have many features

• Use some for debugging

  • LEDs, switches

• Others, not at all

  • Ethernet, flash reader
  • 256 MB SDRAM, audio in/out
  • Can boot Linux!

CSE 372 (Martin/Roth): Introduction 5

Hardware Design Methodologies

• How do we get there from here?

• How is hardware designed?

• Many design methodology choices

  • Level: transistors vs. gates (no other choice with FPGAs)
  • Layout: manual vs. synthesized
  • Tool: schematic vs. hardware description language (HDL) CSE 372 (Martin/Roth): Introduction 6

Schematics

• Draw pictures

  • Use a schematic entry program to draw wires, logic blocks, gates
  • Support hierarchical design (arbitrary nesting)
  • Good match for hardware which is inherently spatial, purty
  • Time consuming, ā€œnon-scalableā€ (large designs are unreadable)
  • Rarely used in practice (ā€œreal-worldā€ designs are big)

S

O

B

A

Hardware Description Languages (HDLs)

• Write ā€œcodeā€ to describe hardware

  • HDL vs. SDL
  • Specify wires, gates, modules (also hierarchical)
  • Easier to create, edit, modify, scales well
  • Disconnect: must still ā€œthinkā€ visually (gets easier with practice) module mux 2 to 1 (S, A, B, Out); input S, A, B; output Out; wire S_, AnS_, BnS; not (S_, S); and (AnS_, A, S_); and (BnS, B, S); or (Out, AnS_, BnS); endmodule

S

Out B

A

(Hierarchical) HDL Example

• Build up more complex modules using simpler modules

  • Example: 4 - bit wide mux from four 1 - bit muxes module mux 2 to 1 _ 4 (S, A, B, Out); input [ 3 : 0 ] A; input [ 3 : 0 ] B; input S; output [ 3 : 0 ] Out; mux 2 to 1 mux 0 (S, A[ 0 ], B[ 0 ], Out[ 0 ]); mux 2 to 1 mux 1 (S, A[ 1 ], B[ 1 ], Out[ 1 ]); mux 2 to 1 mux 2 (S, A[ 2 ], B[ 2 ], Out[ 2 ]); mux 2 to 1 mux 3 (S, A[ 3 ], B[ 3 ], Out[ 3 ]); endmodule

S

4 4

A^4

B

Out

CSE 372 (Martin/Roth): Introduction 13

The Labs

• Lab 0: due Thurs. 2/

  • Getting started: tools intro, timer device

• Lab 1: due Thurs. 2/26 (before midterm)

  • Single-cycle LC 4 processor: register file, datapath, controller

• Lab 2: due Thurs. 4/23 (last week of class)

  • A: Pipelined LC 4 processor + B: bypassing + C: branch prediction

• Tiered grading

  • Labs 0 and 1 are mandatory for a B
  • Lab 2 A, 2 B, 2 C optional for B+, A-, A

• All done in groups of 2

  • Boards and lockers handed out after class next Wednesday 1 / 28
  • Make sure partner wants to go as far as you do
  • Note: final exam will decouple your grade somewhat CSE 372 (Martin/Roth): Introduction 14

372 Lectures

• 5 372 lectures over the course of the semester

  • Stolen from 371 lectures, we will try not to use the Friday slot
  • 1 : Verilog (Lab 0 prep)
  • 2 : VPI and Verilog simulation
  • 3 : FPGAs and synthesis (Lab 1 prep)
  • 4 : Design and testing (Lab 2 prep)
  • 5 : 372 final exam ( 40 minutes)

• Not covered

  • Transistor-level design, VLSI, layout, circuit analysis
  • Synthesis algorithms, place & route
  • Embedded systems, hardware/software co-design, ASICs/ASIPs

Lab Logistics

• K-Lab: Moore 204

  • Home of the boards, computers, and later in semester … you
  • 24 hour access, keycode for door lock
  • TA Office hours, project demos here, too

• Tools

  • Digilent XUP-V 2 P boards
  • Xilinx ISE v 8. 2 i
  • Warning: all such tools notorious for being buggy and fragile

• Working from home

  • Student version of Xilinx ISE is available
  • ICARUS- 0. 8. 7 : fast, but simulation only, and not fully featured
  • All projects must run on the boards in the lab

Resources

• Instructor

  • Amir Roth (amir@cis)
  • Office: Levine 603 , Hours: TR 1 : 30 - 3

• TAs: all undergrads from 372 last year

  • Nate (conradj), Michajlo (michajlo), Andres (andres)
  • Office: K-lab, Hours: MRF 3 - 6 : 30

• Web

  • Class web page: http://www.seas.upenn.edu/~cse 372 /
  • Google group: http://groups.google.com/group/upenn-cis 372 - s 09

• Academic Conduct

  • Anything with your name on it must be your own
  • Penn’s code: http://www.vpul.upenn.edu/osl/acadint.html