Exam Prep Deck Flashcards

1
Q

What factors limit the increased throughput that can be obtained using pipelining in complex designs such as a microprocessor data path?

A

Diminishing returns with each pipeline stage added due to the setup and propagation times of the flip- flop. Also, complex circuits such as the microprocessor data path have dependencies between the pipeline stages (data and control hazards) which require additional logic and delays to overcome and hence do not achieve the expected speed up.

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

Question iii)

A

The critical path length is now (3 x RAM delay) + (3 x mux delay) = (3 x 500ps) + (3 x 50ps) = 1650 ps

The minimum clock period = critical path + setup + clock-to-Q = 1650ps + 50ps + 70ps = 1770 ps

Maximum clock frequency = 1/2870ps = 565MHz

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

Briefly describe the verification process for digital designs

A

The desired behaviour of the digital circuit is captured in a HDL (hardware description language_)_ such as SystemVerilog. A set of test inputs or “test vectors” are generated which cover all the expected operating conditions of the circuit. Another HDL code, the test bench, is used to apply the test vectors to the circuit in simulation and the outputs are captured. A software model of the circuit behaviour is also created. The HDL simulation and software model outputs are compared to detect logical errors in the HDL code before synthesis starts. This process reduces the probability that defects will be present in the final product.

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

Architecture

A

Price lowest to highest: ASIC -> Microprocessor -> FPGA

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

Define Setup error

A

The input to a sequential element such as a flip-flop must be stable a certain time before the clock edge, known as the setup time. A setup error occurs when this condition is not met.

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

Work out DCO tune as an integer?

A
  1. Pick a range(DCORSEL).
  2. Select the desired frequency within that range (FDCOnom).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain the following terms in the context of the digital design process.

(i) Constraints
(ii) Recurring costs

(iii) Non-recurring costs

A

Constraints: requirements which have been identified for the design, for example, minimum clock frequency, maximum delays, maximum area etc.

Recurring costs: costs which have to be paid each time a chip is manufactured, including fabrication, testing and packaging

Non-recurring costs: costs which must be paid before a chip can be manufactured, including design and tooling costs

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

Specify the contents of the RAM blocks in a CLB to create a 2:1 multiplexer

A

Assign I0 and I1 on the 16x1bit RAM to be the 2 bits of D. Assign I2 on the 16x1bit RAM to be S, I3 is a “don’t care”.

A single CLB can represent the mux with the following RAM entry:

(to get the address values just combine all the row elements from left to right.

I0 is 4 zeros followed by 4 1s

I1 is alternating sets of pairs

I2 is simply alternating going down.

I3 is just x’s for all the bits.

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

(i) Explain how the current state variable is updated using the state table implementation approach in c code.

A

The new state is simply updated using array indexing where the row index is the event value and the column index is the current state. The updated state is given by the value at this memory location.

state = statetable[event][state];

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

4:1 multiplexor a behavioural style with case statements

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

Define what is meant by static timing analysis.

A

In static timing analysis, the delay of every combinational path between sequential elements is calculated. These are used to assess whether each sequential element meets it’s setup and hold conditions under a set of timing constraints such as clock frequency and jitter.

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

Write C code to implement the action handler for the actiontable, assuming there is a current state variable currentstate and an event variable event. You can assume the action functions: fcn0() … fcn3() are already defined.

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

Do q b)

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

Sketch the block diagram of the circuit in terms of the adder and flip-flop cells.

ii)

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

What is a precision ADC?

A

module that can achieve over 16bit precision using software oversampling, up to 1 Mbps sampling rate with differential and single ended inputs.

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

Describe the concept of corner analysis and how it would be applied to variations of Vdd across a digital integrated circuit.

A

Corner analysis ensures that a high proportion of the chips fabricated will work across all the process and environmental variations. It involves carrying out static timing analysis at the extreme operating conditions or “corners”.

In the case of power supply variation, gates with a low value of Vdd will run slow and hence be more susceptible to setup errors. Gates with high Vdd will run fast and be more susceptible to hold errors. A corner analysis including Vdd variation could include static timing analysis with (1) low Vdd, slow transistors due to process variation and high temperature to ensure that setup errors do not occur and (2) high Vdd, fast transistors and low temperature to ensure that hold errors do not occur.

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

When using an input pin on a microcontroller as an analogue input what will the input impedance be?

A

The pin will be in the high impedance state

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

Explain how Pulse Width Modulation (PWM) is used to control the speed of the motors and describe how it is implemented in microcontroller hardware.

What are the key words/terms you need to remember

A

PWM is a method of producing an analogue voltage level from a digital output. A PWM signal consists of a periodic pulse train whose frequency is much higher than the frequency of the device or system that is been driven. The signal amplitude is then adjusted by varying the pulse duration or duty cycle. The output waveform is then lowpass filtered, either by a specific low pass filter or simply by the response time of the system that is been stimulated, to produce the analogue waveform. In a microcontroller this is implemented using a timer/counter and two counter compare registers. The timer/counter is clocked at a certain rate 𝑓𝑐𝑙𝑘 using a divided version of the system clock. One counter compare register is used to set the maximum count and hence the period of the PWM signal i.e. 𝑇 = 𝑀𝑎𝑥𝐶𝑜𝑢𝑛𝑡 / 𝑓𝑐𝑙𝑘 . The other compare register is used to set the duty cycle and hence the output amplitude.

Key words/terms to remember: analogue voltage level, periodic pulse train, duty cycle, low pass filter, timer/counter, counter compare registers, maximum count, output amplitude

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

Explain what is meant by Dennard scaling in the semiconductor industry.

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

Define pipelining

A

Partitioning a circuit or algorithm into multiple stages, separated with sequential elements, in order to increase the clock speed and throughput.

Pipelining involves splitting up the functions performed by the combinational logic into separate functions and inserting sequencing flip-flops or registers into the path. Because the delay of the combinational logic in each pipeline stage has been reduced, the clock frequency can be increased or supply voltage can be reduced to save power.

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

(iii) What is the maximum throughput of the circuit, i.e. the number of sum outputs generated per second?

A

The minimum clock period is the sum of 3 adder cell propagation delays and the flip-flop setup and clock-to-Q propagation delays.

Minimum period = (3*300ps)+50ps+65ps = 1015ps.

The maximum clock speed or throughput is, therefore, 1/1315ps = 985MHz

Note that they cheekily put maximum propagation delay of adder cells outside of the table.

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

16 bit vs 8 bit

A

The 16-bit processor will be two times faster.

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

Define: Non-recurring costs

A

Non-recurring costs are any costs which must be paid before any products can be fabricated including d_esign engineering costs_, prototyping, product–specific equipment required for design, product-specific manufacturing equipment such as photomasks and packaging tools

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

Define Standard Cell Library

A

A set of predefined characterized layouts of basic logic functions such as AND, OR, invert, flip-flop, latch, multiplex etc. The cells have fixed height and variable width to allow a circuit layout on a regular grid, speeding up development times.

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

Write C code to initialise pins 0-3 on PORTC as inputs with pull-ups enabled and 4-7 as outputs set to logic high. Then store the state of pin 3 as a char. You may assume that PORTC, DDRC and PINC are defined

A

DDRC=0xF0;

PORTC=0xFF;

char state=(1<<3)&PINC;

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

Show how to build a 4:1 multiplexer with the minimum number of CLBs.

A

A 4:1 mux can be built from 3 x 2:1 muxs arranged in a tree structure. The minimum number of CLBs is therefore 3.

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

Explain the advantage that the state table implementation provides in comparison to a nested if statement implementation.

A

In the state table approach the functionality of the machine is encoded in the state transition and action tables and an identical piece of code is used to implement the state machine regardless of the complexity of the machine. This means that the operation of the machine can easily be changed by simply updating the state table without needing to change the code. If the nested if approach is used then the code must be changed which is harder to keep track of and debug.

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

ADC Interfacing system

A

Transducer Interface Design (TID) circuit:Scale and shift transducer output signal range.

Scale: Map the span.

Bias: Shift scale to align with ADC input.

V2max = (V1max*K)+B.

V2min = (V1min*K)+B.

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

Total Power Consumption of circuit with sequential elements

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

A microcontroller with a clock frequency of 16MHz is used to create an analogue output using PWM suitable for the reproduction of voice signals recorded with 7 bit resolution.

(i) How many bits does the counter require to provide the required resolution and what should the maximum count value be set to?

A

The counter would only require 7 bits to provide the required resolution, however the dedicated counters in a typical microcontroller are either 8 or 16 bit, using a 8 bit counter with the maximum count set to 127 would provide the correct resolution.

how do you find the maximum count from 7bit resolution? 27 - 1. So 2n - 1 is the formula.

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

Explain what is meant by the following terms, relating to the timing of synchronous sequential circuits:

2018 - q2 - a

A

(i) For the circuit to sample its input correctly, the input must have stabilized at least setup time, tsetup, before the active edge of the clock. (so the input was be stable for set amount of time before active edge)
(ii) For the circuit to sample its input correctly, the input must remain stable for at least the hold time, thold, after the active edge of the clock. (so input must remain stable for hold time after the active edge)
(iii) When the clock’s active edge occurs, the output may start to change after the clock to-Q contamination delay, tccq.
(iv) When the clock’s active edge occurs, the output must definitely settle to the final value within the clock-to-Q propagation delay, tpcq.

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

Table you need to remember to convert binary to hexadecimal

A

note that the change from number to letter is from 9 to 10

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

Explain the meaning of line 3 of the code in Figure 1.1

A

Defines two bit vectors I and Q each with 8 bits. The logic type is used in SystemVerilog to model signals in digital circuits – it has 4 possible values 0, 1, X (unknown) and Z (high impedance).

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

The circuit above is to be used in a low power application.

(i) Explain how pipelining can be used to reduce power consumption of the circuit without reducing the clock frequency.

A

Placing the two combinational functions in different pipeline stages means that the delay in each combinational function can be increased by reducing the supply voltage. In this case, it is the 2nd combinational stage which will limit the performance. The current clock frequency can be maintained if the delay of the 2nd combinational stage is increased to 1.5ns.

Key thing to remember is that delay in each combinational element of the pipelined circuit can be increased by reducing the supply voltage, leading to the same clock frequency but lower power consumption.

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

bit width of ADC module

A

32-bit

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

Pointers

A

A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location.

Pointers always begin with an asterisk *

Pointers should be initialised as NULL when the intended address is not known.

Uninitialised pointers can be pointing to a memory address used by the system unintentionally.

Allows NULL checks before accessing a pointer

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

Do questoin b)

A
38
Q

What do you need to remember about switch models and inividual CMOS inverters?

A

When you draw an individual CMOS you combine the Cn and Cp for the pMos part, i.e where V1 goes into.

39
Q

i) Draw the equivalent circuit for calculation of the rise/fall times.

A
40
Q

If the code in Figure 1.1 was simulated, sketch a waveform showing the signals clock, reset, enable, direction and I from the start of simulation up to 250 ns. Express the values of I in hexadecimal. Ensure that the times of signal transitions are clear.

A
41
Q

CMOS Switching energy:

2018 - 3 - c)

A
42
Q

Briefly discuss increasing the throughput of digital circuits, with architectural and technology considerations.

A

Technology: use a more advanced CMOS process with a shorter gate length, Use full custom design techniques or a standard cell library which is better optimized for the application

Architectural: Besides pipelining, parallel processing is the main technique, involving duplicating logic without increasing the clock speed. This is limited by the area available for the circuit.

43
Q

If you’re looking for a fully stable output out of a logic gate, what timing parameter are you looking for?

A

tpd

propagation delay

44
Q

Calculate the reduction in power consumption that can be achieved by pipelining without changing the clock frequency, activity factor or threshold voltage and assuming that a single power supply is used for the whole circuit.

A

Note that the new tpd is 1.5ns for the pipelined circuit with the same frequency as the original circuit.

45
Q

Multiplexors an pipelining

A

The combinational logic of the 32:1 mux must be split into 2, ideally with roughly equal critical paths. As the critical path of the 32:1 has 5 x 2:1 stages, it cannot be split equally so the optimum is to have 8:1 muxs in 1 pipeline stage and 4:1 in the other (the 8:1 and 4:1s are constructed from 2:1 building blocks as previously described)

The clock frequency is increased because the critical path is now through the 8:1 mux which consists of only 3 CLBs.

46
Q

What is the nominal threshold voltage of a MOSFET, Vt?

A

can be varied by changing the channel length or channel doping concentrations, but its nominal value is typically half of the supply voltage, VDD/2.

47
Q

Microcontroller Question

A
48
Q

What’s an important thing to remember when creating case statements in C compared to the HDL system verilog?

A

You define a case with switch()

Then the individual cases are set inside.

e.g.

switch(fun){

case 0:{

}

case 1:{

}

}

49
Q

Maximum clock frequency of multiplexor

A

Following from the answer to (b), the number of stages in an N:1 multiplexer is log2(N). Since the N=32, the critical path is through log2(32) = 5 CLBs.

The critical path length is (5 x RAM delay) + (5 x mux delay) = (5 x 500ps) + (5 x 50ps) = 2750 ps

The minimum clock period = critical path + setup + clock-to-Q = 2750ps + 50ps + 70ps = 2870 ps

Maximum clock frequency = 1/2870ps = 348MHz

In this case the ram and multiplexor delays are multiplied by 5 and the one time setup time clock-to-Q delay are added.

50
Q

If you applied pipelining to this circuit, what do you need to remember?

A

the slowest combinational logic block will dictate the new minimum clock period and hence maximum freq.

In any previous clock period can have 0.5ns removed.

51
Q

4 b i) Explain how an FPGA can be used to implement arbitrary digital systems including both combinational and sequential logic elements.

A

The FPGA needs to be programmed to implement the desired logic by changing the contents of the RAM blocks using the reconfiguration bus.

Any 4-input, single output combinational function can be implemented by setting the contents of the 16 x 1bit RAM. The 4 CLB (cofigurable logic block) inputs represent the address lines of the RAM. For example, a 4-input AND gate can be created by setting all entries of the RAM to 0 except for entry 15 ({I1,I2,I3,I4} = 1111) which should be 1.

By configuring the 1-bit RAM which controls the 2-port multiplexer, the output of the combinational block can be connected directly to the CLB output or to the flip-flop for sequential logic.

By creating an array of CLBs with reconfigurable interconnect, complex digital systems can be created.

Key things to remember here:

any 4 input single output combinational function can be created in 16x1bit RAM.

The 1 bit RAM controls the 2 port multiplexer meaning that the output of the combinational block can be connected directly to the CLB output or to the flip-flop for sequential logic

52
Q

What does adding a 3 stage pipeline do to the maximum clock frequency of this circuit?

A

a register would be placed after each adder cell

maximum clock frequency would increase 3 fold in this case.

53
Q

Describe the difference between a synchronous reset and an asynchronous reset.

A

A synchronous reset only takes effect in response to a clock event.

An asynchronous reset takes effect immediately independent to the clock.

54
Q

Dennard Scaling

A
55
Q

Nyquist frequency

A

minimum sampling rate you need to represent an analogue by its digital equivalent accurately.

fs >= 2*fH

fH highest frequency available.

56
Q

What is an Action and what is an Activity?

A

Action (f-transition): an executable function associated to a transition. Not interruptible.

Activity (f-state): an executable function associated to a state. Is Interruptible by an event

57
Q

When using the 10 bit Analogue to Digital converter (ADC) on an 8 bit microcontroller to sample a human voice:

What frequency should the ADC sample clock be at least?

What type of C variable is required to hold the converted output from the ADC?

A

The highest frequency component in human voice is typically 20 kHz, thus sampling at 40 kHz would meet the Nyquist criterion.

16 bit word, e.g. int

58
Q

Describe the operation of the shift register, in particular, specifying how the output, R, changes in response to the inputs.

A

If the reset is high (independent of the clock), R is held at 0.

If select S is high, on each positive clock edge, R takes the value of the input I.

If select is low, on each positive clock edge, R is shifted to the left by 1 bit with a zero inserted into the least significant (right-most) bit.

Remember the curly brackets with two or more terms inside means concatenation. In this case everything up to N-2 is selected and a zero is added to the end. Thus R is getting shifted to the left by 1 bit at a time.

59
Q

Define: Application specific integrated circuits

A

An ASIC is any digital circuit designed and fabricated for a dedicated purpose, i.e. not using programmable hardware or general purpose software-programmable processors.

60
Q

ADC subsystems

A
61
Q

Window comparator

A

basically the inverting and the non-inverting comparators from the precision ADC combined into a single comparator stage.

62
Q

Action table

A

The action table contains the function codes for each possible state and input condition. The correct function is determined by doing a lookup using the event value for the row and the current state for the column index.

63
Q

An inverter in a standard cell library implemented in a 45 nm CMOS process has the following measured propagation delays at the typical corner, shown in Table 3.1

Explain why the inverter cell has finite propagation delay at zero load capacitance.

A

Chains of logic operate by each logic gate charging/discharging the gate capacitance of the load logic gates. The gate capacitance of the MOSFET is essential to the device operation, but the source and drain also have a capacitance which is parasitic. The propagation delays at zero load capacitance are due to the charging/discharging of this parasitic capacitance.

64
Q

Reducing power consumption of digital circuits

A
65
Q

For each of the following SystemVerilog code fragments, state whether it represents a realisable digital circuit and explain why.

A

Example (i) is not a real circuit. In simulation, always_comb blocks are executed when any of the right hand side parameters change, so this code will advance count by 4 each time it executes but continue executing for ever at the same simulation time. On the other hand, (ii) is a correct counter as it uses sequential logic which is only executed on the positive clock edge.

Fragment (iii) is correct and represents 4 AND gates operating in parallel. New values of c will be generated whenever any value of the arrays b or a change.

66
Q

Definition of Propagation delay of combinational logic

A

Propagation delay is the time taken for the output of combinational logic to fully stabilise after a change in the inputs.

67
Q

Define: Photomasks

A

Features are created on the silicon wafer by covering the wafer with a photoresistive material and exposing the wafer to ultraviolet (UV) light through a photomask which contains the desired pattern of the circuit. The photoresist which has been exposed to UV hardens and remains when a chemical process is used to wash the unexposed photoresist away. Ion implantation or laying down metal, polysilicon or oxide layers on selected areas of the wafer can then take place. Each step in the process requires a photomask.

68
Q

Define Clock-to-Q propagation

A

Clock to Q propagation delay is the time between the clock edge and the output of the flip- flop or register stabilising.

69
Q

Microcontrollers: When using the pins for digital input the preferred mode is to enable pull-ups.

A

This ensures that when the pin is not connected to anything, e.g. an open switch, that the state of the pin is not left simply floating and therefore indeterminate which is why it is pulled up to Vcc.

70
Q

Explain why are the I/O pins on a microcontroller are called tristate inputs?

A

The pins can be in one of three states either be pulled up to +Vcc or set to ground or in a high impedance floating state.

71
Q

If you know the propagation delay, time setup and clock-to-Q time, what can you calculate?

A

clock period

from which you can get the max clock freq.

72
Q

Dennard Scaling limitations

A

Both oxide thickness and threshold voltage have reached scaling limits. Scaling oxide thickness further causes leakage current to increase due to tunneling. Scaling threshold voltage causes sub-threshold currents to increase when the MOSFET is off. In both cases, further scaling would cause leakage power to dominate overall power consumption which is already a problem for high performance digital systems.

scaling oxide thicknes -> leakage current b/c of tunneling

scaling threshold voltage -> causes sub-threshold currents

thus further scaling causes leakage power to dominate

73
Q

Explain what an interrupt is and give an example of how you would use one in this application.

A

Interrupts provide a way of allowing the microcontroller to respond to events without the CPU having to continuously poll for a particular event. For example, in this application, an edge detection interrupt could be used to detect the change of state of a digital input corresponding to a switch press. When the CPU receives the interrupt it first stops what it is currently doing and then carries out the appropriate action for the interrupt. Once the CPU has serviced the interrupt it resumes the previous operation.

74
Q

What does #() when instantiating a module?

A

some modules need a parameter passed through, and this is the syntax to do it.

placed inbetween the module name and your module label.

75
Q

Total power consumption of a circuit with sequential elements?

A
76
Q

Explain how the operation of a for loop differs between SystemVerilog and a software language such as C++ or Java?

A

In a software language, a for loop defines actions which will be carried out in series. In synthesisable SystemVerilog code, for example within always_comb or always_ff blocks, a for loop represents circuits which will operate in parallel.

77
Q

timing constraints: hold time

2018 - q2 - b

A
78
Q

Explain the meaning of line 6 of the code in Figure 1.1.

A

Line 6 “instantiates” or defines a submodule within the tb_shiftreg module. In this case the module name is shiftreg and it is given the label uut. The shiftreg module has 1 parameter which in this instantiation is given the value 4. The Q, I, direction enable, clk, reset signals are connected to the ports of shiftreg in the order that they are defined in the code.

So when you don’t know the order of the values of a module instantiation in a module you just assume the order in which they are defined in the parent module?… i guess just remember to state that the order is that which is defined in the code.

79
Q

If you’ve reduced a N:1 multiplexor using pipelining how do you calculate the new number of combinational logic blocks for the critical path calculations?

A

log2(N)

80
Q

What does the logic type represent?

A

The logic type is used in SystemVerilog to model signals in digital circuits – it has 4 possible values 0, 1, X (unknown) and Z (high impedance).

81
Q

Block diagram of ADC-SAR

A
82
Q

Critical Path: Sketch a timing diagram for the critical path, and calculate the maximum clock frequency.

2018 - q2 - c)

A
83
Q

Explain the changes to the SystemVerilog code that are required to make the reset synchronous?

A

The sensitivity list for the always_ff block contains posedge reset, meaning that the block will be active when the reset goes high whatever the state of the clock. Removing posedge reset from the sensitivity list will ensure that the reset only triggers on the positive edge of the clock:

84
Q

Switch Model Circuit Diagram

2018 - q3 - a

A
85
Q

When determing the time of the critical path, what timing parameters should you be looking at?

A

propagation delays and setup times

as seen in the past paper questions until now…

86
Q

Specifically what does the third line do?

A

as you can see there is a *() with the pointer address +2 inside.

with the *(address+2) you are saying you want the value two places down from addresses poisition.

87
Q

A digital circuit is required which adds four 8-bit unsigned numbers in a single clock cycle with registers on every input and output.

(a) How many bits are required in the output?

A

An 8-bit unsigned number can take values from 0 to 255, so the maximum output is 1020 which can be expressed as a 10-bit number.

88
Q

Describe the function of the initial block within test bench code and how it differs from always_ff and always_comb blocks used in synthesisable code

A

A test bench is a code used to test a synthesisable module not a representation of actual digital circuits. always_ff blocks model edge triggered logic such as flip-flops and always_comb blocks model combinational logic in which the output changes whenever the inputs change. In simulation, initial blocks are executed sequentially like a software code (always_ff and always_comb on the other hand do not). They define signal changes and other actions that occur at distinct points in time. Initial blocks always start executing at the start of simulation time and continue until all the instructions are completed.

89
Q

Can the Event1/fnc3() of state 1 be considered a unique transition?

A

yes

if it ins’t found anywhere else.

90
Q

How do you find the unique events of a FSM?

A

count up all the unique transistions

91
Q

C programming: what does this mean?

A

creates a 2x3 matrix called statetable of type char