BRIEF DESCRIPTION OF THE DRAWINGS
The nature, principle, and utility of the invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings in which like parts are designated by identical reference numbers, in which:
FIG. 1 is a block diagram showing a conventional semiconductor device;
FIG. 2A and FIG. 2B are explanatory views showing register mapping of an internal resource in a semiconductor device;
FIG. 3 is a timing chart showing an operation during an external write access in the conventional semiconductor device;
FIG. 4 is an explanatory view showing a data flow during an external write access in the conventional semiconductor device;
FIG. 5 is a timing chart showing an operation during an external read access in the conventional semiconductor device;
FIG. 6 is an explanatory view showing a data flow during an external read access in the conventional semiconductor device;
FIG. 7 is a block diagram showing a first embodiment of the present invention;
FIG. 8 is a timing chart showing operations during an external write access in the semiconductor device of FIG. 7;
FIG. 9 is an explanatory view showing a data flow during an external write access in the semiconductor device of FIG. 7;
FIG. 10 is a timing chart showing operations during an external read access in the semiconductor device of FIG. 7;
FIG. 11 is an explanatory view showing a data flow during an external read access in the semiconductor device of FIG. 7; and
FIG. 12 is a block diagram showing a second embodiment of the present invention.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
Hereinafter, embodiments of the present invention will be explained using drawings. FIG. 7 shows a first embodiment of the present invention. FIG. 7 is explained below, but for the same elements as those explained with FIG. 1, the same symbols as those used in FIG. 1 are used, and detailed descriptions thereof are omitted. A semiconductor device DEVa of FIG. 7 is constituted by replacing the bus interface circuit BIF in the semiconductor device DEV of FIG. 1 with a bus interface circuit BIFa.
The bus interface circuit BIFa is constituted of a control unit CUa and a buffer unit BU. Note that in the semiconductor device DEVa, a write buffer BUFW of the buffer unit BU is assigned an address P and is accessible from an external bus BUSE. Further, a read buffer BUFR of the buffer unit BU is assigned an address Q and is accessible from the external bus BUSE. The control unit CUa is basically the same as the control unit CU. The difference between the control unit CUa and the control unit CU will be clear by explanations of FIG. 8 to FIG. 11.
FIG. 8 shows operations during an external write access in the semiconductor device of FIG. 7. FIG. 9 shows a data flow during an external write access in the semiconductor device of FIG. 7. Note that the operations shown in FIG. 8 are an operation during a write access to a register to which an address A is assigned in the internal resource RSC1 from the external bus BUSE (cycles C1, C2) and an operation during a write access to a register to which an address M is assigned in the internal resource RSC2 from the external bus BUSE (cycle C3). Further, in FIG. 9, a bold arrow designated (C1) shows a data flow in the cycle C1 of FIG. 8, a bold arrow designated (C2) shows a data flow in the cycle C2 of FIG. 8, and a bold arrow designated (C3) shows a data flow in the cycle C3 of FIG. 8.
In the cycle C1, the external bus BUSE sets an external address signal ADE to the address P and sets an external data signal DE [15:0] to data D (A), and activates an external write signal /WRE to low level. Accompanying this, the control unit CUa deactivates an external ready signal /RDYE to high level, and activates a buffer write signal WRBW for the buffer unit BU (write buffer BUFW) to high level. Accordingly, the write buffer BUFW accepts external data signal DE [15:0] set to the data D (A) (FIG. 9 (C1)). Then, the external bus BUSE deactivates the external write signal /WRE to high level, and thereafter, the control unit CUa activates the external ready signal /RDYE to low level.
In the cycle C2, the external bus BUSE sets the external address signal ADE to an address A+2 and sets the external data signal DE [15:0] to data D (A+2), and activates the external write signal /WRE to low level. Accompanying this, the control unit CUa sets the internal address signal ADI to the address A+2 and activates the internal write signal /WRI to low level, and activates a selection signal /SELW for the buffer unit BU (gate circuit GW) to low level. Accordingly, the gate circuit GW outputs the output signal of the write buffer BUFW set to the data D (A) as an internal data signal DI [31:16] (FIG. 9 (C2)). Simultaneously, the buffer unit BU outputs the external data signal DE [15:0] set to the data D (A+2) as an internal data signal DI [15:0] (FIG. 9 (C2)). Accordingly, an internal bus BUSI writes the data D (A), D (A+2) to the register to which the address A is assigned in the internal resource RSC1. Corresponding to this, the internal bus BUSI deactivates an internal ready signal /RDYI to high level. Accompanying this, the control unit CUa deactivates the external ready signal /RDYE to high level, and thereafter, deactivates the internal write signal /WRI to high level. Further, the external bus BUSE deactivates the external write signal /WRE to high level after the external ready signal /RDYE is deactivated. Thereafter, the control unit CUa activates the external ready signal /RDYE to low level.
In the cycle C3, the external bus BUSE sets the external address signal ADE to an address M+2 and sets the external data signal DE [15:0] to data D (M+2), and activates the external write signal /WRE to low level. Accompanying this, the control unit CUa sets the internal address signal ADI to the address M+2, and activates the internal write signal /WRI to low level. Simultaneously, the buffer unit BU outputs the external data signal DE [15:0] set to the data D (M+2) as the internal data signal DI [15:0] (FIG. 9 (C3)). Accordingly, the internal bus BUSI writes the data D (M+2) to the register to which the address M is assigned in the internal resource RSC2. Corresponding to this, the internal bus BUSI deactivates the internal ready signal /RDYI to high level. Accompanying this, the control unit CUa deactivates the external ready signal /RDYE to high level, and thereafter deactivates the internal write signal /WRI to high level. Further, after the external ready signal /RDYE is deactivated, the external bus BUSE deactivates the external write signal /WRE to high level. Thereafter, the control unit CUa activates the external ready signal /RDYE to low level.
FIG. 10 shows operations during an external read access in the semiconductor device of FIG. 7. FIG. 11 shows a data flow during an external read access in the semiconductor device of FIG. 7. Note that the operations shown in FIG. 10 are an operation during a read access to a register to which an address A is assigned in the internal resource RSC1 from the external bus BUSE (cycles C1, C2) and an operation during a read access to a register to which an address M is assigned in the internal resource RSC2 from the external bus BUSE (cycle C3). Further, in FIG. 11, a bold arrow designated (C1) shows a data flow in the cycle C1 of FIG. 10, a bold arrow designated (C2) shows a data flow in the cycle C2 of FIG. 10, and a bold arrow designated (C3) shows a data flow in the cycle C3 of FIG. 10.
In the cycle C1, the external bus BUSE sets the external address signal ADE to the address A and activates the external read signal /RDE to low level. Accordingly, the control unit CUa sets the internal address signal ADI to the address A and activates the internal read signal /RDI to low level. Accompanying this, after deactivating the internal ready signal /RDYI to high level, the internal bus BUSI reads the data D (A), (D (A+2) from the register to which the address A is assigned in the internal resource RSC1, and sets the internal data signals DI [31:16], DI [15:01 to the data D (A), D (A+2). Thereafter, the control unit CUa deactivates the external ready signal /RDYE to high level and activates a buffer write signal WRBR for the buffer unit BU (read buffer BUFR) to high level. Accompanying this, the read buffer BUFR accepts internal data signal DI [31:16] set to the data D (A) (FIG. 11 (C1)). Simultaneously, the buffer unit BU outputs the internal data signal DI [15:0] set to the data D (A+2) as the external data signal DE [15:0] (FIG. 11 (C1)). Then, the control unit CUa deactivates the internal read signal /RDI to high level, and thereafter, the internal bus BUSI activates the internal ready signal /RDYI to low level. Further, after the external ready signal /RDYE is deactivated, the external bus BUSE deactivates the external read signal /RDE to high level. Thereafter, the control unit CUa activates the external ready signal /RDYE to low level.
In the cycle C2, the external bus BUSE sets the external address signal ADE to the address Q and activates the external read signal /RDE to low level. Accordingly, the control unit CUa deactivates the external ready signal /RDYE to high level and activates a selection signal /SELR for the buffer unit BU (gate circuit GR) to low level. Accompanying this, the gate circuit GR outputs an output signal of the read buffer BUFR set to the data D (A) as the external data signal DE [15:0] (FIG. 11 (C2)). Then, after the external ready signal /RDYE is deactivated, the external bus BUSE deactivates the external read signal /RDE to high level. Thereafter, the control unit CUa activates the external ready signal /RDYE to low level.
In the cycle C3, the external bus BUSE sets the external address signal ADE to the address M+2 and activates the external read signal /RDE to low level. Accordingly, the control unit CUa sets the internal address signal ADI to the address M+2 and activates the internal read signal /RDI to low level. Accompanying this, after deactivating the internal ready signal /RDYI to high level, the internal bus BUSI reads the data D (M+2) from the register to which the address M is assigned in the internal resource RSC2 and sets the internal data signal DI [15:0] to the data D (M+2). Thereafter, the control unit CUa deactivates the external ready signal /RDYE to high level. Simultaneously, the buffer unit BU outputs the internal data signal DI [15:0] set to the data D (M+2) as the external data signal DE [15:0] (FIG. 11 (C3)). Then, the control unit CUa deactivates the internal read signal /RDI to high level, and thereafter, the internal bus BUSI activates the internal ready signal /RDYI to low level. Further, after the external ready signal /RDYE is deactivated, the external bus BUSE deactivates the external read signal /RDE to high level. Thereafter, the control unit CUa activates the external ready signal /RDYE to low level.
In the first embodiment as above, the write buffer BUFW and the read buffer BUFR in the bus interface circuit BIFa are accessible from the external bus BUSE, and the write access (read access) from the external bus BUSE to the write buffer BUFW (read buffer BUFR) is used only during the write access (read access) from the external bus BUSE to a register in the internal resource RSC1, so that the write access (read access) from the external bus BUSE to a register in the internal resource RSC2 can be completed by one cycle. Further, when writing same data to a plurality of registers in the internal resource RSC1, the data may be written to the write buffer BUFW by only a first cycle, so that a write access with the same data from the external bus BUSE to the plurality of registers in the internal resource RSC1 can be completed in a less number of cycles. Thus, the external access can be completed by a minimum number of cycles, which can contribute largely to improvement in efficiency of the external access.
FIG. 12 shows a second embodiment of the present invention. FIG. 12 is explained below, but for the same elements as those explained with FIG. 1 and FIG. 7, the same symbols as those used in FIG. 1 and FIG. 7 are used, and detailed descriptions thereof are omitted. A semiconductor device DEVb of FIG. 12 is constituted by replacing the bus interface circuit BIFa in the semiconductor device DEVa of FIG. 7 with a bus interface circuit BIFb. The bus interface circuit BIFb is constituted of a control unit CUa and a buffer unit BUa. The buffer unit BUa is constituted by replacing the write buffer BUFW and the read buffer BUFR in the buffer unit BU with a read-write buffer BUFRW. The read-write buffer BUFRW functions as both the write buffer BUFW and the read buffer BUFR. Since no contention occurs between the write access and the read access by the external bus BUSE, the normality of the external access will not be lost even when the read-write buffer BUFRW is provided to replace the write buffer BUFW and the read buffer BUFR.
In the second embodiment as above, the same effects as in the first embodiment can be obtained. Further, in the second embodiment, the read-write buffer BUFRW realizes both the functions of the write buffer BUFW and the read buffer BUFR, so that the circuit scale of the bus interface circuit BIFb can be reduced as compared to the bus interface circuit BIFa, which can contribute to reduction in scale of the semiconductor device DEVb.
The invention is not limited to the above embodiments and various modifications may be made without departing from the spirit and scope of the invention. Any improvement may be made in part or all of the components.