Term 1 Flashcards

1
Q

What is the difference between a structural and behavioural description?

A

Structural - tells us how we would make it but not what it would do e.g. an Ikea construction leaflet
Behavioural - tells us what the design should do but not how to make it e.g. g <= ‘1’ when a>b else ‘0’;

VHDL can be written in both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the ENTITY declaration describe?

A

Creates the port map used to determine signals going in and out of a module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the ARCHITECTURE?

A

Describes how the outputs respond to the inputs –> the function of the module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between:

i) a: STD_LOGIC_VECTOR (0 TO 3)
ii) a: STD_LOGC_VECTOR (3 DOWNTO 0)

A

i) 0110 MSB 0110

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are local signals and how are they declared?

A

Used to define the internal connections in a module, between internal logic gates. They cannot be accessed by the rest of the system.

ARCHITECTURE number3 OF full add IS
SIGNAL n1, n2, n3, n4: STD_LOGIC;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
How is the following code processed? (nX are signals)
n1 <= x XOR y;
sum <= cin XOR n1;
n2 <= x AND y;
n3 <= cin AND x;
n4 <= y AND cin;
cout <= n2 OR n3 OR n4;
A
  • All statements are scanned simultaneously
  • Whenever a signal on the RHS changes (also called an event) the relevant statement will run, computing new values
  • This may trigger more RHS signals to change, which are then processed AFTER the initial events have finished processing
  • This continues until there are no more events to process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Does the order of code matter in VHDL? Are there any exceptions?

A

Normally, all statements are monitored at the same time so the order doesn’t matter –> concurrent execution
The exception to this is when a PROCESS is used, then the code inside the process is executed sequentially.
Signals have their values frozen while a process is running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does a structural description look in VHDL? How is it run?

A

Architecture structural OF fulladd IS
SIGNAL n1, n2, n3: STD_LOGIC;
BEGIN
g1: ENTITY work.xor2(simple) PORT MAP (x, y, n1);
g2: ENTITY work.xor2(simple) PORT MAP (n1, cin, sum);
g3: ENTITY work.xor2(simple) PORT MAP (x, y, n2);
etc.

All statements are scanned simultaneously like before, waiting for an event on an input signal (same as behavioural)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How is a delay used in VHDL? What is the smallest interval of time that can be used?

A

By using the AFTER function (can be used to simulate gates having a small delay between input and output)
Delta - meaning a ‘moment’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Construct the event queue for an example in the lecture notes: 4-3

A

Answer in lecture notes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is inertial delay?

A

If the inputs of a gate changes to produce an output pulse that is shorter than the gate delay, the output pulse never happens and the output of the gate remains constant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is concatenation?

A

Merges two vectors to produce a longer vector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is an IF block executed sequentially? Where can it be used?

A

Yes, as such it can only be used inside a process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the general code for setting something to trigger on a clock edge?

A
PROCESS (clk)
BEGIN
IF ( rising_edge(clk) ) THEN
    q <= d;
END IF;
END PROCESS;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of including d-type flip flops (or registers) into a circuit?

A

To clean up glitches that occur when an output changes to an undesired value (see 6-6/6-7/6-8 for examples). The d-type delays the output by a clock cycle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Register Transfer Level coding (RTL)?

A

Using data flow statements but wrapping them up in processes triggered by a clock or another signal (e.g. reset). Still simply defining the desired behaviour.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How are variables different to signals?

A

A variable can only exist inside a process -> declared between PROCESS and BEGIN statements. The assignments of values to variables take effect immediately:

process (clk)
   variable b: STD_LOGIC_VECTOR (3 down 0);
begin
   if (rising_edge(clk)) then
      b := c;
      a <= b;
end if;
end process;

b gets the value of c straight away (when inside a clocked process) –> imagine a wire being drawn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a sensitivity list?

A

Used when declaring a process, if one of the signals in the sensitivity list changes then the process is run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the desirable features of the CMOS logic family?

A

High speed
Low power consumption
Low cost
Ability to pack a high density of gates on a single chip

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the 2 most important types of MOSFETs?

A

n-channel: d<=s (gate closed) when g=1

p-channel: d<=s (gate closed) when g=0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Draw a CMOS:

i) NOT gate
ii) NAND gate
iii) NOR gate

A

See notes 8-3 to 8-4 for answers

22
Q

Draw a CMOS diagram for

X=not((A and B) or (B and C) or (C and A))

A

see 8-5

23
Q

What are the steps for IC fabrication on Silicon?

A

1) Heat up silicon to oxidise surface
2) Layer of photoresist
3) Expose surface to UV light, covering the desired area with a mask
4) Dissolve the soluble (shaded) photoresist leaving are of exposed SiO2
5) Dissolve exposed SiO2 –> exposes silicon
6) Remove remaining photoresist
7) Heat up chip and expose silicon surface to dopant gas

Repeat many times to build up different layers

24
Q

What causes an IC chip to fail during the fabrication process?

A

Dust falling onto the chip either during the masking or doping process, causes chip to be faulty as the circuit would be built correctly

25
Q

What are the benefits of fitting lots of circuits onto a single chip?

A

Reduced volume and weight
Reduced cost
Reduced power consumption
Increased speed

26
Q

What is the sequence of operations for a computer carrying out a process?

A

Instruction fetch
Instruction decode
Execution
Write back

27
Q

What is the difference between static and dynamic memory?

A
Static = Retains data as long as power is supplied. Very fast but low density. More expensive
Dynamic = Stores data bit as a capacitor charge. High density but low speed. Charge leaks away over time so need internal circuity to refresh the data. Less expensive
28
Q

What is cache memory? Why is it necessary?

A

A small amount of high speed, static RAM that holds the operands and instructions the processor is likely to use in the near future.
It would be too expensive to have the main memory built from static RAM, but having 1-4GB of memory made out of dynamic RAM would be too slow. Therefore cache memory is used to bridge this gap, main memory can then be dynamic RAM without compromising too much on speed.

29
Q

Why is multilevel caching used?

A

Data bus of computer runs at a much slower clock speed than the processor (which restricts how fast the cpu can work as it has to wait for the data bus/dynamic memory), it has to wait for the required data to be loaded into the cache –> called a cache miss.
High speed cache integrated onto processor chip which can run at cpu clock speed, has it’s own data bus that runs at the same speed.

30
Q

What is the basic architecture of a current PC?

A

See 9-12

31
Q

What is hub based architecture?

A

Resolves the issue of all components sharing the same bus (which can only be accessed by one component at a time, therefore making everything very slow); everything has an unshared link to the hub which then sends the data to its correct destination.
It ‘translates’ the requirements of one bus to another; it can control how quickly a bus is delivering data, if it is sending data faster than it can be process (by another component/bus) then the bridge can buffer this data and tell the 1st bus to suspend the transfer.

32
Q

What is latency?

A

Length of time that elapses between the inputs becoming valid and the output becoming valid (how long it takes for a circuit to produce an output from an input change).
Measured in seconds

33
Q

What is throughput?

A

Rate at which a circuit outputs new results.
Throughput = 1/clockcycle
Measured in per second

34
Q

What is the purpose of pipelining?

A

In order to maximise the throughput of a circuit, it allows an output to be seen every clock cycle rather than waiting for the full system delay (see 10-6).
It can also synchronise multiple pipelines that come together at one point, making sure that the correct data arrives at the correct time.

35
Q

What is a data hazard?

A

Occurs when an instruction tries to fetch a register before that register has received its new value from an earlier instruction –> produces incorrect answer

36
Q

What are the 5 solutions to a data hazard?

A
Compiler: Insert no-ops
                 Reorder the code 
Hardware: Stall the Pipeline
                   Data Forwarding
                   Out-of-Order Execution
37
Q

What is a pipeline bubble?

A

When the hardware stalls the pipeline, a bubble of ‘cannot process’ condition is inserted and propagates down the pipeline

38
Q

What is a control hazard?

A

If the instruction queue has a jump/branch instruction, we do not know whether the jump has been taken until X clock cycles later –> next 2 instructions may execute and then jump to the branch, not ideal!

39
Q

What are the 6 solutions to a control hazard?

A

Compiler: Insert No-ops
Delayed Branching
Hardware: Stall the pipeline
Out-of-Order Issue using delayed branching
Speculative Execution
Speculative Execution w/Branch Prediction

40
Q

What is a superpipelined processor?

A

A processor that uses very long pipelines (lots of stages) –> can run at a higher frequency but are likely to spend many cycles stalled because data and control hazards occur very frequently

41
Q

What is a superscalar processor?

A

This type of processor has multiple execution units, and issues more than one instruction per clock cycle –> usually, each pipeline has a different capability (e.g. one handles integers, one handles float etc)

42
Q

What is Simultaneous multi-threading SMT (“Hyper-threading”)?

A

2 executing processes reside in one processor at the same time, and are independent of each other. If one executing process is bogged down due to pipeline stalls, data dependencies etc. we can switch to the other process and allow it to use the idle pipeline resources –> seen as one real processor and one virtual processor

43
Q

What are the differences between using a hardware and a software solution for a problem? (not data or control hazards, but in general)

A

ASICs are far faster at one particular purpose, e.g. the algorithm they are designed to cope with, however they are single purpose, expensive, and cannot be modified after production
Using a general hardware computer (like a laptop), although they are slower and can only process one step at a time, they are more flexible as the program can be modified at any time, with minimal cost.

44
Q

What methods or hardware implementation/synthesis are there?

A

ASIC - made in an external silicon foundry (too expensive for each company to have one) from a netlist produced from VHDL.

Programmable Logic Device (PLD) - hardware function can be programmed by applying an abnormally high voltage or by a programming mode. Works off of a sum-of-products architecture, banks/column of different gates (e.g. AND, NOT) have undefined connections at manufacture. Cheap but slow, limited flexibility.

Complex Programmable Logic Devices (CPLDs) - an array of small PLDs connected by the programmable interconnect.

Field Programmable Gate Arrays (FPGAs) - More flexible, faster, actually reprogrammable. Key component is the configurable logic block (CLB), logic gate whose function can be programmed by storing bits in a configuration memory. Can also have a flip flop included (see 13-9)

45
Q

Boobs?

A

Hell Yeah.
( ͡° ͜ʖ ͡°)
ಠoಠ
( ಠ ͜ʖರೃ)

46
Q

What is an Intellectual Property core?

A

Designs for complicated and high value sub-systems, which are sold to designers to use in their design.

47
Q

What is a test vector?

A

The name given to an input chosen in order to test a piece of hardware.

48
Q

What types of exhaustive testing are there?

A

Combinational (contains no memory): no. input combinations = 2^n

Sequential (has memory): no. input combinations = 2^(n+m) where m is the no. state flip flops

49
Q

What are the 2 test logic values and what do they mean?

A

D: If circuit is OK then this node has value 1; if it is faulty then it has value 0

D(bar): If circuit is OK then this node has value 0; if it is faulty then it has value 1

50
Q

What is the test procedure for a faulty node in a circuit?

A

Test for a s-a-0 fault by setting the inputs in a way that will drive the node to D. Propagate D (or D(bar)) towards the output by setting all gates on the path to the observable output into the sensitive condition.
THEN
Test for a s-a-1 fault by setting the input to drive the node to D(bar). Propagate D(bar) (or D) towards the output by setting all gates on the path to the observable output into the sensitive condition.
Once all nodes have been investigated, choose a set of inputs that detects all of the faults