Computer Systems 2 Flashcards Preview

Computing > Computer Systems 2 > Flashcards

Flashcards in Computer Systems 2 Deck (72)
Loading flashcards...
1

Combinational circuits consit of?

  • Logic gates connected together
  • Has some inputs and produces some outputs 
  • Contains no feedback loops 

  • Outputs are a pure boolean function of the current input values 

2

Procedure for Combinational circuit simulation

Find an output of a logic gate where all the inputs are known, and write down the output value (using the truth table for the logic gate) 

Repeat until all signals are known 

3

A multiplexor is a hardware version of?

The if-then-else expresson

 

mux1 c x y = if c is zero then x else y 

4

What is a Clock Skew?

The clock ticks do not reach the flip flops at exactly the same time 

5

A cicuit is synchronous if?

  •  It contains logic gates and flip flops 
  • Every flip flop is connected directly to a unique global clock 

  • No logic functions are performed on the clock signal 

  • Clock tick reaches each flip flop simultaneously 

  • Every feedback loop in the circuit passes through a flip flop 

  • The inputs to the circuit are assumed to remain stable throughout an entire clock cycle 

 

6

Describe some behaviours of a synchronous circutit

  • There is a single global state, comprising the states of all the flip flops in the entire circuit
  • At each clock cycle, the circuit inputs and the flip flop outputs go into the combinational logic, which settles down in order to provide new inputs to the flip flops 

7

A synchronous circuit is a sequential circuit that is designed so that...

All flip flops change their state at the same point in time 

8

The synchronous design is a tradeoff, Explain..

  • The designer gives up the ability to use some design techniques that may offer better speed 

  • In return, the behaviour of the circuit is much easier to reason about, especially for large and complex circuits 

9

Describe some benefits of the synchronous model

  • Entire circuit behaves as a single finite state automaton

  • Simulate its behaviour with a simulation table

  • It is not necessary to consider intermediate signal values in the combinational logic 

  • Temporary changing signal values (due to gate delays) can be ignored 

10

When to use a combinational circuit?

  • For pure mathematical functions (as long as they aren’t too complicated)algebra 
  • For computations that can be performed within one clock cycle 

11

When to use a sequential circuit?

  • For algorithms that require iteration

  • For functions that would require too much time for one clock cycle 

12

Describe some techniques for combinational design

  • Specification as a boolean expression
  • Synthesis from truth table
  • Use multiplexor for conditional expression
  • Describe the value you want on a signal, then introduce a building block to calculate it 

13

Describe some technieques for sequential design

  • Think of the states you want the machine to go through
  • Introduce flip flops or registers to hold the state
  • Describe the values you want to put into the flip flops or registers
  • Design combinational circuits to calculate those values 

14

Describe some characteristics of Sigma 16

  • RISC style
  • 16 - Bit words
  • 16 bit memory address
  • Instruction fields are 4 bits wide
  • Instructions can be one or two words

15

One word instructions in Sigma 16 are?

RRR instructions

 

add R1,R2,R3

sub R1,R2,R3

etc

16

Two word instructions in Sigma 16 are?

RX instructions

 

lea R1,const[R2]

jumpf R1,const[R2]

etc

17

In Sigma 16 the pc register..

program counter: address of the next instruction 

18

In sigma 16 the ir register....

instruction register: the instruction currently being executed 

19

In sigma 16 the adr register...

address register: for calculating the effective address 

20

In sigma 16 the dat register...

data register; used as buffer for the memory 

21

In sigma 16 the trap instruction...

  • Has three register operands (it’s an RRR instruction)

  • The first register contains a trap code that tells the operating system what the program is requesting 

  • The other registers may contain further data

22

Describe the Control circuit...

  • The circuit outputs a set of control signals
  • The behaviour of the datapath is determiend by the values of the control signals
  • The control circuit needs to examine a small number of signals within the datapath, in order to figure out what to do
  • Therefore each circuit recevies inputs from the other, and sends outputs to the other 

23

The instuction set architecture ISA defines...

  • The registers and memory which are visible to the programmer
  •  The set of instructions
  •  How the instructions are represented (as words of bits)
  •  The effect of executing each type of instruction 

24

In translating pseduocode to assembly language,

Describe statement-by-statement...

  •  Each statement is compiled independently
  •  Straightforward but inefficient
  •  Use this style if you feel confused 

25

In translating pseudocode to assembly,

Describe register-variable style

  • More efficient, but you have to keep track of whether variables are in memory or a register
  •  Real compilers use this style
  •  Use this style if you like the shorter code it produces 

26

Describe some characteristics of statement-by-statment

  • Each statement is compiled into a separate block of code
  • Each statement requires loads, computation, then stores
  • A variable may appear in several different registers
  • There may be a lot of redundant loading and storing
  • The object code corresponds straightforwardly to the source code, but it
  • May be unnecessarily long 

27

Describe some charactersitcs of register-variable style

  • The instructions corresponding to the statements are mixed together
  • Some statements are executed entirely in the registers
  • A variable is kept in the same register across many statements
  • The use of loads and stores is minimised
  • The object code is concise, but it’s harder to see how it corresponds to the source code 

28

Describe basic Memory Allocation

  • The operating system maintains a map of the entire memory, organised as a set of blocks
  • A running program often needs to allocate a block of memory dynamically
  • When a program requests memory, it asks for a block of the size that it needs, and the operating system returns with the address of a block 

29

Describe static variables

The lifetime of a static variable is the entire execution of a program

  • When the program is launched, its static variables are created

  • They continue to exist, and to retain their values, until the program is terminated

30

Describe static-varibales in a data segment

  • The variables are not placed in memory right after the instructions
  • The program makes a request to the operating system to allocate a block of memory for data (the static data segment)

  • A register is dedicated to point to the static data segment 

  • Variables are accessed using the static data segment register