The present invention relates to wireless communications and, more particularly, to timing and event processing in wireless systems.
With the rapid advances in wireless communication networks, new wireless communication standards are often created to replace older obsolete standards. However, it often takes time to implement a new wireless network based on a new standard over a large physical area. Thus, it is often desirable to have a wireless terminal which can communicate with existing wireless networks as well as new wireless networks. Moreover, with the rapid growth of wireless computer data networks, it is often desirable to have a wireless terminal which can communicate with these networks to allow a user to browse the Internet or send and receive e-mail. Additionally, it may be useful to communicate with different wireless systems concurrently, so that a user may, for example, check e-mail on a wireless data network, while conducting a voice telephone call on a 2G wireless network.
Such wireless systems often use different time bases. For example, 2G GSM network uses a time base where frames have a duration of 4.615 milliseconds and are divided into 8 time slots. However, 3G WCDMA networks use a time base where frames have a duration of 10 milliseconds and are divided into 15 time slots. Events in the mobile terminal must be precisely timed and synchronized with respect to each of the wireless systems, regardless of whether the mobile terminal operates with one wireless system or operates concurrently two or more wireless systems.
Also, to maintain portability, wireless terminals are typically powered by batteries, where the time between recharges is an inverse function of the current drawn. Because it is desirable to allow the user to operate the wireless terminal for as long as possible between recharges, power management is an important consideration.
According to a first aspect of the invention, a digital baseband processor is provided. The digital baseband processor comprises at least one main processor for executing instructions in a first instruction sequence, and a timing and event processor coupled to the main processor for executing timing-sensitive instructions in a second instruction sequence. The timing and event processor comprises two or more instruction sequencers for executing threads of the second instruction sequence and a time base generator for generating timing signals for initiating execution of instructions on each of the two or more instruction sequencers.
According to another aspect of the invention, a digital baseband processor is provided for concurrent operation with different wireless systems. The digital baseband processor comprises a digital signal processor for executing digital signal processor instructions, a microcontroller for executing microcontroller instructions, and a timing and event processor controlled by the digital signal processor and the microcontroller for executing timing-sensitive instructions. The timing and event processor comprises a plurality of instruction sequencers for executing timing-sensitive instruction threads and a time base generator for generating timing signals for initiating execution of the instruction threads on each of the plurality of instruction sequencers.
According to a further aspect of the invention, a method is provided for generating timing signals for operating a wireless terminal in a wireless system having a wireless system time base. The method comprises generating a calibrated slow clock, generating absolute time values by counting the calibrated slow clock to provide a unified time base, and timing events in the wireless system based on the absolute time values of the unified time base independent of the wireless system time base.
According to another aspect of the invention, a method is provided for generating a calibrated clock. The method comprises receiving a free-running fast clock, receiving a free-running slow clock, modifying the free-running slow clock to provide a calibrated slow clock having a specified relationship to the fast clock, and providing a phase compensation signal that represents a phase error in the calibrated slow clock.
According to another aspect of the invention, a method is provided for generating a calibrated clock. The method comprises receiving a free-running fast clock, receiving a free-running slow clock, specifying a relationship between the fast clock and a calibrated slow clock, counting the number of fast clock cycles in a selected number of free-running slow clock cycles to provide a comparison value, removing cycles from the free-running slow clock to provide the calibrated slow clock, based on the specified relationship between the fast clock and the calibrated slow clock, and on the comparison value, and providing a phase compensation signal that represents a phase error in the calibrated slow clock.
According to another aspect of the invention, a method is provided for performing DMA transfers in a baseband communications processor. The method comprises performing computations in a digital signal processor core, generating timing signals in a timing and event processor, and performing a DMA transfer in response to a request from the digital signal processor and in response to the timing signals from the timing and event processor to provide a timed DMA transfer.
According to a further aspect of the invention, a baseband processor is provided for wireless applications. The baseband processor comprises a digital signal processor core for performing digital signal computations, a timing and event processor coupled to the digital signal processor core for executing timing-sensitive operations, the timing and event processor comprising a time base generator for generating timing signals and a DMA control circuit for initiating a DMA request in response to a command from the digital signal processor core and the timing signals from the time base generator, and a DMA controller for executing the DMA request to provide a timed DMA transfer.
In the drawings:
A wireless terminal may include a radio unit, a digital baseband processor, a user interface and a battery. The baseband processor may include a digital signal processor for executing signal processing algorithms and other complex computations, and a microcontroller for performing control functions and relatively simple computations. Many of the tasks performed by baseband processors in wireless terminals require precise timing. For example, in a wireless communications network, actions on a wireless channel are scheduled to happen at given times, with a specified precision. A dedicated timing and event processor (TEP) may be used to achieve such timing precision. For example, the TEP may be responsible for generating timing signals, scheduling events, generating interrupts to processors, initiating operations in other modules, and generating control signals for off-chip circuits, such as the radio unit. The TEP may operate in conjunction with the digital signal processor, the microcontroller and other components of the baseband processor to control all timing and events in the wireless terminal.
Sometimes it is desirable to communicate with several different wireless systems concurrently. For example, the communications processor may communicate with a wireless data network, such as a Bluetooth network, to monitor a user's e-mail account for new e-mail while simultaneously monitoring the paging channel of a wireless CDMA network for new voice telephone calls. Often, the different wireless systems with which the communications processor is communicating utilize different time bases. The TEP may schedule events for wireless systems by using a common reference clock as the time base for scheduling events for any of the wireless systems with which the communications processor is communicating.
A block diagram of a baseband communications processor 100 according to one embodiment of the invention is illustrated in
Communications processor 100 also includes a system memory 106. System memory 106 may be a static random access memory (SRAM), or any other type of volatile or non-volatile memory, such as dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM) or ferroelectric random access memory (FRAM). DSP core 102 and MCU 104 utilize a common memory map. Therefore, these processors may share access to system memory 106 and may communicate with each other through system memory 106.
Each of the components illustrated in
Direct Memory Access (DMA) controllers 134 and 136 are provided to facilitate data transfer in communications processor 100. DMA controllers 134 and 136 allow direct transfer of memory between devices and memory (e.g., system memory 106), without processor intervention. DMA channels may be assigned to devices to allow those devices to request DMA transfers. The channel configuration may be determined by DSP core 102 and MCU 104. Although both processors may access each DMA channel, the channel configuration for one group of channels may be controlled by DSP core 102 and the channel configuration for another group of channels may be controlled by MCU core 104. Likewise, DMA controller 134 may control DMA transfers for channels configured by DSP core 102, while DMA controller 136 may control DMA transfers for channels configured by MCU 104.
DSP core 102 may include a Level 1 (L1) instruction cache 144 and a L1 data cache 146 to provide low latency when accessing cached data. DSP core 102 may have two data buses connected to L1 data cache 146, an instruction bus connected to L1 instruction cache 144 and a DMA bus connected to caches 144 and 146. A Level 2 (L2) memory 148 may be dedicated SRAM for use by DSP core 102. Memory 148 may be accessible by DMA controller 134. Memory 148 may also be accessed by MCU 104, DMA controller 136, and External Application Processor Interface (EAPI) 142.
A System Bus Interface Unit (SBIU) 132 performs bus bridging functions. For example, SBIU 132 may function as an asymmetric crossbar switch which routes requests from DSP core 102, DMA controller 134, MCU 104, DMA controller 136, and External Applications Processor Interface 142 to appropriate system resources, such as L1 cache 144, L1 cache 146, L2 memory 148, and other system resources. SBIU 132 allows for parallel and concurrent data transfer between various buses.
Man-Machine Interface (MMI) modules 150 provide hardware user interfaces to communications processor 100 and are accessible through PBUS bus 128. MMI 150 modules may include an interface to General Purpose I/O (GPIO) pins of communications processor 100. Such pins may be used for various purposes, including interfacing to a radio unit and other external devices. Other MMI modules may include a display screen interface, a serial port interface, a universal asynchronous receiver transmitter interface (UART), a USB interface, and a subscriber identity module (SIM) which may contain a unique serial number of the wireless terminal in which communication processor 100 is embedded. Many other interface modules may be included in MMI 150.
Housekeeping modules perform various housekeeping functions for communications processor 152 and are accessible through PBUS bus 128. Such functions include a watchdog timer (WDT) which times out and generates a reset in the event of software deadlocks in the communications processor, if not served, general timers which may be used to generate triggers for general purpose timing functionality, and an IRQ controller for managing interrupts to DSP core 102 and MCU 104.
Wireless system modules 154 provide interfaces to wireless system components external to communications processor 100 and are accessible through PBUS bus 128. For example, wireless system modules 154 may include a CSport, which is a control serial port interface to an analog baseband chip, and an interface to a frequency synthesizer.
DSP peripherals perform various digital signal processing functions in conjunction with DSP core 102 and are accessible through DPBUS bus 110. DSP peripherals may include, for example, coprocessor interface 162, BSport 164, flag I/O 166, high-speed logger 168, cipher engine 170 and DSP IRQ controller 172.
Data may be transferred between various components of the communications processor and between the communications processor and off-chip devices using one or more buses. Each bus may be a parallel or a serial bus. Additionally, each bus may be unidirectional or bi-directional. Moreover, each bus may include any of an address bus, a data bus, and a control bus. The bus configuration of communications processor 100 illustrated in
A SYSL2 bus 108 is coupled between SBIU 132 and interfaces to L2 memory 148. Memory 144 is shared between MCU 104, system DMA controller 136, DSP DMA controller 134, and DSP 102. A DPBUS bus 110 is the DSP peripheral bus and interfaces to various DSP peripherals, such as BSPort 164 which may be a baseband serial port, Co-processor interface 162, Flag I/O 166, High-Speed Logger 168, Cipher Engine 170, and DSP IRQ controller 172. Access to DPBUS bus 110 is shared between MCU 104, System DMA controller 136, and DSP DMA controller 134. DSP core 102 may also access DPBUS bus 110 through SBIU 132. A DSPBUS bus 112 is the interface for DSP core 102 to the PBUS bus 128, system memory 106, and EBUS bus 100. A DABUS bus 114 serves as the DSP DMA controller interface to SBIU 132. A DMABUS bus 116 is the interface between system DMA controller 136 and resources on PBUS bus 128, RBUS bus 118, and EBUS bus 120. An RBUS bus 118 is the interface to system memory 106. Access to RBUS bus 118 is shared between MCU 104, system DMA controller 136, DSP DMA controller 134, and DSP core 102. An EBUS bus 120 serves as an interface to FLASH memory and SRAM located external to communications processor 100. An SBUS bus 122 is the main system bus for MCU 104. An EAPI bus 124 serves as the interface to the resources of communications processor 100 from an applications processor external to communications processor 100. An EABUS bus 140 is the interface between EAPI 142 and an applications processor external to communications processor 100. It should be appreciated that it is not necessary to provide an external applications processor. A CBUS bus 126 is the interface to an external co-processor. The PBUS bus 128 is a peripheral bus, which interfaces wireless system peripherals 154, housekeeping peripherals 152, and MMI peripherals 150 to MCU 104, System DMA controller 136, DSP DMA controller 134, and DSP core 102.
Because access to some buses, such as PBUS bus 128 and RBUS bus 118, is shared by multiple components, bus arbiters 130a, 130b and 130c are provided to manage access to these buses.
Communications processor 100 includes a timing and event processor (TEP) 138 which may be used to schedule events for communications processor 100. Such events may include, for example, setting and clearing of I/O pins, generating interrupts to DSP core 102 and MCU 104, and initiating DMA memory transfers between TEP 138 and other modules of communications processor 100. The TEP 138 is connected to other modules of communications processor 100 via DPBUS bus 110 and is also connected to DSP DMA controller 134 and DSP IRQ controller 172.
In the TEP 138, different wireless system time bases are converted to a unified time base, which is not specific to any wireless system. Events are scheduled as triggers to an absolute point in time, using the unified time base. The TEP 138 generates a calibrated slow clock as the reference for the unified time base, by using a high precision free-running fast clock as a calibration reference to obtain long-term stability of the calibrated slow clock. The calibrated slow clock, which is used as the clock to the unified time base, is generated by removing clock pulses from a free-running slow clock. This introduces a phase error, which is compensated in order to obtain precise timing signals. A phase compensation is calculated for every clock cycle of the free-running slow clock. The phase compensation is expressed as a number of clock cycles of the free-running fast clock and is used, together with the calibrated slow clock, to provide exact timing. A feature is that the phase compensation value is maintained even though the free-running fast clock is switched off. These features are discussed in detail below.
Communications processor 100 may be embedded in a wireless terminal and may be powered by a battery. Saving power by idling processors or powering down oscillators when not needed can extend the time before recharging of the battery is required. However, before the processing cores are idled, they may indicate to TEP 138 a time when it is necessary for them to be restarted.
TEP 138 may include a plurality of sequencers 202a-202n which function generally to execute instructions utilized by TEP 138 for performing time-specific actions. TEP 138 also includes a memory 206, which may be, for example, static random access memory (SRAM). Sequencers 202a-202n may use memory 206 to store code and data. A memory access resolver 208 processes incoming memory access requests from sequencers 202a-202n and DPBUS bus 110. A DPBUS bus interface module 210 provides bridging between the system clock and the DPBUS bus clock domains within TEP 138. DPBUS bus interface module 210 is described in more detail below. TEP 138 further includes a clock calibration block 212 which may be used for clock calibration of the unified time base in the TEP. Clock calibration block 212 is discussed in more detail below. TEP 138 may also include an absolute counter 214 which may be used by sequencers 202a-202n for timing purposes. Absolute counter 214 is discussed in greater detail below. TEP 138 may include an I/O conflict resolver 204 for resolving conflicting signals received from sequencers 202a-202n. I/O conflict resolver 204 is discussed in greater detail below. A Clock and Power control block 216, which is discussed in greater detail below, is used for powering down the system clock when possible.
Sequencers 202a-202n may be processors, such as RISC processors, with a dedicated instruction set and may provide timing for multiple wireless systems concurrently. That is, sequencers 202a-202n may generate signals to set and clear GPIO pins, signal DMA controllers, and generate interrupts for DSP core 102 and MCU 104. A sequencer may be provided to execute instructions for each wireless system to be supported concurrently. Improved performance may be obtained by providing two or more sequencers for each wireless system. For example, in one embodiment of the invention, two sequencers may be provided for each wireless system to be supported concurrently. In this configuration, one sequencer may execute instructions while the other sequencer is being loaded with instructions. It should be appreciated that a single sequencer is capable of supporting multiple wireless systems. A single sequencer may be loaded with instructions pertaining to two different wireless systems. However, true concurrency cannot be achieved using a single sequencer because a time of execution of an instruction pertaining to the first wireless system may overlap with a time of execution of another instruction pertaining to the second wireless system. Because these instructions are executed in a sequence by a single sequencer, they cannot execute concurrently. However, it should also be appreciated that is not necessary to use two sequencers for each wireless system. One sequencer per wireless system may be used, or three or more sequencers may be used for each wireless system. An additional sequencer unrelated to wireless system processing, may be used for providing general purpose timing. For example, the additional sequencer may be used to schedule timing events related to updating a clock on the display screen of the wireless terminal. In some embodiments, the TEP 138 includes two sequencers for each wireless system to be supported concurrently and one additional sequencer.
Using multiple sequencers allows communications processor 100 to communicate with several different wireless systems concurrently, despite the fact that the wireless systems use different timing. For example, a wireless terminal may monitor the paging channel of a GSM network while concurrently receiving data from a wireless LAN, a Bluetooth network, or other 802.11b network. Similarly, a wireless terminal with a communications processor having multiple sequencers, upon startup, may simultaneously perform cell search for both a 2G GSM network and a 3G WCDMA network.
As mentioned above, TEP 138 can set and clear GPIO pins, enable DMA channels, generate interrupts, and perform clock calibration. However, two or more sequencers may assert conflicting signals. For example, one sequencer may assert a set signal for a particular I/O pin, while a different sequencer asserts a clear signal for the same pin at the same time. I/O conflict resolver 204, shown in
Memory 206, shown in
As mentioned above, Memory access resolver 208 processes incoming access requests to memory 206 from sequencers 202a-202n and DPBUS bus 110. Memory access resolver 208 also handles conflicts, for example, in the case of more access requests than read ports. Memory access resolver 208 may handle such situations by prioritizing requests based on a round-robin scheme, for example. In such a round-robin scheme, a shift-back register may be used to determine priority. In one embodiment, when a conflict for memory access occurs, the register is shifted. In another embodiment, the shift-back register may be shifted upon every memory access by any sequencer. However, it should be appreciated that many other methods of handling request conflicts may be used.
DPBUS bus interface module 210 provides bridging between the system clock and the DPBUS bus clock domains within TEP 138. DPBUS interface module 210 also handles the 16/32 bit interfacing between the DPBUS bus 110 and the internal TEP bus.
A block diagram of DPBUS bus interface module 210 according to one embodiment of the invention is shown in
After an instruction is decoded by instruction decoder 328, delta-timer 336, shown in
The clock pre-scale module 346, shown in
An example of a sequencer instruction set in accordance with one embodiment of the invention is given in Table 1.
Sometimes it may be necessary to set or clear two or more I/O pins at the same time. Although the sequencer instruction set may provide instructions for setting or clearing I/O pins, such instructions are executed in sequence and not concurrently. To set or clear two or more pins at the same time, the set and clear instructions may be synchronized to a particular signal. For example, if pin GPIOA and pin GPIOB need to be set simultaneously, a sequencer may synchronize these instructions to GPSigA. Then, the sequencer may first execute the set GPIOA instruction followed by the set GPIOB instruction. These pins are not actually set until a toggle GPSigA instruction is executed, which causes both pins to be set simultaneously.
A LongWait compare module 340 is used when a LongWait instruction is executed by the sequencer. A LongWait instruction may be is executed when no subsequent instructions are to be executed by the sequencer for a given amount of time. A LongWait instruction permits the system clock to be powered down and allows the sequencer to use a slow clock for timing, in order to save power.
LongWait compare module 340 compares the wait time indicated in the LongWait instruction with the value of absolute counter 214 (
A PreAbs32 register 338 is used to determine a time to power-up the oscillator if the oscillator has been shut down. The PreAbs 32 register indicates the absolute time point to power-up the oscillator which allows sufficient time for the oscillator to stabilize before the currently executing LongWait instruction completes and the next instruction begins execution.
The sequencer control module 334 controls program flow and handles interrupts for sequencers 202a-202n. Sequencer control module 334 requests instructions from memory based on the contents of a program counter register 322. Program counter register 322 holds the address of the next instruction to be executed. Sequencer control module 334 may receive interrupts over line 344 from interrupt selector 332, which may select the highest priority interrupt request from a plurality of interrupt sources. When an interrupt is received, the interrupt enable bit in a register 316 may be set and the address of the interrupt vector may be loaded into register 318. The sequencer jumps to address of the interrupt vector in register 318 and continues execution from there.
When a sequencer receives a hard reset or executes a Die instruction, the sequencer enters an idle state. A soft reset is used to instruct a sequencer to fetch a first instruction and begin executing instructions. When the sequencer receives a soft reset or an interrupt it may proceed with normal execution. If the sequencer receives a soft reset, the address to which the sequencer jumps to begin execution is held in a register 320. If the sequencer receives an interrupt, the address of the interrupt vector to which the sequencer jumps to begin execution is held in a register 318.
DMA registers 302, 304, 306, 308, and 310 are used by the sequencer to store DMA channel configuration information. For example, these DMA registers may store a source address, a destination address and a number of bytes to be transferred. DMA control module 348 interfaces with DSPDMA controller 134 (
Clock calibration unit 212 shown in
The slow clock is not as accurate as the high frequency system clock and is more sensitive to temperature fluctuations. Thus, the slow clock may be calibrated to ensure a desired degree of accuracy. The slow clock may calibrated using either the system clock or the timing of the wireless system received over the radio. If the system clock is used for calibration, the number of system clock cycles may be counted over a selected number of slow clock cycles. If timing from the wireless system is used for calibration, the number of wireless system clock cycles (received over the radio) may be counted over a selected number of slow clock cycles.
In order to conserve power that otherwise would be consumed by calibrating the slow clock using a frequency synthesizer or VCO, the slow clock may be calibrated by removing clock cycles from the free-running slow clock to provide a calibrated slow clock. That is, a frequency lower than the expected frequency of the free-running slow clock may be chosen as the calibrated clock frequency (e.g., 31 kHz in the case of a 32 kHz slow clock) and the calibrated clock signal may be generated by removing clock pulses from the free-running slow clock signal. The free-running slow clock may be adjusted by a fractional-N clock divider, which periodically removes a clock cycle from the free-running slow clock. The period in which a clock cycle is removed from the free-running slow clock depends on specified fraction and modulus values and on information obtained from comparing the slow clock to the system clock. For example, if the period in which clock cycles are removed is nine slow clock cycles, eight calibrated slow clock cycles are generated for every nine uncalibrated slow clock cycles.
However, removing clock cycles from the free-running slow clock introduces phase errors into the calibrated slow clock. Such phase errors are caused by the fact that the calibrated slow clock is not truly periodic. For example, assume that a calibrated slow clock of 40 kHz is generated from a free-running 50 kHz clock. The 50 kHz clock has a rising edge every 20 μsec. That is, the 50 kHz clock has rising edges at 20 μsec, 40 μsec, 60 μsec, 80 μsec, 100 μsec, 120 μsec, etc. The 40 kHz calibrated slow clock may be generated by periodically removing a cycle. Thus, the calibrated slow clock will have rising edges at 20 μsec, 40 μsec, 60 μsec, 100 μsec, 120 μsec, etc. The calibrated slow clock averages out to a 40 kHz clock, that is, 40,000 leading clock edges per second, but is out of phase with respect to a true 40 kHz clock. A true 40 kHz clock would have a rising clock edge every 25 μsec. For example, a true 40 kHz clock would have rising clock edges at 25 μsec, 50 μsec, 75 μsec, 100 μsec, 125 μsec, etc. Thus, the rising edges in the calibrated 40 KHz clock and the rising edges in the true 40 KHz clock occur at different times and phase compensation is used to account for the difference in phase between the calibrated slow clock and a true clock of the same frequency, as discussed below.
In operation, when the value in register 906 reaches the value in modulus register 908, the output of comparator 914 is set, thus inhibiting the output of gate 910. As can be seen, the amount of phase compensation (i.e., the value of register 906) is accumulated and increases linearly each free-running 32 kHz clock cycle. When the accumulator reaches the modulus register 908, the free-running 32 kHz clock input is gated off until the next clock cycle. Then the phase compensation accumulator is wrapped around via the calculated modulus value from the modulus operator 912.
As mentioned above, removing clock pulses introduces phase errors into the calibrated clock signal. The phase errors result from the fact that the calibrated slow clock 930 with pulses removed, shown in
Thus, when the calibrated clock signal is used to drive absolute counter 214, the phase errors in the calibrated clock signal are compensated for by using the phase compensation calculated in phase compensation register 906. Referring to the example discussed above using a 50 kHz free-running slow clock and a 40 kHz calibrated slow clock, assume an event is scheduled to occur on the third rising edge of the 40 kHz clock signal. As discussed above, in a true 40 kHz clock, the third rising edge occurs at 75 μsec. However, in the calibrated 40 kHz clock, the third rising edge occurs at 60 μsec. Thus, the calibrated slow clock is out of phase with the true 40 KHz clock by 15 μsec. When the calibrated slow clock reaches the third rising edge at 60 μsec, a further delay of 15 μsec, counted in system clock cycles, is added before execution of the scheduled event. In this manner, the sequencers compensate for the adjusted frequency of the calibrated clock signal.
Sometimes sufficient frequency stability of the slow clock cannot be achieved due to, for example, rapid temperature fluctuations. However, it may still be necessary to generate a calibrated slow clock signal for driving the absolute counter and timing the execution of LongWait instructions. In such situations, frequency division of the system clock may be used. For example, a clock divider FSM 916 may divide the system clock down to a calibrated slow clock.
Absolute counter 214, shown in
Two periodic trigger generators 1002 and 1004 are supplied and may be used for various purposes, such as triggering interrupts or triggering a snapshot. A snapshot is a measurement of the slow clock against the system clock or a measurement of the slow clock against the timing of the wireless system received over the radio, which may be used for calibration of the slow clock. A snapshot involves counting the number of system clock cycles in a given number of slow clock cycles.
When a snapshot is initiated, a calibrate signal is asserted to prevent powering down of the system clock. Next, a snapshot FSM 1108 enters a setup state 1103 in which it waits to receive a SysClkOk signal 1110, indicating that the system clock oscillator is not powered off. When the SysClkOk signal 1110 is received, snapshot FSM 1108 enters a snapshot state 1105 in which the number of system clock cycles is counted during a number of slow clock cycles. The number of slow clock cycles is specified in a TCLR register 1112, which is software configurable. After the number of clock cycles specified in TCLR register 1112 has been counted by a slow clock cycle counter 1114, an interrupt is generated and snapshot FSM 1108 enters readback state 1107. While snapshot 1108 is in readback state 1107, a system clock cycle counter 1116 is readable by the processing cores via the DPBUS bus interface 210 to update any registers needed for calibration of the slow clock. After counter 1116 is read, snapshot FSM 1108 returns to idle state 1101.
Clock and Power Control Module 216 is shown in
Each sequencer 202a-202n may indicate to Clock and Power Control module 216 through Set-Reset Flip Flop (SRFF) 1218 that the system clock is required. The Q output of SRFF 1218 is TEPReqSysClk signal 1216. Each sequencer that does not require the system clock asserts a KillSysOsc signal through an AND gate 1222. When none of the sequencers requires the system clock, SRFF 1218 enters the reset state and signal 1216 is not asserted. If any sequencer requires use of the system clock, it asserts a Restart System Oscillator signal through an OR gate 1224. In response, SRFF 1218 enters the set state, and signal 1216 is asserted. The PreAbs 32 register 338 may be used to store the latest time at which the oscillator may remain powered down, taking into account the scheduled execution time of the next instruction and the necessary warm-up time of the oscillator. A sequencer may assert a KillSysOsc signal if the current time is less than the time in its PreAbs32 register 338. If the current time is equal to the time in its PreAbs32 register 338, then a sequencer may assert a RestartSysOsc signal. When the current time equals the expire time of the LongWait instruction, the system clock should be stabilized.
A power-up sequencer 1226 receives from OR gate 1220 an input signal which indicates if any module, internal or external to the TEP, requires use of the system clock. If this signal is asserted, power-up sequencer 1226 may power up the system clock oscillator by asserting SysOscOn signal 1236. A clock pad power up register (CPPUR) 1228 stores the settling time for the clock pad buffer, and an oscillator warm-up register OWUR 1230 stores the warm-up time for the oscillator. When the input signal to power-up sequencer 1226 from OR gate 1220 is asserted, an FSM 1234 starts a 10-bit counter 1232 from zero and asserts the SysOscOn signal 1236, causing the system oscillator to be powered up. When the counter 1232 reaches the time specified in OWUR 1230, a ClkBufOn signal 1238 is asserted, enabling a clock pad buffer. When the counter 1232 equals the time specified in OWUR 1230 plus the time specified in CCPUR 1228, a SysClkGate signal 1240 is asserted, indicating that the system clock oscillator output is valid and enabling an AND gate 1242. The AND gate 1242 inhibits the system clock oscillator output until the oscillator has had sufficient time to stabilize. The oscillator is stable after the oscillator warm-up time specified in OWUR 1230 plus the clock pad power up delay time stored in CPPUR 1228 is reached. When this time is reached, SysClkGate signal 1240 enables AND gate 1242, and clock signals from the oscillator are allowed to pass through the gate.
As mentioned above, clock and power control module 216 receives a ReqSysClk signal from a source external to the TEP 138. This signal indicates whether any modules external to the TEP 138, such as DSP core 102 and MCU 104, require use of the system oscillator.
Clock signals output from gate 1305 are input to a phase-locked loop (PLL) 1307 which multiplies the clock signal to a frequency suitable for clocking the DSP core 102. In situations where the DSP core is idle, it may not be necessary to multiply the clock signal using PLL 1307 and the clock signal output from gate 1305 is not supplied to PLL 1307. Multiplexer 1309 selects either the multiplied clock signal from PLL 1307 or the output of gate 1305. As shown in
Register 1405 is an MCU sleep clock requirements register (MSCRR). MSCRR register 1405, as illustrated in
Similar to MCU 104, two DSP registers are provided: a DSP sleep clock requirements register (DSCRR) 1401 and a DSP active clock requirement register (DACRR) 1403. Registers 1401 and 1403 indicate which clocks are needed while the DSP core 102 is sleeping and which clocks are needed when DSP core 102 is active, respectively. A DSP Active signal generated by DSP core 102 is used by a multiplexer 1421 to determine whether to output the contents of DSCRR register 1401 or DACRR register 1403. OR-gates 1409, 1411, and 1413 combine the outputs of the MCU requirement registers 1405 and 1407 and the DSP requirement registers 1401 and 1403. AND gates 1415, 1311, 1313, 1315, and 1317 may be used to enable or inhibit the corresponding clock signals according to the contents of registers 1401, 1403, 1405 and 1407.
In addition to inhibiting certain clock signals when they are not needed to save power, the system clock oscillator may be powered down, so that no system clock signals are generated when no modules of communications processor 100 require a clock.
Having thus described various embodiments of the invention, numerous improvements and modifications will occur to one skilled in the art. Thus, it is not intended that the breadth of the invention be limited to the specific embodiments illustrated and described. Rather, the scope of the invention is to be limited only by the appended claims and their equivalents.
This application claims the benefit of provisional application Ser. No. 60/315,655, filed Aug. 29, 2001, which is hereby incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
60315655 | Aug 2001 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10230669 | Aug 2002 | US |
Child | 11985375 | Nov 2007 | US |