WO2006046272A1 - メモリアクセス装置 - Google Patents

メモリアクセス装置 Download PDF

Info

Publication number
WO2006046272A1
WO2006046272A1 PCT/JP2004/014722 JP2004014722W WO2006046272A1 WO 2006046272 A1 WO2006046272 A1 WO 2006046272A1 JP 2004014722 W JP2004014722 W JP 2004014722W WO 2006046272 A1 WO2006046272 A1 WO 2006046272A1
Authority
WO
WIPO (PCT)
Prior art keywords
write
read
memory
data
address
Prior art date
Application number
PCT/JP2004/014722
Other languages
English (en)
French (fr)
Inventor
Takayuki Onishi
Original Assignee
Mitsubishi Denki Kabushiki Kaisha
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Denki Kabushiki Kaisha filed Critical Mitsubishi Denki Kabushiki Kaisha
Priority to JP2006542120A priority Critical patent/JPWO2006046272A1/ja
Priority to PCT/JP2004/014722 priority patent/WO2006046272A1/ja
Publication of WO2006046272A1 publication Critical patent/WO2006046272A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/161Handling requests for interconnection or transfer for access to memory bus based on arbitration with latency improvement

Definitions

  • the present invention relates to writing to a memory in a device such as a mobile phone or a personal computer equipped with a device for writing to and reading from a memory such as a central processing unit (CPU).
  • the present invention relates to a memory access device, a memory access mechanism, a mobile phone terminal, and a memory access method that perform processing and reading processing.
  • a memory such as a CPU
  • a memory such as RAM (Random Access Memory) is indispensable as a storage element for data associated with arithmetic processing.
  • a memory has a larger capacity, and a data read / write (hereinafter referred to as access) speed is slower. Therefore, in order to improve the overall performance of the device, it is necessary to speed up access while maintaining a large memory capacity.
  • Patent Document 1 A specific example of the conventional method is disclosed in Patent Document 1, in which the RAM itself originally has a high-speed access mode such as a high-speed page mode that is efficiently used. In order to use the high-speed access mode, the memory addresses to be accessed must be continuous. In Patent Document 1, the address accessed by the CPU is stored in a memory access device, and the high-speed access mode is used under predetermined conditions such that the continuity of the stored address is lost. This enables high-speed memory access comprehensively.
  • Patent Document 1 JP-A-9 106372 (Page 4, Fig. 1)
  • the conventional method 1 when the cache does not correspond to the memory to be accessed and there is an area, high speed access to the area cannot be performed.
  • the cache since the cache is valid only for CPU-powered accesses, it cannot be used when accessing from devices other than the CPU.
  • the write-back method of the cache method writes data only to the cache and writes data to the memory according to specific conditions, which complicates the control for ensuring data consistency between the cache and the cache controller circuit. The scale increases.
  • the write-through method has a problem that the writing process cannot be performed at high speed because the writing process to both the cache and the memory cannot be completed and the next process cannot be performed.
  • the address to be accessed must be continuous.
  • the continuity of the address differs depending on the program.
  • the conventional method 2 cannot always use the high-speed access mode, the effect cannot always be expected.
  • the memory needs to have a high-speed access mode, there is a problem that the high-speed access mode is not applicable to the memory.
  • a memory access device receives a write address and write data from a device, writes the write data to the memory, receives a device read address, reads the read data from the memory, processes the read data, and reads the read data to the device.
  • the memory access device to send, the device power, the storage means for storing the received write address and write data, the first control signal for writing the write data to the memory and the read data from the memory
  • a control signal generating means for generating a second control signal for receiving the device power and receiving the first write instruction and the first write data from the accumulating means upon receipt of the first write command, and generating the control signal The first control signal to the means.
  • a write control unit that writes the first write data to the memory in response to the first control signal in real time and sends a write completion signal to the device, and a device power first read command.
  • the first read address is received, an instruction to create the second control signal is given to the control signal creating means, and the first read data is read from the memory in real time by the second control signal.
  • a read control unit that sends a read completion signal to the device as well as to the device.
  • the device power received first write address and first write data are stored. Generating a first control signal for writing the write data to the memory, and writing the first write data to the memory by the first control signal in real time and completing the writing to the device. And when the first read command is received from the device force, the device force also receives the first read address and a second control signal for reading and processing the read data from the memory. And a first read data from the memory in real time by the second control signal. It is obtained by a step of sending a read completion signal to the device and sends the processing device reads out the data.
  • the second write address and the second write with the device power when the second write command with the device power is received, the second write address and the second write with the device power received. Storing data only, a step of creating a first control signal for writing the write data to the memory after completing the writing process of the first write data, and the first control signal And writing the second write data to the memory, and sending a write completion signal to the device regardless of whether or not the write process is completed, and the device power also receives the second read command.
  • the device power after completing the writing process of the first write data, the device power also receives the second read address, and creates the second control signal for reading the read data from the memory and processing.
  • the second read data is read from the memory and processed in real time. And sending a read completion signal to the device.
  • high-speed data can be stored while maintaining data consistency even when accessing from a device other than the CPU, regardless of whether the access is to a misaligned memory area.
  • a memory access method that can be accessed is realized.
  • FIG. 1 is a block diagram showing a part of a device to which a memory access device used in the first to fifth embodiments of the present invention is applied.
  • FIG. 2 is a block diagram showing a memory access device used in the first and second embodiments of the present invention.
  • FIG. 3 relates to the write processing of the memory access device used in Embodiment 1 of the present invention. It is a flowchart which shows the operation
  • FIG. 4 is a flowchart showing an operation related to a read process of the memory access device used in Embodiment 1 of the present invention.
  • FIG. 5 is a flowchart showing an operation related to a write process of the memory access device used in Embodiment 2 of the present invention.
  • FIG. 6 is a flowchart showing an operation related to a read process of the memory access device used in Embodiment 2 of the present invention.
  • FIG. 7 is a block diagram showing a memory access device used in Embodiment 3 of the present invention.
  • FIG. 8 is a flowchart showing an operation related to a write process of a memory access device used in Embodiment 3 of the present invention.
  • FIG. 9 is a block diagram showing a memory access device used in Embodiment 4 of the present invention.
  • FIG. 10 is a diagram showing the relationship between the multistage buffer and the address monitoring unit used in Embodiment 4 of the present invention.
  • FIG. 11 is a block diagram showing a memory access device used in Embodiment 5 of the present invention.
  • FIG. 12 is a block diagram showing a memory access mechanism used in Embodiment 6 of the present invention.
  • Read unit that is a read control unit
  • Multistage buffer 26 Address monitoring unit as monitoring means
  • FIG. 1 is a block diagram showing a part of a device to which the memory access device according to the present invention is applied. All accesses to memory 3 from CPU1, which is a device, are performed via memory access device 2.
  • the CPU 1 and the memory access device 2 are connected by a CPU address bus la and a CPU data bus lb. Further, the CPU 1 sends a write signal lc that is a write command or a read signal Id that is a read command to the memory access device 2.
  • the memory access device 2 sends a write completion signal 2a or a read completion signal 2b to the CPU1.
  • the memory access device 2 and the memory 3 are connected by a memory address bus 2c and a memory data bus 2d. Further, the memory access device 2 sends a memory control signal 2 e to the memory 3.
  • the operation of the memory access device 2 will be described in two cases.
  • a first case an operation when data is written from the CPU 1 to the memory 3 in the initial state, that is, the state where the memory access device 2 does not perform the writing process and the reading process will be described.
  • the CPU 1 sends a write signal lc, which is the first write command, to the memory access device 2, and also sends the write address, which is the first write address, and the write data, which is the first write data.
  • the CPU 1 performs control so that the write signal lc and the read signal Id are not sent simultaneously.
  • FIG. 2 is a block diagram showing the memory access device 2.
  • the CPU address bus la and the CPU data bus lb are a read unit 212 that is a read control unit of the bus control unit 21 and a single buffer 22 that is an accumulation unit. Connected to both sides.
  • the single buffer 22 and the write unit 211 which is a write control unit of the bus control unit 21 are connected by a buffer address bus 22a and a noffer data bus 22b.
  • the read unit 212 and the interface unit 23 are connected by a read address bus 21a and a read data node 21b, and the write unit 211 and the interface unit 23 are connected by a write address bus 21c and a write data bus 21d.
  • the write signal lc sent from the CPU 1 is passed to the write unit 211 of the bus control unit 21.
  • the write unit 211 determines whether or not the write address and write data are accumulated in the single buffer 22 based on the buffer status signal 22c.
  • the single buffer 22 can hold one write address and one write data, and is composed of, for example, a one-stage fifo (FIFO: First-in First-out).
  • FIFO First-in First-out
  • the phifo outputs a full flag as a signal indicating the amount of data stored, and if the amount of storage is full, the full flag is H logic. Otherwise, it is L logic. Therefore, if the full flag is used as the buffer status signal 22c, it is possible to judge the accumulation status of the phi without requiring a specific request from the writer 211 to the phi.
  • the write address and the write data are accumulated. If the full flag is H logic, the write address and the write data are accumulated. It can be judged. In the initial state, the write process is not yet performed, so the write address and write data are not accumulated, and the full flag is L logic. Then, the writing unit 211 determines that the previous writing process is completed! / !, and sends an accumulation command for accumulating the write address and write data sent from the CPU 1 to the single buffer 22 by the buffer control signal 21e. Based on this accumulation instruction, the single buffer 22 writes the write address and write sent from CPU1. Accumulate data. When the single buffer is phifo, the full flag changes to H logic when the write address and write data are accumulated.
  • the write unit 211 When the write unit 211 accumulates the write address and write data in the single buffer 22, the write unit 211 sends the write completion signal 2a to the CPU 1 without waiting for the completion of the write process to the memory 3. When the CPU 1 receives the write completion signal 2a, it determines that the writing to the memory 3 has been completed, and can proceed to the next process.
  • the writing unit 211 sends a generation signal 21f of the writing control signal 24a to the control signal generating unit 24.
  • the control signal generation unit 24 When receiving the generation signal 21f of the write control signal 24a, the control signal generation unit 24 generates a write control signal 24a necessary for the write processing to the memory 3, such as chip select and write enable, and sends it to the interface unit 23. Since the write control signal 24a differs depending on the type of memory to be accessed, the control signal creation unit 24 creates a predetermined signal corresponding to the target memory.
  • the writing unit 211 sends a command for outputting a write address and write data to the single buffer 22 by a buffer control signal 21e. Based on this output command, the single buffer 22 passes the write address and write data to the writing unit 211 via the buffer address bus 22a and the buffer data bus 22b, respectively. When receiving the address and data, the writing unit 211 sends the write address and write data to the interface unit 23 via the write address bus 21c and the write data bus 21d. At the same time, the generation signal 21 f of the write control signal 24 a is also sent to the interface unit 23.
  • the interface unit 23 When receiving the generation signal 21f of the write control signal 24a, the interface unit 23 connects the write address bus 21c and the write data bus 21d to the memory address bus 2c and the memory data bus 2d, respectively. In other words, the read address bus 21a and the read data bus 21b are not connected to the memory address bus 2c and the memory data bus 2d. Further, the write control signal 24a is connected to the memory control signal 2e.
  • the interface unit 23 sends the write address and write data sent from the write unit 211 to the memory 3 via the memory address bus 2c and the memory data bus 2d, and as a memory control signal 2e. Send write control signal 24a to memory 3. Based on the memory control signal 2e, the memory 3 stores the write data at the given write address and Data writing is complete.
  • the writing process is performed as soon as data is accumulated in the single buffer 22, that is, in real time.
  • the single buffer 22 is phifo, the full flag is changed to L logic by accumulating and outputting the write address and write data, and the initial state is restored.
  • the timing relationship between the memory control signal 2e for the memory 3, the write address, and the write data differs depending on the type of memory generally used. Therefore, the relationship between the output timing of the write address and write data from the force writing unit 211 and the output timing of the memory control signal 2e.
  • the writing unit 211 has a predetermined relationship suitable for each memory. The write address and write data output timing that are output by will be adjusted.
  • FIG. 3 is a flowchart showing the operation of the memory access device 2 in the first case described above.
  • the full flag is L logic
  • the write signal lc is input to the write unit 211 in step S31.
  • the writing unit 211 determines in step S32 that the full flag is L logic.
  • the full flag changes to H logic.
  • the write completion signal 2a is output.
  • step S35 the address and data are output from the single buffer 22.
  • step S36 the timing is adjusted, and these are output from the memory access device 2.
  • step S37 the write control signal 24a is generated in step S37, and is output from the memory access device 2 as the memory control signal 2e in step S38.
  • the interface unit 23 selects the write address bus 21c and the write data bus 21d in step S39.
  • write processing to memory 3 is executed in step S3a.
  • the CPU 1 sends a read signal Id, which is a first read command, to the memory access device 2, and sends the read address, which is the first read address, to the memory access device 2 via the CPU address bus la. Send to.
  • CPU1 does not send write signal lc and read signal Id at the same time.
  • the read signal Id sent from the CPU 1 is passed to the read unit 212 of the bus control unit 21 in FIG.
  • the read unit 212 determines whether or not the write address and the write data are stored in the single buffer 22 based on the notch state signal 22c. That is, if the write address and write data are accumulated in the single buffer 22, it is determined that the previous write process is completed! /. As described above, when a one-stage fifo is applied to the single buffer 22, an empty flag can be used as the buffer status signal 22c in the reading process. The empty flag is output as a signal representing the amount of data stored in the phifo, and if the amount is empty (Empty), the empty flag is at the logic level H, otherwise it is at level L.
  • the empty flag is used as the buffer status signal 22c, it is possible to determine the accumulation status of the phi without requiring the read unit 212 to request the phi.
  • the empty flag and full flag are complementary signals.
  • the empty flag is L logic
  • the write address and write data are accumulated.
  • the empty flag is H logic
  • the reading unit 212 determines that the previous writing process has been completed, and receives the reading address sent from the CPU 1.
  • the reading unit 212 sends a generation signal 21 g of the read control signal 24 b to the control signal creation unit 24.
  • the control signal creation unit 24 creates a read control signal 24b necessary for the reading process from the memory 3, such as chip select and read enable, and sends it to the interface unit 23.
  • the read control signal 24b differs depending on the type of memory to be accessed and the like, so the control signal creation unit 24 creates a predetermined signal corresponding to the target memory.
  • the reading unit 212 receives a read address via the read address bus 21a.
  • the generation signal 21g of the read control signal 24b is also sent to the interface unit 23.
  • the interface unit 23 connects the read address node 21a and the read data bus 21b to the memory address bus 2c and the memory data bus 2d, respectively.
  • the write address bus 21c and the write data bus 21d are not connected to the memory address bus 2c and the memory data bus 2d.
  • the read control signal 24b is connected to the memory control signal 2e.
  • the interface unit 23 sends the read address sent from the read unit 212 to the memory 3 via the memory address bus 2c, and sends the read control signal 24b to the memory 3 as the memory control signal 2e. Based on the memory control signal 2e, the memory 3 stores the read data as the first read data stored in the given read address to the memory data bus 2d. The output read data is sent to the interface unit 23 and further passed to the reading unit 212 via the read data bus 21b.
  • the read unit 212 passes the read data to the CPU 1 via the CPU data bus lb, and outputs a read completion signal 2b to the CPU 1. By receiving the read completion signal 2b, the CPU 1 determines that reading of the read data has been completed, and can proceed to the next process.
  • the reading process is performed as soon as the read signal Id is input, that is, in real time.
  • the relationship between the timing of the memory control signal 2e and the read address for the memory 3 differs depending on the type of memory that is generally used. It is assumed that the output timing of the read address output by the read unit 212 is adjusted so that the output timing relationship is a predetermined relationship suitable for each memory.
  • the read completion signal 2b is not output to the CPU 1 until the read process is completed, so the CPU does not shift to the next process before the read process is completed.
  • FIG. 4 is a flowchart showing the operation of the memory access device 2 in the second case of the first embodiment described above.
  • the empty flag is H logic
  • the read signal Id is input to the read unit 212 in step S41.
  • the reading unit 212 determines in step S42 that the empty flag is H logic.
  • the read address is received, and in step S44, the timing is adjusted, Output from access device 2.
  • the read control signal 24b is generated in step S45, and is output from the memory access device 2 as the memory control signal 2e in step S46.
  • the interface unit 23 selects the read address bus 21a and the read data bus 21b in step S47.
  • the read data is received in step S48.
  • the received read data is output to CPU 1 in step S49, and a read completion signal 2b is output.
  • the memory access device 2 outputs the write completion signal 2a to the CPU 1 before the write processing to the memory 3 is completed, so the CPU 1 can proceed to the next process. . Therefore, unlike the write-through method, write processing can be performed at high speed and high-speed access can be realized. In addition, since the write process is performed in real time, control is simple and the circuit scale can be reduced compared to the write-back method. In addition, since the cache is not used in the first embodiment, the above-described high speed access can be realized for all areas of the memory 3. Even in a memory that does not have a high-speed mode, the above-described high-speed access can be realized even when the addresses to be accessed are not continuous.
  • the CPU 1 accesses the memory access device 2.
  • the access source does not necessarily need to be a CPU.
  • a DMAC Direct Memory Access Controller
  • the memory access device 2 is independent from the CPU, it can be applied to all bus masters that access the memory 3 via the memory access device 2.
  • fifo is applied as the single buffer 22.
  • this is not necessarily fifo.
  • any element that can hold one address and data may be a RAM or a flip-flop.
  • the single buffer 22 when the single buffer 22 is phifo in the reading process from the memory 3, it is necessary to control based on the empty flag. This is not necessarily the empty flag. As described above, since the empty flag and the full flag have a complementary relationship in the single buffer 22, control is performed based on the full flag. It is also good. On the other hand, it goes without saying that the write processing to the memory 3 can be controlled even if it is based on the empty flag with the same logic as that used to control based on the full flag.
  • the case where the write instruction or the read instruction is performed in the initial state, that is, the memory access device 2 performs the write process and the read process to the memory 3 and is in the normal state has been described.
  • the CPU 1 performs a write command or a read command on the memory access device 2 while the memory access device 2 is executing a write process to the memory 3.
  • the CPU 1 sends a write command to memory 3 to memory access device 2 and receives a write completion signal 2a from memory access device 2, then the next process accesses the same memory 3 again.
  • FIG. 1 and FIG. 2 are used as in the first embodiment. The operation will also be described in two cases as in the first embodiment.
  • the memory access device 2 when the memory access device 2 is not in the initial state, that is, in the state where the memory access device 2 is executing the first write processing to the memory 3, a write command is superimposed on the memory access device 2 from the CPU1.
  • the CPU 1 sends a write signal lc, which is the second write command, to the memory access device 2, and uses the new write address, which is the second write address, and the second write data. Some new write data is output to the memory access device 2.
  • the write signal lc is transferred to the write unit 211 of the bus control unit 21, and the write unit 211 determines whether or not the write address and write data are accumulated in the single buffer 22 based on the buffer status signal 22c.
  • the single buffer 22 stores the previous write address and the first write data which are the first write addresses. Previous write data is still accumulated. Thus, for example, when the phifo is applied as the single buffer 22, the funnel flag remains H logic. Therefore, the writing unit 211 determines that the write address and the write data are stored in the single buffer 22, and the first write to the memory 3 being executed is performed. Continue the process. On the other hand, the writing unit 211 does not issue a command for storing a new write address and new write data sent from the CPU 1 to the single buffer 22, and does not send a write completion signal 2a to the CPU 1.
  • CPU 1 since CPU 1 does not receive the write completion signal 2a, it cannot be determined that writing to the memory 3 has been completed. That is, the CPU 1 cannot proceed to the next process, and continues to output a new write address and new write data to the memory access device 2 as it is.
  • the writing unit 211 determines that the previous writing process has been completed, and sends a new write address and a command for storing new write data sent from the CPU 1 to the cinder buffer 22. Based on this accumulation command, the single buffer 22 accumulates a new write address and new write data. When the single buffer is phifo, the write address and write data are accumulated, so the full flag changes to logic H again.
  • the writing unit 211 sends the write completion signal 2a to the CPU 1 without waiting for the completion of the second writing process to the memory 3, and the CPU 1 determines that the writing to the memory 3 is completed. Can be migrated. Note that the data write process to the new write address is the same as in the first embodiment, and the description of the subsequent process is omitted.
  • FIG. 5 is a flowchart showing the operation of the memory access device 2 in the first case of the second embodiment described above. Note that the same flow as in FIG. 3 is denoted by the same reference numeral, description thereof is omitted, and steps S51 to S53, which are different flows, will be described.
  • step S51 the write signal lc is input to the writing unit 211. However, since it is not in the initial state, the full flag is not necessarily L logic.
  • the writing unit 211 determines the logic of the full flag in step S52. If it is full flag force logic, the force is the same as in Embodiment 1. If it is H logic, the discrimination process is repeated until full flag force logic is reached.
  • step S33 the previous write processing continues the flow after step S33, and the write processing is executed in step S3a.
  • step S3a After executing the write process in step S3a, it is determined in step S52 whether or not there is a next process, and if there is a next process, the process returns to step S52.
  • the full flag is L logic in step S35, the write processing after step S33 is executed subsequent to the previous write processing for the write command that has been repeatedly subjected to the discrimination processing in step S52. .
  • the CPU 1 reads the data to the memory access device 2.
  • the CPU 1 sends a read signal Id as a second read command to the memory access device 2 and outputs a read address as a second read address to the memory access device 2.
  • the read signal Id is passed to the read unit 212 of the bus control unit 21, and the read unit 212 determines whether or not the write address and write data are accumulated in the single buffer 22 based on the buffer status signal 22c.
  • the single buffer 22 contains the previous write address and the first write data which are the first write address. Previous write data is still accumulated. Thus, for example, when phifo is applied as the single buffer 22, the empty flag remains L logic. Therefore, the reading unit 212 determines that the write address and the write data are accumulated in the single buffer 22, and continues the first write process to the memory 3 being executed. On the other hand, the reading unit 212 does not receive the second read address output by the CPU 1 and does not send the read completion signal 2b to the CPU 1. In this case, CPU 1 does not receive the read completion signal 2b, and therefore cannot determine that the read processing from the memory 3 has been completed. That is, CPU 1 cannot move on to the next process and continues to output the read address to memory access device 2 as it is.
  • FIG. 6 is a flowchart showing the operation of the memory access device 2 in the second case of the second embodiment described above. Note that the same flow as in FIG. 4 is denoted by the same reference numeral, description thereof is omitted, and steps S61 to S64, which are different flows, will be described.
  • step S61 the read signal Id is input to the read unit 212. However, since it is not in the initial state, the empty flag is not always H logic.
  • the reading unit 212 determines the logic of the empty flag in step S62. If the empty flag is H logic, if it is force L logic, which is the same operation as in the first embodiment, it is determined in step S63 whether all writing processes are completed.
  • step S63 Since the write address and write data are accumulated in the single buffer 22 while the write process continues, the empty flag remains at the L logic, and the determination process in step S63 is repeated. When all the writing processes are completed, the empty flag becomes H logic in step S64, and the process returns to step S62. At this time, since the empty flag is H logic, the read processing after step S43 is executed for the read instruction.
  • the second write instruction to the memory 3 is generated again.
  • the memory access device 2 starts the second write process after the completion of the first write process being executed and sends a write completion signal 2a to the CPU 1.
  • the second write instruction from CPU 1 is always executed after memory access device 2 completes the first write process, so that the write process is not lost.
  • the memory access device 2 performs the second write after the completion of the first write processing being executed.
  • the reading process is started.
  • the second read process by the CPU 1 is always performed after the memory access device 2 completes the first write process. Therefore, the consistency of data on the memory 3 can be achieved without complicated control. Can be maintained.
  • the case has been described in which the memory access device 2 executes a write process to the memory 3 and there is a write command or a read command from the CPU 1 repeatedly.
  • the read completion signal 2b is not output to CPU1 unless CPU1 reads the data from memory3. Is never done.
  • the memory access device 2 executes the first write process to the memory 3 and the CPU 1 performs a write command or a read command repeatedly, the memory access device 2 executes the first write operation. After completing the writing process, a new writing process or reading process is started. In other words, when a new write command is issued, the CPU 1 responds to the new write command until the first write process is completed and a new write address and new write data are passed to the writing unit 211. Do not receive the write completion signal 2a. Therefore, useless waiting time occurs before CPU1 moves to the next process.
  • the memory access device 2 that reduces the unnecessary waiting time will be described.
  • the buffer in the memory access device 2 is a multistage buffer 25 having a finite length.
  • FIG. 7 is a block diagram of the memory access device 2 according to the third embodiment. The difference is that the single buffer 22 in FIG. 2 is replaced with a multi-stage buffer 25 in FIG. Further, FIG. 1 is also used as a block diagram showing a part of the device to which the memory access device 2 is applied. Next, the operation of the memory access device 2 will be described. Since the operation in the initial state is the same as that in the first embodiment, the description thereof is omitted, and the operation in the case of not being in the initial state is divided into two cases as in the second embodiment.
  • the write-in unit 211 determines whether or not the write address and write data stored in the multistage buffer 25 are full based on the notch state signal 25c.
  • the multistage buffer 25 can store N write addresses and write data, each of which is a storage capacity, and is composed of, for example, N stages (N: an integer of 2 or more).
  • N an integer of 2 or more.
  • the full flag can be used as the buffer status signal 25c as in the second embodiment. In other words, if the full flag power is logic, the address and data accumulation amount is less than N and not full! /, But if the full flag is H logic, the address and data accumulation amount is reached and full. It can be judged.
  • Embodiment 1 or 2 when the write address and write data are accumulated one by one, the full flag changes to H logic, but in Embodiment 3, the full flag force logic is accumulated until N write addresses and write data are accumulated. It is different in that it keeps.
  • the memory access device 2 is executing the previous write processing to the memory 3, and the previous write address and write data are still accumulated in the multistage nother 25. Then, for example, when N-stage phifo is applied as the multi-stage buffer 25, the full flag is L logic if the write address and write data accumulation amount is less than N, but the write address and write data accumulation amount is N. If it reaches, the full flag is H logic. In the third embodiment, if the full flag power logic is used, it is determined that a new write address and write data can be stored in the multistage buffer 25. However, if the full flag is H logic, it is determined that a new write address and write data cannot be stored in the multistage buffer 25.
  • the writing unit 211 performs an accumulation command for accumulating new write addresses and write data in the multistage buffer 25. If the accumulation amount of the multi-stage notifier 25 reaches N by this accumulation, the full flag remains at L logic if the full flag remains less than N forces that change to H logic. Then, the writing unit 211 sends the write completion signal 2a to the CPU 1 without waiting for the completion of the writing process to the memory 3 with the new write address and write data, and the CPU 1 determines that the writing to the memory 3 is completed. Therefore, it can move to the next process.
  • the writing unit 211 continues the writing process being executed. Although it continues, the new write address and write data are not stored in the multistage buffer 25, and the write completion signal 2a is not sent to the CPU1. Since CPU1 does not receive the write completion signal 2a, it cannot be determined that the write processing to the memory 3 has been completed. That is, the CPU 1 cannot proceed to the next process, and continues to output a new write address and write data to the memory access device 2 as it is.
  • the memory access device 2 completes one write process to the memory 3 becomes N ⁇ 1. In other words, since the accumulated amount of the multistage buffer 25 is not full, the full flag changes to L logic.
  • the writing unit 211 determines that the write address and write data can be stored, and issues a storage command for storing a new write address and write data in the multistage buffer 25. Then, the accumulated amount in the multistage buffer 25 reaches N again and becomes full, so the full flag changes to H logic. As described above, the writing unit 211 sends the write completion signal 2a to the CPU 1 without waiting for the completion of the writing process to the memory 3, and the CPU 1 determines that the writing to the memory 3 is completed, and thus proceeds to the next process. be able to.
  • the memory access device 2 executes a write process to the memory 3 in the order received from the CPU 1 with respect to the write address and the write data stored in the multistage buffer 25. It continues until the amount of storage reaches zero, that is, until all writing processes are completed. Note that the writing process to the memory 3 is the same as that in the second embodiment, and thus the description thereof is omitted.
  • FIG. 8 is a flowchart showing the operation of the memory access device 2 in the first case of the third embodiment described above. Note that the same flow as in FIG. 3 and FIG. 5 is denoted by the same reference numeral, description thereof is omitted, and step S81 and step S86, which are different flows, will be described.
  • step S81 and step S86 which are different flows, will be described.
  • step S82 when the write signal lc is input in step S51, if the full flag logic is determined in step S52, the write address and write data are accumulated in the multistage buffer 25 in step S81 if the full flag logic is obtained. The Next, it is determined in step S82 whether or not the multi-stage buffer 25 has become full due to this accumulation.
  • step S83 If it is full, write processing is performed after the full flag changes to H logic in step S83, but if it is not full, write processing is performed with full flag power logic. Return to step S52.
  • the reason for returning to step S52 is to allow the write address and write data to be accumulated when there is a write command from CPU1 in the next processing. In FIG. 5, this flow does not exist. However, in the second embodiment, the full flag of the single buffer 22 always changes to H logic, which is unnecessary power.
  • step S84 since the write address and the write data are output from the multistage buffer 25 in step S84, the multistage buffer 25 is not full. Therefore, the logic of the full flag is judged in step S85, and if it is H logic, it is changed to L logic in step S86 and processing is continued.
  • the read unit 212 determines whether or not the write address and write data are accumulated in the multistage buffer 25. Judgment is made based on the noffer state signal 25c. As described above, if the multi-stage buffer 25 is an N-stage fifo, an empty flag can be used as the buffer status signal 25c in the case of a read process. In other words, if the empty flag force logic is set, one or more write addresses and write data are stored. If the empty flag is H, it can be determined that no write address and write data are stored.
  • the memory access device 2 is executing the previous write processing to the memory 3, and the previous write address and write data are still accumulated in the multistage notch 25. Then, for example, when N-stage phifo is applied as the multistage buffer 25, the empty flag is always L logic. Then, the write unit 211 of the bus control unit 211 continues the write process to the memory 3, but the read unit 212 does not receive the read address from the CPU1 and does not send the read completion signal 2b to the CPU1. In this case, since CPU 1 does not receive the read completion signal 2b, it cannot be determined that the reading process from the memory 3 has been completed. In other words, CPU1 cannot move on to the next process, and reads the read address as it is. Continue to output to Reaccess Device 2.
  • the reading unit 212 determines that the reading process is possible, and receives a reading address from the CPU 1. Since the operation after the memory access device 2 receives the read address is the same as that of the second embodiment, the description thereof is omitted. In addition, the flow representing the operation of the memory access device 2 in the second case in the third embodiment is the same as that in the second embodiment in that the read process is performed only when the empty flag becomes H logic. The flow chart is omitted.
  • the CPU 1 since the buffer in the memory access device 2 is the multi-stage buffer 25, the CPU 1 is in the middle of executing the write process to the memory 3 by the memory access device 2. Even when multiple write commands are issued, the write address and write data can be passed to the memory access device 2 without waiting until the previous write processing is completed, so CPU 1 falls into a standby state. Effective waiting time can be reduced.
  • the continuity of the write addresses accumulated in the multistage buffer 25 is not considered, and the write process is always performed one by one in the order received from the CPU 1, but the process is not necessarily performed one by one. There is no need to do.
  • the memory access device 2 when the write address power stored in the multistage buffer 25 is continuous with the address accessed in the immediately preceding write process, the memory access device 2 performs page access to the memory 3 and performs burst access. The writing process is performed using a high-speed access mode such as In the fourth embodiment, description will be made assuming that the memory 3 is a memory that can support the high-speed access mode.
  • FIG. 9 is a block diagram of the memory access device 2 according to the fourth embodiment.
  • an address monitoring unit 26 which is a monitoring unit for monitoring the write address accumulated in the multistage buffer 25 is provided.
  • Figure 1 is also used as a block diagram showing the parts.
  • the operation of the memory access device 2 will be described. If there is a write command or a read command in the initial state, the operation is the same as that of the first embodiment, and the description is omitted. Next, a description will be given of a case where a write command is repeatedly issued from the CPU 1 to the memory access device 2 when the memory access device 2 is executing a write process to the memory 3 when it is not in the initial state.
  • the CPU 1 sends a write signal lc to the memory access device 2 and outputs a new write address and write data to the memory access device 2.
  • the write signal lc is passed to the write unit 212 of the bus control unit 21, and the write unit 212 determines whether or not the write address and write data stored in the multistage buffer 25 are full based on the notifier state signal 25c. To do.
  • the write unit 212 stores a new write address and write data in the multistage buffer 25.
  • the bus control unit 21 continues the write process to the memory 3 being executed. When the process is completed, a new write address and write data are accumulated in the multistage buffer 25.
  • the address monitoring unit 26 monitors a plurality of write addresses accumulated in the multistage buffer 25.
  • An example of the relationship between the write address stored in the multistage buffer 25 and the address monitoring unit 26 is shown in FIG.
  • N write addresses are stored in N storage elements 101 to 10N, and another N storage elements 111! And 11N have N write data corresponding to the N write addresses. Accumulated. Note that two memory elements 101 and 102 have consecutive write addresses.
  • the address monitoring unit 26 monitors the write addresses stored in the storage elements 101 to 10N, and determines that the write addresses of the storage elements 101 and 102 are continuous.
  • the mode instruction signal 26a is output to the writing unit 211.
  • the writing unit 211 When the writing unit 211 receives the mode instruction signal 26 a from the address monitoring unit 26, the writing unit 211 outputs a mode switching instruction signal 21 h to the control signal creating unit 24.
  • the control signal generator 24 receives the mode switching instruction signal 21h, it performs normal writing such as chip select and read enable.
  • a signal necessary for the high-speed access mode of the memory 3 is created as the write control signal 24a and sent to the interface unit 23.
  • the writing unit 211 outputs two consecutive write addresses and two corresponding write data at a timing that matches the write control in the high-speed access mode. Based on the write control signal 24a sent as the memory control signal 2e, the memory 3 stores the respective write data at the given two write addresses in the high-speed access mode.
  • the address monitoring unit 26 monitors the write address accumulated in the multistage buffer 25, and when performing the address continuous write processing, the write unit 211 Mode instruction signal 26a is output to the memory 3 and the write processing is performed using the high-speed access mode of memory 3.
  • the high-speed access mode By using the high-speed access mode, the time required for the memory access device 2 to write to the memory 3 can be reduced, so the time that the CPU 1 waits for the memory access device 2 to complete the write processing is reduced overall. It can be done.
  • the force S that the address monitoring unit 26 determines only the continuity of the write address in the storage elements 101 and 102 is determined when there are a plurality of continuous portions. Even as a thing. For example, if the memory elements 10K and 10K + 1 in FIG. 10 have consecutive write addresses, the high-speed access mode may be used also in the write processing for these write addresses.
  • the continuous number of write addresses for the address monitoring unit 26 to determine application of the high-speed access mode is set to two. However, this is not necessarily limited to two. . For example, if three write addresses of storage elements 101 to 103 are consecutive, the high-speed access mode may be applied. Generally, when any M write addresses (M: integer of 2 or more) are consecutive. You may apply fast access mode. As M increases, the time required for write processing can be shortened compared to the case of processing one address at a time, so the effect of using the high-speed access mode is greater.
  • M integer of 2 or more
  • the address monitoring unit 26 uses force based on the continuity of the write address in order to determine the application of the high-speed access mode. I don't need it.
  • the high-speed access mode may be applied to the write address that has been continuous until then.
  • the continuity is interrupted in the storage element 101 when the write addresses to the storage elements 10K to 102 are continuous
  • the high-speed access mode is used for the write addresses in the storage elements 10K to 102. Good.
  • FIG. 11 is a block diagram of the memory access device 2 according to the fifth embodiment.
  • FIG. 1 is also used as a block diagram showing a part of the device to which the memory access device 2 is applied.
  • the operation of the memory access device 2 will be described. Since the operation in the initial state and the operation in the first case other than the initial state are the same as those in Embodiment 3, the description thereof is omitted.
  • the read instruction is repeatedly issued from the CPU 1 to the memory access device 2. If so, explain.
  • the reading unit 212 determines whether or not the multistage buffer 25 has at least one write address and write data stored based on the noffer state signal 25c. Since the memory access device 2 is executing the previous write processing to the memory 3 and the previous write address and write data are still stored in the multistage buffer 25, the empty flag is always L logic.
  • the read unit 212 in the fifth embodiment receives a read address output from the CPU 1 and sends an address scanning command to the multistage buffer 25 by the second buffer control signal 21 i.
  • the multistage buffer 25 sequentially reads the stored write address to the reading unit 212 by the buffer status signal 25c.
  • the read unit 212 compares the write address stored in the multistage buffer 25 with the read address received from the CPU 1. As a result of comparison, if the write address matching the read address does not exist in the multistage buffer 25, the read unit 212 does not perform the read process until all the write processes are completed, as in the third embodiment. ! /
  • the read unit 212 receives the write data corresponding to the corresponding write address by the second buffer control signal 21i.
  • a data output command is output.
  • the multistage buffer 25 outputs the corresponding write data to the CPU data bus lb as read data.
  • the reading unit 212 outputs a read completion signal 2b to the CPU1.
  • the CPU 1 receives the read data output from the multistage buffer 25 and receives the read completion signal 2b, the CPU 1 can determine that the read processing is completed and can proceed to the next processing.
  • the output from the multistage buffer 25 to the CPU data bus lb is a data flow in the opposite direction to the operation to the writing unit 211, and is performed independently of the writing process.
  • Embodiment 6 the access source devices other than CPU1 are different. A case in which there is a bus master will be described. In this case, the memory 3 can be accessed in common by the CPU 1 and the other bus master power. At the same time, an instruction to access memory 3 may occur. However, if multiple accesses are made to memory 3 at the same time, it is difficult to ensure normal memory access due to address conflicts. In the sixth embodiment, it is assumed that each access source accesses the memory access device 2 via an arbiter.
  • FIG. 12 is a block diagram showing a memory access mechanism to which the memory access device 2 in the sixth embodiment is applied, and corresponds to FIG. 1 in the first to fifth embodiments.
  • bus master 4 that generates access instructions to memory 3.
  • the bus master 4 is connected to the arbiter 5 through the bus master address bus 4a and the bus master data bus 4b, and sends the write signal 4c and the read signal 4d to the arbiter 5.
  • the arbiter 5 is connected to the memory access device 2 via the arbiter address bus 5a and the arbiter data bus 5b.
  • the arbiter 5 sends the write signal 5c or the read signal 5d to the memory access device 2, while sending the write completion signal 5e or the read completion signal 5f to the CPU 1, or the write completion signal 5g or the read completion signal 5h as the bus master. Send to 4.
  • arbiter 5 uses the access source bus that generated the access as arbitrator address bus 5a and arbiter data node 5b. Connecting. That is, for example, when only the CPU 1 has a power access, the write signal lc or the read signal Id is sent to the arbiter 5. Then, the arbiter 5 connects the CPU address bus la and the CPU data bus lb to the arbiter address bus 5a and the arbiter data bus 5b, respectively, and sends a write signal 5c or a read signal 5d to the memory access device 2. When the arbiter 5 receives the write completion signal 2a or the read completion signal 2b from the memory access device 2, it sends a write completion signal 5e or a read completion signal 5f to the CPU 1.
  • the arbiter 5 connects the bus master address bus 4a and the bus master data bus 4b to the arbiter address bus 5a and the arbiter data bus 5b, respectively, and sends the write signal 5c or the read signal 5d to the memory access device 2. .
  • the arbiter 5 receives the write completion signal 2 a or the read completion signal 2 b from the memory access device 2, it sends the write completion signal 5 g or the read completion signal 5 h to the bus master 4.
  • the arbitrator 5 By providing the arbitrator 5 in this way, when there is an access from either the CPU 1 or the bus master 4, the memory 3 is connected via the arbitrator 5 and the memory access device 2. Access can be ensured. Since the subsequent processing is the same as that in the third and fourth embodiments, the description thereof is omitted.
  • the arbiter 5 permits only access from the CPU 1 and connects to the memory access device 2 as described above.
  • access from bus master 4 is not permitted. That is, the write completion signal 5g or the read completion signal 5h is not sent to the bus master 4, and the bus master 4 waits for processing.
  • memory access device 2 When the access from CPU1 is completed, memory access device 2 outputs write completion signal 2a or read completion signal 2b. Arbitrator 5 determines that access from CPU1 is completed when it receives this. Then, write completion signal 5e or read completion signal 5f is sent to CPU1. Then, the CPU address bus la and CPU data bus lb are disconnected from the arbiter address bus 5a and arbiter data bus 5b, and access from the bus master 4 is continuously permitted. That is, access from the bus master 4 is permitted and connection with the memory access device 2 is performed as described above.
  • the arbiter 5 controls access from a plurality of access sources, so that only one access source to the memory access device 2 can always be provided. Therefore, even when the bus master 4 exists as an access source other than the CPU 1, there is no inconvenience such as multiple accesses to the memory 3 at the same time and address collision, and normal memory access can be ensured. There is an effect that can be done.
  • the arbiter 5 has the power described as being connected to the memory access device 2 with priority given to the access from the CPU 1 when simultaneous access from the CPU 1 and the bus master 4 occurs. is not.
  • the access from the bus master 4 may be prioritized and connected to the memory access device 2.
  • the present invention can be used in mobile phones, personal computers, other communication and control fields, and other devices that control using a device that writes to and reads from a memory, such as a CPU.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)

Abstract

 CPU等のメモリへアクセスを行うデバイスを使用する機器において、キャッシュを使用することなく、また高速アクセスモードを備えていないメモリに対しても高速なメモリアクセスを実現するメモリアクセス装置を提供する。この目的を達成するため、本発明に係るメモリアクセス装置は、書き込み部211がCPU1から第1の書き込み命令を受け取ると、シングルバッファ22から第1の書き込みアドレス及び第1の書き込みデータを受け取り、リアルタイムで書き込み処理を実施しつつ、書き込み処理が完了したか否かに関わらずCPU1に書き込み完了信号2aを送り、読み出し部212がCPU1から第1の読み出し命令を受け取ると、CPU1から第1の読み出しアドレスを受け取り、リアルタイムで読み出し処理を実施し、メモリ3から第1の読み出しデータを受け取って、これをCPU1へ送るとともに読み出し完了信号2bを送る。

Description

明 細 書
メモリアクセス装置 方法
技術分野
[0001] 本発明は、中央処理装置(CPU : Central Processing Unit、以下、 CPU)等の メモリへの書き込み及び読み出しを行うデバイスを搭載した携帯電話やパーソナルコ ンピュータ等の機器における、メモリへの書き込み処理及び読み出し処理を行うメモ リアクセス装置、メモリアクセス機構、携帯電話端末及びメモリアクセス方法に関する ものである。
背景技術
[0002] 携帯電話、パーソナルコンピュータ、その他通信、制御など多くの分野の機器にお いては、その内部に CPU等のようなメモリへの書き込み及び読み出しを行うデバイス が使用されている。例えば CPUの場合、演算処理に伴うデータの記憶素子として R AM (Random Access Memory)等のメモリが必須である力 演算処理の高度化 '複雑化に伴い、必要なメモリの容量は増大しつつある。ここで、一般にメモリは容量 が大き 、ものほどデータの読み書き(以下、アクセス)速度が遅!ヽと 、う欠点を有する 。従って機器の全体性能を向上するためには、大きなメモリ容量を保ちつつ、ァクセ スを高速ィ匕することが必要となる。
[0003] メモリのアクセスを高速ィ匕する従来手段として、次の 2つの方法が知られている。ま ず、通常のアクセス対象のメモリは大容量だが低速アクセスしかできないことから、こ れ以外に高速にアクセスできる小容量のメモリ(以下、内部メモリ)を併用する方法( 従来方法 1)がある。従来方法 1では、 CPUは内部メモリへ優先的にアクセスすること で高速ィ匕を図ることができる。例えば、内部メモリの一種であるキャッシュメモリ(以下 、キャッシュ)を使用し、キャッシュコントローラで動作を制御する方法がある。具体的 には CPU力もメモリに書き込む際にはデータを一時的にキャッシュに保存し、キヤッ シュコントローラがアクセス対象のメモリをキャッシュのデータで更新する。反対に CP Uがデータを読み込む際には優先的にキャッシュにアクセスすることで低速なメモリ へ直接アクセスしな 、で済むため、高速なメモリアクセスが可能となる。
[0004] 一方、メモリ自体に高速アクセスが可能な動作モードを備え、これを優先的に利用 する方法 (従来方法 2)も知られて 、る。従来方法の具体例としては特許文献 1に開 示されており、 RAM自体が元々具備して 、る高速ページモード等の高速アクセスモ ードを効率的に利用する。高速アクセスモードを利用するためにはアクセスするメモリ アドレスが連続している必要がある。特許文献 1では、 CPUがアクセスするアドレスを メモリアクセス装置のノ ッファに蓄積し、蓄積されたアドレスの連続性が損なわれた等 の所定の条件下で高速アクセスモードを使用することとしている。これにより、総合的 に高速なメモリアクセスが可能となる。
[0005] 特許文献 1 :特開平 9 106372号公報 (第 4頁、第 1図)
発明の開示
発明が解決しょうとする課題
[0006] 従来方法 1では、アクセス対象のメモリにキャッシュが対応しな 、領域がある場合、 当該領域に対する高速アクセスを行うことはできな 、。またキャッシュは CPU力ものァ クセスに対してのみ有効であるため、 CPU以外のデバイスからのアクセス時には使 用できない。またキャッシュ方式のうちライトバック方式では、キャッシュにのみデータ を書き込み、特定条件によってメモリにデータを書き込むため、キャッシュとメモリ間の データの整合性を確保するための制御が複雑となり、キャッシュコントローラの回路規 模が大きくなる。またライトスルー方式では、キャッシュとメモリ双方に対する書き込み 処理を完了しな 、と次処理に移行できな 、ため、書き込み処理を高速ィ匕できな 、と いう課題があった。
[0007] 一方、従来方法 2において高速アクセスモードを使用するためには、アクセスするァ ドレスが連続であることが必要である力 アドレスの連続性はプログラムに依存して異 なる。すなわち従来方法 2では常に高速アクセスモードを使用できるとは限らないた め、常に効果を期待できるわけではない。またメモリが高速アクセスモードを備えてい る必要があるため、高速アクセスモードを備えて ヽな 、メモリには適用できな 、と 、う 課題があった。
課題を解決するための手段 [0008] この発明に係るメモリアクセス装置は、デバイスから書き込みアドレス及び書き込み データを受け取りメモリへ書き込みデータを書き込み処理し、デバイス力 読み出し アドレスを受け取りメモリから読み出しデータを読み出し処理してデバイスに読み出し データを送るメモリアクセス装置にぉ 、て、デバイス力 受け取った書き込みアドレス 及び書き込みデータを蓄積する蓄積手段と、メモリへ書き込みデータを書き込み処 理するための第 1の制御信号とメモリからの読み出しデータを読み出し処理するため の第 2の制御信号を作成する制御信号作成手段と、デバイス力 第 1の書き込み命 令を受け取ると前記蓄積手段から第 1の書き込みアドレス及び第 1の書き込みデータ を受け取り、前記制御信号作成手段へ前記第 1の制御信号を作成する指示を与え、 リアルタイムで前記第 1の制御信号によりメモリへ前記第 1の書き込みデータを書き込 み処理するとともにデバイスへ書き込み完了信号を送る書き込み制御部と、デバイス 力 第 1の読み出し命令を受け取るとデバイス力 第 1の読み出しアドレスを受け取り 、前記制御信号作成手段へ前記第 2の制御信号を作成する指示を与え、前記第 2の 制御信号によりリアルタイムでメモリから第 1の読み出しデータを読み出し処理しデバ イスへ送るとともにデバイスへ読み出し完了信号を送る読み出し制御部とを備えたも のである。
[0009] また、この発明に係るメモリアクセス方法は、デバイス力 第 1の書き込み命令を受 け取った場合は、デバイス力 受け取った第 1の書き込みアドレス及び第 1の書き込 みデータを蓄積するステップと、メモリへ書き込みデータを書き込み処理するための 第 1の制御信号を作成するステップと、リアルタイムで前記第 1の制御信号によりメモ リへ前記第 1の書き込みデータを書き込み処理するとともにデバイスへ書き込み完了 信号を送るステップとを備え、デバイス力ゝら第 1の読み出し命令を受け取った場合は、 デバイス力も第 1の読み出しアドレスを受け取るステップと、メモリから読み出しデータ を読み出し処理するための第 2の制御信号を作成するステップと、前記第 2の制御信 号によりリアルタイムでメモリから第 1の読み出しデータを読み出し処理しデバイスへ 送るとともにデバイスへ読み出し完了信号を送るステップとを備えたものである。
[0010] また、この発明に係るメモリアクセス方法は、デバイス力 第 2の書き込み命令を受 け取った場合は、デバイス力 受け取った第 2の書き込みアドレス及び第 2の書き込 みデータを蓄積するステップと、第 1の書き込みデータの書き込み処理を完了した後 に、メモリへ書き込みデータを書き込み処理するための第 1の制御信号を作成するス テツプと、前記第 1の制御信号によりメモリへ前記第 2の書き込みデータを書き込み処 理するとともに当該書き込み処理が完了した力否かに関わらずデバイスへ書き込み 完了信号を送るステップとを備え、デバイス力も第 2の読み出し命令を受け取った場 合は、第 1の書き込みデータの書き込み処理を完了した後に、デバイス力も第 2の読 み出しアドレスを受け取るステップと、メモリから読み出しデータを読み出し処理する ための第 2の制御信号を作成するステップと、前記第 2の制御信号によりリアルタイム でメモリから第 2の読み出しデータを読み出し処理しデバイスへ送るとともにデバイス へ読み出し完了信号を送るステップとを備えたものである。
発明の効果
[0011] この発明によれば、いずれのメモリ領域へのアクセスであるかまたはどのようなメモリ であるかに関わらず、 CPU以外のデバイスからのアクセスであっても、プログラムに依 存したり回路規模を増大したりすることなぐデータの整合性を保ったまま高速ァクセ スが可能なメモリアクセス装置を実現できる。
[0012] また、この発明によれば、 、ずれのメモリ領域へのアクセスである力またはどのような メモリであるかに関わらず、 CPU以外のデバイスからのアクセスであっても、プロダラ ムに依存したり回路規模を増大したりすることなぐ高速アクセスが可能なメモリァクセ ス方法を実現できる。
[0013] また、この発明によれば、 、ずれのメモリ領域へのアクセスであるかに関わらず、 CP U以外のデバイスからのアクセスであっても、データの整合性を保ったまま高速ァク セスが可能なメモリアクセス方法を実現できる。
図面の簡単な説明
[0014] [図 1]この発明の実施の形態 1ないし 5に用いられるメモリアクセス装置を適用した機 器の一部を示すブロック図である。
[図 2]この発明の実施の形態 1及び 2に用いられるメモリアクセス装置を示すブロック 図である。
[図 3]この発明の実施の形態 1に用いられるメモリアクセス装置の書き込み処理に関 する動作を示すフローチャートである。
[図 4]この発明の実施の形態 1に用いられるメモリアクセス装置の読み出し処理に関 する動作を示すフローチャートである。
[図 5]この発明の実施の形態 2に用いられるメモリアクセス装置の書き込み処理に関 する動作を示すフローチャートである。
[図 6]この発明の実施の形態 2に用いられるメモリアクセス装置の読み出し処理に関 する動作を示すフローチャートである。
[図 7]この発明の実施の形態 3に用いられるメモリアクセス装置を示すブロック図であ る。
[図 8]この発明の実施の形態 3に用いられるメモリアクセス装置の書き込み処理に関 する動作を示すフローチャートである。
[図 9]この発明の実施の形態 4に用いられるメモリアクセス装置を示すブロック図であ る。
圆 10]この発明の実施の形態 4に用いられる多段バッファとアドレス監視部の関係を 示す図である。
[図 11]この発明の実施の形態 5に用いられるメモリアクセス装置を示すブロック図であ る。
[図 12]この発明の実施の形態 6に用いられるメモリアクセス機構を示すブロック図であ る。
符号の説明
1 デバイスである CPU
2 メモリアクセス装置
21 バス制御部
211 書き込み制御部である書き込み部
212 読み出し制御部である読み出し部
22 蓄積手段であるシングルバッファ
24 制御信号作成手段である制御信号作成部
25 多段バッファ 26 監視手段であるアドレス監視部
3 メモリ
4 デバイスであるバスマスタ
5 調停器
発明を実施するための最良の形態
[0016] 以下この発明を、その実施の形態を示す図面に基づいて具体的に説明する。なお 実施の形態 1では、この発明に係るメモリアクセス装置を携帯電話端末等の CPUを 搭載した機器へ適用した場合を例にとり説明する。
実施の形態 1.
図 1はこの発明に係るメモリアクセス装置を適用した機器の一部を示すブロック図で ある。デバイスである CPU1からメモリ 3に対するアクセスは、すべてメモリアクセス装 置 2を経由して行われる。 CPU1とメモリアクセス装置 2は、 CPUアドレスバス la及び CPUデータバス lbによって接続されている。また CPU1からは書き込み命令である 書き込み信号 lcまたは読み出し命令である読み出し信号 Idがメモリアクセス装置 2 に送られる。これに対してメモリアクセス装置 2からは書き込み完了信号 2aまたは読 み出し完了信号 2bが CPU1へ送られる。一方、メモリアクセス装置 2とメモリ 3は、メモ リアドレスバス 2c及びメモリデータバス 2dによって接続されて!、る。さらにメモリァクセ ス装置 2からはメモリ制御信号 2eがメモリ 3に送られる。
[0017] 次にメモリアクセス装置 2の動作を 2つの場合に分けて説明する。第 1の場合として 、初期状態すなわちメモリアクセス装置 2が書き込み処理も読み出し処理も行って ヽ ない状態で、 CPU1からメモリ 3にデータを書き込む場合の動作を説明する。この場 合、図 1において CPU1は第 1の書き込み命令である書き込み信号 lcをメモリァクセ ス装置 2に送るとともに、第 1の書き込みアドレスである書き込みアドレス及び第 1の書 き込みデータである書き込みデータを、それぞれ CPUアドレスバス la及び CPUデー タバス lbを介してメモリアクセス装置 2に出力する。このとき、 CPU1は書き込み信号 lcと読み出し信号 Idを同時に送ることがないように制御する。すなわちメモリアクセス 装置 2に対して、 CPU1から書き込みと読み出しの命令が同時に行われることはない [0018] 図 2はメモリアクセス装置 2を示すブロック図であり、 CPUアドレスバス la及び CPU データバス lbは、バス制御部 21の読み出し制御部である読み出し部 212と蓄積手 段であるシングルバッファ 22の双方と接続される。またシングルバッファ 22とバス制 御部 21の書き込み制御部である書き込み部 211は、バッファアドレスバス 22a及び ノ ッファデータバス 22bで接続される。さらに読み出し部 212とインタフェース部 23は 、読み出しアドレスバス 21a及び読み出しデータノ ス 21bで、また書き込み部 211とィ ンタフェース部 23は、書き込みアドレスバス 21c及び書き込みデータバス 21dで接続 される。なお制御信号作成手段である制御信号作成部 24は、バス制御部 21からの 信号に基づき第 1の制御信号である書き込み制御信号 24aまたは第 2の制御信号で ある読み出し制御信号 24bを作成する。
[0019] 図 2において、 CPU1から送られた書き込み信号 lcは、バス制御部 21の書き込み 部 211に渡される。書き込み部 211は書き込み信号 lcを受け取ると、シングルバッフ ァ 22に書き込みアドレス及び書き込みデータが蓄積されて 、るか否かを、バッファ状 態信号 22cに基づき判断する。シングルバッファ 22は書き込みアドレスと書き込みデ ータをそれぞれ 1個ずつ保持することができ、例えば 1段のファイフォ(FIFO: First— in First— out)で構成される。ファイフォはデータの蓄積量を表す信号としてフルフ ラグを出力し、蓄積量が一杯 (Full)であればフルフラグが H論理となる力 それ以外 では L論理となる。従ってバッファ状態信号 22cとしてフルフラグを用いれば、書き込 み部 211からファイフォへ特に要求をしなくても、ファイフォの蓄積状況を判断できる
[0020] すなわち 1段のファイフォの場合、フルフラグ力 論理であれば書き込みアドレス及 び書き込みデータが蓄積されて ヽな 、が、フルフラグが H論理であれば書き込みアド レス及び書き込みデータが蓄積されて ヽると判断できる。初期状態では未だ書き込 み処理は行われて 、な 、ため、書き込みアドレス及び書き込みデータは蓄積されて おらず、フルフラグは L論理である。すると書き込み部 211は以前の書き込み処理は 完了して!/ヽると判断し、 CPU 1から送られた書き込みアドレス及び書き込みデータを 蓄積する蓄積命令をバッファ制御信号 21eによりシングルバッファ 22へ送る。この蓄 積命令に基づき、シングルバッファ 22は CPU1から送られた書き込みアドレス及び書 き込みデータを蓄積する。シングルバッファがファイフォの場合、書き込みアドレスと 書き込みデータが蓄積されたことでフルフラグは H論理に変化する。
[0021] 書き込み部 211は、書き込みアドレス及び書き込みデータをシングルバッファ 22に 蓄積すると、メモリ 3への書き込み処理の完了を待たずに CPU1へ書き込み完了信 号 2aを送る。 CPU1は書き込み完了信号 2aを受け取ると、メモリ 3への書き込みが完 了したと判断するので、次処理に移行することができる。
[0022] 一方、書き込み部 211は制御信号作成部 24に対して、書き込み制御信号 24aの 生成信号 21fを送る。制御信号作成部 24は書き込み制御信号 24aの生成信号 21f を受け取ると、チップセレクトやライトイネーブル等、メモリ 3への書き込み処理に必要 な書き込み制御信号 24aを作成し、インタフェース部 23に送る。書き込み制御信号 2 4aは、アクセス対象のメモリの種類等により異なるため、制御信号作成部 24では対 象のメモリに応じた所定の信号が作成される。
[0023] さらに書き込み部 211は、書き込みアドレス及び書き込みデータを出力する命令を バッファ制御信号 21eによりシングルバッファ 22へ送る。この出力命令に基づき、シ ングルバッファ 22はバッファアドレスバス 22a及びバッファデータバス 22bを介して、 それぞれ書き込みアドレス及び書き込みデータを書き込み部 211に渡す。アドレス及 びデータを受取ると、書き込み部 211は書き込みアドレスバス 21c及び書き込みデー タバス 21dを介して、書き込みアドレス及び書き込みデータをインタフェース部 23に 送る。また同時に、書き込み制御信号 24aの生成信号 21fもインタフェース部 23に送 る。インタフェース部 23は書き込み制御信号 24aの生成信号 21fを受け取ると、書き 込みアドレスバス 21c及び書き込みデータバス 21dを、それぞれメモリアドレスバス 2c 及びメモリデータバス 2dと接続する。換言すれば読み出しアドレスバス 21a及び読み 出しデータバス 21bは、メモリアドレスバス 2c及びメモリデータバス 2dとは接続されな V、。さらに書き込み制御信号 24aをメモリ制御信号 2eへ接続する。
[0024] インタフェース部 23は、書き込み部 211から送られた書き込みアドレス及び書き込 みデータを、メモリアドレスバス 2c及びメモリデータバス 2dを介してメモリ 3へ送るとと もに、メモリ制御信号 2eとして書き込み制御信号 24aをメモリ 3へ送る。メモリ 3はメモリ 制御信号 2eに基づき、与えられた書き込みアドレスに書き込みデータを記憶し、デ ータの書き込みが完了する。
[0025] 以上のように、書き込み処理はシングルバッファ 22にデータが蓄積されるとすぐに、 すなわちリアルタイムに実施される。なお、シングルバッファ 22がファイフォの場合、 蓄積して 、た書き込みアドレス及び書き込みデータを出力することで、フルフラグは L 論理に変化し、初期状態に戻る。また、メモリ 3に対するメモリ制御信号 2eと書き込み アドレス及び書き込みデータとのタイミングの関係は、一般に使用するメモリの種類等 により異なる。そこで、あら力じめ書き込み部 211からの書き込みアドレス及び書き込 みデータの出力タイミングと、メモリ制御信号 2eの出力タイミングとの関係力 Sメモリ毎 に適した所定の関係となるよう、書き込み部 211が出力する書き込みアドレス及び書 き込みデータの出力タイミングを調整するものとする。
[0026] 図 3に、以上で説明した第 1の場合におけるメモリアクセス装置 2の動作を表すフロ 一チャートを示す。初期状態ではフルフラグは L論理であり、ステップ S31で書き込み 信号 lcが書き込み部 211へ入力される。次に書き込み部 211ではステップ S32でフ ルフラグが L論理であることを判別する。次にステップ S33で書き込みアドレス及び書 き込みデータをシングルバッファ 22に蓄積するとフルフラグは H論理に変化する。次 にステップ S34で書き込み完了信号 2aを出力する。次にステップ S35でシングルバ ッファ 22からアドレス及びデータを出力し、ステップ S36でタイミング調整のうえ、これ らをメモリアクセス装置 2から出力する。同時にステップ S37で書き込み制御信号 24a を作成し、ステップ S38でメモリ制御信号 2eとしてメモリアクセス装置 2から出力する。 このとき、インタフェース部 23はステップ S39で書き込みアドレスバス 21c及び書き込 みデータバス 21dを選択しておく。最後にメモリ 3への書き込み処理をステップ S3aで 実行する。
[0027] 次に、第 2の場合として、初期状態すなわちメモリアクセス装置 2が書き込み処理も 読み出し処理も行つて ヽな 、状態で、 CPU 1がメモリ 3からデータを読み出す場合の 動作を説明する。この場合、図 1において CPU1は第 1の読み出し命令である読み出 し信号 Idをメモリアクセス装置 2に送るとともに、 CPUアドレスバス laを介して第 1の 読み出しアドレスである読み出しアドレスをメモリアクセス装置 2に送る。データ書き込 み時と同様に、 CPU1は書き込み信号 lcと読み出し信号 Idを同時に送ることはない [0028] CPU1から送られた読み出し信号 Idは、図 2においてバス制御部 21の読み出し部 212に渡される。読み出し部 212は読み出し信号 Idを受け取ると、シングルバッファ 22に書き込みアドレス及び書き込みデータが蓄積されている力否かを、ノ ッファ状態 信号 22cに基づき判断する。すなわち、もしシングルバッファ 22に書き込みアドレス 及び書き込みデータが蓄積されて 、れば、以前の書き込み処理が完了して!/、な 、と 判断する。上述のようにシングルバッファ 22に 1段のファイフォを適用する場合、読み 出し処理におけるバッファ状態信号 22cとしてェンプティフラグを用いることができる。 ェンプティフラグはファイフォのデータの蓄積量を表す信号として出力され、蓄積量 が空 (Empty)であればェンプティフラグが H論理となる力 それ以外では L論理とな る。従ってバッファ状態信号 22cとしてェンプティフラグを用いれば、読み出し部 212 力もファイフォへ特に要求をしなくても、ファイフォの蓄積状況を判断できる。 1段のフ アイフォでは、空(Empty)か一杯(Full)の 2つの状態しかありえないため、ェンプテ ィフラグとフルフラグは相補的な信号となる。
[0029] すなわちェンプティフラグが L論理であれば書き込みアドレス及び書き込みデータ が蓄積されて 、るが、ェンプティフラグが H論理であれば書き込みアドレス及び書き 込みデータが蓄積されて 、な 、と判断できる。初期状態では上述のように書き込み アドレス及び書き込みデータは蓄積されておらず、ェンプティフラグは H論理となる。 すると読み出し部 212は以前の書き込み処理は完了していると判断し、 CPU1から 送られた読み出しアドレスを受け取る。
[0030] アドレスを受け取ると、読み出し部 212は制御信号作成部 24に対して、読み出し制 御信号 24bの生成信号 21gを送る。制御信号作成部 24は読み出し制御信号 24bの 生成信号 21gを受け取ると、チップセレクトやリードィネーブル等、メモリ 3からの読み 出し処理に必要な読み出し制御信号 24bを作成し、インタフェース部 23に送る。書き 込み処理時と同様に、読み出し制御信号 24bは、アクセス対象のメモリの種類等によ り異なるため、制御信号作成部 24では対象のメモリに応じた所定の信号が作成され る。
[0031] 一方、読み出し部 212は、読み出しアドレスバス 21aを介して、読み出しアドレスを インタフェース部 23に送り、同時に読み出し制御信号 24bの生成信号 21gもインタフ エース部 23に送る。インタフェース部 23は読み出し制御信号 24bの生成信号 21gを 受け取ると、読み出しアドレスノ ス 21a及び読み出しデータバス 21bを、それぞれメモ リアドレスバス 2c及びメモリデータバス 2dと接続する。換言すれば書き込みアドレス バス 21c及び書き込みデータバス 21dは、メモリアドレスバス 2c及びメモリデータバス 2dとは接続されない。さらに読み出し制御信号 24bをメモリ制御信号 2eへ接続する。
[0032] インタフェース部 23は、読み出し部 212から送られた読み出しアドレスを、メモリアド レスバス 2cを介してメモリ 3へ送るとともに、メモリ制御信号 2eとして読み出し制御信 号 24bをメモリ 3へ送る。メモリ 3はメモリ制御信号 2eに基づき、与えられた読み出しァ ドレスに記憶されて 、る第 1の読み出しデータである読み出しデータをメモリデータバ ス 2dに出力する。出力された読み出しデータはインタフェース部 23に送られ、さらに 読み出しデータバス 21bを介して読み出し部 212へ渡される。読み出し部 212は CP Uデータバス lbを介して読み出しデータを CPU1へ渡すとともに、読み出し完了信 号 2bを CPU1へ出力する。 CPU1は読み出し完了信号 2bを受け取ることで、読み出 しデータの読み出しが完了したと判断するので、次処理に移行することができる。
[0033] 以上のように、読み出し処理は読み出し信号 Idが入力されるとすぐに、すなわちリ アルタイムに実施される。なお書き込み処理時と同様、メモリ 3に対するメモリ制御信 号 2eと読み出しアドレスとのタイミングの関係は、一般に使用するメモリの種類等によ り異なるため、あら力じめ読み出しアドレスとメモリ制御信号 2eの出力タイミングの関 係がメモリ毎に適した所定の関係となるよう、読み出し部 212が出力する読み出しァ ドレスの出力タイミングを調整するものとする。一方、書き込み処理時と異なり読み出 し処理時は、読み出し処理が完了するまで読み出し完了信号 2bが CPU1へ出力さ れないので、読み出し処理の完了前に CPUが次処理に移行することはない。
[0034] 図 4に、以上で説明した実施の形態 1の第 2の場合におけるメモリアクセス装置 2の 動作を表すフローチャートを示す。初期状態ではェンプティフラグは H論理であり、ス テツプ S41で読み出し信号 Idが読み出し部 212へ入力される。次に読み出し部 212 ではステップ S42でェンプティフラグが H論理であることを判別する。次にステップ S4 3で読み出しアドレスを受け取り、ステップ S44でタイミング調整のうえ、これをメモリア クセス装置 2から出力する。同時にステップ S45で読み出し制御信号 24bを作成し、 ステップ S46でメモリ制御信号 2eとしてメモリアクセス装置 2から出力する。このとき、 インタフェース部 23はステップ S47で読み出しアドレスバス 21a及び読み出しデータ バス 21bを選択しておく。メモリ 3へ読み出しアドレスを送ると、ステップ S48で読み出 しデータを受け取る。受け取った読み出しデータはステップ S49で CPU1へ出力され ると共に、読み出し完了信号 2bが出力される。
[0035] 以上のように、実施の形態 1に係るメモリアクセス装置 2はメモリ 3への書き込み処理 が完了する前に書き込み完了信号 2aを CPU1に出力するので、 CPU1は次処理に 移ることができる。このためライトスルー方式と異なり書き込み処理を高速ィ匕でき、高 速アクセスを実現できる。また、書き込み処理をリアルタイムで実施するため制御が簡 単ですみ、ライトバック方式と比べて回路規模を小さくできる。また実施の形態 1では キャッシュを使用しな 、ため、メモリ 3の全ての領域に対して上述のような高速ァクセ スを実現できる。また高速モードを持たないメモリであっても、さらにアクセスするアド レスが連続でな 、場合であっても、上述のような高速アクセスを実現できる。
[0036] なお、上記実施の形態 1においてはメモリアクセス装置 2にアクセスするのは CPU1 であるとして説明したが、アクセス元は必ずしも CPUである必要はなぐノ スの制御 主体(以下、バスマスタ)となるデバイスであればよぐ例えば DMAC (Direct Mem ory Access Controller)などであってもよい。すなわち、メモリアクセス装置 2は C PUlから独立しているため、メモリアクセス装置 2を経由してメモリ 3にアクセスする全 てのバスマスタに対して適用できる。
[0037] なお、上記実施の形態 1ではシングルバッファ 22としてファイフォを適用するものと して説明をしたが、これは必ずしもファイフォでなくても良い。すなわち 1個のアドレス とデータを保持することができる素子であればよぐ RAM等やフリップフロップ等であ つてもよい。
[0038] なお、上記実施の形態 1ではメモリ 3からの読み出し処理においてシングルバッファ 22がファイフォの場合、ェンプティフラグに基づき制御をするものとした力 これは必 ずしもェンプティフラグでなくても良 、。上述のようにシングルバッファ 22ではェンプ ティフラグとフルフラグが相補的な関係となるため、フルフラグに基づき制御をするも のとしてもよい。なお反対に、メモリ 3への書き込み処理においてはフルフラグに基づ き制御をするものとした力 同様の論理でェンプティフラグに基づ ヽても制御できるこ とは言うまでもない。
[0039] 実施の形態 2.
実施の形態 1では、初期状態すなわちメモリアクセス装置 2がメモリ 3へ書き込み処 理も読み出し処理も行って 、な ヽ状態で、書き込み命令または読み出し命令がなさ れた場合について説明した。実施の形態 2では、メモリアクセス装置 2がメモリ 3への 書き込み処理を実行中に、 CPU1が重ねて書き込み命令または読み出し命令をメモ リアクセス装置 2に対して行った場合について説明する。例えば CPU1がメモリ 3への 書き込み命令をメモリアクセス装置 2へ送り、メモリアクセス装置 2から書き込み完了信 号 2aを受け取った後、次処理で再び同じメモリ 3へのアクセスが生じた場合力これに あたる。なお図面については実施の形態 1と同様に図 1及び図 2を使用する。また動 作も、実施の形態 1と同様に 2つの場合に分けて説明する。
[0040] 第 1の場合として、初期状態でないとき、すなわちメモリアクセス装置 2がメモリ 3へ 第 1の書き込み処理を実行している状態で、 CPU1からメモリアクセス装置 2に対して 書き込み命令が重ねてなされた場合について説明する。実施の形態 1と同様に、 CP U1は第 2の書き込み命令である書き込み信号 lcをメモリアクセス装置 2に送るととも に、第 2の書き込みアドレスである新たな書き込みアドレス及び第 2の書き込みデータ である新たな書き込みデータをメモリアクセス装置 2に出力する。書き込み信号 lcは バス制御部 21の書き込み部 211に渡され、書き込み部 211はシングルバッファ 22に 書き込みアドレス及び書き込みデータが蓄積されているか否かをバッファ状態信号 2 2cに基づき判断する。
[0041] ここでメモリアクセス装置 2はメモリ 3への第 1の書き込み処理を実行中であるため、 シングルバッファ 22には第 1の書き込みアドレスである以前の書き込みアドレス及び 第 1の書き込みデータである以前の書き込みデータがまだ蓄積されたままである。す ると例えばシングルバッファ 22としてファイフォを適用した場合、そのフノレフラグは H 論理のままである。従って書き込み部 211は、書き込みアドレス及び書き込みデータ がシングルバッファ 22に蓄積されていると判断し、実行中であるメモリ 3への第 1の書 き込み処理を «続する。一方、書き込み部 211はシングルバッファ 22に対して CPU 1から送られた新たな書き込みアドレス及び新たな書き込みデータを蓄積する命令を 行わず、また CPU1へ書き込み完了信号 2aを送らない。この場合、 CPU1は書き込 み完了信号 2aを受け取らないためメモリ 3への書き込みが完了したと判断できない。 すなわち CPU 1は次処理へ移行することができず、そのまま新たな書き込みアドレス 及び新たな書き込みデータをメモリアクセス装置 2へ出力し続ける。
[0042] メモリアクセス装置 2がメモリ 3への第 1の書き込み処理を継続した結果、この処理が 完了すると、実施の形態 1で述べたようにシングルバッファ 22に蓄積されていた以前 の書き込みアドレス及び書き込みデータがなくなり、フルフラグは L論理に変化する。 すると書き込み部 211は以前の書き込み処理は完了していると判断し、 CPU1から 送られた新たな書き込みアドレス及び新たな書き込みデータを蓄積する命令をシン ダルバッファ 22へ送る。この蓄積命令に基づき、シングルバッファ 22は新たな書き込 みアドレス及び新たな書き込みデータを蓄積する。シングルバッファがファイフォの場 合、書き込みアドレスと書き込みデータが蓄積されるのでフルフラグは再び H論理に 変化する。書き込み部 211は上述のように、メモリ 3への第 2の書き込み処理の完了 を待たずに CPU1へ書き込み完了信号 2aを送り、 CPU1はメモリ 3への書き込みが 完了したと判断するので次処理に移行することができる。なお新たな書き込みァドレ スへのデータの書き込み処理については実施の形態 1と同じであるため、以後の処 理についての説明は省略する。
[0043] 図 5に、以上で説明した実施の形態 2の第 1の場合におけるメモリアクセス装置 2の 動作を表すフローチャートを示す。なお図 3と同一のフローについては、同一の符号 を付して説明を省略し、異なるフローであるステップ S51ないしステップ S53について 説明する。まずステップ S51で書き込み信号 lcが書き込み部 211へ入力されるが、 初期状態ではないため、フルフラグは L論理とは限らない。次に書き込み部 211では ステップ S52でフルフラグの論理を判別する。そしてフルフラグ力 論理であれば実 施の形態 1と同様の動作となる力 H論理であれば、フルフラグ力 論理となるまで判 別処理を繰り返す。一方、フルフラグが H論理の場合、以前の書き込み処理はステツ プ S33以降のフローを継続して行い、ステップ S3aで書き込み処理を実行する。実施 の形態 2では、ステップ S3aで書き込み処理を実行後、次処理があるか否かをステツ プ S52で判別し、次処理があればステップ S52まで戻るものとする。このときステップ S35でフルフラグは L論理となって 、るため、ステップ S52で判別処理を繰り返して ヽ た書き込み命令についても、以前の書き込み処理に引き続いてステップ S33以降の 書き込み処理を実行することとなる。
[0044] 次に第 2の場合として、初期状態でな!、とき、すなわちメモリアクセス装置 2がメモリ 3へ書き込み処理を実行して 、る状態で、 CPU1からメモリアクセス装置 2に対して読 み出し命令がなされた場合について説明する。実施の形態 1と同様に、 CPU1は第 2 の読み出し命令である読み出し信号 Idをメモリアクセス装置 2に送るとともに、第 2の 読み出しアドレスである読み出しアドレスをメモリアクセス装置 2に出力する。読み出し 信号 Idはバス制御部 21の読み出し部 212に渡され、読み出し部 212はシングルバ ッファ 22に書き込みアドレス及び書き込みデータが蓄積されているか否かをバッファ 状態信号 22cに基づき判断する。
[0045] ここでメモリアクセス装置 2はメモリ 3への第 1の書き込み処理を実行中であるため、 シングルバッファ 22には第 1の書き込みアドレスである以前の書き込みアドレス及び 第 1の書き込みデータである以前の書き込みデータがまだ蓄積されたままである。す ると例えばシングルバッファ 22としてファイフォを適用した場合、そのェンプティフラグ は L論理のままである。従って読み出し部 212は、書き込みアドレス及び書き込みデ ータがシングルバッファ 22に蓄積されて 、ると判断し、実行中であるメモリ 3への第 1 の書き込み処理を継続する。一方、読み出し部 212は CPU1が出力する第 2の読み 出しアドレスを受け取らず、また CPU1へ読み出し完了信号 2bを送らない。この場合 、 CPU1は読み出し完了信号 2bを受け取らないためメモリ 3からの読み出し処理が 完了したと判断できない。すなわち CPU1は次処理へ移行することができず、そのま ま読み出しアドレスをメモリアクセス装置 2へ出力し続ける。
[0046] メモリアクセス装置 2がメモリ 3への第 1の書き込み処理を継続した結果、この処理が 完了すると、実施の形態 1で述べたようにシングルバッファ 22に蓄積されていた以前 の書き込みアドレス及び書き込みデータがなくなり、ェンプティフラグは H論理に変化 する。すると読み出し部 212は以前の書き込み処理は完了していると判断し、 CPU1 力も送られた読み出しアドレスを受け取る。なお以降の読み出し処理については実 施の形態 1と同様であるため、説明は省略する。
[0047] 図 6に、以上で説明した実施の形態 2の第 2の場合におけるメモリアクセス装置 2の 動作を表すフローチャートを示す。なお図 4と同一のフローについては、同一の符号 を付して説明を省略し、異なるフローであるステップ S61ないしステップ S64について 説明する。まずステップ S61で読み出し信号 Idが読み出し部 212へ入力されるが、 初期状態ではないため、ェンプティフラグは H論理とは限らない。次に読み出し部 21 2ではステップ S62でェンプティフラグの論理を判別する。そしてェンプティフラグが H論理であれば実施の形態 1と同様の動作となる力 L論理であれば、ステップ S63 で全ての書き込み処理が完了したか否かを判別する。書き込み処理の継続中は、シ ングルバッファ 22に書き込みアドレス及び書き込みデータが蓄積されているので、ェ ンプティフラグは L論理のままであり、ステップ S63での判別処理を繰り返す。そして 全ての書き込み処理が完了すれば、ステップ S64でェンプティフラグが H論理となり 、ステップ S62まで戻る。このときェンプティフラグは H論理となっているため、読み出 し命令について、ステップ S43以降の読み出し処理を実行することとなる。
[0048] 以上のように、実施の形態 2に係るメモリアクセス装置 2は、 CPU1がメモリアクセス 装置 2から書き込み完了信号 2aを受信した後、重ねてメモリ 3への第 2の書き込み命 令が発生した場合、メモリアクセス装置 2は実行中の第 1の書き込み処理の完了後に 第 2の書き込み処理を開始するとともに CPU1に対し書き込み完了信号 2aを送る。こ のように、 CPU1からの第 2の書き込み命令が実行されるのは、必ずメモリアクセス装 置 2が第 1の書き込み処理を完了した後となるため、書き込み処理が消失することが ない。
[0049] さらに、 CPU1がメモリアクセス装置 2から書き込み完了信号 2aを受信した後、第 2 の読み出し命令が発生した場合、メモリアクセス装置 2は実行中の第 1の書き込み処 理の完了後に第 2の読み出し処理を開始する。すなわち、 CPU1による第 2の読み 出し処理が行われるのは必ずメモリアクセス装置 2が第 1の書き込み処理を完了した 後となるため、複雑な制御を行わなくてもメモリ 3上のデータの整合性を保つことがで きる。 [0050] なお、上記実施の形態 2においてはメモリアクセス装置 2がメモリ 3への書き込み処 理を実行中に、重ねて CPU1から書き込み命令または読み出し命令があった場合に ついて説明した。これに対してメモリ 3からの読み出し処理を実行している場合には、 CPU1がメモリ 3からデータを読み出さなければ読み出し完了信号 2bが CPU1へ出 力されないため、重ねて CPU1から書き込み命令または読み出し命令がなされること はない。
[0051] 実施の形態 3.
実施の形態 2では、メモリアクセス装置 2がメモリ 3への第 1の書き込み処理を実行 中に、 CPU1が重ねて書き込み命令または読み出し命令を行った場合に、メモリァク セス装置 2は実行中の第 1の書き込み処理を完了した後に新たな書き込み処理また は読み出し処理を開始するものとした。すなわち新たな書き込み命令がなされた場 合は、第 1の書き込み処理が完了して新たな書き込みアドレス及び新たな書き込み データが書き込み部 211に渡されるまでは、 CPU1は新たな書き込み命令に対応す る書き込み完了信号 2aを受け取らな 、。したがって CPU1が次処理に移行するまで に、無用な待ち時間が発生する。実施の形態 3では、当該無用な待ち時間を短縮す るメモリアクセス装置 2につ 、て説明する。
[0052] 実施の形態 3では、メモリアクセス装置 2内のバッファを、有限長の多段バッファ 25 とする。図 7は実施の形態 3におけるメモリアクセス装置 2のブロック図である。図 2に おけるシングルバッファ 22を、図 7では多段バッファ 25に置き換えている点で相違す る。また、メモリアクセス装置 2を適用した機器の一部を示すブロック図としては図 1を 兼用する。次にメモリアクセス装置 2の動作を説明する。初期状態での動作は実施の 形態 1と同様であるため説明を省略し、初期状態でない場合の動作を実施の形態 2 と同様に 2つの場合に分けて説明する。第 1の場合として、メモリアクセス装置 2がメモ リ 3へ書き込み処理を実行している状態で、 CPU1からメモリアクセス装置 2に対して 書き込み命令が重ねてなされた場合について説明する。実施の形態 2と同様に、 CP U1は書き込み信号 lcをメモリアクセス装置 2に送るとともに、新たな書き込みアドレス 及び新たな書き込みデータをメモリアクセス装置 2に出力する。
[0053] 図 7において書き込み信号 lcがノ ス制御部 21の書き込み部 211に渡されると、書 き込み部 211は多段バッファ 25に蓄積された書き込みアドレス及び書き込みデータ がー杯である力否かを、ノ ッファ状態信号 25cに基づき判断する。多段バッファ 25は 書き込みアドレスと書き込みデータをそれぞれ蓄積容量である N個ずつ保持すること ができ、例えば N段 (N: 2以上の整数)のファイフォで構成される。ファイフォを適用し た場合、実施の形態 2と同様にバッファ状態信号 25cとしてフルフラグを用いることが できる。すなわちフルフラグ力 論理であればアドレス及びデータの蓄積量が N個未 満であり一杯ではな!/、が、フルフラグが H論理であればアドレス及びデータの蓄積量 力 個に達しており一杯であると判断できる。実施の形態 1または 2では、書き込みァ ドレス及び書き込みデータを 1つずつ蓄積するとフルフラグが H論理に変化するが、 実施の形態 3では書き込みアドレス及び書き込みデータを N個ずつ蓄積するまでは フルフラグ力 論理を保つ点で相違する。
[0054] ここでメモリアクセス装置 2はメモリ 3への以前の書き込み処理を実行中であり、多段 ノ ッファ 25には以前の書き込みアドレス及び書き込みデータがまだ蓄積されている。 すると例えば多段バッファ 25として N段のファイフォを適用した場合、書き込みァドレ ス及び書き込みデータの蓄積量が N個未満であればフルフラグは L論理であるが、 書き込みアドレス及び書き込みデータの蓄積量が N個に達して ヽれば、フルフラグは H論理である。実施の形態 3では、もしフルフラグ力 論理であれば、多段バッファ 25 に新たな書き込みアドレス及び書き込みデータを蓄積することができると判断する。し かし、もしフルフラグが H論理であれば、多段バッファ 25に新たな書き込みアドレス及 び書き込みデータを蓄積することはできないと判断する。
[0055] 従ってフルフラグ力 論理であれば、書き込み部 211は新たな書き込みアドレス及 び書き込みデータを多段バッファ 25に蓄積する蓄積命令を行う。この蓄積により多段 ノ ッファ 25の蓄積量が N個に達すればフルフラグは H論理に変化する力 N個未満 のままであればフルフラグは L論理のままである。そして書き込み部 211は新たな書 き込みアドレス及び書き込みデータによるメモリ 3への書き込み処理の完了を待たず に、 CPU1へ書き込み完了信号 2aを送り、 CPU1はメモリ 3への書き込みが完了した と判断するので、次処理に移行することができる。
[0056] 一方フルフラグが H論理であれば、書き込み部 211は実行中の書き込み処理を継 続するものの、新たな書き込みアドレス及び書き込みデータを多段バッファ 25に蓄積 せず、また CPU1へ書き込み完了信号 2aを送らない。 CPU1は書き込み完了信号 2 aを受け取らないためメモリ 3への書き込み処理が完了したと判断できない。すなわち CPU1は次処理へ移行することができず、そのまま新たな書き込みアドレス及び書き 込みデータをメモリアクセス装置 2へ出力し続ける。そしてメモリアクセス装置 2がメモ リ 3への書き込み処理を 1個完了すると、多段バッファ 25に蓄積された書き込みアド レス及び書き込みデータの数が N— 1個になる。すなわち多段バッファ 25の蓄積量が 一杯ではなくなるため、フルフラグは L論理に変化する。従って書き込み部 211は、 書き込みアドレス及び書き込みデータを蓄積することができると判断し、多段バッファ 25に新たな書き込みアドレス及び書き込みデータを蓄積する蓄積命令を行う。すると 多段バッファ 25の蓄積量は再び N個に達して一杯になるため、フルフラグは H論理 に変化する。書き込み部 211は上述のように、メモリ 3への書き込み処理の完了を待 たずに CPU1へ書き込み完了信号 2aを送り、 CPU1はメモリ 3への書き込みが完了 したと判断するので次処理に移行することができる。
[0057] メモリアクセス装置 2は、多段バッファ 25に蓄積された書き込みアドレス及び書き込 みデータに関して、 CPU1から受け取った順にメモリ 3へ書き込み処理を実行する。 そして蓄積量が 0個になるまで、すなわち全ての書き込み処理を完了するまで継続 する。なお、メモリ 3への書き込み処理については実施の形態 2と同様であるため説 明を省略する。
[0058] 図 8に、以上で説明した実施の形態 3の第 1の場合におけるメモリアクセス装置 2の 動作を表すフローチャートを示す。なお図 3及び図 5と同一のフローについては、同 一の符号を付して説明を省略し、異なるフローであるステップ S81な 、しステップ S8 6について説明する。図 8においてステップ S51で書き込み信号 lcが入力されると、 ステップ S52でフルフラグの論理を判別した結果、フルフラグ力 論理であれば、ステ ップ S81で多段バッファ 25に書き込みアドレス及び書き込みデータが蓄積される。次 に、この蓄積により多段バッファ 25がー杯になったか否かをステップ S82で判断する 。もし一杯であればステップ S83でフルフラグが H論理に変化した後、書き込み処理 を行うが、一杯にならなければ、フルフラグ力 論理のまま書き込み処理を行うととも にステップ S52に戻る。ステップ S52まで戻るのは、次処理で CPU1から書き込み命 令があった場合、書き込みアドレス及び書き込みデータを蓄積できるようにするため である。図 5では、このフローが存在しないが、これは実施の形態 2ではシングルバッ ファ 22のフルフラグが必ず H論理に変化するため不要だ力もである。
[0059] また図 8において、ステップ S84で多段バッファ 25から書き込みアドレスと書き込み データを出力するので、多段バッファ 25は一杯ではなくなる。そこで、フルフラグの論 理をステップ S85で判断し、 H論理であればステップ S86で L論理に変化して処理を 継続することとしている。
[0060] 第 2の場合として、メモリアクセス装置 2がメモリ 3へ書き込み処理を実行している状 態で、 CPU1からメモリアクセス装置 2に対して読み出し命令が重ねてなされた場合 について説明する。実施の形態 2と同様に、 CPU1は読み出し信号 Idをメモリァクセ ス装置 2に送るとともに、読み出しアドレスをメモリアクセス装置 2に出力する。
[0061] 図 7において読み出し信号 Idがバス制御部 21の読み出し部 212に渡されると、読 み出し部 212は多段バッファ 25に書き込みアドレス及び書き込みデータが 1つでも 蓄積されている力否かを、ノ ッファ状態信号 25cに基づき判断する。上述のように多 段バッファ 25を N段のファイフォとすれば、読み出し処理の場合はバッファ状態信号 25cとしてェンプティフラグを用いることができる。すなわちェンプティフラグ力 論理 であれば書き込みアドレス及び書き込みデータが 1個以上蓄積されている力 ェンプ ティフラグが Hであれば書き込みアドレス及び書き込みデータが 1個も蓄積されて!ヽ ないと判断できる。
[0062] ここでメモリアクセス装置 2はメモリ 3への以前の書き込み処理を実行中であり、多段 ノ ッファ 25には以前の書き込みアドレス及び書き込みデータがまだ蓄積されている。 すると例えば多段バッファ 25として N段のファイフォを適用した場合、ェンプティフラ グは必ず L論理となる。するとバス制御部 211の書き込み部 211はメモリ 3への書き込 み処理を継続するものの、読み出し部 212は読み出しアドレスを CPU1から受け取ら ず、また CPU1へ読み出し完了信号 2bを送らない。この場合、 CPU1は読み出し完 了信号 2bを受け取らないためメモリ 3からの読み出し処理が完了したと判断できない 。すなわち CPU1は次処理へ移行することができず、そのまま読み出しアドレスをメモ リアクセス装置 2へ出力し続ける。
[0063] そしてメモリアクセス装置 2がメモリ 3への書き込み処理を全て完了すると、多段バッ ファ 25に蓄積されたアドレス及びデータの数が 0個になる。すなわち多段バッファ 25 の蓄積量が 0となるため、ェンプティフラグは H論理に変化する。従って読み出し部 2 12は、読み出し処理が可能と判断し、 CPU1から読み出しアドレスを受け取る。なお 、メモリアクセス装置 2が読み出しアドレスを受け取った以降の動作は実施の形態 2と 同様なため説明を省略する。また、実施の形態 3における第 2の場合のメモリアクセス 装置 2の動作を表すフローは、ェンプティフラグが H論理になった場合のみ読み出し 処理を行うという点で実施の形態 2と同じであり、図 6と同一となるため、フローチヤ一 トを省略する。
[0064] 以上のように、実施の形態 3では、メモリアクセス装置 2内のバッファを多段バッファ 25とすること〖こより、メモリアクセス装置 2がメモリ 3への書き込み処理を実行中に、 CP U1が重ねて書き込み命令を行った場合であっても、以前の書き込み処理が完了す るまで待つことなく書き込みアドレス及び書き込みデータをメモリアクセス装置 2へ渡 すことができるので、 CPU1が待機状態に陥る無用な待ち時間を減少させることがで きるという効果がある。
[0065] 実施の形態 4.
実施の形態 3では、多段バッファ 25に蓄積された書き込みアドレスの連続性を考慮 せず、 CPU1から受け取った順に、常に 1つずつメモリ 3へ書き込み処理を行うものと したが、必ずしも 1つずつ処理を行う必要はない。実施の形態 4では、多段バッファ 2 5に蓄積された書き込みアドレス力 直前の書き込み処理においてアクセスするアド レスと連続していた場合、メモリアクセス装置 2がメモリ 3に対してページアクセスゃバ 一ストアクセス等の高速アクセスモードを使用して書き込み処理を行うものとする。な お実施の形態 4では、メモリ 3は高速アクセスモードに対応可能なメモリであるとして 説明する。
[0066] 図 9は実施の形態 4におけるメモリアクセス装置 2のブロック図である。図 7との主な 相違は、多段バッファ 25に蓄積された書き込みアドレスを監視する監視手段である アドレス監視部 26を備える点である。また、メモリアクセス装置 2を適用した機器の一 部を示すブロック図としては図 1を兼用する。次にメモリアクセス装置 2の動作につい て説明する。初期状態において書き込み命令または読み出し命令があった場合は 実施の形態 1と同様の動作であるため説明を省略する。次に初期状態でないとき、す なわちメモリアクセス装置 2がメモリ 3へ書き込み処理を実行している場合に、 CPU1 からメモリアクセス装置 2に対して書き込み命令が重ねてなされた場合について説明 する。実施の形態 3と同様に、 CPU1は書き込み信号 lcをメモリアクセス装置 2に送 るとともに、新たな書き込みアドレス及び書き込みデータをメモリアクセス装置 2に出 力する。書き込み信号 lcはバス制御部 21の書き込み部 212に渡され、書き込み部 2 12は多段バッファ 25に蓄積された書き込みアドレス及び書き込みデータが一杯であ る力否かを、ノッファ状態信号 25cに基づき判断する。
[0067] 実施の形態 3と同様に、ノ ッファ状態信号 25cのフルフラグが L論理であれば、書き 込み部 212は新たな書き込みアドレス及び書き込みデータを多段バッファ 25に蓄積 する。一方フルフラグが H論理であれば、バス制御部 21は実行中であるメモリ 3への 書き込み処理を継続し、処理を完了すると、多段バッファ 25に新たな書き込みァドレ ス及び書き込みデータを蓄積する。
[0068] 実施の形態 4では、アドレス監視部 26が多段バッファ 25に蓄積された複数の書き 込みアドレスを監視する。多段バッファ 25に蓄積された書き込みアドレスとアドレス監 視部 26との関係の一例を図 10に示す。図 10では、 N個の記憶素子 101ないし 10N に N個の書き込みアドレスが蓄積され、別の N個の記憶素子 111な!、し 11Nに N個 の書き込みアドレスに対応する N個の書き込みデータが蓄積される。なお、記憶素子 101及び 102の 2個は書き込みアドレスが連続しているものとする。アドレス監視部 2 6は記憶素子 101ないし 10Nに蓄積された書き込みアドレスを監視し、記憶素子 101 及び 102の書き込みアドレスが連続していると判断すると、これらの書き込みアドレス に対する書き込み処理が行われるタイミングで、書き込み部 211にモード指示信号 2 6aを出力する。
[0069] 書き込み部 211は、アドレス監視部 26からモード指示信号 26aを受け取ると、制御 信号作成部 24にモード切替指示信号 21hを出力する。制御信号作成部 24はモード 切替指示信号 21hを受け取ると、チップセレクトやリードィネーブル等、通常の書き込 み処理に必要な信号の他、メモリ 3の高速アクセスモードに必要な信号を書き込み制 御信号 24aとして作成し、インタフェース部 23に送る。書き込み部 211は高速ァクセ スモードにおける書き込み制御に合致するタイミングで、連続する 2つの書き込みアド レス及び対応する 2つの書き込みデータを出力する。メモリ 3はメモリ制御信号 2eとし て送られた書き込み制御信号 24aに基づき、与えられた 2つの書き込みアドレスにそ れぞれの書き込みデータを高速アクセスモードで記憶する。
[0070] なお、メモリアクセス装置 2がメモリ 3へ書き込み処理を実行して 、る場合に、 CPU1 からメモリアクセス装置 2に対して読み出し命令がなされた場合にっ 、ては、実施の 形態 3と同様の動作であるため説明を省略する。
[0071] 以上のように実施の形態 4によれば、アドレス監視部 26が多段バッファ 25に蓄積さ れた書き込みアドレスを監視し、アドレスの連続した書き込み処理を行う場合には書 き込み部 211にモード指示信号 26aを出力して、メモリ 3の高速アクセスモードを使用 して書き込み処理を行うものとした。高速アクセスモードの使用によりメモリアクセス装 置 2によるメモリ 3への書き込み処理に要する時間を減少することができるため、 CPU 1がメモリアクセス装置 2による書き込み処理の完了を待つ時間を総合的に減少させ ることがでさる。
[0072] なお、上記実施の形態 4では、アドレス監視部 26が記憶素子 101及び 102におけ る書き込みアドレスの連続のみを判断した力 S、連続部分が複数個存在する場合にこ れを判断するものとしてもよ 、。例えば図 10の記憶素子 10K及び 10K+ 1につ 、て も書き込みアドレスが連続して 、れば、これらの書き込みアドレスに対する書き込み 処理時にも高速アクセスモードを使用するものとしてもよい。
[0073] なお、上記実施の形態 4では、アドレス監視部 26が高速アクセスモードの適用を判 断するための書き込みアドレスの連続個数を 2個としたが、これは必ずしも 2個とは限 らない。例えば記憶素子 101ないし 103の 3個の書き込みアドレスが連続した場合に 高速アクセスモードを適用するものとしてもよぐ一般に任意の M個(M : 2以上の整 数)の書き込みアドレスが連続した場合に高速アクセスモードを適用するとしてもよ ヽ 。 Mが大きくなるほど、アドレス 1個ずつを処理する場合に比べて書き込み処理に要 する時間を短くすることができるため、高速アクセスモードを使用する効果が大きくな る。
[0074] なお、上記実施の形態 4では、アドレス監視部 26が高速アクセスモードの適用を判 断するために書き込みアドレスの連続性を基準とした力 必ずしも書き込みアドレス の連続性を判断の基準とする必要はな 、。例えば連続して 、る書き込みアドレスが 不連続となる場合に、それまで連続した書き込みアドレスにつ 、て高速アクセスモー ドを適用するものとしてもよい。すなわち記憶素子 10Kないし 102までの書き込みァ ドレスが連続している場合に、記憶素子 101で連続性が途切れたとすると、記憶素子 10Kないし 102までの書き込みアドレスに対して高速アクセスモードを使用してもよ い。この場合、書き込みアドレスの連続性を基準とする方法と比べて連続する個数を カウントする必要がなぐまた連続数が多くても常に高速アクセスモードの適用が期待 できる。
[0075] 実施の形態 5.
実施の形態 3では、メモリアクセス装置 2がメモリ 3への書き込み処理を実行中に、 C PU1が読み出し命令を行った場合には、蓄積された書き込み処理が全て完了して 力 読み出し処理を行うこととした。このため多段バッファ 25の蓄積容量が大きぐ多 くの書き込みアドレス及び書き込みデータが蓄積されている場合は、読み出し処理の 実行が後回しにされて CPU1には長い待ち時間が発生する。実施の形態 5では当該 長い待ち時間を短縮するメモリアクセス装置 2について説明する。
[0076] 実施の形態 5では、多段バッファ 25内に読み出しアドレスと同一の書き込みァドレ スが存在する場合に、読み出し処理を割り込んで実行することで、読み出し処理の高 速ィ匕を図る。図 11は、実施の形態 5におけるメモリアクセス装置 2のブロック図である 。また、メモリアクセス装置 2を適用した機器の一部を示すブロック図としては図 1を兼 用する。次にメモリアクセス装置 2の動作を説明する。初期状態での動作及び初期状 態以外の第 1の場合の動作は実施の形態 3と同様であるため説明を省略する。実施 の形態 5では初期状態以外の第 2の場合、すなわちメモリアクセス装置 2がメモリ 3へ 書き込み処理を実行して 、る状態で、 CPU1からメモリアクセス装置 2に対して読み 出し命令が重ねてなされた場合にっ 、て説明する。
[0077] 図 11において読み出し信号 Idがバス制御部 21の読み出し部 212に渡されると、 読み出し部 212は多段バッファ 25に書き込みアドレス及び書き込みデータが 1つで も蓄積されている力否かを、ノッファ状態信号 25cに基づき判断する。メモリアクセス 装置 2はメモリ 3への以前の書き込み処理を実行中であり、多段バッファ 25には以前 の書き込みアドレス及び書き込みデータがまだ蓄積されて ヽるため、ェンプティフラ グは必ず L論理となる。
[0078] ェンプティフラグ力 論理の場合、実施の形態 5における読み出し部 212は CPU1 が出力する読み出しアドレスを受け取るとともに、第 2バッファ制御信号 21iによりアド レス走査命令を多段バッファ 25に送る。多段バッファ 25はアドレス走査命令を受け 取ると、蓄積している書き込みアドレスをバッファ状態信号 25cにより逐次的に読み出 し部 212へ出力する。読み出し部 212は多段バッファ 25に蓄積されている書き込み アドレスと、 CPU1から受け取った読み出しアドレスを比較する。そして比較した結果 、読み出しアドレスと一致する書き込みアドレスが多段バッファ 25に存在しな力つた 場合は、読み出し部 212は実施の形態 3と同様に、全ての書き込み処理が完了する まで読み出し処理を行わな!/、。
[0079] 一方アドレスを比較した結果、読み出しアドレスと一致する書き込みアドレスが多段 ノ ッファ 25に存在した場合は、読み出し部 212は第 2バッファ制御信号 21iにより該 当する書き込みアドレスに対応する書き込みデータを出力するデータ出力命令を行 う。多段バッファ 25はデータ出力命令を受けると、 CPUデータバス lbに、該当する 書き込みデータを読み出しデータとして出力する。また同時に、読み出し部 212は読 み出し完了信号 2bを CPU1に出力する。 CPU1は多段バッファ 25が出力する読み 出しデータを受け取るとともに読み出し完了信号 2bを受け取ると、読み出し処理が完 了したと判断して次処理に移行することができる。
[0080] なお多段バッファ 25から CPUデータバス lbへの出力は、書き込み部 211に対する 動作とは反対方向のデータの流れであり、書き込み処理とは独立して行われるものと する。
[0081] 実施の形態 6.
実施の形態 1ないし 5では、 CPU1のみ力もメモリ 3へのアクセスがなされる場合に ついて説明した。実施の形態 6では、 CPU1以外のアクセス元のデバイスとして、別 のバスマスタが存在する場合について説明する。この場合メモリ 3は、 CPU1及び当 該別のバスマスタ力も共通にアクセスされ得る。そして同時にメモリ 3へのアクセス命 令が発生する可能性がある。しかしメモリ 3へ同時に複数のアクセスを行うと、アドレス が衝突してしまう等により正常なメモリアクセスを確保することが難しい。実施の形態 6 では、各アクセス元が調停器を経由してメモリアクセス装置 2にアクセスするものとす る。
[0082] 図 12は実施の形態 6におけるメモリアクセス装置 2を適用したメモリアクセス機構を 示すブロック図であり、実施の形態 1ないし 5における図 1に相当する。 CPU1の他に メモリ 3へのアクセス命令を発生するバスマスタ 4がある。バスマスタ 4はバスマスタアド レスバス 4a及びバスマスタデータバス 4bを介して調停器 5と接続されるとともに、書き 込み信号 4c及び読み出し信号 4dを調停器 5へ送る。調停器 5は調停器アドレスバス 5a及び調停器データバス 5bを介してメモリアクセス装置 2と接続される。また調停器 5 は書き込み信号 5cまたは読み出し信号 5dをメモリアクセス装置 2へ送る一方、書き込 み完了信号 5eもしくは読み出し完了信号 5fを CPU1へ送る力、または書き込み完了 信号 5gもしくは読み出し完了信号 5hをバスマスタ 4へ送る。
[0083] 次に動作について説明する。 CPU1またはバスマスタ 4のいずれか一方のアクセス 元のみからメモリ 3へのアクセスが発生した場合、調停器 5は当該アクセスが発生した アクセス元力ものバスを調停器アドレスバス 5a及び調停器データノ ス 5bと接続する。 すなわち、例えば CPU1のみ力 アクセスが発生した場合、書き込み信号 lcまたは 読み出し信号 Idが調停器 5に送られる。すると調停器 5は CPUアドレスバス la及び CPUデータバス lbを、それぞれ調停器アドレスバス 5a及び調停器データバス 5bに 接続し、書き込み信号 5cまたは読み出し信号 5dをメモリアクセス装置 2へ送る。そし て調停器 5がメモリアクセス装置 2から書き込み完了信号 2aまたは読み出し完了信号 2bを受け取ると、書き込み完了信号 5eまたは読み出し完了信号 5fを CPU1へ送る。
[0084] 同様に、バスマスタ 4のみ力 アクセスが発生した場合、書き込み信号 4cまたは読 み出し信号 4dが調停器 5に送られる。すると調停器 5はバスマスタアドレスバス 4a及 びバスマスタデータバス 4bを、それぞれ調停器アドレスバス 5a及び調停器データバ ス 5bに接続し、書き込み信号 5cまたは読み出し信号 5dをメモリアクセス装置 2へ送る 。そして調停器 5がメモリアクセス装置 2から書き込み完了信号 2aまたは読み出し完 了信号 2bを受け取ると、書き込み完了信号 5gまたは読み出し完了信号 5hをバスマ スタ 4へ送る。
[0085] このように調停器 5を設けたことで、 CPU1またはバスマスタ 4のいずれかのアクセス 元カゝらアクセスがあった場合には、調停器 5及びメモリアクセス装置 2を介してメモリ 3 へのアクセスを確保することができる。なお、以降の処理は実施の形態 3及び実施の 形態 4と同様であるため説明を省略する。
[0086] 次に、 CPU1及びバスマスタ 4の双方のアクセス元から同時にアクセスが発生した 場合について説明する。この場合、調停器 5は CPU1からのアクセスのみを許可して 上述のようにメモリアクセス装置 2との接続を行う。一方、バスマスタ 4からのアクセスは 許可しない。すなわち書き込み完了信号 5gまたは読み出し完了信号 5hはバスマス タ 4へ送られず、バスマスタ 4は処理を待機する。
[0087] CPU1からのアクセスが完了した場合、メモリアクセス装置 2は書き込み完了信号 2 aまたは読み出し完了信号 2bを出力するので、調停器 5はこれを受け取ると CPU1か らのアクセスが完了したと判断し、書き込み完了信号 5eまたは読み出し完了信号 5f を CPU1へ送る。そして CPUアドレスバス la及び CPUデータバス lbと調停器ァドレ スバス 5a及び調停器データバス 5bとの接続を切り、引き続きバスマスタ 4からのァク セスを許可する。すなわち上述と同様にバスマスタ 4からのアクセスを許可してメモリ アクセス装置 2との接続を行う。
[0088] 以上のように、調停器 5が複数のアクセス元からのアクセスを制御することで、メモリ アクセス装置 2へのアクセス元を常に 1つだけにすることができる。従って、 CPU1以 外のアクセス元としてバスマスタ 4が存在する場合であっても、メモリ 3へ同時に複数 のアクセスがなされてアドレスが衝突する等の不都合は生じず、正常なメモリアクセス を確保することができるという効果を奏する。
[0089] なお、上記実施の形態 6では、 CPU1以外のノ スマスタ 4を 1個備えるものとしたが 、これは 2個以上でもよい。また、上記実施の形態 6では、調停器 5は CPU1とバスマ スタ 4から同時にアクセスが発生した場合、 CPU1からのアクセスを優先してメモリァク セス装置 2へ接続するものとして説明した力 これは必ずしも必要ではない。例えば バスマスタ 4からのアクセスを優先してメモリアクセス装置 2へ接続するものとしてもよ い。
産業上の利用可能性
この発明は携帯電話やパソコン、その他通信、制御などの分野にお!、て CPU等の ようにメモリへの書き込み及び読み出しを行うデバイスを用いて制御を行う機器に利 用できる。

Claims

請求の範囲
[1] デバイスから書き込みアドレス及び書き込みデータを受け取りメモリへ書き込みデ ータを書き込み処理し、デバイス力も読み出しアドレスを受け取りメモリから読み出し データを読み出し処理してデバイスに読み出しデータを送るメモリアクセス装置にお
V、て、デバイス力 受け取った書き込みアドレス及び書き込みデータを蓄積する蓄積 手段と、メモリへ書き込みデータを書き込み処理するための第 1の制御信号とメモリか らの読み出しデータを読み出し処理するための第 2の制御信号を作成する制御信号 作成手段と、デバイスから第 1の書き込み命令を受け取ると前記蓄積手段から第 1の 書き込みアドレス及び第 1の書き込みデータを受け取り、前記制御信号作成手段へ 前記第 1の制御信号を作成する指示を与え、リアルタイムで前記第 1の制御信号によ りメモリへ前記第 1の書き込みデータを書き込み処理するとともにデバイスへ書き込み 完了信号を送る書き込み制御部と、デバイス力 第 1の読み出し命令を受け取るとデ バイスから第 1の読み出しアドレスを受け取り、前記制御信号作成手段へ前記第 2の 制御信号を作成する指示を与え、前記第 2の制御信号によりリアルタイムでメモリから 第 1の読み出しデータを読み出し処理しデバイスへ送るとともにデバイスへ読み出し 完了信号を送る読み出し制御部とを備えることを特徴とするメモリアクセス装置。
[2] 書き込み制御部は、デバイス力 第 2の書き込み命令を受け取ると、第 1の書き込 みデータの書き込み処理を完了した後に、前記蓄積手段から第 2の書き込みァドレ ス及び第 2の書き込みデータを受け取り、前記制御信号作成手段へ前記第 1の制御 信号を作成する指示を与え、前記第 1の制御信号によりメモリへ前記第 2の書き込み データを書き込み処理するとともにデバイスへ書き込み完了信号を送り、読み出し制 御部は、デバイス力 第 2の読み出し命令を受け取ると、第 1の書き込みデータの書 き込み処理を完了した後に、デバイス力も第 2の読み出しアドレスを受け取り、前記制 御信号作成手段へ前記第 2の制御信号を作成する指示を与え、前記第 2の制御信 号によりリアルタイムでメモリから第 2の読み出しデータを読み出し処理しデバイスへ 送るとともにデバイスへ読み出し完了信号を送ることを特徴とする、請求項 1に記載の メモリアクセス装置。
[3] 蓄積手段は、複数の書き込みアドレス及び書き込みデータを蓄積し、蓄積容量未 満の場合はデバイスから書き込みアドレス及び書き込みデータを受け取って蓄積し、 蓄積容量に達している場合は蓄積容量未満となるのを待ってデバイスから書き込み アドレス及び書き込みデータを受け取って蓄積し、書き込み制御部は、デバイスから 第 1または第 2の書き込み命令を受け取ると、前記蓄積手段が第 1または第 2の書き 込みアドレス及び第 1または第 2の書き込みデータを受け取った後に、前記第 1また は第 2の書き込みデータの書き込み処理が完了した力否かに関わらずデバイスへ書 き込み完了信号を送る一方、前記蓄積手段から前記書き込みアドレス及び書き込み データを書き込み命令の順番に受け取り、制御信号作成手段へ第 1の制御信号を 作成する指示を与え、書き込み命令の順番にメモリへ前記書き込みデータを書き込 み処理し、読み出し制御部は、デバイス力 読み出し命令を受け取ると、前記蓄積手 段に蓄積された全ての書き込みアドレス及び書き込みデータに関する書き込み処理 が完了した後にデバイス力 読み出しアドレスを受け取り、制御信号作成手段へ第 2 の制御信号を作成する指示を与え、リアルタイムでメモリから読み出しデータを読み 出し処理しデバイスへ送るとともにデバイスへ読み出し完了信号を送ることを特徴と する、請求項 2に記載のメモリアクセス装置。
[4] 蓄積手段に蓄積された書き込みアドレスの連続性または不連続性を監視する監視 手段を備え、監視手段の監視結果に基づき、連続した書き込みアドレスに対して高 速アクセスモードにより一括して書き込みデータを書き込み処理することを特徴とする 、請求項 3に記載のメモリアクセス装置。
[5] 読み出し制御部は、デバイス力 読み出し命令を受け取ると、デバイスから読み出 しアドレスを受け取り、前記読み出しアドレスと蓄積手段に蓄積された全ての書き込 みアドレスとを比較し、前記読み出しアドレスと一致する書き込みアドレスが存在する 場合は、当該一致する書き込みアドレスに対応する書き込みデータをデバイスへ送 る指示を蓄積手段に与えるとともにデバイスへ読み出し完了信号を送り、蓄積手段は 、前記読み出し制御部力 の指示に従いデバイスへ書き込みデータを出力すること を特徴とする、請求項 3に記載のメモリアクセス装置。
[6] メモリへのアクセスを発生する複数のデバイスと、複数のデバイスとメモリアクセス装 置との間に挿入され複数のデバイス力ゝらのアクセスを 1つ選択してメモリアクセス装置 に渡す調停器と、請求項 1に記載のメモリアクセス装置とを備えることを特徴とするメ モリアクセス機構。
[7] メモリへのアクセスを発生するデバイスと、デバイスによるアクセス対象となるメモリと
、請求項 1に記載のメモリアクセス装置とを備えることを特徴とする携帯電話端末。
[8] デバイス力も第 1の書き込み命令を受け取った場合は、デバイス力も受け取った第 1の書き込みアドレス及び第 1の書き込みデータを蓄積するステップと、メモリへ書き 込みデータを書き込み処理するための第 1の制御信号を作成するステップと、リアル タイムで前記第 1の制御信号によりメモリへ前記第 1の書き込みデータを書き込み処 理するとともにデバイスへ書き込み完了信号を送るステップとを備え、デバイス力ゝら第 1の読み出し命令を受け取った場合は、デバイス力 第 1の読み出しアドレスを受け 取るステップと、メモリから読み出しデータを読み出し処理するための第 2の制御信号 を作成するステップと、前記第 2の制御信号によりリアルタイムでメモリから第 1の読み 出しデータを読み出し処理しデバイスへ送るとともにデバイスへ読み出し完了信号を 送るステップとを備えることを特徴とするメモリアクセス方法。
[9] デバイス力も第 2の書き込み命令を受け取った場合は、デバイス力も受け取った第 2の書き込みアドレス及び第 2の書き込みデータを蓄積するステップと、第 1の書き込 みデータの書き込み処理を完了した後に、メモリへ書き込みデータを書き込み処理 するための第 1の制御信号を作成するステップと、前記第 1の制御信号によりメモリへ 前記第 2の書き込みデータを書き込み処理するとともに当該書き込み処理が完了し たカゝ否かに関わらずデバイスへ書き込み完了信号を送るステップとを備え、デバイス 力 第 2の読み出し命令を受け取った場合は、第 1の書き込みデータの書き込み処 理を完了した後に、デバイス力も第 2の読み出しアドレスを受け取るステップと、メモリ 力 読み出しデータを読み出し処理するための第 2の制御信号を作成するステップと 、前記第 2の制御信号によりリアルタイムでメモリから第 2の読み出しデータを読み出 し処理しデバイスへ送るとともにデバイスへ読み出し完了信号を送るステップとを備え ることを特徴とするメモリアクセス方法。
PCT/JP2004/014722 2004-10-06 2004-10-06 メモリアクセス装置 WO2006046272A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006542120A JPWO2006046272A1 (ja) 2004-10-06 2004-10-06 メモリアクセス装置、メモリアクセス機構、携帯電話端末及びメモリアクセス方法
PCT/JP2004/014722 WO2006046272A1 (ja) 2004-10-06 2004-10-06 メモリアクセス装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2004/014722 WO2006046272A1 (ja) 2004-10-06 2004-10-06 メモリアクセス装置

Publications (1)

Publication Number Publication Date
WO2006046272A1 true WO2006046272A1 (ja) 2006-05-04

Family

ID=36227524

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/014722 WO2006046272A1 (ja) 2004-10-06 2004-10-06 メモリアクセス装置

Country Status (2)

Country Link
JP (1) JPWO2006046272A1 (ja)
WO (1) WO2006046272A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340199A (zh) * 2023-05-31 2023-06-27 太初(无锡)电子科技有限公司 一种地址冲突处理系统、方法、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61168058A (ja) * 1985-01-22 1986-07-29 Nec Corp 記憶装置
JPH03263156A (ja) * 1990-03-14 1991-11-22 Hitachi Ltd マイクロコンピュータ
JPH06175911A (ja) * 1992-12-08 1994-06-24 Nec Eng Ltd メモリ制御方式
JPH09505679A (ja) * 1993-07-07 1997-06-03 トーシバ・アメリカ・エレクトロニック・コンポーネンツ・インコーポレーテッド 選択フラッシュ機能を具備するメモリーバッファ
JP2004199608A (ja) * 2002-12-20 2004-07-15 Digital Electronics Corp メモリ制御回路

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61168058A (ja) * 1985-01-22 1986-07-29 Nec Corp 記憶装置
JPH03263156A (ja) * 1990-03-14 1991-11-22 Hitachi Ltd マイクロコンピュータ
JPH06175911A (ja) * 1992-12-08 1994-06-24 Nec Eng Ltd メモリ制御方式
JPH09505679A (ja) * 1993-07-07 1997-06-03 トーシバ・アメリカ・エレクトロニック・コンポーネンツ・インコーポレーテッド 選択フラッシュ機能を具備するメモリーバッファ
JP2004199608A (ja) * 2002-12-20 2004-07-15 Digital Electronics Corp メモリ制御回路

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340199A (zh) * 2023-05-31 2023-06-27 太初(无锡)电子科技有限公司 一种地址冲突处理系统、方法、电子设备及介质
CN116340199B (zh) * 2023-05-31 2023-10-13 太初(无锡)电子科技有限公司 一种地址冲突处理系统、方法、电子设备及介质

Also Published As

Publication number Publication date
JPWO2006046272A1 (ja) 2008-05-22

Similar Documents

Publication Publication Date Title
US8683093B2 (en) Memory system having high data transfer efficiency and host controller
US9043806B2 (en) Information processing device and task switching method
US7245248B2 (en) A/D converter and a microcontroller including the same
JP3601872B2 (ja) データ処理装置およびそのオペレーション方法
CN102385555B (zh) 一种缓存系统和数据缓存的方法
WO2006046272A1 (ja) メモリアクセス装置
JP7273176B2 (ja) シーケンス処理ユニットを備えたメモリ制御システム
US7076641B2 (en) Programmable controller
JPH1139171A (ja) マルチタスク処理装置、マルチタスク処理制御方法及び制御プログラム記憶媒体
CN102591820B (zh) 一种idma总线桥装置
US20030041190A1 (en) System and method for efficiently performing a command swapping procedure
JP2007140858A (ja) メモリアクセス方法及びメモリアクセス装置
JP7202225B2 (ja) 半導体装置及びデバッグシステム
JPH11184761A (ja) リードモディファイライト制御システム
JP2000227895A (ja) 画像データ転送装置および画像データ転送方法
JPH11110342A (ja) バス接続方法及び装置
CN115658601A (zh) 多核处理器系统及其控制方法
JPH11306074A (ja) 情報処理装置
JPH09160786A (ja) マイクロプロセッサ
JPH09218859A (ja) マルチプロセッサ制御システム
JP2980163B2 (ja) データ転送方式
JP2000066946A (ja) メモリコントローラ
JP2008217659A (ja) Dma転送起動方法
JPH11306073A (ja) 情報処理装置
JP2008191840A (ja) 制御システム及び制御方法

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BW BY BZ CA CH CN CO CR CU CZ DK DM DZ EC EE EG ES FI GB GD GE GM HR HU ID IL IN IS JP KE KG KP KZ LC LK LR LS LT LU LV MA MD MK MN MW MX MZ NA NI NO NZ PG PH PL PT RO RU SC SD SE SG SK SY TJ TM TN TR TT TZ UA UG US UZ VN YU ZA ZM

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SZ TZ UG ZM ZW AM AZ BY KG MD RU TJ TM AT BE BG CH CY DE DK EE ES FI FR GB GR HU IE IT MC NL PL PT RO SE SI SK TR BF CF CG CI CM GA GN GQ GW ML MR SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006542120

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase