SMD150 Computer Architecture Andrey Kruglyak Lectures 27/3, Lab - - PowerPoint PPT Presentation

smd150 computer architecture
SMART_READER_LITE
LIVE PREVIEW

SMD150 Computer Architecture Andrey Kruglyak Lectures 27/3, Lab - - PowerPoint PPT Presentation

SMD150 Computer Architecture Andrey Kruglyak Lectures 27/3, Lab preparation Simulation of digital electronic circuits Synchronous Circuit Simulator (SyncSim) MIPS microprocessor Lab assignment 1 3/4, Lab


slide-1
SLIDE 1

SMD150 Computer Architecture

Andrey Kruglyak

slide-2
SLIDE 2

SMD150 Computer Architecture Andrey Kruglyak, 2007

Lectures

  • 27/3, Lab preparation
  • Simulation of digital electronic circuits
  • Synchronous Circuit Simulator (SyncSim)
  • MIPS microprocessor
  • Lab assignment 1
  • 3/4, Lab preparation
  • VHDL
  • Writing VHDL components for SyncSim
  • Memory module for SyncSim
  • Lab assignment 2
slide-3
SLIDE 3

SMD150 Computer Architecture Andrey Kruglyak, 2007

Labs

  • Pre-requisites:
  • basic understanding of how a microprocessor works
  • acquaintance with the assembly language
  • Lab 1, deadline 3/4
  • Write (in assembly language) a program for a MIPS simulator
  • MIPS simulator for SyncSim will be given
  • Work individually or in pairs
slide-4
SLIDE 4

SMD150 Computer Architecture Andrey Kruglyak, 2007

Labs

  • Lab 2, deadline 21/5§
  • Complete a small

VHDL tutorial

  • Design (in VHDL) a model of a super-scalar MIPS processor for SyncSim

& test it

  • Memory module will be given
  • Work individually or in pairs
slide-5
SLIDE 5

SMD150 Computer Architecture Andrey Kruglyak, 2007

ASK QUESTIONS !

  • NOW
  • DURING LABS TODAY AND ON FRIDAY
  • LATER:

andrey.kruglyak@ltu.se

slide-6
SLIDE 6

SMD150 Computer Architecture Andrey Kruglyak, 2007

Digital Electronic Circuits

  • At the lowest level consist of transistors connected by wires
  • More complex elements are logic gates (AND, OR, XOR, NOT, etc.) and

memory elements (buffers and registers)

  • We will speak about program counter, register file, data/instruction memory,

ALUs, ...

  • We will see examples of different circuits, but work with designs of

microprocessors

slide-7
SLIDE 7

SMD150 Computer Architecture Andrey Kruglyak, 2007

Testing & Simulation

  • Digital circuits can be tested (build, send input, check output)
  • Digital circuit can be simulated in software (send input, observe internal

behavior, check output)

  • Simulation can be performed in different ways, usually by introducing various

simplifications

  • We will concentrate on functional behavior at the register transfer level

(RTL) (i.e. producing the correct result) and ignore the timely behavior of the circuits

  • each clock cycle is treated as one simulation step
  • hold time, propagation delay, set-up time, etc. are ignored
  • clock skew is ignored
slide-8
SLIDE 8

SMD150 Computer Architecture Andrey Kruglyak, 2007

Synchronous Circuits

  • Practically all digital circuits are synchronous
  • i.e. there is one clock signal for a system (or a subsystem)
  • the clock is delivered to some components of the system, these are called

synchronous components

  • the clock is delivered to them (almost) simultaneously
  • the synchronous components change value only at the (rising) edge of the

clock depending on the input at that moment, and hold the output constant until the next (rising) edge of the clock

  • ther components change their value as soon as any input changes, and the

clock is not delivered to them; these are called combinatorial components

1

slide-9
SLIDE 9

SMD150 Computer Architecture Andrey Kruglyak, 2007

Synchronous Circuits

  • in one clock cycle, a signal travels from one synchronous component

through a number of combinatorial components to another synchronous component

  • at the (rising) clock edge, all inputs to a synchronous component must be

ready to be sampled

  • the longest path between two synchronous components is known as the

critical path

  • the length of a clock cycle must be larger than the critical path
  • it is important to avoid combinatorial loops, any combinatorial loop leads to

a signal never stabilizing and the output of the circuit becomes unpredictable

slide-10
SLIDE 10

SMD150 Computer Architecture Andrey Kruglyak, 2007

SyncSim

  • The software we will use for simulation has been developed here at LTU
  • You will use last-year’s version for the first lab, and a newer version for the

second lab

  • SyncSim is a general synchronous circuit simulator
  • it allows to define any circuit with synchronous and combinatorial

components

  • the components can be defined in Java or in

VHDL (according to some strict templates), and later connected into a complete circuit

  • during simulation the internal state of each component as well as the

value in the wires between them can be observed after each clock cycle

slide-11
SLIDE 11

SMD150 Computer Architecture Andrey Kruglyak, 2007

SyncSim

  • Note that defining a circuit and running a simulation are two

different tasks!

  • For a model of a microprocessor, input (instruction memory and (possibly)

data memory) must be provided for simulation

  • Same model can be simulated with various programs (=contents of the

instruction memory)

  • For the first lab, a ready SyncSim model of a simplified MIPS microprocessor

will be provided; your task will be to write a program for it

  • In the second lab, you will build components for a super-scalar MIPS in

VHDL and connect them in SyncSim; you will also write programs to test your design

slide-12
SLIDE 12

SMD150 Computer Architecture Andrey Kruglyak, 2007

MIPS (lab 1)

  • MIPS is a large family of microprocessors, produced by MIPS Technologies
  • It is a RISC (Reduced Instruction Set Computer) processor with 32 registers
  • It is a 32-bit processor, and each instruction is also 32 bit wide
  • We will work with a simplified single-cycle version (i.e. no pipelines)
  • The model we will use for the first lab is written entirely in Java
  • We will use tools available from MIPS Technologies to compile program

code into binary (machine) code

slide-13
SLIDE 13

MIPS Model for SyncSim

Demo

slide-14
SLIDE 14

SMD150 Computer Architecture Andrey Kruglyak, 2007

LAB 1: GOALS

  • Learn how to use SyncSim
  • Learn a simplified version of MIPS
  • Refresh / learn the MIPS assembly language