Skip to content
Get App

W1 Introduction EN

Intro lecture on RISC-V processor design: what an ISA is, RISC vs CISC, why open-source RISC-V matters, and the course roadmap from transistors to pipelined cores.

Key Takeaways

  • An ISA is the contract between hardware and software, and RISC-V is an open, free ISA that enables custom processor design.
  • RISC designs favor simplicity, area, and power efficiency, which is why they dominate mobile and are expanding into laptops.
  • Building a processor requires understanding the stack from transistor physics through logic gates, sequential circuits, and timing.
  • Open-source RISC-V reduces licensing barriers and benefits from a large community, making it attractive for national processor programs.

What the video covers

  • Course introduces top-to-bottom understanding of a modern RISC-V processor, focusing on the CPU core rather than the full SoC.
  • Instructor Hasan Erdem Yantır presents himself as a senior researcher at BİLGEM and part-time faculty at Istanbul Technical University.
  • An ISA (instruction set architecture) is the common language between hardware and software, defining how software controls the CPU.
  • Distinguishes architecture (the programmer's view) from microarchitecture (how it is implemented in hardware).
  • Compares RISC (simple instructions, larger code, area and power efficient, suited to mobile) with CISC (complex instructions, smaller code, power-hungry, used by Intel and AMD).
  • Positions RISC-V as an open-source ISA, contrasted with proprietary ARM and x86, and notes growing adoption in ASIC and FPGA projects.
  • Argues RISC-V is a strategic choice for nations seeking their own processors, citing China and some European countries.
  • Lecture progresses from transistors and logic gates through combinational and sequential circuits, latches, flip-flops, timing, and metastability.
  • Covers CMOS fundamentals such as pull-up/pull-down networks, static and dynamic power consumption, and setup/hold constraints.
  • Notes that students were using LLMs for homework, motivating a more hands-on course approach.

Answers

Questions about this video

What is an instruction set architecture according to this lecture?

An ISA is the common language between hardware and software. It defines how software controls the CPU, including instructions, operands, and locations, so that software developers and hardware developers can work independently.

Why does the lecturer recommend RISC-V over ARM or x86?

RISC-V is free and open source, backed by a large community, and not tied to licensing fees as ARM or x86 are. This makes it a viable path for building national or custom processors, and its adoption in ASIC and FPGA projects is growing rapidly.

How do RISC and CISC differ in power and code size?

RISC uses simple instructions, producing larger code but with area- and power-efficient processors suitable for mobile devices. CISC uses complex instructions, producing smaller code but with more complex, power-hungry processors better suited to high-performance desktops.

Full Transcript — Download SRT & Markdown

00:04
Speaker A
So, the class is about risk five architecture and processor design. And my name is Hassan Adam Yantar.
00:12
Speaker A
I will introduce myself. This class is about a top-to-bottom understanding of a modern risk five processor system.
00:21
Speaker A
So, in this class we will see how to design a very complex processor core, but not not the SOC itself. In here there is a die shot of Apple M4.
00:31
Speaker A
And you you see there are different kinds of components in this die shot. You know, Apple Apple is the phone that you use commonly. And its processor consists of different components like GPUs, CPUs.
00:47
Speaker A
And in this course we are going to focus on the CPU. And we will focus on the complex processor.
00:53
Speaker A
Complex CPU. Not like the basic ones. And I will introduce it more in detail.
01:01
Speaker A
I will mention about it in detail. My name is Hassan Adam Yantar. Actually, I'm a senior chief research researcher at the BİLGEM. And also at the same time I'm a part-time faculty at Istanbul Technical University. In the case of a
01:14
Speaker A
need, you can contact me over this email. In here I mentioned that I mentioned about the term named risk five. And risk five is actually an instruction set architecture. And instruction set architecture defines how the CPU is controlled by the software.
01:32
Speaker A
So, it's like a common language between the hardware and software. So, when you look at this picture, everything is consists of physics devices.
01:43
Speaker A
And these devices combines and forms the digital circuits, analog circuits. And we have logic based on these digital circuits, microarchitecture architecture and application software through the top level application software.
01:59
Speaker A
And when you look at any electronic component, for example, a processor, you are writing software on it, running software on it. Uh it's Okay, people are using it to write software, but under under the software, there are lots of different levels.
02:17
Speaker A
Starting from physics until the architecture. And in here, you know, people they are writing the software, and also also there are also other people they are building the micro processor. And there should be a common language between them. Because the the one who is writing
02:35
Speaker A
the software needs to know that how which software, how how should it write the software for this architecture? And at the same time, the hardware developer needs to know that under which software commands my hardware should should run them.
02:52
Speaker A
So, instruction set architecture plays a key role in here. So, as I told you, it's a common language between the hardware and software.
03:03
Speaker A
So, in here, there are two terms where the which are important. One of them is architecture.
03:10
Speaker A
Architecture is the programmer's view of a computer. Uh like instruction, operand locations, like and or for example, operands. And microarchitecture is related to how to implement an architecture in hardware.
03:25
Speaker A
So, as I told, instruction set architecture is the common language between the hardware developers and software developers.
03:34
Speaker A
Uh Otherwise, we don't know. For example, when you write a software for the Intel, you cannot run it in on a ARM processor.
03:41
Speaker A
Uh For this reason, there should be a common language, which is named as instruction set architecture.
03:50
Speaker A
Is it clear? Did you understand that what instruction set architecture is? Okay. Instruction set archi- Now in the modern world, there are two instruction set architecture classes.
04:05
Speaker A
One of them is RISC and other one is the CISC. So, they are classified into categories mainly. There are different instruction set architectures, but they are not common. They are not used much.
04:16
Speaker A
And in RISC and CISC classes, there are lots of different variants of it. In this class, we are going to focus on RISC-based instruction set architecture, which is RISC-V.
04:28
Speaker A
When you compare it, for example, in RISC, it stands for reduced instruction set computing.
04:37
Speaker A
Its instructions are basic, simple. And it generates if you compile a code written code written, for example, in C, C++, or C#, when you compile it, it generates higher code size. This is a negative effect. But it's it's this
04:58
Speaker A
processors, if you implement a processor that runs the RISC programs, it is its area and power consumption is less.
05:05
Speaker A
Area is less, also power consumption is less. So, it is area and power efficient. And these RISC-based architectures are good for mobile and also for high-performance computing like desktop and laptop, it is also extending.
05:20
Speaker A
So, it can perform better also. CISC is It is used mainly by Intel and AMD.
05:28
Speaker A
It stands for complex instruction set computing. It has It consists of the advanced and complex instructions. When you compile a program by using CISC compilers, it generates lower code size, but its processors are very complex and power-hungry.
05:46
Speaker A
These instruction set architecture good for high performance computing, but definitely not for mobile. And the good thing is that uh which is for for risk that we will see in this lecture in this class. Uh risk is also extending to the high
06:03
Speaker A
performance computing. For example, when you look at the Apple uh the laptops, Apple was selling the laptops with x86 uh and uh nowadays for the last 4 years, they start to ship also laptops with the risk processors, arm processors.
06:21
Speaker A
When you look at the instruction set architectures, you I mentioned about the CISC. CISC is the actually the CISC belongs to AMD and Intel. It is x86. Okay, at it also has 64 variants.
06:36
Speaker A
And when you look at the RISC side RISC side, there is RISC-V and arm.
06:41
Speaker A
Uh arm is commercial. Uh there are two mainly two RISC instruction set architectures. One of them is RISC-V and arm. And arm is commercial. So, for example, you you can read the arm documents, but you cannot use this
06:57
Speaker A
instruction set architecture arm instruction set architecture both the commercial one. Uh so, otherwise if you want to use it, you need to pay money to arm.
07:08
Speaker A
It is proprietary. Uh so, and in here other one is alternative is RISC-V. RISC-V is open set instruction set architecture. It is like Linux.
07:18
Speaker A
It is the hardware version of Linux. Linux is a open source operating system. Uh and RISC-V in software, of course Linux is software. RISC-V is like open source hardware.
07:33
Speaker A
You can think about think so. So, in in this class, that's why the reason is that RISC-V is free and open source. We are going to focus on the risk five instruction set architecture, but mainly you can apply for example in
07:47
Speaker A
this class we will see the complex processor architectures and you can apply it to other processor instruction set architecture also. You can use this methodologies to build a processor by using army instruction set architecture also.
08:03
Speaker A
RISC-V, why we are seeing RISC-V? RISC-V is nowadays going very well. Its usage are increasing.
08:13
Speaker A
In in the countries like for example China and other some European countries which are which they don't have any processor national processor, they are exploiting the RISC-V to build their own national processor because it is open source. There is a very huge open source
08:31
Speaker A
community supporting this process instruction set architecture. For for this reason, it is global market is increasing very rapidly.
08:41
Speaker A
And you can use it in many different domains. So, in overall nowadays, ASIC and in FPGA projects, 28 23% of those projects are using at least a single RISC-V core and it is increasing very rapidly.
09:00
Speaker A
So, as for most of us as Turkish, if you want to build a national processor, then the RISC-V is the only choice. And we need to exploit the RISC-V.
09:12
Speaker A
Otherwise, for example, we can okay read Intel's document and build a x86 processor, but we have to pay money to Intel or may not be sell.
09:26
Speaker A
Most most likely they will not sell it sell it to us. And for the arm also, we need to pay to arm. But for if you are using RISC-V, there is a very huge open source community. They are supporting you.
09:39
Speaker A
And its performance also increasing day by day. So, there is a good opportunity in RISC-V instruction set. So, it's very important. That's why we are opening this offering this class.
09:55
Speaker A
And these lectures are just to introduce. These slides are just to introduce you instruction set architecture, what RISC-V is.
10:04
Speaker A
Is it clear? You can ask in Turkish also. I can answer in in English.
10:11
Speaker A
Okay. So, the course is about digital design. Yeah, I will mention about the course content.
10:20
Speaker A
First, we will see digital design overview and system Verilog. And after that, we will start to look at RISC-V instruction set architecture. And after that, we are going to see the basic processor architectures in order ones, single cycle and pipeline in order ones.
10:39
Speaker A
And after that, we will see caches and memory. We will look at the branch prediction. And after that, we will switch to out-of-order course. This is the important topic. I think this is the most beneficial content of this course.
10:56
Speaker A
And after that, we will see some some information about the virtual memory and operating system, how to run operating system in an accord.
11:04
Speaker A
And if we can find time, we will look at the SOC. We will look at the interconnect, peripherals, and GPU as empty and vector course.
11:15
Speaker A
So, in overall, our aim is that, for example, in here, there is I put another Apple processor die shot. And in here, you can see the course. We I would like to show you how to build such a complex
11:29
Speaker A
core. Of course, we will not be able to do it, but at least you will have a imagination that how can we build it. Maybe we can come together as a team, 30 40 people, we we will be able to build it. But at
11:44
Speaker A
least you can imagine native. You can imagine how to build it. So, for example, you can see that in the internet, people are saying that okay, we are building this five course, but these are generally very very basic risk
12:01
Speaker A
five course. For example, there is a competition Technofest chip design competition. And in this competition, people are designing risk five processor. They are very very small actually. They are not realistic. They are basic. Like for example, in this for example, projector
12:16
Speaker A
controller, remote controller. Inside this remote controller, there is a small processor. It is just looking to the push buttons, sensing them, and sending the commands to the projector.
12:30
Speaker A
You can use such processors in this remote controller, but not for high performance computing or in laptop.
12:38
Speaker A
Inshallah, in our class, our aim is to look design complex processors. At least just to imagine how to build it.
12:52
Speaker A
And in this class, you remember this picture of hierarchy. We will focus digital circuits, logic, micro architecture architecture and a little bit operating systems. In this class, of course, you have to know the knowledge of the digital circuits. At
13:07
Speaker A
least you you took classes on second and third years. So, you need to know some information about digital circuits, but we we mainly in this class focus on the micro architecture and architecture.
13:23
Speaker A
This is the course logistics information. In this course for 35% of the overall grade, we will do in-class quizzes.
13:37
Speaker A
I will give seven quizzes in total and select highest five of them for grading.
13:43
Speaker A
We will do one midterm exam, 25%, one final exam, 40%, and I will give you six homeworks, but it is optional. You don't You don't have to do it.
13:55
Speaker A
So, the for advice for success in this course, just focus on learning, uh manage time, follow schedules, and don't postpone. In the case of a need, ask questions, even if it is basic. So, it is By the way, it is
14:14
Speaker A
better for me to to this class interactive. I know it is a little bit hard in English, but we can try. Also, you are free to speak in Turkish, uh but if you can make the class interactive, I think
14:27
Speaker A
it is much better. In here, I I put two proverbs. You can read it. It is unfortunately in in Turkish, uh but it says that free time is important. You need to evaluate it.
14:40
Speaker A
And also, you need to also need evaluate or uh get the benefit from the uh free time before becoming busy.
14:54
Speaker A
Uh what about the AI policy? You can use AI freely. No problem. Not in class, by the way.
15:02
Speaker A
Not during the quizzes. Uh you can use large language models freely for learning, but it can easily mislead you if you expect more, because we are using it in our also in TUBITAK while we are building the complex ICs.
15:18
Speaker A
Uh they are actually don't yield the best result. They are not giving the best results, maybe intentionally by the way, because for example, think about people for example, America is building a model large large language model.
15:33
Speaker A
And you are asking this model how to gen- how to build a very super high performance respect processor.
15:42
Speaker A
Uh do you think that does it give you the correct answer? Sometimes they are under performing performing intentionally. I know because one friend was working for these companies. For example, if you are asking for very for example, uh
16:02
Speaker A
high-end questions, uh they are not answering uh fully. They are under performing. So, they are not explicitly answering everything.
16:16
Speaker A
So, they are not yielding the best results may and most likely it is intentionally, uh but of course, you can use the LLMs for learning. So, you can ask for example, in the next phases of the courses, for
16:29
Speaker A
example, you can ask LLMs how renaming works, for example, and you can check it. Uh Why we are not giving any homeworks?
16:39
Speaker A
Because LLMs can do the basic RTL design tasks. Uh this is the fourth time we are offering this course, and in the in the first semester, in the first offering, it it was not able to do it.
16:53
Speaker A
But day by day, uh they are progressing. Uh they are improving themselves, and in the last semester, we realized that most of the students are doing the homeworks by using the LLMs, and they are not learning. This was the problem. That's
17:07
Speaker A
why homeworks are not graded. We will give it, but it is optional. Uh so, this is the new grading actually, starting from this semester.
17:19
Speaker A
And the important point in here is that quizzes will be related to homeworks. So, working on the homeworks is still beneficial.
17:31
Speaker A
At the beginning I mentioned that I am coming from TUBITAK and working for ITU as part-time.
17:40
Speaker A
As TUBITAK, I am working for the integrated circuit design and training laboratory. We conduct research and teaching activities, but as employee in TUBITAK, as a researcher in TUBITAK, we conduct research and teaching activities at Istanbul Technical University because I am also
17:57
Speaker A
at the same time part-time faculty in here. So, in here we are offering graduation projects. This is like a slide for advertisement.
18:06
Speaker A
We are offering graduation projects. We have master and PhD students in here. Also, in TUBITAK we are offering internship and fellowship. By the way, in digital domain, for example, around 60% of the researchers graduated from this course in in my team, in my
18:25
Speaker A
research team. So, this course is actually beneficial for your for your requirement in TUBITAK.
18:35
Speaker A
And also we are offering two courses as TUBITAK. One of them is this course.
18:41
Speaker A
This course is named as RISC-V architecture and processor design, but starting from the next semester we will make it EHB course, inshallah, hopefully. And it will be named as processor architecture and design. And in this course, it is a the
18:57
Speaker A
content will be the same. So, we will see RTL implementation of a complex high-performance processor architecture.
19:05
Speaker A
And after this course, we will offer this course during in the spring semesters, and in the fall semesters we are going to offer the associate design and physical implementation course. And in this course, we are going to physically implement the processor that
19:21
Speaker A
processors that we designed in the previous course. So, in this course, we will focus on the associate design and physical implementation at TSMC 16 nanometer technology.
19:33
Speaker A
So, this course will be about the design and the next course will be about the physical implementation and associate design.
19:42
Speaker A
Because in this course, we are mainly we focus on the core of a processor. Uh but core itself is not much meaningful. You need to build a associate system because for example, you are In the next lectures, we will see in
19:57
Speaker A
detail but if you build a core processor core, of course, you need to for example, connect screen to this core, uh keyboard to this core. So, associate environment is the place that you are connecting these peripherals to this
20:12
Speaker A
core. So, it is also very important. Uh actually, associate is providing you to methodology to interact with the outside world. Core itself is not enough.
20:22
Speaker A
Core is the like brain, but you need hands also at the same time. Like Any question?
20:43
Speaker A
Yes. So, before starting to the class, I will mention a little bit about integrated circuits and its importance also.
20:54
Speaker A
Uh so, as you know, integrated circuit consists of transistors. Uh in here, we have a For example, this is a transistor. It's like uh a switch.
21:04
Speaker A
Uh If you apply a voltage to the gate, it passes current. And if you don't apply, it's just not pass the current.
21:19
Speaker A
So, with the advent of the technology in the technology, these transistors can be built in a very small dimensions, like 14 nanometer.
21:30
Speaker A
So, compared for example, you can build a transistor and its size can be for example, like 7 nanometer, 10 nanometer.
21:37
Speaker A
It can be very, very small. So, compared to human hair, which is around 90,000 nanometer thickness, uh you can fit maybe thousands of them inside a human hair.
21:50
Speaker A
So, by combining these transistors, we are building the logic gates and unlock devices. For example, in here, there is a basic AND gate.
22:01
Speaker A
And you can think that it consists of six transistors. When you compute its area, it's very small.
22:08
Speaker A
Like for example, 100 nanometer, you we can say. So, it is in a 100 nanometer square meter for example, you can build very simple logic gate that can perform the AND gate. And by using these AND gates and combining
22:25
Speaker A
them, we are building more complex circuits like adders, multipliers. And at the same time, analog devices are also built by using just transistor.
22:36
Speaker A
Of course, analog can also use inductor and other components. And then by using these very tiny transistors and combining billions of them, we are building the integrated circuits.
22:52
Speaker A
And in terms of the signal, there are two domains, as you know. One of them is analog domain and one of them is digital domain. Digital domain is like abstraction of the domain. Analog is continuous, like 0, 0.1, 0.2, 0.375
23:08
Speaker A
V, but digital is between two values. It's abstract version of the analog. This is one or zero. And all processors works as digital.
23:19
Speaker A
So, in this class we are going to focus on the digital domain. How we are building digital or mixed-signal integrated circuits?
23:29
Speaker A
In here, I will mention briefly. Normally, it is impossible. For example, one one CPU consists of maybe a billion of transistors, and it is impossible to connect them by hand.
23:41
Speaker A
So, generally we write hardware We write actually code to to describe the processor. And this is named as hardware description languages.
23:54
Speaker A
And after writing this hardware description languages, we are synthesize it. It's like compilation. We compile it.
24:02
Speaker A
And after that, after the compilation, we convert it in a format that can be fabricated physically.
24:11
Speaker A
So, we are converting it into in a physical format. At the same time, if you want, you can put analog circuits inside.
24:21
Speaker A
And build a mixed-signal integrated circuit, digital or mixed-signal integrated circuit. But, the important point in here is that you are not building the processor by combining billion of transistors. You are just writing code. We are describing the processor by writing code.
24:44
Speaker A
And after this compilation, you can think it as a compilation. After com After these steps, you can send it to the fabrication and produce the chip. This is the digital or mixed-signal integrated circuit design flow in general.
25:00
Speaker A
Uh what about analog integrated circuit design? In analog integrated circuit, we are still using transistors, but this time we are designing it by hand. We are putting the transistors and shaping them. For example, specifying its dimensions. We are connecting them.
25:17
Speaker A
And after that, we are writing We are making it ready for the production and sending it to the fabrication for fabrication and getting the chip.
25:30
Speaker A
The difference is that mainly in digital integrated circuit design, we are writing the hardware description language code uh to describe our processor complex IC, and then like compiling it. We are just synthesizing it. It's like compilation.
25:47
Speaker A
And in analog integrated circuit, people are doing uh handcrafted job. So, they are just sizing by hand.
25:55
Speaker A
They are combining, putting the transistors, and combining them uh by hand. And also, uh there's another methodology, FPGA-based digital system design. This is different than the integrated circuit design, because integrated circuit is the chip itself, but FPGA is a little bit different. In
26:13
Speaker A
FPGA, there is a chip inside here, and inside this chip, you are uh putting your HDL, hardware description language uh code.
26:25
Speaker A
Uh I will not go into the details, but in here, in this methodology, it is not like this digital integrated circuit design, because in here, you are designing the integrated circuit itself.
26:36
Speaker A
But in FPGA-based digital system design, there is a chip, and you are putting your HDL functionality into this chip, and somehow this chip functions as you described.
26:48
Speaker A
You are still writing hardware description language in here. But its flow is different. So, computation and integrate circuit, I will mention about the overview and importance. Since, for example, you can think about you are running, for example, different software
27:10
Speaker A
applications, like health, for example, health care systems, Chrome, or WhatsApp, for example, and these applications are running running over an operating system.
27:21
Speaker A
And this operating system runs on a integrated circuit. There is a chip, and you are running this operating system in this chip.
27:29
Speaker A
And this chip is produced somewhere else, for example, in outside, in Taiwan, or in United States.
27:37
Speaker A
So, the important thing in here is that if you want to build if you want to use dependable, secure software, you need to be sure that all of the levels under the software must be developed by you, or must be
27:56
Speaker A
developed by a secure people. So, that's the reason the the important point in here is that, for example, if you want to build a secure phone, or secure software, unless the hardware is not secure, you cannot provide 100% security. For this
28:19
Speaker A
reason, it is very important to build their own IC. As as nation, it's for a nation, it is very important to build their own IC.
28:31
Speaker A
Otherwise, for example, we can say that, "Okay, we have Pardus operating system, but it is not 100% secure." And I will mention about some examples about the security and importance of this building their own chips. By the way, Turkey is not building their own
28:46
Speaker A
processor. That's why we are giving this class to to create an ecosystem and to do movements in this direction to build our own IC, own processor, like our own Intel processor. We can do it.
29:01
Speaker A
Uh, unless hardware is made designed by us, uh, the software is not secure. This is the key point in here. What can be done?
29:10
Speaker A
For example, you can purchase a chip from somewhere else and it can be counterfeit chips.
29:15
Speaker A
It's a fake chip, like uh, people can put backdoors. It is very common, by the way. Uh, you can they can put backdoors inside this chip and they can get the control of this chip anytime. Uh, it's up to them.
29:30
Speaker A
Uh, then they can intentionally life reduce the lifetime of this chip. For example, you are putting a chip inside a plane and you are thinking that this chip last 10 years, but they intentionally reduced its lifetime to 4 years. So, after 4
29:46
Speaker A
years, maybe the chip will malfunction. So, it's a catastrophic case. Uh, and I mentioned about also malfunction. They can change the functionality of the chip.
29:56
Speaker A
So, that's very important. Why it is very important design and also produce our own chips as nation.
30:05
Speaker A
Otherwise, only building to software is not enough. For example, we can build our own operating system, but it's not enough.
30:12
Speaker A
Uh, we need to run them in our own integrated circuits and even we need to build these integrated circuits in here.
30:22
Speaker A
Uh, let's see some examples what is happening if you cannot if you don't produce design your own chips. There is a some cases.
30:32
Speaker A
Uh, one of them is in 2007. Uh, Syrian S-300s were disabled due to the backdoors within the networking chips.
30:40
Speaker A
Actually, Israel disabled their uh, network chips, actually, uh by using their backdoors. So, they chip couldn't communicate. They couldn't sense Maybe they sensed the planes, but they couldn't inform the center.
30:57
Speaker A
Because they hacked the They hacked the communication chips. Uh as far as I remember, it was It was Mellanox IC network chips. And they they used the backdoors of inside this chip.
31:11
Speaker A
And you know, pager attack in Lebanon in 2020, for they they hacked the chips.
31:17
Speaker A
And at any time, they they convert this phone to a bomb. You can Google it. If you don't know the in detail, you can Google it in in Google it and see the details.
31:28
Speaker A
And also, restriction is also an another important thing in here. For example, you cannot buy If you want to, for example, buy a very high-speed analog-digital converter, you cannot buy it because they need to allow to sell it
31:43
Speaker A
to you. And most likely, they are not allowing. For example, I know in processor, for example, if you if you want to purchase a processor, for example, 4 GHz, 5 5 GHz, very high-performance processor, uh you need to
31:59
Speaker A
fill lots of documents, and you are getting permission. Otherwise, they are not selling you. And you know, in for example, GPUs, they were not selling to GPUs to China. They were selling not high-end GPUs to China, maybe around
32:14
Speaker A
2 3 years ago. So, they can easily restrict it. For this reason, we need to design our high-performance chips.
32:22
Speaker A
And there are in here, you can read some news. I put some news. It is very important. For example, in Turkish drones, uh they found some parts, and they apply They stopped selling the some parts uh, to Turkey.
32:38
Speaker A
So, and of course, as I told you, they they are registering the highest technology products.
32:44
Speaker A
And also, I put uh, two news here. One of them says that uh, it was about the chip war around 2 years ago. Uh, it says that who controls the chip controls the world, uh, the silicon cold war. The the
32:58
Speaker A
war actually between the China and United States mainly based on the chip. Uh, they are saying it as a silicon war.
33:06
Speaker A
And most likely you will see this video. I I don't know. Yeah, you can read the uh, subtitle in here.
33:15
Speaker A
For example, he is saying that if you are a holding a cell phone, it's a piece of Israel. He's saying that.
33:22
Speaker A
Uh, because most of the chips inside this cell phone are built by them somehow.
33:34
Speaker A
So, you can check them offline. So, that's all. Uh, in this class I told them that in this class we are going to see how to design very complex uh chips.
33:54
Speaker A
Uh, so how can we do it? How How How do we design things that are too big to fit in one person's head at once? Uh, there are three design methodologies in here.
34:03
Speaker A
Uh, abstraction discipline uh, and there are three ways as I told. Uh, the important thing here in here is that hierarchy. So, we need to divide the for example, think even this core is very complex.
34:17
Speaker A
Uh, we need to divide it into modules and sub modules and this each sub module for example, designed by a group of people.
34:26
Speaker A
And modularity in here is important. Uh, having well-defined functions and interfaces between them. For example, this core is communicating with this core, and there should be a well-defined interfaces for them.
34:42
Speaker A
And regularity. You look at If you design this core zero, and there are lots of cores in here, they are the same. You are just duplicating them.
34:51
Speaker A
Replicating them, and it's the already half of the chip, for example. Half of the chip is the same of this core zero.
34:57
Speaker A
And most likely these cores are very similar to this core. Only some configurations are different, and you are building most of the chips already.
35:06
Speaker A
So, regularity is also important. So, we are following three ways in here: hierarchy, dividing everything into modules and submodules, modularity, uh there should be a well-defined functions between these modules, and regularity.
35:22
Speaker A
So, it's like abstraction and discipline. Abstraction means that like it's related to hierarchy also.
35:32
Speaker A
So, in here we started Okay. We can continue a little bit more, and we can give a break.
35:42
Speaker A
We didn't start the class yet. I will do some review on digital systems, uh and we will start with binary numbers.
35:50
Speaker A
Uh most likely you are familiar with these concepts, and but let's do a some review on on it.
36:00
Speaker A
Let me check this one. Okay. So, the first topic the in the in the radio is about the binary values.
36:30
Speaker A
Uh there are two discrete values uh for in digital domain, one and zero. Everything consists of one and zero.
36:39
Speaker A
Uh one is like voltage is on and zero is like voltage is off. Uh they are named as true or false or high and low or zero and one. There are different names for it for them.
37:00
Speaker A
Let me check, please. So, this is a circuit used the voltage levels. Uh zero is generally low voltage. Uh zero is low voltage and correspond to ground and one is high voltage correspond with the VDD.
37:20
Speaker A
And these levels corresponds to a bit, binary digit. And by using these bits, actually computers are as I told you consist of one and zeros. Uh they are not competing in decimal domain. Decimal is base 10.
37:34
Speaker A
The numbers between zero and nine uh corresponds to base 10, but computers only know zero and one, binary system.
37:42
Speaker A
And corresponding to the human uh humans use the decimal numbers. Uh actually these decimal numbers are represented in computer in one and zeros.
37:54
Speaker A
And in here you there is a correspondence. Actually, you'll see there is a uh decimal number uh correspond this number and decimal equivalent of it. And binary number is like this one. It is also in decimal everything is 10 to the X, for example,
38:13
Speaker A
the uh value of a digit in here is a 10 to X. The X is the digit's position.
38:20
Speaker A
In a similar manner, in binary number, it is two to the X, where X is the digit number.
38:29
Speaker A
So, for example, 1101, which is correspond which corresponds to 1 * 2 to the 3, because this this one is three, third one, plus 1 * 2 to 2, plus 0 * 2 to 1, and 1 plus 1 * 2 to 0, and
38:45
Speaker A
it corresponds to 13. Actually, this binary number, for example, you put it in a computer, this corresponds to 13 in decimal system.
38:55
Speaker A
And, as I told you, computer only understands the binary numbers. People are trying to build ternary or quaternary computers, but now the only there are commercially binary numbers are used by the computers.
39:11
Speaker A
If don't know, you can interrupt me, but this course I will do a very quick review. And this no this course actually assumes a good knowledge on this digital systems.
39:24
Speaker A
And in here, I put some examples to binary to decimal conversion and decimal to binary conversion. How can you do it?
39:31
Speaker A
You can check the slides, and if you have a question, also you can ask.
39:36
Speaker A
But, if you have a n-bit binary number, it can represent two to the n numbers, different values, and it represent between zero to two to the n minus one, the range between them.
39:49
Speaker A
For example, three-digit binary number, it can it is between 000 and 111. So, there are eight possible values between these two numbers.
40:03
Speaker A
Hexadecimal numbers is also very important. We are using while writing while building the processor, we are using hexadecimal a lot.
40:11
Speaker A
Hexadecimal corresponds to base 16. Until now, we saw base 10, base two, base 16 is the another and it's named as hexadecimal numbers.
40:21
Speaker A
It's a short hand for binary. How it is a short hand? Because four digit binary number corresponds a digit in hexadecimal number.
40:29
Speaker A
For example, this is a hexadecimal number. By the way, hexadecimal number is between zero and 15.
40:35
Speaker A
Uh decimal is between zero and nine, binary is between zero and one, uh and hexadecimal is between zero and 15. And after 10, people are represented as a A B C D E F.
40:48
Speaker A
And each four bits in binary corresponds to a digit in hexadecimal. So, in order to convert a hexadecimal to decimal, it is the same. Uh in here, our base is 16. So, 16 * 16 uh power of uh the digit position times the value.
41:09
Speaker A
For example, it is 4 * 16 squared plus uh 10 * A corresponds to 10. 10 * 16 plus uh 15.
41:19
Speaker A
F E F corresponds to 15 and this is the decimal conversion. So, for example, as I told you, a hexadecimal number corresponds to four four-bit binary number. And for four, for example, it corresponds to 0 1 0 0
41:33
Speaker A
because this is four actually in hexadecimal. For example, A is 10 and when you look at this four digit, it is a it corresponds to 10. 2 + 8, it is 10.
41:46
Speaker A
Let me activate this one. And in digital systems, we have some terms. Bits, we we know zero and one.
42:11
Speaker A
Uh bytes and nibbles. Uh, byte corresponds to eight bits. Most likely you know about the RAM. Uh, for example, your RAM is can be described in terms of bytes. Uh, so bytes correspond to eight bits. Nibble is the half byte. It is
42:27
Speaker A
four bits. And half is 16 bits. A word is 32 bits. Double is 64 bits.
42:35
Speaker A
Uh, people also using kilo, mega, giga, tera peta exa. Uh, these are 2 to the 10, 2 to the 20.
42:43
Speaker A
And this is the approximate value in decimal. For example, if you say that 1 kilobyte, uh, it is actually 2 to the 10 to 2 to 10 byte.
42:55
Speaker A
In a number, uh, the leftmost one is the most significant bit and rightmost is the least significant bit.
43:04
Speaker A
Uh, this says eight-bit number, it is a byte. And half of it is a nibble. Uh, we are not using nibble much.
43:10
Speaker A
Uh, and this is a hexadecimal number, for example. This is the least significant byte in this hexadecimal number. This is eight-bit and this is a byte. And this CE is the most significant byte. In here, for example, there is 64-bit number.
43:26
Speaker A
This is a 64-bit number. And when you separate it as bytes, each two of them is a byte.
43:33
Speaker A
Uh, sorry, this is a 32-bit byte. 30-bit number because there are four bytes in here.
43:42
Speaker A
While doing arithmetic operations in digital systems, we use the two's complement. Uh, so in two's complement number, we have a number like this one, XYZ, for example. And the most significant bit, the leftmost one, is the uh, sign bit,
44:00
Speaker A
like sign bit. So it has a weight of minus 2 to the M minus 1. So if this is one, for example, uh, its weight is -2 and -1. It is if it is zero, its weight is when you go
44:16
Speaker A
multiply it with zero, it is zero. So, whenever is a number is minus, this bit is one.
44:24
Speaker A
So, in this representation in two's complement representation, if you have a number, you can use this formula to find its decimal correspondence as signed.
44:34
Speaker A
And in this representation, most positive four-bit number is 01111, okay? Because this is zero.
44:41
Speaker A
When you look at here, it brings zero, and this one is 4 2 1. When you sum them, it is seven.
44:50
Speaker A
And most negative four-bit number is one and three zero. So, because why it is so, when you look at here, -2 and -1, -2 power -1.
45:02
Speaker A
So, it is -2 power three, it is -8. By the way, this formula is like this one okay?
45:13
Speaker A
So, what about this 1111? It is like -8 plus 4 + 2 + 1, so it is -1. It is not the most negative one.
45:27
Speaker A
The most negative one is this this one for this reason in two's complement. So, the range of an n-bit two's complement number is between this.
45:38
Speaker A
And in order to reverse the sign of a two's complement number, you need to invert the bits and add one. So, you need to make this zero to one, this zero to one, this zero to one, and this one
45:49
Speaker A
to zero, and after that, add one in order to reverse its sign. So, invert the bits and add one. This is the method one. In method two, for example, this is a number, 0101 0.
46:05
Speaker A
You want to invert the sign of this number. You start look start to look at from this direction. Whenever you saw first one, just invert the bits after [snorts] after this bit.
46:17
Speaker A
Okay? So, in here I put four-bit representation of a two's complement numbers. So, in here we can give a break.
46:36
Speaker A
Uh I was planning to give break at 30. So, we can give a break. Maybe we can start at 1:50.
46:45
Speaker A
Okay? After 18 minutes. And then That's the way uh we we will Okay. Reviewing the digital systems.
47:08
Speaker A
And we will see the number systems. So, you need to know them. I am not trying to teach you. I am just trying to remind you.
47:16
Speaker A
So, but you need to know these uh concepts. Digital systems, binary numbers, conversion, binary number conversion, hexadecimal numbers, and these concepts, and two's complement. This is very important.
47:29
Speaker A
Uh you need to know them. And also, you need to know the fundamentals of transistors.
47:35
Speaker A
So transistors uh in here there are two types of transistors, N-MOS and P-MOS. Uh and N-MOS and P-MOS is the different working behaviors. In N-MOS, if the you apply a zero to gate, uh it's not conducting.
47:53
Speaker A
Uh so, if here here is zero, it's not conducting. So, it means that no connection between the source and drain. Source and drain is the like for example, it is input and it goes through the it comes from drain
48:07
Speaker A
and goes through the source. And if we apply zero to gate, it's not conducting.
48:12
Speaker A
If we apply one to gate, it's conducting. There is a channel in here and it connects drain to source. So, the information can flow from here to here.
48:22
Speaker A
And PMOS is the opposite. If it is uh gate is zero, it is on. So, if you apply zero volt to here, it is on. It's conducting. If you apply one to here, it is not conducting.
48:36
Speaker A
And by using this NMOS and PMOS transistors, at the beginning I mentioned about the transistors, but transistors is two types, NMOS and PMOS.
48:45
Speaker A
And by using both these two transistor types, we are building the logic gates. How we are building? Uh there are two networks. One of them is pull-up network consists of PMOS transistors and other one is a pull-down network consisted of
48:59
Speaker A
NMOS transistors. Pull-up network devices are connected to the VDD power source and NMOS uh ones are connected to pull-down network.
49:12
Speaker A
And we are applying to input to here and then getting the output from here.
49:18
Speaker A
So, the important thing in here is that for NMOS, uh it pass the zero. It means that V VSS or ground uh in a good way.
49:29
Speaker A
This NMOS transistor passes the VSS well and this PMOS transistor passes the VDD well.
49:38
Speaker A
For example, in here we have a not gate. And in this not gate uh for example uh this not gate consists of these transistors, one PMOS transistor in here, one NMOS transistor in here. And NOT gate is actually basically does if
49:55
Speaker A
you apply a zero, it converts it to one and if you apply one, it converts it to zero. So, whenever you apply a zero to this A, Y gives one. It inverts it.
50:07
Speaker A
So, when you look at this uh the logic gate correspondence of it, transistor correspondence of it, there is a PMOS gate in here and NMOS gate in here. NMOS is connected to GND, ground, and PMOS is connected to VDD.
50:21
Speaker A
Whenever you apply a zero to A, it means that Y is the output in here. Whenever you apply A to here, it means that NMOS gate is disconnected, transistor is disconnected, so there is no connection to this Y point to the ground.
50:38
Speaker A
But, this PMOS transistor contacts. So, it passes this VDD voltage to Y. So, it gives one.
50:46
Speaker A
What about one? If you apply one to here, in this case, this PMOS closed, NMOS passing. So, this ground is connected to Y, it gives zero.
50:56
Speaker A
This is the This is the case for the base inverter, but it's same for the AND, OR, XOR, any other gates.
51:05
Speaker A
For example, this is a correspondence for NOT NAND gate. It is NOT AND gate.
51:09
Speaker A
So, you can also build this by using the same pull-up and pull-down network structure, you can build also NAND gate.
51:18
Speaker A
But, this time it has two inputs and one output. We are using four transistors. These PMOS transistors are connected as serial and NMOS transistors connected as parallel in here and it corresponds to NAND gate.
51:34
Speaker A
So, when you look at the DC characteristics of, for example, take an example an ideal buffer. A buffer is like actually two inverters connected to each other. So, whenever you apply zero to here, you you get one you are getting
51:46
Speaker A
one from here and then again getting zero to here. So, when you look at it, it is a big buffer.
51:52
Speaker A
Whenever you apply zero to here, you are getting zero. The good thing in here is that it is actually For example, this zero is a little bit weak.
52:02
Speaker A
For example, people are using buffer to to strengthen signal. For example, you are applying zero to here, but it is like maybe 0.1 V.
52:13
Speaker A
Because think in here, for example, there are two voltage Off means zero, on means VDD. For example, you can say that 0.8 V. The V on is 0.8 V. It is 1 V. Corresponds to logic one, and this one corresponds to
52:31
Speaker A
logic zero. Buffer is used it for for example, sometimes due to the noise, it is not exactly zero, but it is a little bit higher than zero, 0.1, for example. So, whenever you apply 0.1 point here, and this is a active
52:49
Speaker A
component. It has a VDD and VSS connection, and VSS is zero. It eliminates the noise in here and gives zero to here. Or maybe in other way, for one, for example, you are applying maybe 0.7 V. A little bit
53:04
Speaker A
noisy, not exactly 0.8 V. But in here, when you pass it through the buffer, you are getting exactly like 0.8 V. It's You are making the signal stronger.
53:15
Speaker A
That's why people are using buffer. And when you look at the characteristic of this buffer, normally ideally it is like exact zero, and it passes one.
53:26
Speaker A
So, if it is zero, it gives zero. If it is one, it gives exact one. But it is not always so.
53:32
Speaker A
In the real case, it is like so. In real case, also, we are As I told you, we are not getting exact zero. We are getting something between zero and a low threshold voltage and also for the output we are getting something very
53:47
Speaker A
close to high logic one volt but not exactly. So it is real characteristic actually in in in such a way.
53:59
Speaker A
Normally I told that 0.8 volt Normally as I told you zero and one is the logical correspondence but actual voltage correspondence are different.
54:08
Speaker A
For example, for zero it is generally always zero but for one it's changing. In the previous chips, for example, in 19 and 70s it was 5 volt. Now in for example in our to into bit act we are
54:23
Speaker A
designing circuits with 0.8 volt. At 0.8 volt it corresponds to logic one. So it is decreasing by the improvement in the technology this voltage is decreasing. This The reason why people are trying to decrease it due to the power consumption. They are
54:44
Speaker A
trying to decrease the power consumption of integrated circuits. Now in maybe very in very high-end technology notes like 2 nanometer 3 nanometer technology notes people are using around 0.7 and 0.6 volts. It's very low at these notes.
55:03
Speaker A
So VDD is dropping by time. And it depends on the logic family. For example, for TTL logic family the it is between zero and five. For CMOS it is yeah a little bit different.
55:22
Speaker A
Uh And LVTTL it is low voltage TTL the VDD is 3.3 and for LVC most it is 3.3 but there are small differences between the ranges.
55:35
Speaker A
Uh Uh, because the issue in here is that since this is a real buffer circuitry, it is not ideal.
55:44
Speaker A
In in a computer in digital domain, it is not exactly at zero or 0.8 8. It is a little bit closer to zero.
55:54
Speaker A
So, for example, it is between zero and zero one. You can say it that this real buffer pass passes it as zero.
56:03
Speaker A
But, for example, what about 0.3? If it is 0.3, it is not allowed. So, there shouldn't be any transistor working at this voltage, giving output at this voltage. So, the computer chips generally says that this range is corresponds to zero and
56:25
Speaker A
this range corresponds to one. And between them, it is forbidden. You are not driving any transistor between these range. You need to actually design your circuitry accordingly. But, as digital designer, we are not dealing with it because I mentioned that we are
56:39
Speaker A
doing abstraction. We are not designing analog circuits. Normally, everything is analog. For example, we are building we are using the transistors and building the logic gates. Actually, logic gates are itself inherently analog.
56:50
Speaker A
But, we are abstracting them and using as digital. So, we are not dealing with analog.
56:56
Speaker A
Uh, but this is the fundamental. You need to know the fundamentals. But, of course, we will not deal with any voltages. For everything everything for us is zero or 0.8 VDD and ground.
57:10
Speaker A
And there are some concepts for logic gates also. We mention about one and zero in here. Uh, voltage on and voltage off.
57:20
Speaker A
And there are two values also in logic gates. One of them is unknown and one of them is floating.
57:28
Speaker A
Uh, for floating, it is very easy. It is a easy. It is high It means high impedance, open. So, for example, if you have a wire if for example, you have a wire and you didn't connect anything to this wire, so
57:41
Speaker A
you don't know whether it is zero or 0.8 or anything between them. You don't know anything about this voltage.
57:48
Speaker A
So, it is floating, actually. It is high impedance. It is open. So, what about contention?
57:58
Speaker A
Uh contention uh is the case where the circuit tries to drive output to one and zero at the same time.
58:07
Speaker A
It is still not known. For example, in here I have an inverter and I have another inverter in here. For uh in here, I'm driving one, so it tries to drive zero to this Y. And for in from
58:22
Speaker A
here, it tries to drive one to here. And still it we don't know the output on here. But, this one is a different case. It is named as contention. Circuit tries to drive output to one and zero at the same time.
58:38
Speaker A
Floating is a little bit different. In floating, we are not driving. It is open.
58:43
Speaker A
And both of them are unknown. We don't know. Uh for contention, actual value is somewhere somewhere in between. Uh it could be zero or one, but forbidden.
58:54
Speaker A
Uh its actual value can change depending on the voltage, temperature, time, and noise. Uh so, this is very problematic because it it causes excessive power dissipation.
59:05
Speaker A
Because you are providing current to here and this one is consuming this current. So, this is causes excessive power dissipation.
59:13
Speaker A
And this X is also used for uninitialized values and don't cares. And floating is also same as I told you, but in here we are not driving anything, so it is safer. This floating case is safer.
59:27
Speaker A
Uh in here, the message that I'm trying to give you is that not everything is one or zero. You can You need to know the knowledge of X and Z also. Z is means that not driving and X means that
59:38
Speaker A
unknown. We don't know the value in here. For example, most likely you know three-state buffer. Three-state buffer has an input enable. And whenever this enable is one, this A passes to Y.
59:54
Speaker A
But whenever this E is zero, this Y is floats. It is not connected. This A is not connected to Y. So, Y floats.
60:03
Speaker A
Nothing drives Y. So, in this case, if A is zero, we are showing the Y as Z. And whenever E is one, A is passes through Y.
60:14
Speaker A
This is three-state buffer. It's very useful actually. Three-state buffer is very useful if you are building a bus, for example.
60:20
Speaker A
Uh, for example, you have a signal in here and this signal is right by different sources.
60:27
Speaker A
But not at the same time. So, for example, A is driving this bus, B is driving this bus, C is driving this bus, but not at the same time. So, three-state is useful. So, if you put a three-state buffer in here
60:41
Speaker A
and only at any time one of them has E is one and other one is E is zero. And in this way, for example, if A's three-state buffer is one, this A drives this bus. So, it is very useful
60:55
Speaker A
circuit. So, in here we have a diagram that shows it. For example, in here we have a shared bus and this bus is driving by processor, video, ethernet and memory.
61:07
Speaker A
And at any time one of them sets the enables to one and other one sets it as zero. And this one drives this bus.
61:17
Speaker A
But as a practical information, generally or almost always we are not using tri-state buffers in our high-performance integrated circuit processor designs. We are not using it because tri-state buffers lack in timing.
61:31
Speaker A
So, its timing is not good. For example, if you want high frequency like 1 GHz, 2 GHz, 3 GHz, tri-state buffer doesn't provide enough frequency to you. So, we are not using tri-state buffers.
61:42
Speaker A
But, it is useful if you are using a maybe low frequency uh processor trying to build a low frequency processor, tri-state buffer can be useful.
61:52
Speaker A
Logic gates, there are two types of logic gates. One of them is for combinational logic gates, other one is sequential. Combinational logic gates are memoryless. There is no memory. It has no state actually. We are not keeping any state. We are just applying
62:05
Speaker A
input and getting output. There is a functionality inside in here. Like AND gate, for example. AND gate, it has a no state. It has two inputs, one output. Whenever we change the input, it's changing the output, but there is
62:19
Speaker A
no state inside here. For example, it's not keeping the previous value of the output.
62:24
Speaker A
It has nothing to do with the previous output. So, the combinational logic is memoryless. So, output determined by current values of the inputs only.
62:35
Speaker A
And there is also another concept, it is sequential logic. Sequential logic has memory. It has a memory inside and it keeps a state. And outputs depend on the input and state at the same time in sequential logic.
62:48
Speaker A
So, outputs determined by previous and current values of inputs. You should be familiar, by the way, with these concepts because it is a content I think related to a content in second class, the course you took in second class, second Yeah, second year.
63:07
Speaker A
Uh In here, you can see a summary of the combinational logic gates. Uh there are inversion NOT AND OR NAND NOR uh gates.
63:18
Speaker A
Single input ones are not gate and buffer and two input ones are and or exor nand nor exnor. And there are multiple input ones also.
63:27
Speaker A
Uh, so for example, you can build five input and gates also. It is you can do it.
63:33
Speaker A
Uh, and also the three-state buffer is also two input gate because it has a two two inputs, enable and input.
63:43
Speaker A
And you can also, for example, build a two to one mux by using these logic gates.
63:49
Speaker A
Uh, you can see all their look up tables in here. Yeah, you you need to be familiar with these concepts, but of course you might be forgetting them since maybe it was one one years before, uh, but you can review.
64:10
Speaker A
So, more complex systems built on top of the fundamental gates. For example, in here I uh, here I have an example priority circuit. This priority circuit is actually just look at this input and it gives one in the corresponding output,
64:30
Speaker A
depending on the input. For example, in here in the input, if A3 is one, it says that this A3 is one, so it makes Y3 one and other zero.
64:42
Speaker A
And it doesn't matter what the other A2 A1 A0 is one or zero. So, whenever A3 is one, it gives Y3 as one, but if A3 is not one, it selects the one uh, with highest actually most significant one.
65:04
Speaker A
So, this Y output actually shows the corresponds to the digit that is the most significant and it is one.
65:12
Speaker A
Okay, this is the priority circuit. You can understand it by looking this uh look up table.
65:18
Speaker A
Uh in this look up table, this one is the inputs and this one is the outputs.
65:24
Speaker A
So, whenever, for example, A3, A2, and A1 is zero, in this case, Y0 is one if A0 is one. If it is zero, is A0 is zero.
65:37
Speaker A
But, for example, whenever A2 is one, and A3 is zero, these values doesn't matter. It gives it signals Y2 as one.
65:50
Speaker A
Because the most significant one in the circuit is A2, so A2 corresponds to Y2.
65:56
Speaker A
So, there's a direct correlation between them. So, if the most significant bit is A3, one, then Y3 becomes one. If it is A2, Y2 becomes one. If it is A1, Y1 becomes one.
66:10
Speaker A
So, how can we design such a circuit? Uh we are using AND OR gates by design such a circuit. There are methods, I will not show these methods, uh but, for example, when you look at this look up table,
66:25
Speaker A
uh truth table, uh Y3 actually is corresponding directly to A3. Whenever A3 is one, Y3 is also one. So, we can say that Y3 is equal to A3.
66:36
Speaker A
So, Y3 is directly connected to A3. What about Y2? Y2 is one only if A2 is one and A3 is not one. Because if A3 is one, then it means that Y3 is one, because the most significant one is A3.
66:52
Speaker A
So, it's corresponding logic equivalence is A3 not times A2. And this is for Y1 and this is for Y0.
67:02
Speaker A
So, this is compared to basic logic gates, this is more complex circuitry because it is priority circuit.
67:09
Speaker A
And we are building it by using this NAND gates. We can build it. These are the primitive gates and combining with these primitive gates, we are building more complex circuitry and by bring by using this a little bit complex circuitry and we
67:27
Speaker A
are building much more complex circuitry and at then we are designing very complex high performance processors. For example, priority circuits are very widely used in an out of order processor.
67:41
Speaker A
But of course, we as I told you, we are not designing by combining the transistors.
67:47
Speaker A
We will design it by writing hardware description language and in this class also I will mention about I will teach you hardware description languages, which is a System Verilog.
67:57
Speaker A
So, what about sequential logic gates? In sequential logic gates, outputs of the sequential logic depend on the current and prior input values if it has a memory.
68:07
Speaker A
Uh so, it has a memory by the way. Uh there are some definitions in here.
68:13
Speaker A
State is the information uh kept inside a circuit inside the circuit in sequential logic circuit.
68:21
Speaker A
And we can keep the state in latches and flip-flops. They are named as state elements.
68:27
Speaker A
Uh they store one bit of state. And synchronous sequential circuits are the sequential circuits using flip-flops sharing a common clock.
68:36
Speaker A
So, the most basic actually in here, okay, I mentioned about state. Uh state is like a state of the circuit. It's like memory.
68:46
Speaker A
Okay, the the in sequential logic gates, circuit has a memory. And it keeps a state in this memory.
68:56
Speaker A
And in order to keep it as for memory, we are using latches and flip-flops.
69:02
Speaker A
And in here, we have a basic memory. We know gates, okay? In In gates, we are applying some input and getting an output. But, how we should keep a logic value?
69:17
Speaker A
How can we design a memory element that keeps the value? In the most basic methodology, we can design it by using cross-coupled inverters.
69:29
Speaker A
So, in here, I have an inverter and another inverter. They are connected to each other.
69:34
Speaker A
So, this is same connection topology, by the way. So, in here, when we cross-couple an inverter, it keeps the value. For example, think that this is two inverters.
69:48
Speaker A
Think that, for example, I have a one in here and zero in this Q in this Q output. And the zero in this Q output feeds zero to second inverter. And this second inverter gives one in Q bar in Q not.
70:06
Speaker A
And this one is already one in here. So, if I don't interfere the circuit, it keeps this value. For example, if there is a Q is zero, for example, it keeps zero to here. Because, by the way, these are VDD and VSS connections. They
70:23
Speaker A
are not shown generally. But, this keeps this value. Just four transistors. By using just four transistors, we can keep single value.
70:34
Speaker A
So, whenever If I want to change this value, I can apply zero to here, and this zero flips everything.
70:40
Speaker A
Flips this one, and this flips this one, and in here, starting from after applying this zero, this Q gives one.
70:47
Speaker A
But, if I don't touch this circuit, it keeps this value, right? This coupled inverters keeps this value. This is the most basic memory that we can use in in sequential logic gates.
71:02
Speaker A
But people are designing better ones. One of them is SR latch. This is the most basic one.
71:10
Speaker A
Cross-coupled inverters, but it has only inputs. But people are designing more complex one, more useful ones. One of them is SR latch.
71:18
Speaker A
People build SR latch by using NOR gates in a similar way in a similar way to the inverters.
71:26
Speaker A
People cross-couple the NOR gates in this way. And now it has two inputs. R input for reset and S input for set.
71:38
Speaker A
And in this circuit you can do it you can try it in in in home. Whenever you apply one to R it gives zero at this Q output. Whenever you apply one to S, it gives one in here.
71:55
Speaker A
So, in order to reset it, reset means that you are setting Q as zero, you can apply one to R R input. And in order to set it, you can apply one to S input.
72:08
Speaker A
And whenever S is zero and R R is zero, it keeps this value. So, Q keeps the previous value of Q. So, it keeps the value.
72:19
Speaker A
In this SR latch, you shouldn't by the way, there is a forbidden input combination. You shouldn't apply S one and R one at the same time.
72:30
Speaker A
Because if you apply S one and R one at the same time, you don't know the output value. It is unknown. It's for For this reason, it is forbidden state.
72:38
Speaker A
So, SR latch is more useful one because you have R and S inputs. So, if you want to set it, you only can apply one to S input. And if you want to reset it, you want to apply one to R input.
72:50
Speaker A
And people use this SR latch to build a D latch. Uh By the way, yeah, you can use D latch SR latch to build a D latch, but in here there is a different methodology to build a D latch.
73:06
Speaker A
In this D latch, we have a clock input. This clock is can be zero and one.
73:13
Speaker A
But whenever clock is one, if you apply a D input to this D input, it stores this value in here in SR latch. Yeah, here is SR latch.
73:27
Speaker A
Uh yeah, in here we we used SR latch to build it, okay? We used SR latch to build a D flip flop D latch. So, in this D latch, whenever clock comes here, this here is SR latch part.
73:43
Speaker A
But in front of the SR latch, I am putting AND gates, and this AND gate is actually prevents us from this state, applying S and R one at the same time.
73:55
Speaker A
It prevents. And in this AND gates, we connected a clock input and D input, and not of D goes to this AND gate, and the functionality is as follows.
74:09
Speaker A
Whenever this clock is one, whenever clock is one, D passes its input to this SR latch, so this SR latch stores this D. But whenever this clock is zero, it it keeps the value that it has stored in here.
74:27
Speaker A
It holds the its previous value. So, whenever clock is one, it is transparent. Transparent means that D is goes to here, and whenever clock is zero, it is opaque. It means that it doesn't pass this D to SR latch.
74:45
Speaker A
And this clock is you can think it as an enable. Whenever enable is one, it stores the D in here. Whenever enable is zero, it doesn't store anything. So, it keeps its previous value.
75:00
Speaker A
And by using this Okay, this were the latch. Okay? And I told that there are latches and flip-flops.
75:11
Speaker A
Flip-flops are a little bit different than latches. Uh and we can build a flip-flop by using two latches, two D latches.
75:24
Speaker A
In here, we have two D latches. They are two latch D latches, two D latches.
75:30
Speaker A
And we are connecting a clock to them. You can think clock as enable, okay?
75:39
Speaker A
Whenever this clock is becoming one, this D is sampled in here. Whenever this clock is zero or not moving, there is nothing stored in here.
75:56
Speaker A
Uh maybe I can mention about Yes, I can mention about the functionality how it is behave so.
76:05
Speaker A
I I'm I mentioned about the latch, right? So, latch says that whenever here is one, it passes this D and stores it in here.
76:14
Speaker A
Whenever this clock is one, it this stores the value at the D input inside the SR latch okay?
76:23
Speaker A
This flip-flop is uh behaves a little bit differently. Uh In the previous case, for example, we can generate a clock signal. This is a clock signal.
76:39
Speaker A
This latch was sampling this D input while clock is one. But in flip-flop, we can draw a clock again.
76:50
Speaker A
This flip-flop, this is a flip-flop. This flip-flop stores the value at D at the rising edge of the clock. How?
77:00
Speaker A
I can go because this is a D flip-flop, by the way. This is a D flip-flop. This is a corresponding symbol of it.
77:10
Speaker A
So, this is the This is my clock signal. And Q is our corresponds to value stored, okay? Well, this is the value stored.
77:21
Speaker A
Whenever clock is rising, think for example, at the beginning, clock is zero, okay? If clock is zero, this zero goes to this latch as one because there is an inverter in here.
77:35
Speaker A
So, clock zero means that this latch gets the clock as one because it it takes the not of the clock.
77:42
Speaker A
So, whenever this clock is one, this SR latch samples D in here. So, this Q corresponds to D and one. The N1 corresponds to D. It keeps the D value, okay?
77:56
Speaker A
But at the same time, the clock in here, it is a directly connected to clock.
78:01
Speaker A
This clock input is connected to directly clock. It is zero. So, it doesn't pass through here. It doesn't pass through here. So, Q keeps the previous value because whenever clock was zero in latch, it was giving the previous value.
78:15
Speaker A
Okay? So, at this point, in here, the first latch sampled this D value, but it is in here between two latches in in this N1 value.
78:30
Speaker A
So, whenever this clock goes from zero to one, in this case, clock goes zero to one. It means that here is becoming zero, here is becoming one.
78:44
Speaker A
If here becomes zero, this connection is closed right? This D is stored in here, and when this clock becomes one, at that time, this D passes to here while this clock becomes zero to one.
79:00
Speaker A
This value at the previous value at the N1 location passes to this second latch, and Q corresponds to D.
79:10
Speaker A
So, in this case, we can say that while clock is rising, this flip-flop sampling. Did Did you understand it? Can You understand, right?
79:20
Speaker A
Because this this latch works while clock is zero sample clock is zero, and this latch samples while clock is one.
79:28
Speaker A
So, while switching from zero to one, this value passes to here, and it samples It means that it samples while at the rising edge of clock.
79:38
Speaker A
So, in latch, we are sampling at the edge of the clock. Uh sorry, not at at the level.
79:47
Speaker A
If clock is one or zero. By the way, there are reverse latches. For example, you can get the inverse of it. You can sample at zero. It is It is You can do it in this way. But generally speaking,
80:00
Speaker A
in latch, you sample at the level. And in D flip-flop in flip-flops, you sample at the edge.
80:09
Speaker A
At the edge. Uh By the way, maybe until now, maybe in the last four five years, I interviewed maybe around 500 uh electrical electronics engineering students, and maybe 90% of the students didn't know it. Didn't know the difference between the latch and
80:27
Speaker A
flip-flop. According to the statistic that I got from my interviews, job interviews. So, this is a important concept for logic digital design.
80:39
Speaker A
Latches sample at the edge at the level. So, they are level triggered and flip-flops samples at the edge.
80:47
Speaker A
And we are using clock for to generate the enable signals actually. Clocks are at the enable signals.
80:55
Speaker A
So, here is a description. So, when clock is zero, so that's that what I mentioned to you.
81:05
Speaker A
Okay. And by using these flip-flops, we are building finite state machines. You have to be familiar about them. And there are two finite state machines, Moore and Mealy FSM finite state machines.
81:21
Speaker A
Uh these are used to to keep the states. And in this finite state machines, depending on the input, our state is changing.
81:30
Speaker A
Uh and a finite state machine consists of two parts. One of them is a state register that keeps the current state.
81:39
Speaker A
And other one is the combination logic. It depends combination logic computes the next state and also computes the output at the same time.
81:50
Speaker A
Uh by the way, a complex processor is also a finite state machine. In digital design, uh everything nearly, if you are using a flip-flop to keep state, everything is we can say that everything is a finite state machine.
82:05
Speaker A
And in this finite state machine, next state is determined by the current state and inputs.
82:12
Speaker A
There are two types of it, Moore and Mealy. Uh actually, we don't care much Moore or Mealy. While designing the complex processors, we are writing hardware description languages for this. We don't care much whether it is Moore or Mealy.
82:26
Speaker A
we don't care it. I will briefly mention about also timing and power. Combinational logic gates has timing because signal travels. So, how signal travels?
82:52
Speaker A
For example, when you apply a signal to here, it is not like light. For example, when you apply a logic one to here, it doesn't goes to be immediately because it is not just a wire. It is when you look at it,
83:07
Speaker A
actually there is a resistor in here and there is a capacitor in here. These are named as parasitics.
83:15
Speaker A
So, in order to For example, if we apply a one logic one to here, in order to get a one in B, we have to fill this capacitor. So, that this capacitor at the output it gives to be
83:28
Speaker A
the value to be. So, it takes time to fill this capacitor because electrons are moving and these electrons fills this capacitor and whenever this capacitor fills, this B gets one. But, it's very fast by the way, yeah. For example, in
83:43
Speaker A
in 16 nanometer technology, if you are using an AND gate, uh delay is maybe 5 picosecond. It is very fast.
83:51
Speaker A
But, there is there are delays. And in combinational logic gate, uh for this reason, there is a concept of critical path. Critical path corresponds to path that is the slowest one.
84:08
Speaker A
For example, in here, I have a D. Uh this D input just goes this AND gate and goes to Y output, changes the Y output.
84:16
Speaker A
This is a very fast path. But, corre- when you look at the path between A and Y, this path is goes loss of gates in and in each gate there are parasitics.
84:30
Speaker A
Resistor and capacitor. So, while going through each gate time passes. So, this is the critical path, for example. In here, most likely this is the critical path. It doesn't We don't know. We need to use synthesis tools. This is the By the way,
84:48
Speaker A
implementation actual implementation of the integrated circuit is the uh Uh but, of course, you need to do implementation and look at the result.
85:00
Speaker A
But, most likely this is the critical path in here. So, critical path means that when you apply a signal to here, and this signal, the change in this signal reflects to here, uh but it takes time, more time compared to
85:16
Speaker A
other ones. It is the longest path. When you look at this path, for example, the critical path in here from between A and Y, it corresponds to two AND gates.
85:29
Speaker A
Two AND gates. Uh This is first AND gate, this is second AND gate, and one OR gate. It takes the two It needs to pass through two AND gate and one OR gate. And when you look at the short path, it needs to go
85:43
Speaker A
through one AND gate. And there are concept of max and min delay. So, in here, the important thing is that for example, since you don't know, for example, inside while driving this circuit, for example, you are driving some input to here and
86:05
Speaker A
getting some output to here, since you don't know which input is changing, you have to set your circuit operating frequency regarding the longest path.
86:17
Speaker A
That's why, for example, people are saying that our processor is working at 2 GHz. It means that the critical path inside the this processor uh corresponding to 0.5 ns.
86:29
Speaker A
Because 0.5 ns means that 2 GHz. Mhm. So, by the way, the critical path decides on the maximum running frequency.
86:44
Speaker A
In here, there are some called steps in combination logic gate timing. Uh delay, as I told you, it is the time between input change and output change.
86:53
Speaker A
Uh there are two types of delays, propagation delay and contamination delay. Propagation delay is actually maximum delay.
87:00
Speaker A
And contamination delay is the minimum delay. So, in here, for example, propagation delay, we can say that, for example, the maximum of this one and contamination is the minimum.
87:11
Speaker A
From D to Y is the contamination, A to Y is the uh maximum one.
87:18
Speaker A
But, it is not always the input and output paths. Sometimes, even, for example, you have a gate, for example, A and B, and you have a output in here.
87:29
Speaker A
For example, maybe this A to Y change is faster than B to Y change. So, in this case, B to Y is the maximum delay, A to Y is minimum delay.
87:40
Speaker A
And even sometimes, for example, think you have a single buffer. And it has a single input and single output.
87:50
Speaker A
It has a simple concept of mean and max delays. How? Uh because it change some with uh PVT.
88:00
Speaker A
Uh PVT means that process, V means voltage, T means temperature. Uh process, don't worry about process.
88:10
Speaker A
It is the topic of the next course. But, for example, sometimes as I told you, it is not exactly VDD. It is maybe 0.8 0.
88:19
Speaker A
between 0.8 and 0.7. So, if for example, this voltage, for example, applied voltage to this buffer is 0.7 V, this gate is a little bit slower because it is voltage is less than the nominal one. So, if it is 0.8, it is faster.
88:41
Speaker A
So still there is a even if there is a single input, there is a range between min and max, and we need to care about it still. For example, for this buffer A, whenever we apply an input to here, for
88:58
Speaker A
example, we apply an input in here. We applied a new input at this point, and it takes some time to be reflected at the Y point.
89:09
Speaker A
So, and it has a subtle minimum and maximum delays. So, the minimum one is that, for example, you apply a input to A, you change the input at the A, maybe minimum is 1 nanosecond, it change after 1
89:26
Speaker A
nanosecond, and maximum is 2 nanosecond. So, it can be the earliest one is after 1 nanosecond, and latest one is after 2 nanosecond. So, it can be any time between 1 nanosecond and 2 nanosecond, but not between before 1
89:43
Speaker A
nanosecond and after 2 nanosecond. So, it has a still concept of minimum and maximum delay even if it is a single input.
89:53
Speaker A
And this is very important. Why it has a minimum and a maximum? Because the voltage changes in here. While, for example, you connected billion of transistors, some of them getting 0.8 0.8 V, some of them is getting 0.75
90:08
Speaker A
volts. Some of them is getting 0.78 volts. It changes. Temperature also changes. In your IC, for example, some place of the IC is 85 degree, some places 84 degree. The even these temperature differences create small differences between this delay. For this
90:25
Speaker A
reason, while designing designing the logic digital designs, we have a concept of minimum and maximum delays always.
90:34
Speaker A
And this delay is caused also by capacitance and resistance in a circuit, not only PVT.
90:40
Speaker A
PVT is important. By the way, process is the quality of the transistor. Sometimes transistor quality is not good. So, at that time P corresponds to process, by the way. At that time the for example, NMOS transistor is maybe or or under function.
90:58
Speaker A
Less performance, providing less performance. It delay is caused by uh PVT. Delay differences caused by PVT and also capacitance and resistance causing the delay also.
91:11
Speaker A
So, why we have a propagation and contamination concepts uh because yeah, PVT differences. And also another one that I mentioned about.
91:23
Speaker A
For example, this A is changing in here. This also another another stuff that leads to different propagation and contamination delay. If you drive this A very sharply, then you get very fast response in here.
91:37
Speaker A
But what about if you drive it very slowly? You are getting slower response at Y. Also, it also changes how sharply apply this A input to here.
91:49
Speaker A
And most likely this A input is output of another gate. And if this gate drives it sharply, Y also gives the output very fastly. But if it doesn't, Y Y is also slower.
92:03
Speaker A
And also multiple in outputs I mentioned that in here there are multiple inputs and outputs and each of them has a different delay.
92:11
Speaker A
And circuits slow down generally when hot and speed up when cold. Yes. Process voltage temperature TVT.
92:22
Speaker A
Process how the trans quality of the transistor while manufacturing because you are not getting there are billion of transistors and you are not getting the same quality quality every time.
92:33
Speaker A
And temperature is the actual temperature. It changes inside a processor. Temperature is different in the in the die. Die means IC by the way.
92:45
Speaker A
And voltage is also different. And the there are in this is for the combinational logic gate timing.
92:56
Speaker A
And in sequential logic circuits especially for flip-flops there are also some timing knowledge. But maybe is it better to give a break, right? We we started at 50 and now it is okay. We we can give a break maybe 15 minutes break and then
93:16
Speaker A
continue. We can we can start at 55. So related to sequential circuits flip-flop timing flip-flop samples at D samples D at clock edge and D must be stable while sampled.
93:53
Speaker A
So the point in here is that for example I told you that while clock is clock is rising while clock is rising, this flip-flop is sampling this D.
94:10
Speaker A
But, what if D changes in here while sampling? This is a timing violation because there are some rules in here you need to obey.
94:21
Speaker A
And these rules are summarized as setup time and hold time. Uh setup time is the time before clock edge data must be stable. So, it's you can think at it as a taking photograph.
94:34
Speaker A
For example, while running if you take a photograph, your picture will not be clear.
94:42
Speaker A
So, while taking a photograph photograph, you must be you must be stable actually. You you shouldn't move.
94:50
Speaker A
And also while taking for example, it sampled you the photograph the photograph machine sampled you, also you need to keep stable a little bit more because while sampling it's is it's still sampling, so you have to be you have to be stable.
95:09
Speaker A
And you can think the setup and hold time in a similar way. While sampling, the setup time is the time before sampling, you have to be stable.
95:19
Speaker A
The input at the D must be stable. And hold time is the time after clock edge after this clock edge you have to keep the D stable.
95:32
Speaker A
So, you have to be stable before the clock edge and you have to be stable after the clock edge also.
95:39
Speaker A
If you change the D input during this period, during this interval we don't know what is stored in flip-flop. This is the violation of timing. We don't know. In this case, the circuit doesn't behave correctly.
95:53
Speaker A
The setup time is the time before the clock edge it must be stable and hold time is the time after the clock edge it must be stable. Input must be stable and aperture time is the the combination window of setup and hold
96:09
Speaker A
time. So during that time uh the during the aperture time the D must be stable.
96:15
Speaker A
It is the combination of setup and hold time. And in here also the similar similar to the the combination logic gates we have a propagation delay and contamination delay concepts still. Propagation is the maximum delay, contamination is the
96:31
Speaker A
minimum delay. The propagation delay the T propagation clock to Q. It means that this uh D input it means that time after clock edge that Q is guaranteed to be stable to stop changing. Means that for example you have a flip-flop, okay?
96:54
Speaker A
You have a D input in here and Q output in here and when clock comes you are sampling this D, right? And this D must be stable during aperture time.
97:06
Speaker A
It means that setup and hold time. Setup plus hold time. And also it takes some time to to take the D and pass it to to Q because in here there are gates, right?
97:19
Speaker A
These gates must forward the signal. And the clock comes and the change at the D reflects to Q.
97:31
Speaker A
During that time the time that passes named as propagation delay, but this is the maximum of it.
97:37
Speaker A
So when this clock comes the Q output change depending on this D input and this time the maximum of it is named as propagation, and minimum of it contained as contamination. So, there are two versions. Maximum clock to Q
97:58
Speaker A
delay. This CQ means that clock to Q delay. So, when clock comes to reflection on the Q takes time. So, there is a maximum and minimum of it.
98:11
Speaker A
So, when you look at it, when you look at this flip-flop diagram, the input in here, it must be stable before the clock edge, at least T setup time, and it must be it must be stable after the clock edge during this T hold
98:28
Speaker A
period, and the combination of these two period is named as aperture time. And propagation delay means that after this clock comes, when this clock rises, we are sampling this a D, right? Okay, there is a D input in here, and we are
98:45
Speaker A
sampling it. And there is a time. The maximum time is the propagation time, minimum one is the contamination time, and it changes.
98:55
Speaker A
So, when clock comes, this D input is reflected to Q, output at Q. And earliest time you can see it at after contamination delay, and maximum you can see it after propagation delay, and between them.
99:13
Speaker A
But, it is guaranteed that after in this point you cannot see it. It must become before propagation and after contamination, between them.
99:24
Speaker A
It is guaranteed. Otherwise, we cannot build circuits. We need to [snorts] know these propagation delay and contamination delays.
99:32
Speaker A
And this propagation delay and contamination delay are characteristic to flip-flop. They are given. If if they are designing a flip-flop, for example, we are using a flip-flop, Uh, we need to know its contamination and propagation delay. Then they give it to
99:45
Speaker A
us. And also they are giving us the setup time and hold time. This is the specific to flip-flop.
99:54
Speaker A
And while designing a digital circuit, we have to pay attention to them. I will show how we are using these values to compute our maximum frequency. I will show.
100:07
Speaker A
What if we cannot pay attention to setup and hold time? Uh, it leads to metastability.
100:14
Speaker A
Uh so in here, basically I can mention here here there is a flip-flop and this is the inside of flip-flop. Uh, yeah, this is a correspondence of flip-flop. Actually, flip-flop is two latches.
100:30
Speaker A
But people use the build a flip-flop by using inverters in here, right? And here there are pass gates.
100:39
Speaker A
And in here I will I will try to explain how metastability in flip-flop happens.
100:44
Speaker A
So, assume that clock is zero and becomes one. Clock, this is our clock signal.
100:50
Speaker A
And I have a D value and I am trying to sample it to this D value.
100:57
Speaker A
When clock is zero, this gate passes because this is if not if clock is zero, it means that clock is not one. So, clock not is one. So, this gate passes. Okay, this is the pass gate.
101:11
Speaker A
This gate passes D to A. And this inverter, for example, assume that D is one. D is one. This inverter gives zero to here and this B uh, gives C zero and this D becomes one.
101:30
Speaker A
Okay? And here is open. This since clock is zero, D here is open. Not con- not connected.
101:39
Speaker A
So, after clock becomes one, this here is closed, here is opened, here is closed.
101:52
Speaker A
O- Uh I mean, yeah, here is opened. Here is opened, also. It It means that it's passing.
101:59
Speaker A
And this zero passes to here, and it gives one to here, and this one correspondingly gives zero to here. Here is closed, also. This is a basic flip-flop model.
102:12
Speaker A
This uh Yeah, you can check it, but this is a basic flip-flop also built by inverter gates. Normally, I show you how to build flip-flop by SR latch, but this is the version with inverter gates. You can also build a
102:25
Speaker A
flip-flop by using inverter gates. And these are the pass transistors. Actually, this one corresponds to AND gates. You can build them by using AND gates.
102:34
Speaker A
But, the important point here is that I will mention about the importance of the setup and hold time. So, if clock is Assume that clock is zero, okay?
102:45
Speaker A
And I have a D input in here, some D input. I have a setup and hold time setup and hold time margins in here.
103:02
Speaker A
And I assume that this clock is zero. So, if this is zero, here is opened. So, D passes to A.
103:12
Speaker A
Assume that D is at the beginning one, okay? And the circuit in here gets the samples the D at one. So, here is becoming one, here is becoming zero, here is zero, and here is one. Here is closed,
103:31
Speaker A
okay? And during that time, assume that this D change in here very fastly. For example, assume that okay, I will change the D in here, okay? D change in here. D became one in after setup time.
103:54
Speaker A
Okay? So, assume that D change after setup time. It means that it was zero before. D was zero before. So, if it is zero, here was be one. Here was uh one and here was zero, okay?
104:13
Speaker A
If it is changed very close to the edge of the clock, assume that it change a little bit very later than this T setup, okay?
104:26
Speaker A
So, assume that we we make the D one, okay? Here became D one. And if here is one, this B starts to be zero okay?
104:38
Speaker A
Because this clock was this this gate was closed, okay? But okay it D was one.
104:48
Speaker A
Since D one was one, this point B point starts to be zero. But it was one before and it starts it started to decrease to to zero.
105:00
Speaker A
So, it was one, but it started to decrease to zero. Like zero. It was going to zero.
105:07
Speaker A
But immediately, since I changed the D one very close to the edge of the clock, assume that clock changed and become one.
105:16
Speaker A
So, immediately we close this gate. We close this gate. We open this gate. And it couldn't be zero exactly. It stayed between them, between one and zero. Did you see this point?
105:29
Speaker A
Because it couldn't change because it was very close to edge of the clock and we couldn't charge enough to this B point. And the clock immediately changed and closed here, open closed here, opened here.
105:42
Speaker A
And at that point we don't know the exact voltage in here. If we change the this D input after setup time window, we don't know this value. That's why people are putting setup and hold time constraints.
105:57
Speaker A
Otherwise, we don't know the value at B, voltage at B. We we don't guarantee it.
106:04
Speaker A
So, when we don't pay attention to this setup time, in this case we don't know the value at B. And if you don't know know the value at B, we don't know value at Q also. And it leads to
106:15
Speaker A
metastability. So, this is the uh this uh measurement result. People put a flip flop. This is a flip flop. And assume that this is this is the uh in here I can draw a clock for you also.
106:35
Speaker A
Assume that this is the clock. People are provided a clock to to this flip flop. This is the input on of this flip flop and this is the output of this flip flop.
106:47
Speaker A
And assume that this flip flop has this time window. This is a T setup time window and this is a T hold time window.
106:57
Speaker A
And we didn't pay attention to this T setup time and we changed this input after setup time.
107:05
Speaker A
And people tried it maybe thousand times and this is the result. Maybe for half of them, this flip flop settles to one and for half of them, it settles to zero.
107:17
Speaker A
So, we don't know the exact value. This is why people are putting paying attention while especially designing digital circuits, we pay attention to set up and hold times. Otherwise, we don't know what's happening to this flip-flop.
107:30
Speaker A
And basically, this is set up and hold time. As I told you, set up time, you have to obey it, and it is the time before clock edge data must be stable. And hold time, time after clock edge data must be
107:42
Speaker A
stable stable. And hold time is also in here, you can check the whole time concepts.
107:49
Speaker A
Even after clock edge, after clock edge comes, if you change this D value, and if this D value change change passes through here, it also metastabilizes this Q value also again.
108:05
Speaker A
So, that's why important even after clock edge, this D value shouldn't change. Okay, after clock edge, you can think that this is closed, but very close to this clock edge, it's still passing. It is not switching immediately. It is switching slowly,
108:24
Speaker A
maybe in 5 picoseconds, 6 picoseconds. So, during that time, while switching this this transistors off, you shouldn't change the value also. This is also important. Otherwise, you can see a metastability in here.
108:38
Speaker A
And this is the real oscilloscope results that results the metastability. So, we know the combinational circuit timing, sequential circuit timing. Now, we can do an example in here.
108:54
Speaker A
In here, I have a circuit. I have a flip-flops in here. These flip-flops getting some inputs, and these at the rise of the clock, these inputs are given to here.
109:10
Speaker A
And in here, we are doing some logic operations, and in the next clock edge, we are sampling the result of these logic gates in this flip-flops, okay? In here, we have a memory.
109:26
Speaker A
This memory gets its value at this clock edge, and in the next clock edge we are doing some computations in here, and in the next clock edge we are sampling it.
109:39
Speaker A
What's that? So, in here, I assume that we have flip-flops, and flip-flop has 60 picosecond uh 60 picosecond setup time and 70 picosecond hold time. So, it means that before the clock edge 60 picosecond, in this interval we
110:00
Speaker A
shouldn't change the input, and after 70 picosecond of this clock edge, we shouldn't change the uh f- input of the flip-flop.
110:11
Speaker A
And the basically, as I drove in here we have a clock. This clock actually is common. This is common clock.
110:21
Speaker A
I drove this clock in here. In the first rising edge of the clock we are getting some input value from here, and these flip-flops stores this input value and gives this input value as the output also. And during that time, after
110:37
Speaker A
getting the new input values to A B C D points at this location, we are doing some computations, logical computations in here. And then new results are sampled in the next flip-flop.
110:54
Speaker A
So, here is Actually, people says that this is the launch. We are launching input, and this is the capture.
111:03
Speaker A
We are launching input in here, and then in the next rising edge, we are capturing it. We are storing the result in here.
111:11
Speaker A
So, I assume that setup time 60 picosecond, hold time 70 picosecond, and for flip-flop maximum delay is 50 picosecond. The clock to Q delay. And minimum is 30 picosecond.
111:23
Speaker A
And for each gate, our logic delay is 35 picosecond maximum and 25 picosecond minimum.
111:31
Speaker A
So, when we look at here, when we look at here, uh the what is the maximum path in here?
111:43
Speaker A
This is the maximum path. We are passing through three gates. And what is the maximum delay of these three gates? So, for gates, the maximum delay is 35 picosecond. So, when we compute it three times 35 picosecond, 105 picosecond maximum delay.
112:00
Speaker A
But also we had some constraints for the uh flip-flop. Assume that there is a flip-flop in here and another flip-flop in here, and we are doing some combinational logic in here.
112:16
Speaker A
In the In this for this flip-flop, data must come before 35 picosecond sorry, 60 picosecond setup window.
112:26
Speaker A
60 picosecond setup window. So, we have 60 picosecond. Assume that this is a our clock period. So, this is period. One over period, by the way, one over period is the frequency.
112:41
Speaker A
One over period is the frequency. So, the our clock period is the time between the clock edges.
112:48
Speaker A
So, when you look at it for setup time, we can do a computation. We have three gates. So, three gates at 105 picosecond gate delay, and we have a setup time constraint of 60 picosecond.
113:05
Speaker A
And also I have a uh propagation delay. Maximum propagation delay, which is 50 second 50 picosecond.
113:14
Speaker A
So, this flip-flop gives 50 picosecond takes 50 picosecond. This because this takes 50 picosecond to come here from clock to Q.
113:25
Speaker A
Here there is a 50 picosecond delay. This three logic gates gives 105 picoseconds. 50 after 105 picoseconds and I have also in here a setup constraint that it must come before the uh 60 picosecond before the clock edge. So, when you look at the
113:45
Speaker A
setup time constraint, 50 + 105 + 60 what 215 picosecond setup time constraint. So, it means that this path takes 255 picoseconds this way. So, it means that our maximum uh by the way, our minimum period is 215
114:10
Speaker A
15 picosecond. So, when you compute the frequency by using it, uh it means it corresponds that uh this circuit can can work at 4.65 GHz GHz.
114:24
Speaker A
It is one over period. It is frequency. So, it is 4.65 GHz it can run.
114:31
Speaker A
How we are finding it? We are combining the delays maximum delays to find the maximum frequency. We are looking to the slowest path and we are combining the uh maximum delays and also we are taking the setup time constraint into
114:46
Speaker A
consideration because the input must be ready before setup time. That setup time was 60 picosecond.
114:53
Speaker A
So, the total path 215 picosecond and it corresponds to 4.65 GHz. What about hold time?
115:01
Speaker A
Hold time looks to the shortest path, fastest path. So, what about the fastest path?
115:10
Speaker A
Hold time, to recap, hold time says that in this flip-flop, in the rising clock edge, okay, there is a setup time constraint.
115:23
Speaker A
The data must be ready before the rising edge of the clock at least by setup time.
115:29
Speaker A
And after this rising edge, data must be stable. New data should not come during this T hold period time.
115:39
Speaker A
So, for example, for this flip-flop, if this path after this flip-flop rises and while it is sampling the data at here, this flip-flop, this path shouldn't drive any data before this T hold time.
116:02
Speaker A
Because while sampling this one, T hold means that after the rising edge, data must be stable. But after rising edge, if this data changes so fastly, very fastly, then it's still problem. It leads to metastability.
116:18
Speaker A
So, for set hold time, we are looking to do fastest path and we are taking to the fastest timing uh values. So, what about the fastest timing values?
116:32
Speaker A
There is a This is the fastest path, by the way. And this is a one and not NOR gate. And for this NOR gate, I am taking the fastest uh Sorry, not this one. I am taking the fastest
116:49
Speaker A
uh contamination delay, minimum delay. So, it is 25 picoseconds. This is the fastest response time of this gate. I'm This time in while competing the setup time, I took the 35 picosecond maximum.
117:04
Speaker A
But while competing the whole time requirement, I need to take the minimum because hold time uh is caused uh due to the fastest path.
117:15
Speaker A
Because after flip flop rises, if new data comes very early, this is the whole time violation. So, I need to check this case and in order to check check this case, I need to look at the minimum time. So, for the the
117:29
Speaker A
minimum one, it is 25 picosecond plus our whole time constraint, uh which is uh whole time constraint is uh where is it?
117:38
Speaker A
Uh whole time constraint is 70 picosecond, by the way. Yeah. This 25 picosecond minimum delay and also for this flip flop minimum contamination clock to Q minimum delay 30 picosecond.
117:52
Speaker A
So, 30 picosecond plus 25 picosecond 55 55 picosecond. When you look at whole time constraint, it is 70 picosecond.
118:01
Speaker A
So, it means that there is a violation in here because I was saying that after this rising edge of this clock, it's a new data shouldn't come.
118:16
Speaker A
Bet- between rising edge and after 70 picosecond. During this interval, a new data shouldn't come. But it came at 55 picoseconds. After 55 picosecond, it came. This is a violation. This is a uh this is a violation of the this for this
118:32
Speaker A
flip flop. It violates the whole time constraint of this flip flop. So, in this case, what should I do?
118:41
Speaker A
I have to do this path a little bit slower because this path is very fast and due to this is very this is fast, while this flip flop is sampling the old data, the made, data arrives immediately. So, I need to make this
118:55
Speaker A
that a little bit slower. So, how can I do it? I can add a buffer in here. So, if I have add a buffer, for example, just buffer, I am adding another 30 picosecond, not not 30 picosecond, 35 picosecond because
119:08
Speaker A
gate delay was 35 picosecond. I added another 35 picosecond. So, when I add another 55 + 35, then it is fine. It is the 90 picosecond, so it it complies with the hold time constraint.
119:24
Speaker A
Uh Could you understand this point? Hold time? No? So, hold time actually is related, yeah, to this flip-flop while clock when clock comes, we said that data must be ready during this T setup time.
119:54
Speaker A
And it must be stable after rising edge during this T hold time. But, what if, for example, for this flip-flop, when the clock comes, clock rises, while this flip-flop samples the data at this point, this flip-flop sends new data.
120:17
Speaker A
In this case, this flip-flop cannot sample in a healthy way because it violates this whole time period. While we are sampling the old data, new data comes. And in this case, we don't know. We sampled maybe old data
120:33
Speaker A
or new data. We don't know. This is a violation for this flip-flop. So, and in here, according to our computation, we had a hold time violation because this path was providing the data very fastly before this flip-flop samples to old
120:50
Speaker A
data. So, in this case, it this circuit will not reliably run. Uh and in order to solve it, we told that we need to make this path slower.
121:07
Speaker A
So, to make this path slower, we just added a buffer in here. So, when we add a buffer in here, we it is like adding a extra 35 picosecond. We are making this path a little bit slower, so that
121:23
Speaker A
while this flip-flop samples to old data, new data cannot arrive. So, this buffer makes this path a little bit slower.
121:32
Speaker A
And in this case, hold time constraint is also complied. No problem in hold time constraint.
121:39
Speaker A
I think setup is mostly most time setup is clear, but hold time is people are more confused about it.
121:46
Speaker A
Uh unfortunately, in people I think they should be uh they should be they should teach them during the digital logic course.
121:56
Speaker A
Uh because this is very fundamental concept, but unfortunately, they are not teaching well. Uh But maybe if you don't understand still, we can do it one more time later.
122:08
Speaker A
But I think we need to finish the class. And uh for the power also, I mentioned about the timing in here, and also another concept related to digital circuits power. Uh power is the energy consumed per unit time. There are two
122:22
Speaker A
types of power, dynamic power and static power. And you can see the formulas uh about the power.
122:29
Speaker A
Uh since we are changing the circuit one and zeros, of course, we are charging a capacitor and discharging a capacitor.
122:36
Speaker A
Of course, it consumes some power. And these are the formula formulas to con- compute power.
122:44
Speaker A
Uh, dynamic power is related to changing because we are charging and discharging capacitors and static power is the leakage power, like leakage power. If you apply a in a transistor, even you don't change the this input, I assume that this input one,
123:01
Speaker A
uh, it doesn't maybe assume that this is a PMOS, okay? It doesn't conduct. Still there is a small leakage.
123:09
Speaker A
And this small leakage causes the static power consumption. Even there is no gates are switching, it it consumes some power. Dynamic power is switching. For example, you change it, you have an inverter, for example, you apply 1010 in
123:24
Speaker A
order, it is changing 0101. So, you are switching always, so it consumes power. This is the static power consumption.
123:33
Speaker A
So, these are the concepts you need to know. Uh, so as the last slide, uh, the the course assumes a fair knowledge about digital circuits. Uh, not much timing or power.
123:45
Speaker A
Uh, for example, if you don't know hold hold time, it is fine. Uh, but you need to know at least what these gates are and what is finite state machines, what sequential gates are, what is flip flop, what is latch. You need to know them.
124:00
Speaker A
Uh, for timing, I know they are not teaching well. Uh, for this reason it is acceptable. Uh, but if you don't know, for example, gates or finite state machines, this course is not for you.
124:13
Speaker A
So, you need to pay attention to this point. Uh, so if you are not much familiar about these concepts, uh, either you can refresh, for example, maybe you you have forgotten, no problem, you can refresh your knowledge.
124:26
Speaker A
Uh, or you can work more to learn the basic concepts. Uh, but we are as I told you, we are not for we we are not going to focus on digital circuits, analog circuits, devices, or physics. I will
124:37
Speaker A
not show any NMOS transistors. By using this fundamental knowledge, we are going to build more complex processors. For this reason, the concepts that I show you is very important. You need to know them. You have to know them in order to
124:49
Speaker A
take this class. So, and this is the week for the add-drop, so you can review your your selection in the class.
124:59
Speaker A
Uh so, we can flash finish the core class in here. Uh if you have a question, you can ask.
125:06
Speaker A
And also, if you want to review some concepts concepts, you can write me. Maybe we can do an office hours, most likely online office hours. Uh generally, I am spending my one one day in a week in here.
125:22
Speaker A
In Wednesday, I'm in here, but I don't have room yet. Uh you can come in person, or maybe you can write an email to me, and I can show you. And also, I have TAs actually in this class. Uh so,
125:33
Speaker A
they can also help to you. Uh any questions? If no questions, we can we can finish the class.
125:41
Speaker A
Okay? Then, see you next week, inshallah.
Topics:RISC-Vinstruction set architectureprocessor designRISC vs CISCcomputer architecturedigital logicCMOSflip-flopstiming analysisopen-source hardware

Get More with the SozAI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries and speaker detection. 30 minutes free.

Or transcribe another YouTube video here →