CS61C | Lecture 10

Lecture 10 | State registers

NAND

abc
001
011
101
110

Signals and Waveforms

Clock

Grouping

### Circuit Delay ## Circuits with State(e.g. register) ![](https://img-blog.csdnimg.cn/img_convert/6be5cd6a43ee5e1b0753ea816f2d6192.png) ## Accumulator ```c S = 0; for(i = 0; i < n; i ++) S = S + Xi; ``` ![](https://img-blog.csdnimg.cn/img_convert/beab2ca2e6870ab8c684652259418579.png) Register is used to hold up the transfer of data to adder. When reset line is asserted or goes one, the register will be reset. ![](https://img-blog.csdnimg.cn/img_convert/655eb46167a5a556fa154dd20d3ec810.png) ### Register Details Flip-flops ![外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传](https://img-home.csdnimg.cn/images/20230724024159.png?origin_url=https%3A%2F%2Ftypora-birdy.oss-cn-guangzhou.aliyuncs.com%2F20240730152240.png&pos_id=img-vgiOde8f-1722434000434) 一个 n 位寄存器实际上是 n 个 1 位触发器。 D input is **Data**, Q is **output** 这些也叫做 D-type Flip-Flop #### 上升沿触发(rising edge-triggered) 当它从 0 变为 1 时,就会触发。 On the rising edge of the clock, the input d is sampled and transferred to the output. At all other times, the input d is ignored. ![外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传](https://img-home.csdnimg.cn/images/20230724024159.png?origin_url=https%3A%2F%2Ftypora-birdy.oss-cn-guangzhou.aliyuncs.com%2F20240730153000.png&pos_id=img-lhPYTOjb-1722434000434) q 中刚开始的阴影部分代表可能是 1 也可能是 0。红色部分是因为存在一定延迟。 #### Example(more detail) ![外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传](https://img-home.csdnimg.cn/images/20230724024159.png?origin_url=https%3A%2F%2Ftypora-birdy.oss-cn-guangzhou.aliyuncs.com%2F20240730153540.png&pos_id=img-f1YJFpvr-1722434000434) ### Accumulator Revisited ![](https://img-blog.csdnimg.cn/img_convert/44b6f333a5f9ba9ef7a78b20c0210817.png)

  • Reset signal shown.
  • Also, in practice X might not arrive to the adder at the same time as S i − 1 S_{i-1} Si1
  • S i S_i Si temporarily is wrong(底下阴影部分), but register always captures correct value.
  • In good circuits, instability never happens around rising edge of clk.
Clock(CLK)steady square wave that synchronizes system
Setup Timewhen the input must be stable before the rising edge of the CLK
Hold Timewhen the input must be stable after the rising edge of the CLK
CLK-to-QDelay – how long it takes the output to change, measured from
the rising edge of the CLK
Flip-flopont bit of state that samples every rising edge of the CLK
Registerseveral bits of state that samples on rising edge of CLK or on
LOAD

Finite State Machines(FSM) 有限状态机

### Example: 3 ones ![](https://img-blog.csdnimg.cn/img_convert/07193112478eb42a4fb1733cf6cee1c4.png) #### 流程如图: ![](https://img-blog.csdnimg.cn/img_convert/d927c38224efe473b7efce7df7df368f.png) #### Hardware Implementation of FSM
PSInputNSOutput
000000
001010
010000
011100
100000
101001
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值