Content of the invention
The shortcoming of prior art in view of the above, it is an object of the invention to provide on a kind of little piece of chip area be
System chip structure.
Another object of the present invention is to providing a kind of method preserving Debugging message, so as not to need single memorizer
To store Debugging message.
For achieving the above object and other related purposes, the chip structure of system-on-chip that the present invention provides, it at least includes:
Processing unit;The memory element being connected with described processing unit;For recording the recording unit of Debugging message;And deposit with described
The read-write cell that storage unit and recording unit are connected, for not reading or writing to described memory element when described processing unit
During operation, Debugging message that described recording unit is recorded writes in the pre- stator unit of described memory element or will be described pre-
Debugging message in stator unit reads.
Preferably, described recording unit also includes:First signal output apparatus, it is used for the recording unit belonging to when itself
The temporary storage location being comprised has been filled with output first during Debugging message and has informed signal to read-write cell.
Preferably, described read-write cell also includes:Secondary signal output circuit, it is used for output second and informs signal to institute
State processing unit, to make described processing unit suspend carry out read or write to described memory element.
The method of the preservation Debugging message that the present invention provides, for aforesaid chip structure of system-on-chip, it includes following
Step:
In-system chip structure comprises on said sheets memory element, specified portions subelement is used for storage debugging letter
Breath;
- on said sheets during the processing unit execution Task of Debugging in system chip structure, described SOC(system on a chip)
The Debugging message of the affiliated chip structure of system-on-chip of the recording unit records in chip structure itself;And
Read-write cell in-described chip structure of system-on-chip is not read to described memory element in described processing unit
Or during write operation, the Debugging message that described recording unit is recorded writes described part subelement.
Preferably, the described method preserving Debugging message also includes the temporary storage location that described recording unit comprises and has been filled with tune
During examination information, output first informs signal to the step of read-write cell.
Preferably, the described method preserving Debugging message also includes described read-write cell output second and informs signal to described
Processing unit, so that the step that described processing unit time-out carries out read or write to described memory element.
As described above, the chip structure of system-on-chip of the present invention and the method preserving Debugging message, there is following beneficial effect
Really:Single memorizer is not had to store Debugging message in chip, thus can be with effectively save chip area, reduces cost;This
Outward, chip is also not provided with the pin being connected with external memory storage, therefore effectively reduces the pin number of chip, and then reduces core
The preparation cost of piece.
Specific embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also be by addition different concrete realities
The mode of applying is carried out or applies, and the every details in this specification can also be based on different viewpoints and application, without departing from
Carry out various modifications and changes under the spirit of the present invention.
Refer to Fig. 1 to Fig. 4.It should be noted that the diagram provided in the present embodiment only illustrates this in a schematic way
The basic conception of invention, only shows the assembly relevant with the present invention rather than then according to package count during actual enforcement in schema
Mesh, shape and size are drawn, and during its actual enforcement, the kenel of each assembly, quantity and ratio can be a kind of random change, and its
Assembly layout kenel is likely to increasingly complex.
As illustrated, the present invention provides a kind of chip structure of system-on-chip, described chip structure of system-on-chip 1 is at least wrapped
Include:Processing unit 11, memory element 12, recording unit 13 and read-write cell 14.
Described processing unit 11 is based on SOC(system on a chip) as the core cell of on-chip system chip, the circuit structure that it comprises
Chip function to be done determining it is preferable that it includes comprising the circuit unit of processor, for example, comprise CPU, MCU,
The circuit unit of one or more of DSP.
In more detail speech, for example, described processing unit 11 include one or more of CPU, MCU, DSP, clock circuit,
Intervalometer, interrupt control unit, serial-parallel interface, other ancillary equipment, I/O port and the bonding being used between various IP kernels are patrolled
Volume etc..
Described memory element 12 is connected with described processing unit 11, for storage information.Preferably, described processing unit
11 carry out read or write by bus to described memory element 12.Preferably, described memory element 12 include various volatile,
The memorizeies such as non-volatile or Cache.
Described recording unit 13 is used for recording Debugging message.Wherein, described Debugging message is included to described SOC(system on a chip)
Chip structure 1 carries out various data messages produced by its internal circuit during Task of Debugging it is preferable that including but is not limited to:Always
The data of line read-write, chip internal status information, jump address of routine change flow process etc..
Preferably, described recording unit 13 includes temporary storage location, described temporary storage location can using volatile, non-volatile or
The memorizeies such as Cache, to realize, may also be employed depositor etc. to realize.
It should be noted that in order to reduce chip area, the memory capacity of the temporary storage location that described recording unit 13 comprises
As little as possible, preferably 8 to 16 bytes etc..
Described read-write cell 14 is connected with described memory element 12 and recording unit 13, for when described processing unit 11
When read or write not being carried out to described memory element 12, deposit described in Debugging message write that described recording unit 13 is recorded
In the pre- stator unit of storage unit 13.
Wherein, described pre- stator unit is the preassigned subelement for storing Debugging message it is preferable that it is even
Continuous unit, for example, the memory element of address " 1234 " to address " 3FFF " in described memory element 12 is used for storage debugging letter
Breath.
Specifically, described read-write cell 14 passes through to monitor the reading between described processing unit 11 and described memory element 12
According to line and write data line, all whether the free time determines whether described processing unit 11 is reading or writing to described memory element 12
Operation, and when when described processing unit 11 does not carry out read or write to described memory element 12, by described recording unit 13
The Debugging message being recorded writes in the pre- stator unit of described memory element 13.
Those skilled in the art, therefore be will not be described in detail herein it should be appreciated that the circuit structure of read-write cell based on preceding description.
A kind of preferred as the present invention, aforementioned recording unit 13 includes the first signal output apparatus 131, as shown in Figure 2.
The temporary storage location that described first signal output apparatus 131 are comprised for the recording unit 13 belonging to when itself is deposited
During full Debugging message, output first informs signal to read-write cell 14, so that described read-write cell 14 is in time by described temporary storage location
The Debugging message being stored writes in the pre- stator unit of described memory element 12.
Wherein, first inform that signal includes any one and can be shown that the temporary storage location that recording unit 13 is comprised has been filled with tune
The signal of examination information is it is preferable that include but is not limited to:Low level signal, high level signal etc..
Specifically, described first signal output apparatus 131 can byte number based on Debugging message to be recorded or address letter
Breath and the byte number of described temporary storage location or maximum address information relatively to export the first notification.Preferably, described
One signal output apparatus 131 can adopt comparison circuit etc. to realize.
A kind of preferred as the present invention, aforementioned read-write cell 14 also includes secondary signal output circuit 141, as Fig. 3 institute
Show.
Described secondary signal output circuit 141 is used for output second and informs signal to described processing unit 11, to make institute
State processing unit 11 and suspend and read or write is carried out to described memory element 12, be thus easy to described read-write 14 and Debugging message is write
Enter in the pre- stator unit of described memory element 12.
Wherein, second inform that signal includes any one described processing unit 11 can be made to suspend described memory element 12 is entered
The signal of row read or write is it is preferable that include but is not limited to:Low level signal, high level signal etc..
Specifically, inform letter when described read-write cell 14 receives from the first of the first signal output apparatus 131 output
Number or because other reasonses etc., described read-write cell 14 needs the Debugging message being recorded described recording unit 13 to write institute
State memory element 12 pre- stator unit when, if described processing unit 11 carries out reading or writing behaviour to described memory element 12
Make, then described secondary signal output circuit 141 exports the second of a high level etc. and informs signal to described processing unit 11,
So that described processing unit 11 suspends the read or write to described memory element 12.
, based on preceding description it should be appreciated that the circuit structure of the first signal output apparatus, therefore here is or not those skilled in the art
Describe in detail again.
In addition it is also necessary to explanation, described chip structure of system-on-chip 1 be also based on user need comprise other work(
Energy modular unit, it may for example comprise the analog front-end module of ADC/DAC, power supply provide and power managed module, radio-frequency front-end mould
Block, user define logic and microelectron-mechanical module etc., and here no longer describes in detail one by one.
Based on any one chip structure of system-on-chip 1 of aforementioned Fig. 1 to Fig. 3, the present invention provides a kind of preservation Debugging message
Method, as shown in Figure 4.
In step sl, in the memory element 12 that aforementioned chip structure of system-on-chip 1 comprises, specified portions subelement is used
In storage Debugging message.
Specifically, in the debugging stage, in described memory element 12, first distribute a subelement as debugging internal memory, for protecting
Deposit Debugging message, in described memory element 12, as shared drive, now described is above the unit in addition to debugging internal memory
The processing unit 11 that system chip structure 1 comprises or other functions module will avoid using debugging internal memory, and can be processed list by described
In the enable signal of shared drive and debugging that other functions module in first 11 or described chip structure of system-on-chip 1 is used
The initial address depositing distribution can be saved in the depositor of recording unit 14.
In step s 2, on said sheets during the processing unit 11 execution Task of Debugging in system chip structure 1,
Recording unit 14 in described chip structure of system-on-chip records the Debugging message of itself affiliated chip structure of system-on-chip 1.
Wherein, the Task of Debugging of described processing unit 11 execution is known to those skilled in the art knows, therefore here is no longer
Describe in detail.
Specifically, on said sheets during the processing unit 11 execution Task of Debugging in system chip structure 1, described
Recording unit 14 records the connecting line of the described memory element 12 of connection in described chip structure of system-on-chip 1 (as read/write is total
Line) read-write data, internal state data of chip, processing unit 11 change the data such as jump address during task.
In step s3, the read-write cell 14 in described chip structure of system-on-chip 1 in described processing unit 11 not to institute
When stating memory element and carrying out read or write, the Debugging message that described recording unit 13 is recorded writes described part subelement
(debugging internal memory).
Specifically, described read-write cell 14 detects the read/write between described processing unit 11 and described memory element 12
When data wire is idle, in the Debugging message write debugging internal memory that described recording unit 13 is recorded.
If the read/write data line between described processing unit 11 and described memory element 12 is busy, lead to described record
The temporary storage location that unit 13 is comprised has been filled with Debugging message, then the first signal output apparatus that described recording unit 13 is comprised
131 outputs first inform signal to described read-write cell 14, so that described read-write cell 14 is in time by described recording unit 13 institute
In the Debugging message write debugging internal memory of record.
Additionally, when described read-write cell 14 prepares to described memory element 12 write Debugging message, if described process list
Unit 11 is carrying out read or write to described memory element 12, then the secondary signal output circuit that described read-write cell 14 comprises
141 outputs second inform signal to described processing unit 11, so as described processing unit 11 discharge the reading of described memory element 12/
Write data line, subsequently, described read-write cell 14 can utilize the read/write data bundle of lines Debugging message of described memory element 12 to move
To in debugging internal memory, then described processing unit 11 recovers normal work again.
Further, after debugging storage Debugging message in internal memory, can be read described by outside on-line debugging emulator
Debugging message in debugging internal memory, and this Debugging message is analyzed.
In sum, the chip structure of system-on-chip of the present invention and preserve Debugging message method be based on read-write cell can be by
The Debugging message write storage unit (i.e. in Installed System Memory) that recording unit is recorded, due to not having single memorizer in chip
To store Debugging message, therefore can be with effectively save chip area, reduces cost;Additionally, chip is also not provided with and external storage
The pin that device connects, therefore effectively reduce the pin number of chip, and then reduce the preparation cost of chip.So, the present invention has
Effect overcomes various shortcoming of the prior art and has high industrial utilization.
Above-described embodiment only principle of the illustrative present invention and its effect, not for the restriction present invention.Any ripe
The personage knowing this technology all can carry out modifications and changes without prejudice under the spirit and the scope of the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete with institute under technological thought without departing from disclosed spirit such as
All equivalent modifications becoming or change, must be covered by the claim of the present invention.