ELEC211 notes

ELEC211 notes

WEEK1

咱们第1周是一些基本的数字电路概念/模型等,约等于复习一遍EEE104。

Logic gates and combinational logic

新增数学记号:

image-20220207052500342

NOT gate:

image-20220207052357708

image-20220207052528400

image-20220207052641452

此处XOR逻辑=“取奇数输入”,少见。X = ((A XOR B) XOR C)

image-20220207052856561

其中,NAND 和 NOR 也被称为Universal gates,因为我们可以仅使用他们中的某一种来实现所有的布尔逻辑:

NAND:

通用逻辑门

NOR:

通用逻辑门

Combinational circuits 组合电路 •Present output depends only on present input •Combinational logic uses Boolean algebra:

*使用卡诺图化简通常比看这种表格来得更快。

image-20220207060955527

image-20220207061009182

Sequential circuits 时序电路 •Present output values depend on present and past values •Circuit ‘remembers’ its own state

Minterms/Maxterms and implementing functions

Minterms: Sum of Products (SOP)

Maxterms: Product of Sums (POS)`

implementing functions:image-20220207062035564大概就是这个意思,不如卡诺图。

Karnaugh maps

一图足矣!

image-20220207061940969

A little on decoders

Multiplexer 数据选择器/多路开关

A multiplexer在多个输入中,依据数个控制用输入(control inputs)选择一个作为输出。(下图右)

image-20220207062343812

A multiplexer has: •At least two inputs •One or more control (select) inputs •One output

实现:

image-20220207062622460

image-20220207062652392

image-20220207062805667

Tristate gates 三态门(three state buffers)

States of Tristate gates:

1,0, high impedance (Hi-Z) 高阻抗 (断路

why?

当多个逻辑电路的输出合并到一条线上,他们的输出会产生冲突:同时短接高低电平,你到底算哪个呢?

此时,Hi-Z提供了解决冲突的方法:多了一种输出——断路。这就意味着,在多个输出里,如果只有一个具有0/1输出而其它都断路的话,那么总输出就必然与0/1输出一致。

实现:

image-20220207064301412

典中典4种情况:

image-20220501234937317

某种意义上起到了 multiplexer 的作用。

image-20220207064417877

list of test in week 11

------------------------Digital Electronics------------------------

Shannon’s Expansion

image-20220502002235553

Mealy / Moore machines

In Moore machines, output=f(current state)

In Mealy machines, output=f(current state, input)

image-20220502013829800

image-20220502013851964

ASM Design techniques

image-20220502182756729

image-20220502181533422

image-20220502183507258

Quine-McCluskey v Karnaugh

image-20220502004418648

image-20220502004627908

image-20220502004444900

image-20220502004652794

image-20220502004806012

Incompletely Specified Functions

image-20220502005858583

image-20220502005913436

Registers

use D Flip-Flops with Clock Enable

When Load is 1 the clock is enabled (CE) and the data applied to the D inputs will be loaded into the flip-flops.

When Load is 0 the register holds its data (memory).

image-20220502165855612

D Flip-Flop

image-20220502173004226

image-20220502173023914

image-20220502173400439

Minimum Clock Period = flip-flop propagation delay + setup time + propagation delay of other components in circuit

image-20220502173806307

Serial data transmission and Registers

Registers

image-20220502174014922

image-20220502174114703

image-20220502174153345

image-20220502174322151

Serial data transmission

image-20220502204357549

或者

image-20220502204530903

具体传输编码

image-20220502204605397

“self-clocking” signals:

image-20220502204731802

------------------------Microprocessor Systems------------------------

Shift-register

LSLS - logical shift left: abcdefghijkl => defghijkl000

LSRS - logical shift right: abcdefghijkl => 000abcdefghi

ASRS - Arithmetic shift right: abcdefghijkl => aaaabcdefghi *a是符号位

PORS - Rotate right: abcdefghijkl => jklabcdefghi

Branch

image-20220503040939074

B

B<cond>

image-20220503041021715

image-20220503041143195

Flags

注意, 当运算的结果产生进位或者减法运算没有借位的话C=1,其他情况C=0

image-20220503040616459

Negative numbers

0……

1……

PC vs LR

PC: program counter

PC中存放下一次访存的地址。

LR: link register

函数的返回地址

image-20220503042402206

image-20220503042148390

IEEE754 standard

image-20220503041927711

Carry vs Overflow

carry: 无符号溢出

Overflow:有符号溢出