CROSS-REFERENCE OF THE INVENTION
[0001] This application claims priority from Japanese Patent Application No.
2009-108895, the content of which is incorporated herein by reference in its entirety.
BACKGROUND OF THE INVENTION
Field of the Invention:
[0002] This invention relates to a program update system and an electronic device with program
update function. More specifically, this invention relates to a system and an electronic
device provided with function to update (version up) a control program used to decode
compressed data that is taken-in from a USB (Universal Serial Bus) memory or the like.
Description of the Related Art:
[0003] In recent years, an electronic devices such as a car audio takes-in compressed data
stored in an external recording medium such as a USB memory or iPod (iPod is a registered
trade mark of Apple Incorporated). Standardized audio file formats such as MP3, WMA
and AAC are used as a format of the compressed data. The compressed data is decoded
by a compression decoder in the electronic device and then played back as a sound
through a speaker or the like. At that time, a microcomputer having a USB host function
executes a control program of the compression decoder.
[0004] In this case, connectability between the electronic device and the USB memory that
is available in the market at the time of shipping of the electronic device has been
confirmed. That is, the compressed data taken-in from the USB memory is properly decoded
by the compression decoder. However, specifications (for example, data output timing)
of a USB memory that is released after the shipping of the electronic device may be
modified. In that case, there may be caused a problem that the compressed data taken-in
from the USB memory released after the shipping of the electronic device is not properly
decoded depending on the control program that is installed in the electronic device
at the time of the shipping, because the installed control program may not be able
to control the compression decoder properly.
[0005] Therefore, a flash ROM (an electrically erasable programmable nonvolatile memory,
hereafter referred to as an FROM) is incorporated in the electronic device so that
the control program is revised using the FROM.
[0006] That is, the control program corresponding to the USB memories available in the market
at the time of the shipping of the electronic device is written into the FROM in the
electronic device. When a new version of USB memory is released after the shipping,
update information for the control program is written into the new USB memory. The
control program is revised (updated) by writing the update information into the FROM.
[0008] In recent years, integrated circuit chips are consolidated into a smaller number
of chips in order to reduce a mounting area for them. With the electronic device having
the function to update the control program as described above, it is conceivable that
the microcomputer having the USB host function, the FROM and the compression decoder
are consolidated into a single chip. In this case, however, there is a problem that
the single chip has to be manufactured using an FROM process (a manufacturing process
required to form the FROM) that increases a manufacturing cost of the single chip.
[0009] That is, although the compression decoder and the microcomputer itself, that includes
a CPU, a RAM and the like, do not need the FROM process in themselves, they have to
be manufactured using the FROM process in order to be integrated in the single chip
together with the FROM. However, the FROM process is not suitable for finer design
rules required to reduce the size of devices in the single chip, because the FROM
process requires a larger number of masks and an increased amount of thermal treatment
compared with a logic process that is used to manufacture logic circuits. As a result,
the single chip is increased in its die size as well as its manufacturing cost.
[0010] It is an object of the invention to provide an improved program update system and
electronic device with program update function that lessens this drawback.
SUMMARY OF THE INVENTION
[0011] The solution according to the invention resides in the features of the independent
claims and preferably in those of the dependent claims.
[0012] The invention provides an integrated circuit chip with program update functions.
The chip includes an interface circuit interfacing with an external recording medium,
a compression decoder decoding compressed data received from the external recording
medium through the interface circuit, a mask ROM storing a program to control the
compression decoder, and a CPU executing the program stored in the mask ROM. The mask
ROM and the CPU are configured to operate as part of a ROM correction circuit correcting
the program stored in the mask ROM based on update information of the program stored
in the external recording medium. The integrated circuit chip is configured to transmit
data to and receive data from an electrically erasable programmable nonvolatile memory
external to the integrated circuit chip and is configured to write the update information
received from the external recording medium through the interface circuit into the
nonvolatile memory. And, the ROM correction circuit is configured to update the program
stored in the mask ROM when the CPU executes the program.
[0013] The invention also provides an electronic device with program update functions. The
device includes a first integrated circuit chip having an interface circuit interfacing
with an external recording medium, a compression decoder decoding compressed data
received from the external recording medium through the interface circuit, a mask
ROM storing a first program to control the compression decoder, and a first CPU executing
the first program stored in the mask ROM. The mask ROM and the first CPU operate as
part of a ROM correction circuit correcting the first program stored in the mask ROM
based on update information of the first program stored in the external recording
medium. The device also includes a second integrated circuit chip having an electrically
erasable programmable nonvolatile memory and a second CPU executing a second program
stored in the nonvolatile memory and controlling the electronic device. The first
integrated circuit chip is configured to transmit data to and receive data from the
second integrated circuit chip and is configured to write the update information received
from the external recording medium through the interface circuit into the nonvolatile
memory. And, the ROM correction circuit is configured to update the first program
stored in the mask ROM when the first CPU executes the first program.
BRIEF DESCRIPTION OF THE DRAWINGS
[0014]
Fig. 1 is a block diagram of a program update system and an electronic device with
a program update function according to an embodiment of this invention.
Fig. 2 is a block diagram of a ROM correction circuit..
Fig. 3 is a timing chart showing an example of an operation of the ROM correction
circuit.
Fig. 4 shows an example of an operation of the ROM correction circuit.
DETAILED DESCRIPTION OF THE INVENTION
[0015] A program update system and an electronic device with a program update function according
to an embodiment of this invention are described referring to the drawings. A car
audio is taken as an example of the electronic device and is explained hereafter.
[0016] First, a system structure of the car audio is described referring to Fig. 1. A first
integrated circuit chip 10 has a USB interface circuit 11, a compression decoder 12,
a CPU 13, a mask ROM (Read Only Memory) 14 and a RAM (Random Access Memory) 15.
[0017] That is, the first integrated circuit chip 10 is a single chip consolidating a microcomputer
with a USB host function and the compression decoder 12. It should be noted that the
first integrated circuit chip 10 incorporates the mask ROM 14, not an FROM, as a memory
to store a control program (before update) to control an operation of the compression
decoder 12.
[0018] The mask ROM 14 is a nonvolatile read-only memory, and its ROM coding is modified
by modifying an ion implantation mask, a metal mask, a contact mask or the like. It
is manufactured using a less expensive process and suitable for finer design rules
compared with the FROM. The RAM 15 is a memory to store data temporarily. The data
stored in the RAM 15 is lost when a power supply is turned off.
[0019] The USB interface circuit 11 serves to interface the first integrated circuit chip
10 and the external recording medium such as the USB memory 31 or the iPod 32, and
has a function to convert serial data transferred from the USB memory 31 into a data
format that can be processed in the first integrated circuit chip 10, for example,
that is, a function to convert the serial data from the USB memory 31 into parallel
data, for example. The USB memory 31, the iPod 32 or the like is connected to the
USB interface circuit 11 through a USB cable 33.
[0020] The compression decoder 12 decodes the compression date (in the format of MP3, WMA,
AAC or the like in this case) inputted from the USB memory 31 or the like through
the USB interface circuit 11.
[0021] The USB interface circuit 11, the compression decoder 12, the CPU 13, the mask ROM
14 and the RAM 15 are configured so that they can transmit/receive the data or the
like to/from each other through a bus 16. In addition, a DRAM 34 is provided outside
the first integrated circuit chip 10. The DRAM 34 can be used as a buffer memory to
store the data transferred from the USB interface circuit 11 collectively.
[0022] A second integrated circuit chip 20 is a semiconductor chip separated from the first
integrated circuit chip 10. It has a CPU 21, an FROM 22 and a RAM 23, and serves as
a system microcomputer to control the whole system of the car audio. The CPU 21, the
FROM 22 and the RAM 23 are configured so that they can transmit/receive the data or
the like to/from each other through a bus 24. The second integrated circuit chip 20
controls operations of a tuner 41, an electronic volume 42, a power amplifier 43 and
an LCD driver 44.
[0023] For example, the second integrated circuit chip 20 sends a display signal and a display
instruction to the LCD driver 44. The LCD driver 44 drives an LCD panel 46 in accordance
with them. A predetermined LCD display is performed as a result.
[0024] An audio signal decoded by the compression decoder 12 is inputted to the electronic
volume 42 and its sound volume is adjusted based on the instruction from the second
integrated circuit chip 20. The audio signal with the sound volume adjusted by the
electronic volume 42 is amplified by the power amplifier 43. The audio signal amplified
by the power amplifier 43 is played back as a sound through a speaker 45.
[0025] An example of an operation to update the control program stored in the mask ROM 14
in the first integrated circuit chip 10 is described hereafter. First, an operator
or the like inputs update information of the control program into the USB memory 31.
[0026] When the USB memory 31 is connected to the USB interface circuit 11 through the cable
33, data communication in compliance with a USB communication protocol takes place
between the USB memory 31 and the USB interface circuit 11. That is, the first integrated
circuit chip 10 recognizes that the USB memory 31 is connected and sets up a state
in which the update information and the compressed data can be transferred from the
USB memory 31 to the USB interface circuit 11.
[0027] After that, the update information stored in the USB memory 31 is written into the
FROM 22 in the second integrated circuit chip 20 through the interface circuit 11.
At that time, the update information inputted through the USB interface circuit 11
may be temporarily stored in the DRAM 34 that serves as the buffer memory. By doing
so, the time required to transfer the update information from the first integrated
circuit chip 10 to the FROM 22 can be reduced because the update information stored
in the DRAM 34 can be collectively transferred to the FROM 22.
[0028] Then, the CPU 13 takes-in the compressed data stored in the USB memory 31 through
the USB interface circuit 11 and converts into the data format that can be processed
by the compression decoder 12 by executing the control program. The converted compressed
data is transferred to the compression decoder 12 and decoded.
[0029] The control program stored in the mask ROM is automatically updated when the CPU
13 executes the control program. That is, the update information written into the
FROM 22 is transferred to the first integrated circuit chip 10 and the program stored
in the mask ROM 14 is updated with a ROM correction function of the first integrated
circuit chip 10. At that time, the update information written into the FROM 22 may
be temporarily stored in the RAM 23 in the second integrated circuit chip 20. By doing
so, the update information stored in the RAM 23 can be transferred to the first integrated
circuit chip 10 collectively.
[0030] Since the first integrated circuit chip 10 according to the embodiment of this invention
does not include the FROM, the single chip consolidating the microcomputer with the
USB host function and the compression decoder 12 can be manufactured using the less
expensive logic process.
[0031] On the other hand, the second integrated circuit chip 20, that is the system microcomputer,
includes the FROM 22 in order to reduce a lead time and expedite debugging of the
program.
[0032] In the embodiment of this invention, the control program stored in the mask ROM 14
is updated using the FROM 22 incorporated in the system microcomputer. As a result,
it is made possible that the manufacturing cost of the car audio having the update
function of the control program is reduced while the microcomputer with the USB host
function and the compression decoder are consolidated into the single chip.
[0033] Regarding a structure to implement the ROM correction function (ROM correction circuit),
which is to be described in detail, the update information written into the FROM 22
in the second integrated circuit chip 20 is transferred to the RAM 15 in the first
integrated circuit chip 10, and the data outputted from the mask ROM 14 is corrected
(replaced) based on the update information that is temporarily stored in the RAM 15.
[0034] Although the update information and the compressed data are downloaded from the USB
memory 31 in the embodiment described above, the information and the data may be downloaded
from other external recording medium such as the iPod 32 or an SD card.
[0035] Next, an example of the structure of the ROM correction circuit is described referring
to Fig. 2. The ROM correction circuit is composed of the CPU 13, the mask ROM 14,
the RAM 15 (an example of "retaining circuit") and a selection circuit (multiplexer)
17. In this case, the update information of the control program includes correction
address (data) that indicates an address in the control program to be corrected (that
is, a location in the original control program to be corrected) and correction data
corresponding the correction address.
[0036] The correction address and the correction data are written into the FROM 22 in the
second integrated circuit chip 20 as described above. The correction address and the
correction data stored in the FROM 22 are transferred to the RAM 15 in the first integrated
circuit chip 10 and temporarily retained in it.
[0037] The CPU 13 incorporates a program counter that sequentially outputs addresses to
access the mask ROM 14. As a result, the mask ROM 14 outputs a program data (ROM code)
corresponding to the address outputted from the CPU 13. The CPU outputs the address
not only to the mask ROM 14 but also to the RAM 15.
[0038] The selection circuit 17 outputs the correction data when the address outputted from
the CPU 13 coincides with the address retained in the RAM 15. When the address outputted
from the CPU 13 does no coincide with the address retained in the RAM 15, the selection
circuit 17 outputs the program data stored in the mask ROM 14 at the corresponding
address.
[0039] Detection of the coincidence between the address outputted from the CPU 13 and the
correction address may be carried out using arithmetic function (ALU) of the CPU 13,
or may be made by a coincidence detection circuit provided in a form of hardware.
[0040] The selection circuit 17 outputs the updated (version-up) control program based on
the update information, and the updated control program is inputted to the CPU 13.
Since the CPU 13 executes the updated control program as a result, it is made possible
that the compression decoder 12 operates properly to decode the compressed data.
[0041] Next, an example of an operation of the ROM correction circuit is described referring
to Figs. 3 and 4. The CPU 13 outputs the address in synchronization with a clock CLK,
and the mask ROM 14 outputs the program data corresponding to the address as shown
in Fig. 3. In this example, the correction addresses are addresses 301, 302, 303 and
304.
[0042] The outputs from the mask ROM 14 corresponding to the correction addresses 301, 302,
303 and 304 are 75, 80, 92 and 20, respectively, which are the data before the update
(bug data) and are to be corrected. The ROM correction circuit replaces the grogram
data to be corrected that are 75, 80, 92 and 20 with the correction data that are
95, 22, 80 and 21, respectively. The correction data 95, 22, 80 and 21 are inputted
to the CPU 13 through the selection circuit 17.
[0043] The outputs from the mask ROM 14 at addresses other than the correction addresses,
for example at addresses 305 - 309, are 00, 84, 75 and 02. There is no correction
data for them because they are correct program data. Therefore, the outputs 00, 84,
75 and 02 from the mask ROM 14 are inputted to the CPU 13 through the selection circuit
17 without changing.
[0044] The ROM correction circuit replaces the bug data with the correction data as described
above. Such replacement may be carried out in several locations. As shown in Fig.
4, each of bug data 1 - 3 in three locations is replaced with each of three correction
data 1 - 3, respectively.
[0045] Although the embodiment of this invention is described taking the car audio as the
example, this invention is not limited the above, and may be applied to other audio
devices and video devices having a compression decoder to decode compressed data (not
only the audio file formats but also video formats) using a control program.
[0046] According to the embodiment of this invention, it is made possible to reduce the
manufacturing cost of the integrated circuit chip used in the program update system
or in the electronic device with program update function.
1. An integrated circuit chip (10) with program update functions, comprising:
an interface circuit (11) interfacing with an external recording medium (31, 32);
a compression decoder (12) decoding compressed data received from the external recording
medium (31, 32) through the interface circuit (11);
a mask ROM (14) storing a program to control the compression decoder (12); and
a CPU (13) executing the program stored in the mask ROM (14),
wherein the mask ROM (14) and the CPU (13) are configured to operate as part of a
ROM correction circuit (13, 14, 15, 17) correcting the program stored in the mask
ROM (14) based on update information of the program stored in the external recording
medium (31, 32), the integrated circuit chip (10) is configured to transmit data to
and receive data from an electrically erasable programmable nonvolatile memory (22)
external to the integrated circuit chip (10) and is configured to write the update
information received from the external recording medium (31, 32) through the interface
circuit (11) into the nonvolatile memory (22), and the ROM correction circuit (13,
14, 15, 17) is configured to update the program based on the update information when
the CPU (13) executes the program.
2. The program update system of claim 1, wherein the update information comprises a correction
address that is an address in the mask ROM (14) for update and program correction
data that replaces program data stored in said address in the mask ROM (14), and the
ROM correction circuit (13, 14, 15, 17) further comprises a retaining circuit (15)
temporarily retaining the correction address and the program correction data received
from the nonvolatile memory (22) and a selection circuit (17) outputting to the CPU
(13) the program correction data when an address outputted from the CPU (13) coincides
with the correction address temporarily retained in the retaining circuit (15) and
outputting to the CPU (13) program data stored in the mask ROM (14) when the address
outputted from the CPU (13) does not coincide with the correction address.
3. The program update system of claim 1, wherein the retaining circuit (15) comprises
a random access memory.
4. The program update system of claim 1, wherein the interface circuit (11) comprises
a USB interface circuit interfacing with a universal serial bus.
5. The program update system of claim 1, wherein the nonvolatile memory (22) comprises
a flash memory.
6. An electronic device with program update functions, comprising:
a first integrated circuit chip (10) comprising an interface circuit (11) interfacing
with an external recording medium (31, 32), a compression decoder (12) decoding compressed
data received from the external recording medium (31, 32) through the interface circuit
(11), a mask ROM (14) storing a first program to control the compression decoder (12),
and a first CPU (13) executing the first program stored in the mask ROM (14), the
mask ROM (14) and the first CPU (13) operating as part of a ROM correction circuit
(13, 14, 15, 17) correcting the first program stored in the mask ROM (14) based on
update information of the first program stored in the external recording medium (31,
32); and
a second integrated circuit chip (20) comprising an electrically erasable programmable
nonvolatile memory (22) and a second CPU (21) executing a second program stored in
the nonvolatile memory (22) and controlling the electronic device,
the first integrated circuit chip (10) is configured to transmit data to and receive
data from the second integrated circuit chip (20) and is configured to write the update
information received from the external recording medium (31, 32) through the interface
circuit (11) into the nonvolatile memory (22), and
the ROM correction circuit (13, 14, 15, 17) is configured to update the first program
based on the update information when the first CPU (13) executes the first program.
7. The electronic device with program update function of claim 6, wherein the update
information comprises a correction address that is an address in the mask ROM (14)
for update and program correction data that replaces program data stored in said address
in the mask ROM (14), and
the ROM correction circuit (13, 14, 15, 17) further comprises a retaining circuit
(15) temporarily retaining the correction address and the program correction data
received from the nonvolatile memory (22) and a selection circuit (17) outputting
to the first CPU (13) the program correction data when an address outputted from the
first CPU (13) coincides with the correction address temporarily retained in the retaining
circuit (15) and outputting to the first CPU (13) program data stored in the mask
ROM (14) when the address outputted from the first CPU (13) does not coincide with
the correction address.
8. The electronic device with program update function of claim 6, wherein the retaining
circuit (15) comprises a random access memory.