YouTube2Text

[CS61C FA20] Lecture 14.3 - Intro to Synchronous Digital Systems: Signals and Waveforms — Transcript

by CS 61C Departmental · 2,782 words · 440 segments · language en · Watch on YouTube

Full transcript

  1. 0:00and welcome back now let's learn about
  2. 0:03signals and waveforms
  3. 0:04how to think about how these values
  4. 0:06zeros and one might change over time
  5. 0:09oh my gosh time so let's start the
  6. 0:12beginning a clock is the heartbeat of
  7. 0:14the system
  8. 0:15our clock uh this particular signal
  9. 0:18is a beautiful if you've if you've seen
  10. 0:21um some of these terms before i hope
  11. 0:23you've seen these terms before
  12. 0:25you've got the idea of t which is the
  13. 0:27period
  14. 0:28which is the distance between a rising
  15. 0:30edge and the next rising edge that's
  16. 0:32important
  17. 0:34t and frequency are inversely related so
  18. 0:38frequency is the one over the period and
  19. 0:40period is one over the frequency okay
  20. 0:42and typically
  21. 0:43roughly these are in the the period is
  22. 0:46roughly one nanosecond
  23. 0:47and the frequency is roughly one
  24. 0:49gigahertz if the
  25. 0:50if the if the period goes
  26. 0:54to a third of a nanosecond that would
  27. 0:56mean the frequency is three gigahertz
  28. 0:58so think about that we've got voltage so
  29. 1:01this is our
  30. 1:02clock and it's going to vary between
  31. 1:04three volts and zero volts
  32. 1:05um and we're going to treat these as
  33. 1:07ones or zeros so so this is again
  34. 1:08abstractly thinking about these ideas
  35. 1:12signals are translated transferred over
  36. 1:16wires continuously and there's delays
  37. 1:18time takes time to go from here to there
  38. 1:20so we'll talk about that in a little bit
  39. 1:22we're going to treat them mostly as
  40. 1:24instantaneous because mostly we're not
  41. 1:26talking about a long transmission but as
  42. 1:28you
  43. 1:28actually get the distance between these
  44. 1:30signals to be great it ends up being um
  45. 1:32a real a real issue in fact grace mary
  46. 1:34hopper used to walk around with a piece
  47. 1:36of wire about this long and saying this
  48. 1:37is a nanosecond
  49. 1:38because it takes this long for a signal
  50. 1:40to start here and get
  51. 1:41to that distance if you work out the
  52. 1:42speed of light so
  53. 1:44that remember that um and also remember
  54. 1:46that a wire can only have one value at a
  55. 1:48time a single wire has one value at a
  56. 1:49time
  57. 1:50you have multiple wires optical things
  58. 1:52you can actually have multiples in a
  59. 1:53single optical channel you can have lots
  60. 1:54of signals but in a physical kind of
  61. 1:56copper wire
  62. 1:57you only have one signal at a time okay
  63. 2:00so here's an example of an outer circuit
  64. 2:03as we're going to start thinking about
  65. 2:04these block diagrams here's an adder
  66. 2:06look at this i've got n bits of b
  67. 2:11n bits of a and i have some number bits
  68. 2:14of this circuit now
  69. 2:15if i look at just let's look at b0 and
  70. 2:17b1
  71. 2:18there's some interesting things these
  72. 2:20things are going to change over time so
  73. 2:21this is voltage over time i'm looking
  74. 2:23here voltage
  75. 2:24as a function of time and i'm seeing
  76. 2:25that voltage you know here's my clock a
  77. 2:27nice very pretty clock nice square wave
  78. 2:29in the bottom
  79. 2:30but you're seeing there's some issues
  80. 2:32here this is not a perfect
  81. 2:33signal here this is not line up like
  82. 2:35here's my lineup it doesn't line up
  83. 2:37perfectly there's some issues here
  84. 2:38and it's also wiggling up here we're
  85. 2:40going to see that there's imperfections
  86. 2:41we're going to try to work around that
  87. 2:42with our signals as well so we saw that
  88. 2:45they're noisy
  89. 2:46they're not always perfectly flat and
  90. 2:49they don't line up
  91. 2:50there's a delay there's a delay in just
  92. 2:53the
  93. 2:53all the processing that has to be done
  94. 2:55in this circuit before the output
  95. 2:57um and maybe look at this this is delay
  96. 2:58on the input the delay of the input is
  97. 3:00not even coming in here who knows how
  98. 3:01long this
  99. 3:02this circuit delays and whether the
  100. 3:04output is even more more delayed if the
  101. 3:05output might even be more delayed
  102. 3:07how that is so we're going to have to
  103. 3:08deal with all those challenges between
  104. 3:10noise and delays
  105. 3:11this is real world folks this is a
  106. 3:13little harder so yes it's digital but
  107. 3:15there's some issues we should think
  108. 3:16about as we start to build our circuits
  109. 3:17together
  110. 3:18let's talk about some names so i have
  111. 3:21here's a nibble
  112. 3:22i've got here four parallel bits x0
  113. 3:25through x3
  114. 3:26okay and each of these were going to be
  115. 3:29nice for this
  116. 3:29picture with no delays each of these has
  117. 3:32a value when it's high
  118. 3:34we're going to call it a one when it's
  119. 3:36low we'll call it a zero
  120. 3:37so now you see this path this is kind of
  121. 3:39cool x0
  122. 3:40has different values hopefully
  123. 3:43synchronized with the clock
  124. 3:44one zero one one x one has
  125. 3:48zero one zero zero now here's the cool
  126. 3:51thing
  127. 3:51take your head and turn it sideways and
  128. 3:54what you see is i turn it sideways now
  129. 3:56i'm looking sideways at this number here
  130. 3:57we go
  131. 3:58now that's the higher order bit that's
  132. 4:00the msb
  133. 4:02or most significant bit and this is the
  134. 4:05lsb or least significant bit
  135. 4:07if you draw like that here's the lsb
  136. 4:10and here's the msb if you draw like that
  137. 4:13look
  138. 4:14i'm seeing 0 1 0 1. that's a 5.
  139. 4:18a 1 1 0 6 1 0 0 0
  140. 4:218 i've been i've memorized the whole
  141. 4:23i'll help you memorize that by the way
  142. 4:24zero zero zero one one and zero one one
  143. 4:26one seven so
  144. 4:28i can just think about this as
  145. 4:31a big capital x like a vector x
  146. 4:34which is really a vector and in some
  147. 4:36sense and capturing i draw it like this
  148. 4:38i don't like it this looks like i look
  149. 4:40like a chiclet i draw a little
  150. 4:42chick that's saying this has the value
  151. 4:43five and the value six and that saves me
  152. 4:45for him to draw
  153. 4:46four lines over time i just draw the
  154. 4:48value x and its number over time
  155. 4:50which really encodes the fact that
  156. 4:52they're really four bits doing the work
  157. 4:53but i'm going to draw it like this x to
  158. 4:55make it really very convenient okay so
  159. 4:57think about that
  160. 4:58to group this with that part of turning
  161. 4:59this is to group my four bits into
  162. 5:02one kind of four bit wide vector
  163. 5:06so now now i can think about that now
  164. 5:08here's a here we go an adder
  165. 5:10this is called a nibble adder look at
  166. 5:13that
  167. 5:14four bits of a come in four bits of b
  168. 5:16come in and a plus b
  169. 5:17is represented on the output c sometimes
  170. 5:20four bits can't be enough to do that
  171. 5:22that's when overflow would happen but
  172. 5:23let's for now let's pretend that
  173. 5:24overflow isn't happening
  174. 5:26and a and b are gonna be small enough
  175. 5:27there's no overflow so that's what we
  176. 5:28got this is fine
  177. 5:29so that's pretty cool so here's my a
  178. 5:32here's my a vector here's my b
  179. 5:34vector okay both nibbles and again this
  180. 5:36we just saw this last
  181. 5:38last slide a as we thought of as this
  182. 5:40four signals
  183. 5:41a zero small lower case a zero through a
  184. 5:43three
  185. 5:44and now i've got two and three and two
  186. 5:46three should add to five but what i'm
  187. 5:48noticing is there's something called
  188. 5:49a delay now i'm finally realizing that
  189. 5:51the fact that you know what this is real
  190. 5:52world there are delays it takes the time
  191. 5:54to do
  192. 5:54takes the time for some magical genie
  193. 5:57inside to do the work
  194. 5:58we're going to see what the magical
  195. 5:59genie is when we build it ourselves but
  196. 6:00did you do the work okay two plus three
  197. 6:02five okay it takes me some time take the
  198. 6:03genie some time to do that
  199. 6:04so there's going to be a delay between
  200. 6:06when
  201. 6:07for example here's a new three here's a
  202. 6:09new three here's a new 10.
  203. 6:12when does the output c say 13 well
  204. 6:15it still says 5 even though right a
  205. 6:17moment after this time
  206. 6:19i knew at that time that it was three
  207. 6:21and ten but it took some time there and
  208. 6:22we're going to call this the time
  209. 6:24between when
  210. 6:25the clock goes up really usually when
  211. 6:27the clock goes up till
  212. 6:28or when the inputs change i'll say
  213. 6:30inputs change until i see the output
  214. 6:33the correct value on the output we're
  215. 6:35going to call that
  216. 6:36the adder propagation delay and if this
  217. 6:38is an adder we call it out of
  218. 6:39propagation
  219. 6:40if this is a and it would call it the
  220. 6:42and propagation lays whatever
  221. 6:44the name of the block is propagation
  222. 6:46delay that says there's a delay between
  223. 6:48when the inputs are stable at the new
  224. 6:49values until when i can confidently say
  225. 6:51that the output has the correct value
  226. 6:53for whatever it's trying to calculate
  227. 6:55okay so new word here adder propagation
  228. 6:58delay
  229. 6:59pretty cool okay so let's keep playing
  230. 7:02with this
  231. 7:03as i start to have more and more complex
  232. 7:05signals
  233. 7:06systems i'm going to have a ton of
  234. 7:08signals and boy does it help to
  235. 7:10actually have a tool to look and see
  236. 7:13what's going high when what's going on
  237. 7:15oh look at this
  238. 7:16this they're never supposed to be this
  239. 7:19both one but look right for that little
  240. 7:20instant they're both one
  241. 7:21that can be a problem for myself for my
  242. 7:23system whatever it is so as i'm building
  243. 7:24these systems
  244. 7:25you need to have a piece of tool a
  245. 7:27debugger that will let you work with
  246. 7:30uh the signals in parallel see all the
  247. 7:31signals in parallel and be able to play
  248. 7:33with them in fact notice this
  249. 7:34this one look at this here they're
  250. 7:36thinking about this as values not as
  251. 7:38this here's the here's the
  252. 7:40here's the the vector sometimes you want
  253. 7:43to see the actual bits
  254. 7:44but you also want to see the vector so
  255. 7:45these these debuggers often let you
  256. 7:48cluster them or not cluster it's pretty
  257. 7:50cool okay that's kind of neat
  258. 7:53so big picture there are two kinds of
  259. 7:55circuits we're going to look at
  260. 7:56in the series of lectures and in really
  261. 7:58computer engineering we can categorize
  262. 7:59them to two ways
  263. 8:00kind number one is combinational logic
  264. 8:03circuits
  265. 8:03these if you took cs0 cs10
  266. 8:07these are just like pure functions just
  267. 8:10like pure functions this is also from
  268. 8:1161a
  269. 8:12it's a function that has no side effects
  270. 8:14no state it's memoryless
  271. 8:15the output is only a function of the
  272. 8:16input combinational logic circuits we
  273. 8:18love them very easy
  274. 8:20here's a set of inputs and here's an
  275. 8:21output there might be a delay in my
  276. 8:23combinational logic but
  277. 8:24there's no feedback there's no state
  278. 8:26it's just output is only a function of
  279. 8:28the inputs i'm ready to go
  280. 8:30and our adder was like that here's some
  281. 8:32bits and here's the output it's always
  282. 8:33going to be the same output for the same
  283. 8:35input that's the other critical piece of
  284. 8:36it
  285. 8:37or we also care about state elements and
  286. 8:40state elements are ones that
  287. 8:41have state they have memory boy if i
  288. 8:43didn't have memory my computer won't be
  289. 8:45able to store the data that i've created
  290. 8:46so
  291. 8:47we need state elements to store our data
  292. 8:49registers
  293. 8:50caches caches memory disk all these
  294. 8:52things have state they remember
  295. 8:54what you put them there and i have
  296. 8:56combination of logic to do some
  297. 8:57calculations
  298. 8:58and so we're going to have two of those
  299. 8:59kinds of circuits and
  300. 9:01we need both of them in what we're going
  301. 9:02to be building okay so combinational
  302. 9:04logic circuits are cl
  303. 9:05and state elements here's a circuit with
  304. 9:08state
  305. 9:09and i haven't told you how it works but
  306. 9:10i'm going to talk about what it is
  307. 9:12this is called a register
  308. 9:16you've seen a register when we were
  309. 9:16talking about risk five but here is an
  310. 9:18example register is
  311. 9:19it has n bits of input and bits of
  312. 9:23output
  313. 9:23and it has a loader and this little
  314. 9:26circuit says that something magical
  315. 9:27happens when
  316. 9:28that circuit goes high so when that goes
  317. 9:31high
  318. 9:31here's what the register does i'm a
  319. 9:33register i'm sitting here i've got my
  320. 9:35outputs it's all
  321. 9:36my output is whatever i've been stored
  322. 9:38with i have some value stored here
  323. 9:39here's my output
  324. 9:40okay here we go load goes high
  325. 9:44i turn around i grab the value
  326. 9:47of input and i hold it i remember it and
  327. 9:50now i'm loading it i'm loading this into
  328. 9:52myself
  329. 9:53and now i ignore it once that goes high
  330. 9:55i turn on quickly grab it and then turn
  331. 9:56around
  332. 9:57and i hold that that's what i hold you
  333. 9:59gave me five okay here's
  334. 10:00five holding five oh now it's changing
  335. 10:03to 10 20. i don't care i don't care what
  336. 10:04my input says because
  337. 10:06because load is still low ready rising
  338. 10:08edge of load now it's a 7
  339. 10:10turn around grab the 7 and 7.
  340. 10:13that's it i'm holding 7. now it's
  341. 10:15changing load is still low
  342. 10:16input is changing i don't care i'm
  343. 10:18holding it stable state
  344. 10:20i'm holding the seven that's the idea
  345. 10:23what often we do is we clock these
  346. 10:26devices
  347. 10:27so now rather than load going up every
  348. 10:29once in a while
  349. 10:30i'm going to go up every single clock
  350. 10:32cycle i'm here i got my seven and then
  351. 10:35clock goes up turn around grab
  352. 10:36whatever's there
  353. 10:38now it's a 12. here's my i should have
  354. 10:41said 12.
  355. 10:42here's my 2. i don't know what 12 feet
  356. 10:442.
  357. 10:46okay clock goes up again whatever it
  358. 10:48happens to be
  359. 10:49so there's a rhythmic nature to it okay
  360. 10:51and so normally we
  361. 10:53um normally we're going to clock these
  362. 10:55devices and having them clocked is
  363. 10:57is great because now there's a rhythm
  364. 10:59and now data's kind of moving in chunks
  365. 11:01like an assembly line
  366. 11:04they move to the next stage everything
  367. 11:06just kind of moves to the right and data
  368. 11:07so that's going to be great as we build
  369. 11:09circuits we have our data kind of
  370. 11:11chunk to the right that's exactly what
  371. 11:12we'll use this register that's going to
  372. 11:14be clocked so we typically clock our
  373. 11:16registers not always
  374. 11:17but we often we often do
  375. 11:20in conclusion clocks are the heartbeat
  376. 11:23the pulse of our circuits
  377. 11:25voltages are analog voltages are who
  378. 11:28knows what they are but i'm going to
  379. 11:29quantize them
  380. 11:30it's zero to three volts next year it's
  381. 11:31zero and 2.5 volts whatever they build
  382. 11:33but i'm going to quantize them to be a
  383. 11:35zero and one and think of them in a kind
  384. 11:36of
  385. 11:36soft abstract abstract way as a zero to
  386. 11:39one from now on
  387. 11:40circuit delays are a fact of life we saw
  388. 11:42that everything there's real world
  389. 11:44natures
  390. 11:45the there's not just delays but the
  391. 11:47values are often fuzzy
  392. 11:49and one of the things we're going to do
  393. 11:50from our from our circuits is if the
  394. 11:51value came in fuzzy like let's say it's
  395. 11:53a little bit below one it's still a one
  396. 11:54but it's like
  397. 11:54not three volts it's 2.5 we're gonna
  398. 11:57make sure that
  399. 11:58that circuit cleans it up if every
  400. 12:00circuit cleans it up
  401. 12:01so that input was coming in was a little
  402. 12:03below two below three
  403. 12:05output is gonna be solid three and the
  404. 12:06only way that they're gonna have noise
  405. 12:09the only reason it would not be three is
  406. 12:10then noise or maybe maybe there's some
  407. 12:12resistance on the line so i had to go
  408. 12:13from here to here and it started a three
  409. 12:15and it was lower by the time it got
  410. 12:16there so the real world is going to
  411. 12:18influence this by adding noise to our
  412. 12:20system or having
  413. 12:21you know having a distance with
  414. 12:22resistance across the line but every one
  415. 12:24of our core blocks is going to try to
  416. 12:26clean the circuit up if it came off a
  417. 12:27little bit higher than zero
  418. 12:29we're going to clamp it down to zero if
  419. 12:30it came in a little bit lower than the
  420. 12:32three a little above three we're gonna
  421. 12:33try to make a clamp but at three so our
  422. 12:35job of each of these blocks is going to
  423. 12:36be clean the signal up
  424. 12:37and then who knows in the in the trans
  425. 12:39in the transmission of that data to the
  426. 12:41next block
  427. 12:42maybe your voltage got up maybe some
  428. 12:43noise from the connection guy maybe
  429. 12:44there's a distance of resistance
  430. 12:46whatever it is
  431. 12:47that might be not perfect zero and one
  432. 12:50coming in but we're going to try to
  433. 12:50clean up to be a zero and one coming out
  434. 12:52that's the idea of our blocks
  435. 12:54and in summary there's two kinds of
  436. 12:55circuits combinational logic or cl
  437. 12:57and state circuits like registers we're
  438. 13:00going to learn more about those and even
  439. 13:01how to build a register in the next
  440. 13:02series of lectures we'll see you there

About this transcript

This page contains the full transcript of [CS61C FA20] Lecture 14.3 - Intro to Synchronous Digital Systems: Signals and Waveforms by CS 61C Departmental, generated from the public captions YouTube serves with the video. The transcript has 2,782 words across 440 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.