Abstract:
A bit pattern conversion system for converting a sequence of a bit pattern between a central processing unit and a peripheral circuit, including a data bus line connected between the central processing unit and the peripheral circuit, and a conversion circuit provided in the peripheral circuit for converting the sequence of the bit pattern from a most significant bit to a least significant bit, and vice versa, in accordance with a conversion signal.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a bit pattern conversion system for converting a sequence of a bit pattern from a most significant bit (MSB) to a least significant bit (LSB), and vice versa. 
     2. Description of the Related Art 
     In a computer system, a data bus line is provided, for example, between a central processing unit (CPU) and a memory (RAM), and used for transferring data therebetween in series. The data stored in the memory is read out by, for example, a CRT controller as a peripheral circuit to display the data on the CRT. In this case, the sequence of the bit pattern of the data transferred in series from the CPU is often converted from the MSB to the LSB, and vice versa, when the data is stored in the memory, because the transfer sequence of the bit pattern is not uniform between various kinds of CPU and LSI circuits of the CRT controller. That is, it is necessary to convert the sequence of the bit pattern for some LSI circuits. Further, when an inverted character or image is displayed on the CRT, it becomes necessary to convert the sequence of the bit pattern. Therefore, it is necessary to provide a conversion means for converting the sequence of the bit pattern between the CPU and the peripheral circuit, or to provide software for converting the sequence of the bit pattern in the CPU. 
     SUMMARY OF THE INVENTION 
     The object of the present invention is to provide a bit pattern conversion system enabling an easy connection between a CPU and a peripheral circuit, for example, a CRT controller, without recognition of the sequence of the bit pattern. 
     In accordance with the present invention, there is provided a bit pattern conversion system for converting a sequence of a bit pattern between a central processing unit and a peripheral circuit, comprising: a data bus line connected between the central processing unit and the peripheral circuit, and a conversion circuit provided in the peripheral circuit for converting the sequence of the bit pattern from a most significant bit to a least significant bit, and vice versa, in accordance with a conversion signal. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings: 
     FIGS. 1 and 2 are schematic block diagrams of a conventional bit pattern conversion system; 
     FIGS. 3 and 4 are schematic block diagrams of a bit pattern conversion system according to an embodiment of the present invention; 
     FIG. 5 is a detailed diagram of the conversion circuit shown in FIGS. 3 and 4; 
     FIG. 6 is a schematic block diagram of a bit pattern conversion system according to another embodiment of the present invention; and 
     FIG. 7 is a schematic block diagram of a bit pattern conversion system according to still another embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Before describing the preferred embodiments, an explanation will be given of a conventional bit pattern conversion method, for reference. 
     In FIGS. 1 and 2, CRTC is a cathode-ray tube controller constituted by a large scale integrated circuit (LSI), and DB is a data bus line provided between the CPU and the CRTC. As shown in FIG. 1, the transfer sequence of the bit pattern is not converted in the CRTC. That is, the sequence from the MSB to the LSB is used in the CRTC without conversion. This is because the sequence of the bit pattern used in the CRTC complies with the sequence of the bit pattern of the CPU. 
     As shown in FIG. 2, A is a conversion circuit provided on the data bus line DB for converting the sequence of the bit pattern from the MSB to the LSB, and vice versa. This is provided when the sequence of the bit pattern used in the CRTC is reversed. For example, when the sequence of the bit pattern is expressed by &#34;01011001&#34;, this bit pattern is converted to &#34;10011010&#34; by the conversion circuit A. In this case, the MSB is &#34;0&#34; and the LSB is &#34;1&#34;. Usually, the conversion circuit A is prepared in an external portion of the RAM chip as an additional circuit. Therefore, space for the conversion circuit is needed on the board, and thus the space of the board is limited. Further, software is also utilized for conversion of the sequence of the bit pattern. In this case, the predetermined conversion program is provided instead of the conversion circuit in the CPU. However, this softward imposes a heavy load on the CPU, and it is difficult for the user to operate such software. 
     A bit pattern conversion system according to the present invention will be explained in detail hereinafter. 
     In FIGS. 3 and 4, B is a conversion circuit provided in the CRTC, and C is an internal circuit also provided in the CRTC for dislaying the image data on the CRT. S is a bit conversion signal generated from the CPU and input to the conversion circuit B to convert the sequence of the bit pattern. As shown in FIG. 3, the sequence of the bit pattern is not converted by the conversion circuit B because the sequence of the bit pattern used in the internal circuit C complies with that of the CPU. As shown in FIG. 4, the sequence of the bit pattern is converted by the conversion circuit B in response to the conversion signal S. 
     The conversion signal S is generated from a system memory in the CPU. The system memory is constituted by a memory map, and the conversion signal S is stored in a register for bit conversion in the memory map. Therefore, the conversion signal S is read out from the memory map based on the predetermined control program when the bit conversion is necessary. 
     In FIG. 5, this conversion circuit B is used when the bit pattern is four bits. That is, D 3  to D 0  are input data constituted by 4 bits from the CPU, and DB 3  to DB 0  are data also constituted by 4 bits output to the CRTC in a write mode. In this case, D 3  is the MSB and D 0  is the LSB. The conversion circuit B is constituted by four blocks B 1  to B 4  each having the same structure, and each block corresponds to each bit. Block B 1  comprises two switching inverters 1 and 8, two NOR gates 2 and 7, and four AND gates 3 to 6. 
     The operation of this circuit will be explained in detail hereinafter. 
     Reference numbers 9 to 11 are inverters. The inverter 9 is connected to the switching inverter 1, the inverter 11 is connected to the switching inverter 8, and the inverter 10 is connected to the AND gates 3 to 6. RD is a read signal and WT is a write signal, and these signals are generated from the CPU. These signals are used for turning ON/OFF the switching inverters 1 and 8. 
     In the write mode from the CPU to the memory, the write signal WT is &#34;1&#34; and the switching inverter 8 is turned ON. When the conversion signal S is &#34;1&#34;,the output of the AND gate 5 becomes &#34;1&#34; or &#34;0&#34; according to the state of the bit &#34;D 3  &#34;. The output of the AND gate 6 becomes &#34;0&#34; regardless of the state of the bit &#34;D 0  &#34;. Therefore, the output of the NOR gate 7 becomes &#34;0&#34; or &#34;1&#34; according to the output of the AND gate 5. That is, when the output of the AND gate 5 is &#34;1&#34;, the output of the NOR gate 7 becomes &#34;0&#34;, and when the output of the AND gate 5 is &#34;0&#34;, the output of the NOR gate 7 becomes &#34;1&#34;. The output of the switching inverter 8 is an inverted signal of the output of the NOR gate 7. Therefore, the bit &#34;D 3  &#34; is not inverted but is output from the switching inverter 8 as the bit &#34;DB 3  &#34;. 
     When the conversion signal S is &#34;0&#34;, the output of the AND gate 5 is &#34;0&#34; and the output of the AND gate 6 becomes &#34;1&#34; or &#34;0&#34; according to the state of the bit &#34;D 0  &#34;. Therefore, the output of the NOR gate 7 becomes &#34;0&#34; or &#34;1&#34;, and the bit &#34;DB 3  &#34; becomes &#34;1&#34; or &#34;0&#34; according to the bit &#34;D 0  &#34;. Consequently, it is possible to convert the sequence of the bit pattern from the MSB to the LSB, and vice versa, in response to the conversion signal S in the write mode. 
     In the read mode from the memory to the CPU, the read signal RD is &#34;1&#34; and the switching inverter 1 is turned ON. In this case, the circuit is constituted by the AND gates 3 and 4, and the NOR gate 2, and the switching inverter 1 is used for converting the sequence of the bit pattern. The operation of this circuit is the same as that of the write mode explained above, and therefore, a detailed explanation thereof will be omitted. That is, the sequence of the bit pattern is converted in response to &#34;1&#34; or &#34;0&#34; of the conversion signal S. 
     Each of the blocks B 2  to B 4  has the same operation as the block B 1  in the write and read modes. Therefore, the bit &#34;D 2  &#34; corresponds to the bit &#34;DB 1  &#34; and the bit &#34;D 1  &#34; corresponds to the bit &#34;DB 2  &#34; when converting the sequence of the bit pattern. Consequently, in the four bits conversion, the correspondence of each bit is expressed by D 3  ⃡DB 0 , D 2  ⃡DB 1 , D 1  ⃡DB 2 , and D 0  ⃡DB 3 . 
     In FIG. 6, CS is a chip selection signal, and RAM is a display memory. The CRC is constituted by a large scale integrated circuit (LSI). For example, when an inverted character &#34;  &#34; is displayed on the CRT, the sequence of the bit pattern is converted by the conversion signal S in the conversion circuit B, and the converted bit pattern is stored in the RAM. The inverted character &#34;  &#34; can be displayed on the CRT by reading out from the RAM. In this case, the write signal is &#34;1&#34; since the data is written in the RAM. 
     In FIG. 7, D is a switching circuit for switching the connection of the data bus lines DB between the CPU and the display RAM. That is, when the data is written from the CPU to the RAM, the switching circuit D is turned ON so as to connect the CPU and the RAM by a control signal S 0 , and when the data is read out from the RAM to the CRTC, the switching circuit D is turned OFF so as to isolate the CPU from the RAM by the control signal S 0 . In this case, the data indicating an attribute of the character is added in the RAM at every one character by the CPU. That is, whether or not the character should be inverted is indicated by the attribute data on the RAM. The data from the RAM is converted by a conversion signal S 1  generated in the CRTC itself in accordance with the state of the attribute data transferred from the RAM to the CRTC. Therefore, the sequence of the bit pattern can be easily converted in the CRTC regardless of the transfer sequence from the CPU. In this case, the conversion signal S 1  is generated by the software in the CRTC.