Abstract:
Presented herein are systems and methods for two address map for transactions between an X-bit processor and a Y-bit wide memory. A processor subsystem comprises a first address space, a second address space, and a bridge. The first address space stores data words of a first length. The second address space stores data words of a second length. The bridge performs one transaction after receiving a transaction with an address corresponding to the first address space and performs two transactions after receiving a transaction with the address corresponding to the second address space.

Description:
RELATED APPLICATIONS  
       [0001]    This application claims priority to Provisional Application for U.S. Patent, Serial No. 60/446,411, entitled “Two address Map for Transactions Between an X-bit Processor and a Y-bit Wide Memory”, filed Feb. 10, 2003, by Sandeep Bhatia, which is incorporated herein by reference. 
     
    
     
       FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT  
         [0002]    [Not Applicable] 
         MICROFICHE/COPYRIGHT REFERENCE  
         [0003]    [Not Applicable] 
         BACKGROUND OF THE INVENTION  
         [0004]    A common problem in application specific integrated circuits occurs when processors with different data word widths interact. For example, a 32-bit processor may interact with a 16-bit processor subsystem.  
           [0005]    The 16-bit subsystem may include both 16 and 32 bit data words, and may also include a bridge between the wider bus of the 32-bit processor and the 16-bit processor. The data space of the 16-bit processor may contain both 16 and 32 bit wide variables. The 32 bit variables are stored in 16 bit memory as two consecutive 16 bit variables, each carrying the low and the high part of the 32 bit variable.  
           [0006]    Typically, when the 32 bit processor wants to access the data space of the 16 bit processor to get a 16-bit variable, it would just put out the address and, depending on whether the system uses big Endian format, or little Endian format, the bridge would read from the appropriate location and return the data to the 32-bit processor.  
           [0007]    There are several designs wherein a 32 bit processor can access the data space of the 16 bit processor to read 32 bit variables stored as two 16 bit variables. A simple form of reading the 32 bit word is having the 32 bit processor perform two 16 bit operations. However, the foregoing can have coherency issues as there can be a substantial delay between the two 16 bit operations. In the time between the two 16 bit transactions, the 16 bit processor may have changed one or both of the 16 bit words or another software thread running on the 32 bit processor may end up accessing this 16 bit pair. Thus, special Semaphore mechanism need to be employed between the processors and the threads to avoid these problems.  
           [0008]    Processors can have, what are called byte enables. These signals correspond to the various bytes on the bus. Therefore, if the bus is 32 bits wide, there would be four byte enables. When the 32 bit processor seeks to access 32 bits, it would drive all the byte enables and the bridge could be designed to recognize that all the four bytes are required. The bridge can then perform dual 16 bit transactions in the internal data space and return the 32 bit word.  
           [0009]    The bridge has to ensure that the 16 bit processor does not get between the two 16-bit transactions as that can possibly allow the 16 bit processor to change the value of either or both, thereby causing a faulty transaction.  
           [0010]    The problem with this is the dependency on the availability of byte enables. Moreover, more and more systems are being designed in a manner that the dependency on byte enables is removed, because it makes the system Endian neutral.  
           [0011]    Another way is to implement the capability to access 32 bit words is for the bridge to have a control bit that could be configured at the start of the transaction that indicates whether the next transaction with be 16 bit or a 32-bit transaction requiring the bridge to perform two 16 bit transactions.  
           [0012]    The problem with this type of implementation is that extra effort has to be put to make the system software thread safe. Multiple processes running on the 32 bit processor may need to access the 16 bit processor data space. If one process begins a 32 bit transaction, it will have to first configure the bit to 32 bit mode, and then do a 32-bit read or write. In the meantime, if another software thread wanting to use this may also come in between the flag setting and the actual transaction, potentially corrupting the flag as the next thread may want to do a 16-bit transaction, resulting in fault operation for the other thread.  
           [0013]    Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of ordinary skill in the art through comparison of such systems with the present invention as set forth in the remainder of the present application with reference to the drawings.  
         BRIEF SUMMARY OF THE INVENTION  
         [0014]    Presented herein are systems and methods for two address map for transactions between an X-bit processor and a Y-bit wide memory.  
           [0015]    In one embodiment, there is presented a processor subsystem for transacting data. The processor subsystem comprises memory that is mapped to a first address space and a second address space, and a bridge. The first address space stores data words of a first length. The second address space stores data words of a second length. The bridge performs one transaction after receiving a transaction with an address corresponding to the first address space and performs two or more transactions after receiving a transaction with the address corresponding to the second address space.  
           [0016]    In another embodiment, there is present a method for transacting data. The method comprises receiving a transaction for a target address; performing one transaction if the target address corresponds to a first address space; and performing two or more transactions if the target address corresponds to a second address space.  
           [0017]    In another embodiment, there is presented a circuit for transacting data. The circuit comprises a processor subsystem and a processor. The processor subsystem comprises a memory that is mapped to a first address space and a second address space, and a bridge. The bridge performs one transaction after receiving a transaction with an address corresponding to the first address space and performs two or more transactions after receiving a transaction with the address corresponding to the second address space. The processor requests transactions from the processor subsystem.  
           [0018]    These and other features and advantages of the present invention may be appreciated from a review of the following detailed description of the present invention, along with the accompanying figures in which like reference numerals refer to like parts throughout.  
       
    
    
     BRIEF DESCRIPTION OF SEVERAL VIEWS OF THE DRAWINGS  
       [0019]    [0019]FIG. 1 describes an exemplary system wherein the present invention can be practiced;  
         [0020]    [0020]FIG. 2 describes an exemplary processor in accordance with an embodiment of the present invention;  
         [0021]    [0021]FIG. 3 is a block diagram describing the processor in accordance with an embodiment of the present invention; and  
         [0022]    [0022]FIG. 4 is a flow diagram describing the operation of the processor in accordance with an embodiment of the present invention.  
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0023]    Referring now to FIG. 1, there is illustrated a block diagram describing an exemplary circuit wherein the present invention can be practiced. The circuit comprises a processor  105 Y, a processor subsystem  105 Y, and a bus  110 . The processor  105 Y operates on Y-bit data words while the processor subsystem  105 X operates on X-bit data words, wherein X&gt;Y, and wherein both X and Y are integer powers of two. For example, in an exemplary case, the processor  105 X can operate on 32-bit words, while the processor subsystem  105 Y can operate on 16 bit words.  
         [0024]    The bus  110  comprises a X bit bus and allows the processor  105 X to access the processor subsystem  105 Y. The access can include both reads and writes. Additionally, the accesses can either by X-bit or Y-bit.  
         [0025]    Referring now to FIG. 2, there is illustrated a block diagram describing the processor subsystem  105 Y in accordance with an embodiment of the present invention. The processor subsystem  105 Y comprises memory mapped to two address spaces as viewed by the processor  105 X, a bridge  210 , and a processor  215 .  
         [0026]    One address space is associated with Y-bit transactions while the other address space is associated with the X bit transactions. Accesses by the processor  105 Y and  105 X to the memory using one of the address spaces are Y-bits while accesses by the processor  105 X to the memory using the other of the address spaces are X-bits.  
         [0027]    In an exemplary embodiment, the address spaces can have the addresses that have the same least significant bits, but a differ by the most significant bits. For example, one address space can be 0x0F00 through 0x0FFF, while the other address space is 0x1F00 through 0x1FFF. Where the address spaces  205 X and  205 Y have addresses that have the same least significant bits, but differ by the most significant bits, the most significant bits of the address can be used to indicate to the processor subsystem  105 Y, whether the transaction is X bit or Y bit.  
         [0028]    When the processor  105 X seeks to access the memory  205 , the processor  105 X will send the address of the location onto the bus  110  to processor subsystem  105 Y. The address will either be in the first address space or the second address space. The transaction is either Y bit or X bit, depending on whether the address is in the first address space or the second address space. Where the transaction is Y bit and the address is in the first address space, an address decode logic in the bridge  210  responds by having the bridge perform only one Y bit transaction internally. When the transaction is X bit, the address is in the second address space, and address decode logic in the bridge  210  responds by having the bridge internally perform two or more Y bit transactions back to back and complete the X bit transfer. The number of transactions is equivalent to the ratio between X and Y. Accordingly, there are no coherency issues, and the software on processor  105 X is thread safe.  
         [0029]    It is noted that on for a Y bit read transaction, where only Y bits are read, the X-Y most significant bits on the bus  110  are loaded with zeroes by the bridge  210 . In a Y bit write transaction, the bridge  210  can be configured to only write the Y least significant bits received on the bus  110 .  
         [0030]    Referring now to FIG. 3, there is illustrated a block diagram describing an exemplary bridge  210 . The bridge  210  comprises address decode logic  305  for decoding an address and fetching the contents from the address. The address decode logic  305  decodes an address and determines whether the address corresponds to the first address space that is associated with Y bit transactions or the second address space that is associated with X bit transactions.  
         [0031]    A first logic circuit  310  within the address decode logic  305  decodes the address. A second logic circuit  315  within the address decode logic  305  receives the decoded address and determines whether the address is in the first address space that is associated with Y bit transactions or the second address space that is associated with X bit transactions.  
         [0032]    In an exemplary case, where the address spaces have addresses that have the same least significant bits, but differ by the most significant bits, the second logic circuit  315  can input the most significant bits of the address and determine whether the transaction is X bit or Y bit. For example, where one address space is 0x0F00 through 0x0FFF, and the second address space is 0x1F00 through 0x1FFF, the second logic circuit  315  can make the determination based on the bit  12  (where bit  0  is the least significant) of the decoded address.  
         [0033]    Where the decoded address corresponds to address space that is associated with X bit transactions, the second logic circuit  315  sets a control signal  317  transmitted to a third logic circuit  320 .  
         [0034]    The third logic circuit  320  receives the decoded address and the rest of the transaction from the processor  105 X and either causes bridge  210  perform one transaction on the decoded address or to perform a transaction on the decoded address and another transaction on the X/Y−1 next addresses to the decoded address. Where the third logic circuit  320  receives a set control signal  317 , the third logic circuit  320  causes the bridge  210  to perform a transaction on the decoded address and another transaction on the X/Y−1 next addresses to the decoded address. Where the third logic circuit  320  does not receive a set control signal  317 , the third logic circuit  320  cause the bridge  210  to perform a transaction on just the decoded address.  
         [0035]    Referring now to FIG. 4, there is illustrated a flow diagram for performing X or Y bit transactions between an X bit processor and a Y bit processor subsystem. At  405 , the X bit processor  105 X issues either a transaction to a target address via the bus  110  to processor subsystem  105 Y. Depending on which address space the target address corresponds to( 410 ), the transaction is X bit or Y bit.  
         [0036]    If the target address corresponds to a particular one of the address spaces, e.g., a first address space, the transaction is Y bit and the address decode logic decodes and accesses the contents from the provided address ( 415 ) and the bridge  210  performs only one Y bit transaction internally. If the target address corresponds to another one of the address spaces, e.g., a second address space, the transaction is X bits and the address decode logic decodes and access the contents from the provided address ( 420 ) and the X/Y−1 next addresses ( 425 ). The bridge performs X/Y Y bit transactions back to back, internally, and completes the transfer to processor  105 X.  
         [0037]    One embodiment of the present invention may be implemented as a board level product, as a single chip, application specific integrated circuit (ASIC), or with varying levels integrated on a single chip with other portions of the system as separate components. The degree of integration of the system will primarily be determined by speed and cost considerations. Because of the sophisticated nature of modern processors, it is possible to utilize a commercially available processor, which may be implemented external to an ASIC implementation of the present system. Alternatively, if the processor is available as an ASIC core or logic block, then the commercially available processor can be implemented as part of an ASIC device with various functions implemented as firmware.  
         [0038]    While the present invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the present invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the present invention without departing from its scope. Therefore, it is intended that the present invention not be limited to the particular embodiment disclosed, but that the present invention will include all embodiments falling within the scope of the appended claims.