Search code examples
embeddedfpgareset

Different kinds of resets in a Chip( SoC )


I want to know different kinds of resets and there definitions in a Chip. Preferably Cold, Warm, System, Application,power-ON resets.

Also a simple example for each of them is highly appreciated.

Thanks.


Solution

  • Not sure what exactly you are trying to understand. Resets can and are used in a number of different ways and places. And in general there are no rules that state when and where they can be used.

    Relative to the speed at which electricity flows through circuits it takes quite a while from the time power is "turned on" to the point where the voltage and current have settled at a usable and stable state such that the logic can start. The clock or oscillator that drives the logic itself once powered will take time to settle. Chips that use some sort of clock multiplier. For example your multi gigahertz processors often run off of say a 100Mhz oscillator and multiply up from that inside the chip. that circuit takes a while to lock onto the oscillator clock and then generate its multiplied clock. So you will often see a global reset, logic not required to get the chip up and running will want to be held in reset until things are stable enough so they can run. This can and is called a power on reset. Some circuit is used to hold the rest of the chip in reset for some period of time after power is on. there are a great many different ways to do this.

    Generally your power on reset is used for all the logic on the board, sometimes each chip has its own separate power on reset circuit and of course some systems are a mixture of these two extremes. You might call a reset that is tied to the majority of the logic on the board a system reset. Causing the whole system not just one part of it, to be held in reset and/or released.

    Sometimes you will see chips that allow software to strobe the global reset, again a great many different ways to do this. You have to avoid the obvious chicken and egg problem. If the software had on-off control of the reset line by asserting the reset would cause the processor and thus the software itself to go into reset preventing it from causing the reset to be released. So either some hardware that is not reset by the reset in question is given a command to hold the reset for a period of time then release it. or sometimes the way the system works the software can cause two writes to be sent out before the first one arrives, one to assert reset the other to release it (this would be a software hack for a bad hardware design). One might call this a warm reset as the power is already settled, oscillators settled, etc, but for some reason or other it is desirable to put the logic in a known state.

    The system design may provide the software the ability to perform a system wide reset, or only a fraction of the system or perhaps only the processor that software is running on or its chip. You could imagine for example the system is up and running the software has programmed a peripheral to do something, or at least changed it from its power on reset state, then the processor only is reset, but the peripheral has not. This may or may not be desirable for the software as it has to come up out of reset and might have to figure out if the peripherals were just reset as well or are in an unknown state. The software design might not be able to assume the peripherals are in a known post-reset state when the software boots.

    This can and does get carried to various extremes. Clocking logic consumes power, if your SOC has peripherals that you are not using it can be a noticeable waste of power clocking logic that will not be used by that system. So some systems are designed with sections of the system or even every individual peripheral having a reset and a clock enable giving software precise control both over power consumption and the ability to easily reset portions of the chip to a known state making the use or re-use of those peripherals easier. Generally used to just bring the (embedded) system up in a known manner.

    Cold being the opposite of warm, a cold reset can be another way of saying "power cycling". turn off power (implying the circuits/system gets cold) and then turning power on so that everything can come up from the cold and settle again. Systems where the warm reset does not affect the entire system but only part of it would be ones where you would use the terms warm and cold. Warm resets solve some crashes, cold resets, in theory, solve more problems as a cold reset in theory resets the entire system. But naturally for example if you have a scanner or printer or some other peripheral that has its own power source, wont necessarily get reset from a cold reset of the main computer, you would need to power down everything and bring it back up. sometimes the systems are designed such that the peripheral will warm reset when the main computer warm or cold resets.

    there really is no magic to it, any block of logic that the designer feels there is a need to have a reset will have a reset, how local or global that reset is, is part of the design. A chip can be thought of as being no different than a software project being made up of individual function calls and library calls. The programming languages used to create modern logic very very much resembles software projects with software functions and functions calling functions, etc. The primary differences are that the logic truly does run in parallel, and second the logic functions can and sometimes will have dozens to hundreds of parameters, where software the code segments execute linearly and functions tend to havea modest number of calls. As desirable or undesirable as it may seem think of a project that uses global variables, these global variables are assumed by the programming language to have a certain state when the program starts. In C when main() happens there are language rules that tell you what the state of all the globals are, likewise the state of all your locals when a function is entered. You could imagine places in your code where individual globals are reset to a known state, x=0; y=7; etc. And later their use is determined based on prior states x++; y-=z; Logic is no different when you desire to have something put back in a known state you provide a mechanism to do that. If your code wanted to have a great number of the variables put back in a known state so a task can start over, say a graphics program is finished with one file, without exiting the program wants to free all the memory it had allocated for the prior image, gray out menus and buttons that dont make sense when there is no open image file, etc. You might have one function that calls other functions that causes that major cleanup to happen. that is not unlike a warm reset. Exiting the program and starting the program again is not unlike a cold reset. The state of the variables when main() is entered and or the state of local variables when a function is called is the power on reset state for those variables.