METHOD OF OPERATING A MEMORY DEVICE HAVING DECOUPLED ADDRESS AND DATA ACCESS

A buffer manager provides address information for reading and writing data to an SDRAM. The address information is translated from a flat memory address space into an SDRAM address space. The buffer manager operates based upon a first clock and the SDRAM operates based upon a second clock. Accordingly, a synchronization circuit synchronizes the data. The translation of address information occurs simultaneously with the synchronization of data.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
FIELD OF THE INVENTION

[0001] The present invention relates generally to accessing an SDRAM, and in particular to decoupling address and data paths to an SDRAM.

BACKGROUND OF THE INVENTION

[0002] Synchronous dynamic random access memory (SDRAM) is a type of memory which is used in a wide variety of applications. An SDRAM may be divided into a plurality of banks. Each bank is further divided into a plurality of pages. In a typical SDRAM with a 48-bit wide data bus and an 8-bit wide column address, a page has 1.5 Kbytes of memory. To access a page, the SDRAM must perform pre-charge and activate operations. The pre-charge and activate operations cause some delay in accessing a memory location, however sequential accesses to the same page do not require additional pre-charge and activate operations. Nonetheless, to access a new page, the SDRAM must perform pre-charge and activate operations on the new page. These pre-charge and activate operations also causes some delay in accessing the desired memory location. To speed access to data stored in the SDRAM, data which will be accessed together should be stored on the same page. This acts to minimize the number of pre-charge and activate delays.

[0003] Since each bank includes a plurality of pages, the access of a memory location in a new page may or may not occur within the same bank. If the access of a memory location does cross a bank boundary and therefore also a page boundary, the pre-charge operation may begin before completion of the previous access. On the other hand, if the access of a memory location crosses a page boundary but does not cross a bank boundary, the pre-charge operation may not begin until after the completion of the previous access.

[0004] In some applications, the memory manager (or control process) which stores data to the SDRAM operates based upon one clock (i.e., in a first clock domain) and the SDRAM operates based upon another clock (i.e., in a second clock domain). These clocks may be asynchronous and may operate at different frequencies. When the memory manager attempts to access the SDRAM both address and data information must cross the clock domain boundary. In other words, both the address and data information must be synchronized from the first clock to the second clock. The synchronization of address and data information across the clock domain boundary delays memory access.

[0005] One application, which uses an SDRAM in a different clock domain, involves network switches which temporarily store packet data. For example, network switches are frequently used on Ethernet networks to connect multiple sub-networks. A switch receives packet data from one sub-network and passes that packet data onto another sub-network. Upon receiving a packet, a network switch may divide the packet data into a plurality of sub-packets or cells. Each of the cells includes additional header data. As is well known in the art, Ethernet packet data has a maximum size of approximately 1.5 Kbytes. With the additional header data associated with the cells, a packet of data has a maximum size of under 2 Kbytes.

[0006] After dividing the packet data into cells, the network switch may temporarily allocate a memory buffer in the SDRAM to store the packet before retransmission. The address and packet data are translated across the clock domain boundary to the SDRAM. The packet data is then stored in the memory buffer. For retransmission, the switch again accesses the SDRAM to retrieve the packet data. Both the storage and retrieval of data from the SDRAM introduce access delays.

[0007] In addition, for a 48-bit wide SDRAM with an 8-bit wide column address, the page size is 1.5 Kbytes. Accordingly, a 2-Kbyte Ethernet packet including cell headers will cross a page boundary. This introduces further access delays. On heavily-trafficked high-speed networks such delays can have a damaging effect on network performance.

[0008] Accordingly, an SDRAM is desired which may be configured as a buffer for storing Ethernet packet data. The SDRAM may operate in a clock domain different than a control process. Nonetheless, the SDRAM should operate to minimize access delays.

SUMMARY OF THE INVENTION

[0009] In one preferred embodiment, an address translation circuit for mapping address information to an SDRAM includes a buffer manager interface and a translation circuit. The buffer manager interface is configured to receive address information from a buffer manager. The buffer manager allocates a plurality of buffers each having a start address and an end address related therewith. The translation circuit is operationally coupled with the buffer manager interface. The translation circuit maps the start address of each of the plurality of buffers to a first bank and maps the related end address to a second bank, different than the first bank.

BRIEF DESCRIPTION OF THE FIGURES

[0010] FIG. 1 is a block diagram of a network including a network switch.

[0011] FIG. 2 is a block diagram of a packet of network data.

[0012] FIG. 3 is a flow chart of the operation of the network switch of FIG. 1 receiving and transmitting packet data.

[0013] FIG. 4 is a block diagram of one preferred embodiment of the switch of FIG. 1 including an SDRAM, a memory control unit and a buffer manager.

[0014] FIG. 5 is a block diagram of the switch of FIG. 4, including further detail of one preferred embodiment of the memory control unit.

[0015] FIG. 6 is a flow chart of one preferred write operation using the memory control unit of FIG. 5.

[0016] FIG. 7 is a flow chart of one preferred read operation using the memory controller unit of FIG. 5.

[0017] FIG. 8 is a table of one preferred address translation from a flat memory address space to an SDRAM address space.

[0018] FIG. 9 is a block diagram of the address translation of FIG. 8.

[0019] FIG. 10 is a block diagram of one preferred embodiment of an SDRAM memory address selection circuit.

[0020] FIG. 11 is a flow chart of one preferred operation of the memory control unit of FIG. 4 translating an address from a flat memory address space to an SDRAM address space.

[0021] FIG. 12 is a flow chart of one preferred operation of a memory control unit writing data to an SDRAM.

[0022] FIG. 13 is a flow chart of one preferred operation of a memory control unit reading data from an SDRAM.

DETAILED DESCRIPTION

[0023] Turning to FIG. 1, an Ethernet network 100 in accordance with the invention is described. The Ethernet network includes a switch 110 having a plurality of ports 120-125. The switch also includes a controller 112 and a memory 114. The controller 112 directs the flow of data between the ports 120-125. The controller 112 uses the memory 114 as temporary storage while data is being transmitted between the ports 120-125.

[0024] Each of the ports 120-125 connect to one of a plurality of sub-networks 130-135. The sub-networks may include a plurality of network devices or may include only a single network device such as a computer. The Ethernet network allows any of the sub-networks 130-135 to communicate with any other sub-network.

[0025] By way of example, sub-network 130 may communicate with sub-network 134 by sending a packet of data 140a. The packet of data 140a is received through port 120 by switch 110. Controller 112 then scans the packet of data 140a and saves it to the memory 114. Subsequently, controller 112 reads the packet of data 140a from the memory 114 and routes it to the appropriate port. As shown, the switch 110 has determined that the packet of data 140a should be routed to network 134 as the packet of data 140b. Controller 112 makes the routing decisions based upon information included in the packet of data 140a.

[0026] Turning to FIG. 2, a block diagram of a packet of data 140 is described. The packet of data 140 includes a start of frame delimiter (SOF) 210. The SOF 210 indicates the beginning of a packet of data. The packet of data 140 also includes a header 220, which includes information such as source address, destination address, and packet length 222. The packet of data 140 also includes a data field 230. This field is used to transmit information between network devices. Finally, the packet of data 140 includes an error check field 240. This field is used to determine whether the packet was corrupted during transmission over the network.

[0027] Turning to FIG. 3, a flow chart of the operation of the switch 110 of FIG. 1 is described. The switch 110 begins at step 310 where it receives a packet of data over one of its ports. At step 312, the switch 110 reads the header field to determine the packets length and destination. At step 314, the switch 110 then temporarily stores the packet in a memory buffer. At step 316, the switch 110 uses the destination information to determine the proper routing of the packet. In particular, the switch 110 determines which ports have a network device whose network ID matches the destination address of the packet. The network switch also determines whether the related network have sufficient bandwidth to transmit the packet. If so, the switch 110 reads the packet out of the memory buffer.

[0028] At step 318, the switch retransmits the packet over the port having a network device whose network ID matches that of the destination address of the packet. Multicast and broadcast packets are transmitted over multiple ports.

[0029] Turning to FIG. 4, a block diagram of one preferred embodiment of the switch 110 of FIG. 1 is described. The switch 110 includes an SDRAM 410, a memory control unit 424, and buffer manager 426. The buffer manager 426 manages the flow of packet data into the SDRAM 410. More specifically, the buffer manager 426 assigns buffers to incoming packets and monitors the allocation of buffers as data is written to and read from the SDRAM 410.

[0030] The SDRAM 410 consists of three SDRAM chips 412-416, each with a 16-bit data bus (not shown). Each SDRAM chip includes two banks, 211 rows, and 28 columns. Together the SDRAM chips 412-416 provide 6 Mbytes of memory. The memory locations are accessed over a 20-bit address bus.

[0031] Packet data and address information are passed from the buffer manager 426 to the memory control unit 424. Memory control unit 424 uses the address information to save the packet data into the SDRAM 410.

[0032] Memory control unit 424 also connects to a register access unit 420, clock multiplexor 422, scan controller 430, and reset block 428. The register access unit 420 is used to store error information, which may be communicated to the switch 110. The clock multiplexor 422 provides one clock signal (clk_sdram_out_c) for the SDRAM 410 and another clock signal (clk50cgm_c) for the other clocked circuits, including buffer manager 426. These two clocks are asynchronous to one another and may operate at different frequencies. Accordingly, memory control unit 424 also operates to coordinate the transfer of packet data and address information across these two clock domains.

[0033] Reset block 428 is used to coordinate initialization of SDRAM 410 and memory control unit 424. Scan controller 430 is used for testing the memory control unit 424 in manufacturing the integrated circuit.

[0034] A brief description of the clock signals clk50cgm_c and clk_sdram_out_c is given in the following table: 1 Memory Control Unit - Clock Signals Signal Signal Name Type Signal Polarity Description clk50cgm_c I Pulse Positive Edge 50-MHz clock clk_sdram_out_c I Pulse Positive Edge 50-MHZ to 100-MHz clock

[0035] The Type column indicates that the signals are input (I) to the memory control unit 424. The Signal column indicates that the signals are digital pulse signals (Pulse). The Polarity column indicates that the clocks trigger circuit elements on a positive transition. The Signal Description gives the acceptable range of the clock signal frequencies.

[0036] A brief description of the signals between the register access unit 420, the reset block 428, the scan controller 430 and the memory control unit 424 is given in the following table: 2 Memory Control Unit - Interface Signals Signal Name I/F Type Signal Description reset_done RESET I CGM clock has stabilized. mcu_bypass RESET I Bypasses initial 200 us powerup wait on SDRAM. (not shown) reg_init_done RESET I Registers contain valid bits. cas_lat [1:0] RAU I CAS latency 00: 4 01: 1 10: 2 (default) 11: 3 start_post RAU I Trigger SDRAM power-on-self-test operation. (not shown) mcu_done RESET O DRAM initialized and passed self-test; MCU is ready for normal operation. dram_err RAU O DRAM failed self-test; all DRAM access is disabled. rbus_dram_err4 [15:0] RAU O [15:7] reserved. [6:6]: post_done: asserted when post is finished. [5:4]: DRAM checker pattern. [3:0]: DRAM address (high bits). rbus_dram_err3 [15:0] RAU O DRAM address (low bits). rbus_dram_err2 [15:0] RAU O Erroneous data (high bits) reset_ios_enb RESET I I/O-cell-output enable allowed. (not shown) scan_en SCAN I Enables SCAN chain shift registers. rbus_dram_err1 [15:0] RAU O Erroneous data (mid bits). rbus_dram_err0 [15:0] RAU O Erroneous data (low bits).

[0037] The I/F column indicates the source or destination of the signal. The register access unit 420 is denoted by RAU, reset block 428 is denoted by RESET, and scan controller 430 is denoted by SCAN. The Type column indicates whether the signal is an input (I) or an output (O) signal as seen by the memory control unit 424. The Signal Description column provides a brief description of the signal.

[0038] A brief description of the signals between the SDRAM 410 and the memory control unit 424 is given in the following table: 3 Memory Control Unit - SDRAM Signals SIGNAL NAME I/F TYPE SIGNAL DESCRIPTION RAS SDRAM O Row-address strobe, sampled at rising edge of CLK Defines SDRAM operation. CAS SDRAM O Column-address strobe, sampled at rising edge of CLK. Defines SDRAM operation. WE SDRAM O Write enable, sampled at rising edge of CLK. Defines SDRAM operation. DQM SDRAM O DOM high places SDRAM DQ buffers in high-Z state; disables read from SDRAM operation and blocks write to SDRAM operation. DQM low enables such read and write operations. A11 SDRAM O BS low selects bank A; BS high selects bank B. A10-A0 SDRAM O Address selection signals within bank A and bank B. DQ [47:0] SDRAM I/O Data from SDRAM

[0039] The I/F column indicates the source or destination of the signal. The SDRAM 410 is denoted SDRAM. The Type column indicates whether the signal is an input (I) or an output (O) signal as seen by the memory control unit 424. The Signal Description column provides a brief description of the signal.

[0040] In addition to the above table, the clk_sdram_out_c signal is routed through the memory control unit 424. The memory control unit 424 provides this signal to the SDRAM 410 as SDRAM_CLOCK_OUT.

[0041] During a Bank-Active command cycle, A0-A10 defines the row address (RA0-RA10) when sampled at the rising edge of SDRAM_CLK_OUT. During a read or write command cycle, A0-A7 defines the column address (CA0-CA7) when sampled at the rising edge of SDRAM_CLK_OUT. The A10 bit high enables automatic pre-charge on bank selected by A11. The A10 bit low disables automatic pre-charge. During a pre-charge command cycle, the A10 bit high enables pre-charging both banks A and B. The A10 bit low enables pre-charging selected bank by the A11 bit. In one preferred embodiment, the automatic pre-charge is not used because does not accommodate variable burst sizes.

[0042] A brief description of the signals between the buffer manager 426 and the memory control unit 424 is given in the following table: 4 Memory Control Unit - Buffer Manager Signals Signal Name I/F Type Signal Description cmd_valid BM I A valid command is present on dram_wr, dram_rd. start_addr [19:0] BM I The address of the first word in a cell. burst_size [5:0] BM I Number of words in the cell. no_info_wd BM I Info word present if (˜no_info_wd & bm_tag_req==1) is true. dram_wr BM I Command is a write to DRAM command. dram_rd BM I Command is a read from DRAM command. bm_tag_req [3:0] BM I A unique tag for this write/read command. cmd_ack BM O Read/write command and tag are acknowledged; only until then should cmd_valid, start_addr, burst_size, dram_wr, dram_rd, and BM_tag_req [3:0] be de- asserted; cmd_ack is de-asserted when burst_wr or burst_rd is asserted (or BM's SM breaks). bm_tag_res [3:0] BM O Tag same as BM_tag_req [3:0]; issued when burst_wr or burst_rd command is asserted, burst_wr BM O Asserted at the beginning of a cell-write burst, and at the same time de-asserting cmd_ack, data can be sent from BM on the next clock; de-asserted on writing the word in the cell to MCU FIFO; this is an envelop signal. send_wr_data BM O Word data should be sent from BM on the next single clock and are latched by MCU a clock later. burst_rd BM O Asserted at the beginning of a cell-read burst, and at the same time de-asserting cmd_ack, data can be sent to BM on the same clock; de-asserted one clock after reading the last word in cell from MCU FIFO; this is an envelop signal. data_valid BM O Word data are sent to BM on the same clock and should be latched by BM on the next clock. mcu_bm_data [47:0] BM O Data going from MCU to BM.

[0043] Again, the I/F column indicates the source or destination of the signal. The buffer manager 426 is denoted BM. The Type column indicates whether the signal is an input (I) or an output (O) signal as seen by the memory control unit 424. The Signal Description column provides a brief description of the signal.

[0044] Turning to FIG. 5, a block diagram of switch 110, including further detail of one preferred embodiment of the memory controller unit 424, is described. Memory control unit 424 is divided into two clock domains: clk_sdram_out_c and clk50cgm_c. Signals in the clk_sdram_out_c domain are valid following a positive transition in this clock signal. Signals in the clk50cgm_c domain are valid following a positive transition in this clock signal.

[0045] Memory control unit 424 includes an SDRAM interface controller 510, an SDRAM command controller 522, and a buffer manager command controller 524. The SDRAM command controller 522 receives command information from the buffer manager 426 through the buffer manager command controller 524. Since the SDRAM command controller 522 and the buffer manager 426 operate in different clock domains, the buffer manager command controller 524 operates to coordinate the transfer of command information across the clock domains. In response to commands from the buffer manager 426, the SDRAM controller 522 provides control signals to the SDRAM interface controller 510. In addition to these signals, the SDRAM interface controller 510 receives signals directly from the buffer manager 426, multiplexors 512 and 514, and DPRAM controller 526. In response to these signals, the SDRAM interface 510 reads and writes data to the SDRAM 410.

[0046] More specifically, the SDRAM controller 510 receives start and end address signals from multiplexors 512 and 514. These address signals are used to select a starting and ending address location within the SDRAM 410 and are based upon signals received from buffer manager 426. Specifically, the buffer manager provides a start address and a packet size to address converter 520. In response to these signals, the address converter 520 selects start and end address locations within SDRAM 510. The selected addresses are saved in registers 516 and 518. The address conversion is described in further detail below. The registers 516 and 518 in turn provide the address information to multiplexors 512 and 514. Multiplexor 512 provides the start address to SDRAM controller 510; Multiplexor 514 provides the end address information to SDRAM controller 510.

[0047] Although the address conversion has been described with reference to specific circuit elements, the same functionality may be implemented using other configurations. For example, the same functionality may be implemented in software.

[0048] The SDRAM controller 510 reads and writes data to the SDRAM 410. This data is provided to and received from the buffer manager 426 through a synchronization circuit. The synchronization circuit includes DPRAM controllers 526 and 536, DPRAMs 528 and 532, and pointer controllers 530 and 534. The synchronization operates to translate data across the clk_sdram_out_c to clk50cgm_c clock boundary.

[0049] More specifically, DPRAM 528 acts as a FIFO. Packet data received by DPRAM controller 536 is written to DPRAM 528 and this packet data is subsequently read out of DPRAM 528 by DPRAM controller 526. The write and read operations are coordinated by pointer controller 530. Pointer controller 530 monitors DPRAM 528 so that unread elements are not overwritten and so that the oldest packet data is read first. The DPRAM controllers 536 and 526 each maintain a pointer to the DPRAM 528 to write and read data to the FIFO. The pointer controller 528 coordinates these pointers across the clock domains.

[0050] Similarly, DPRAM 532 acts as a FIFO, except that packet data received by DPRAM controller 526 is written to DPRAM 532 and this packet data is subsequently read out of DPRAM 532 by DPRAM controller 536.

[0051] A dual port fifo with synchronized read and write pointers is described in further detail in copending application ______, titled “DUAL PORT FIFO WITH SYNCHRONIZED READ AND WRITE POINTERS”, filed Sep. 17, 1998 (ATTY-DOCKET No.: NSC1-E3200) and is incorporated herein by reference.

[0052] Turning to FIG. 6, a flow chart of one preferred write operation using the memory controller unit of FIG. 5 is described. Beginning at step 610, the buffer manager 426 receives a packet of data. At step 612, the buffer manager 426 allocates a buffer in the SDRAM 410. Buffer manager 426 passes both a starting address and a burst size to memory control unit 424. As mentioned above, packet data may be divided into cells. Accordingly, the burst length is used to indicate the length of the cell. By dividing packet data into cells, data may be written to the SDRAM 410 before an entire packet has been received.

[0053] At step 614, the memory control unit 424 provides the starting address and burst size to address converter 520. The address converter 520 converts the start address from a flat memory address space to an SDRAM memory space. This conversion is described further below. The address converter 520 also determines an end address by adding the burst size to the start address.

[0054] At step 616, the memory control unit 424 receives data from the buffer manager 426. This data is translated across the clock domains simultaneously with the address conversion. In particular, the data is pushed onto a FIFO stack and the FIFO pointers are synchronized across the clock domains. This allows the data to be popped from the FIFO stack in the other clock domain.

[0055] At step 618, the address has been translated and the data has been synchronized to the SDRAM's clock. Accordingly, the memory control unit 424 writes the synchronized data to the SDRAM 410. At step 620, the memory control unit 424 determines whether the last data word has been written to SDRAM 410. The SDRAM 410 writes data to sequential memory locations. When the SDRAM reaches the end address, as calculated at step 614, the SDRAM returns to step 610 to wait for additional packet data.

[0056] Turning to FIG. 7, a flow chart of one preferred read operation using the memory control unit of FIG. 5 is described. Beginning at step 710, the buffer manager 426 selects a buffer which contains packet data and passes both a starting address and a burst size to memory control unit 424. At step 712, the memory control unit 424 provides the starting address and burst size to address converter 520. The address converter 520 converts the start address from a flat memory address space to an SDRAM memory space. This conversion is described further below. The address converter 520 also determines an end address based upon the start address and the burst size.

[0057] At step 714, the memory control unit 424 passes the start and end address to SDRAM 410. In turn, SDRAM 410 begins reading data from sequential addresses beginning at the start address. This data is translated across the clock domains simultaneously with the address conversion. In particular, the data is pushed onto a FIFO stack and the FIFO pointers are synchronized across the clock domains. This allows the data to be popped from the FIFO stack in the other clock domain.

[0058] At step 716, the SDRAM determines whether the end address has been reached. If not, the SDRAM 410 returns to step 714 to read data from the next sequential address. Otherwise, the data read is complete.

[0059] Accordingly, at step 718, the buffer manager transmits the packet data to the appropriate network device and returns to step 710 to select the next buffer.

[0060] FIG. 8 is a table of one preferred address translation from a flat memory address space to an SDRAM address space. This address translation is performed by address converter 520 of FIG. 5. The flat memory address space is divided into six buffers (1-6) as indicated in the Relative Buffer # column. Each of the buffers is allocated a range of memory location within the flat memory address space. This allocation is indicated by the From Flat Addr column. For example, buffer 1 is allocated flat memory address space 000-14F (listed as 000-OFF and 100-14F) in hexadecimal notation. The other buffers are similarly allocated memory in the flat memory address space.

[0061] Since each of the buffers is larger than one page, each of the buffers are mapped into two banks. For example, a portion of buffer #1 is mapped into bank 1 and a portion of buffer #1 is mapped into bank 2. More specifically, flat memory locations 000-OFF are mapped to bank #1 and flat memory locations 100-14F are mapped to bank #2. The physical memory locations within the banks are indicated by the To Physical Addr column.

[0062] The Condition column indicates the mapping condition. For example, the first entry, “0<=[10:4]<10” indicates that if the value of address bits ten through four are greater than or equal to 0 and less than 10, then the address locations will be mapped to physical address locations in the range of 000-0FF in Bank 1. Since the flat memory address locations match the physical memory address locations, no operation need be performed on these addresses.

[0063] For the second entry, if the tenth through fourth bits satisfy the condition 15<=[10:4]<25, then the second physical address range is selected. Accordingly, the flat memory address locations 150-24F are mapped to the physical memory address locations 100-1FF. This translation is performed according to both the Operation column and the Additional Operation column. Specifically, the Operation column indicates that the tenth through eighth bits (“[10:8]”) are mapped to 001 in binary notation. The Additional Operation indicates that the seventh through fourth bits (“[7:4]”) are reduced by 5. These two operations are applied to each flat memory address location to generate the corresponding physical memory address location.

[0064] The other entries operate in a similar manner so that each flat memory address location is mapped to a physical address memory location. The condition column is applied to the flat memory address location. If the flat memory address location falls within the selected range, then the corresponding operations from the Operation and Additional Operation column are applied to the flat memory address location. These operations generate the physical memory address location.

[0065] Turning to FIG. 9, a block diagram of the address translation of FIG. 8 is described. The flat memory address space 902 is divided into blocks 910-920. Blocks 910-920 are each mapped to the physical memory address space by the address converter 520 (shown in FIG. 5). The mapping of memory block 918 is shown in detail. The other memory blocks are similarly mapped.

[0066] In particular, block 918 is subdivided into six buffers. These buffers occupy pages 930-944 of the SDRAM 410. Pages 930, 934, 938 and 942 are in Bank A of the SDRAM 410. Pages 932, 936, 940 and 944 are in Bank B of the SDRAM 410. Page 942 is subdivided into a first portion 950, a second portion 951 and a third portion 952. Page 944 is subdivided into a first portion 953, a second portion 954 and a third portion 955.

[0067] Buffer 1 occupies page 930 and the first portion 953 of page 944. Buffer 2 occupies page 932 and the second portion 951 of page 942. Buffer 3 occupies page 934 and the third portion 955 of page 944. Buffer 4 occupies page 936 and the first portion 950 of page 942. Buffer 5 occupies page 938 and the second portion 954 of page 944. Buffer 6 occupies page 940 and the third portion 952 of page 942.

[0068] When writing packet data to a buffer, the memory control unit 424 first accesses pages 930-940. Accordingly, these pages are termed main pages. If a main page is not able to hold an entire packet, then the memory control unit 424 accesses a portion of pages 942-944. Accordingly, these pages are termed supplemental pages.

[0069] For example, the memory control unit 424 may attempt to store a 2-Kbyte packet of data into buffer 1. Data is first written to page 930, however, this page can only hold 1.5-Kbytes of data. Accordingly, the remaining packet data is written to the first portion 953 of page 944. Since page 930 is in Bank A and page 944 is in Bank B, the pre-charge operation on page 944 may begin before completion of writes to page 930.

[0070] Turning to FIG. 10, a block diagram of one preferred embodiment of an SDRAM memory address selection circuit 1000 is described. The SDRAM memory address selection circuit includes flat-to-SDRAM address translators 1010 and 1018 as well as start address translator 1016. Together, these translators receive start address and burst size information from a buffer manager and generate address start and address end signals for an SDRAM. The SDRAM memory address circuit 1000 allows the buffer manager to address the SDRAM as a flat memory. This simplifies implementation of the buffer manager.

[0071] The start address information is provided by the start_addr signal and the burst size information is provided by the burst_size signal. Adder 1012 adds the start_addr signal to the burst_size signal. The output of adder 1012 is provided to subtractor 1014, which decrements this output by one. The output of subtractor 1014 is the end address location and is provided as the end_addr signal.

[0072] The start_addr signal is also provided to flat-to-SDRAM address translator 1010. The start_addr signal is a 20-bit wide signal. The eleven least significant bits of the start_addr signal (i.e. [10:0]) are converted according to the table shown in FIG. 8. The nine most significant bits are not altered by the flat-to-SDRAM address translator 1010.

[0073] The eleven least significant bits are sufficient to map a buffer into a main page in one bank and a supplemental page in another bank. In addition, use of the nine most significant bits would require additional translation circuitry and therefore additional logic gates. This would in turn delay the address conversion.

[0074] The eleven least significant bits, which were converted according to the table shown in FIG. 8, are combined with the nine most significant bits of the start_addr signal to provide the addr0_start signal. This signal is the start address in the SDRAM.

[0075] In addition, flat-to-start address translator 1010 provides a main-page signal (main_page), and a main-page end address signal (addr0_end). The main_page signal indicates whether the translated starting address mapped to a main page. If so the main_page signal is asserted. Otherwise, the main_page signal is de-asserted. The addr0_end signal indicates the last available address location on the main page. Turning back to FIG. 9, the last available address in main page 930 is 255 (0FFh).

[0076] The start address translator 1016 receives the end_addr signal and the main_page signal. The start address translator 1016 indicates the first available address location in a supplemental page. Turning back to FIG. 9, the first available address location in supplemental page 944 for Buffer 1 1792 (700h). For data other than packet data, reads and writes may occur from a supplemental page to a main page. For example, addr0_start may be assigned 700h. Accordingly, main_page is de-asserted, then addr1_start would then be assigned 100h (i.e. the beginning of Buffer 2).

[0077] The end_addr signal is also provided to flat-to-SDRAM address translator 1018. The end_addr signal is a 20-bit wide signal. The eleven least significant bits of the end_addr signal (i.e. [10:0]) are converted according to the table shown in FIG. 8. The nine most significant bits are not altered by the flat-to-SDRAM address translator 1018.

[0078] The eleven least significant bits, which were converted according to the table shown in FIG. 8, are combined with the nine most significant bits of the end_addr signal to provide the addr1_end signal. This signal is end address in the supplemental page of the SDRAM.

[0079] Page: 27

[0080] To speed up address translations, all four addresses, namely addr0_start, addr0_end, add1_start and addr1_end, are generated simultaneously. These address signals will be used differently depending upon whether the subject cell will be contained within one page.

[0081] If a cell is contained within one page, then addr0_start points to the actual SDRAM start address, addr0_end points to the last address on the same SDRAM page, addr1_start points to the first address of the next SDRAM page in sequence, and addr1_end points to the actual end address on the same SDRAM page as addr0_start. Therefore, in this case, only addr0_start and addr1_end will be used by an SDRAM controller. Specifically, the SDRAM controller will use addr0_start as the starting address and addr1_end as the ending address. Since all data is written to one page, the SDRAM controller can ignore page boundaries.

[0082] If a cell is contained within two SDRAM pages, then addr0_start points to the actual SDRAM start address, addr0_end points to the last address on the same SDRAM page, addr1_start points to the first address of the next SDRAM page in sequence, and addr1_end points to the actual end address on the same SDRAM page as addr1_start. Therefore, in this case, all four addresses will be used by an SDRAM controller. Specifically, the SDRAM controller will first use addr0_start and addr0_end to write (or read) data to the first page. The SDRAM controller will then use addr1_start and addr1_end to write (or read) data to the second page.

[0083] Turning to FIG. 11, a flow chart of one preferred operation of the memory control unit of FIG. 4 translating an address from a flat memory address space to an SDRAM address space is described. At step 1110, the memory control unit receives a flat-memory address signal and a burst size. At step 1112, the memory control unit translates the flat-memory address signal into an SDRAM address signal. The translation occurs according to the table shown in FIG. 8. At step 1114, the memory control unit adds the burst size to the flat-memory address signal to provide a flat-memory end address signal. At step 1116, the memory control unit translates the flat-memory end address signal to an SDRAM end address signal.

[0084] At step 1118, the memory control unit determines whether the SDRAM start address signal falls on a main page. If not, the translation is complete. Otherwise at step 1120, the memory control unit determines whether the SDRAM end address signal falls on a main page. If so, the translation is complete. Otherwise the data will cross a page boundary. Accordingly, at step 1122, the memory control unit generates page boundary address signals. The page boundary address signals indicate the last available address location on the main page and the first available address location on the supplemental page. The translation is then terminated.

[0085] The above-described mapping acts to speed data access. Specifically, this mapping arranges packet data, which will be accessed together but cannot be stored in the same page in different banks. This allows the pre-charge and activate operations to begin before the completion of the previous access and thereby further reduce data access time.

[0086] In addition, during normal operation, Buffer 1 will be accessed first. As shown in FIG. 9, a first portion of Buffer 1 (i.e., block 930) resides in Bank, A and a second portion of Buffer 1 (i.e., block 950) resides in Bank B. Typically, a packet of data will not occupy an entire page of memory. Accordingly, only block 930 will be accessed. Buffer 2 will be accessed next. Since the first portion of this buffer resides in Bank B (i.e., page 932), this page may be pre-charged and activated while data is still being written to Bank A. The main pages of other sequential buffers are likewise arranged in different banks. This arrangement acts to speed data access.

[0087] Although the embodiments described herein implement an address translation which receives start and length address information, the address translation may also receive start and end address information. The same translation may be applied to such address information. In addition, the address translation may generate start, length or burst size information depending upon the requirements of the SDRAM.

[0088] More specifically, as described above, start_addr and burst_size are provided by a buffer manager and are converted into addr0_start, addr0_end, addr1_start, and addr1_end in SDRAM address space. Equivalenty, start_addr and burst_size may be converted into addr0_start, addr0_size, addr1_start, and addr1_size. In other words, instead of generating the start and end addresses, it is functionally equivalent to generate the start addresses and the sizes of bursts for those start addresses.

[0089] Turning to FIG. 12, a flow chart of one preferred operation of a memory control unit writing data to an SDRAM is described. The memory control unit begins at step 1210 where it receives a write command, address information, and data. The address information includes a start address and a burst size. The memory control unit proceeds to block 1212. Here, the memory control unit translates the address information into an SDRAM address space. Simultaneously, the memory control unit synchronizes the data across a clock domain boundary.

[0090] At step 1214, the memory control unit initiates pre-charge and activate operations on a main page in a first bank. At step 1216, the memory control unit writes data to sequential address locations in the main page.

[0091] At step 1218, the memory control unit determines whether data will be written to a supplemental page in a second bank. If not, the memory control unit returns to step 1210. Here, the memory control unit waits to receive the next command. With a 50/50 chance in a dual bank SDRAM system, the next write will occur on a page in the second bank. At step 1214, the memory control unit may initiate the next pre-charge and activate operations before completion of the previous write.

[0092] Otherwise, the memory control unit proceeds to step 1220. Here, the memory control unit initiates the pre-charge and activate operations on the supplemental page in the second bank. During these operations, data is simultaneously written to the main page in the first bank. When the memory control unit has filled the main page with data, it proceeds to step 1222. Here the memory control unit writes data to the supplemental page. Upon completion of the write operation, the memory control unit returns to step 1210.

[0093] Turning to FIG. 13,.a flow chart of one preferred operation of a memory control unit reading data from an SDRAM is described. The memory control unit begins at step 1310 where it receives a read command and address information. The address information includes a start address and a burst size. The memory control unit proceeds to block 1312. Here, the memory control unit translates the address information into an SDRAM address space.

[0094] At step 1314, the memory control unit initiates pre-charge and activate operations on a main page in a first bank. At step 1316, the memory control unit reads data from sequential address locations in the main page. This data is synchronized across a clock domain boundary to Buffer Manager 426.

[0095] At step 1318, the memory control unit determines whether data will be read from a supplemental page in a second bank. If not, the memory control unit returns to step 1310. Here, the memory control unit waits to receive the next command. With a 50/50 chance in a dual bank SDRAM system, the next read will occur on a page in the second bank., At step 1314, the memory control unit may initiate the next pre-charge and activate operations before completion of the previous read.

[0096] Otherwise, the memory control unit proceeds to step 1320. Here, the memory control unit initiates the pre-charge and activate operations on the supplemental page in the second bank. During these operations, data is simultaneously read from the main page in the first bank and synchronized. When the memory control unit has filled the main page with data, it proceeds to step 1322. Here the memory control unit reads data from the supplemental page. Upon completion of the write operation, the memory control unit returns to step 1310.

[0097] The above described operation speeds SDRAM access by allowing the simultaneous translation of address information and synchronization of data.

[0098] Although the embodiments described herein are with reference to a network device, the present invention is applicable to any device which translates memory addresses from a flat memory address space or which synchronizes data from one clock to another clock. In addition, although the present invention is described with reference to particular functional blocks and tables, other designs may perform the same functionality or obtain the same advantages using different configurations. Those having ordinary skill in the art will certainly understand from the embodiments disclosed herein that many modifications are possible without departing from the teachings hereof. All such modifications are intended to be encompassed within the following claims.

Claims

1. A memory control unit for controlling an SDRAM comprising:

a buffer manager interface configured to receive commands, address information and data from a buffer manager wherein the buffer manager operates based upon a first clock;
an address translation circuit operationally coupled with the buffer manager interface and configured to translate the address information into an SDRAM address space;
a data synchronization circuit operationally coupled with the buffer manager interface and configured to synchronize the data to a second clock while the address translation circuit translates the address information into the SDRAM address space; and
an SDRAM interface operationally coupled with the address translation circuit and the data synchronization circuit and configured to write the data to an SDRAM based upon the translated address information, wherein the SDRAM operates based upon the second clock.
Patent History
Publication number: 20020199055
Type: Application
Filed: Jun 6, 2002
Publication Date: Dec 26, 2002
Inventor: Sheung-Fan Wen (Sunnyvale, CA)
Application Number: 10163561
Classifications
Current U.S. Class: Dynamic Random Access Memory (711/105); Access Timing (711/167); Address Mapping (e.g., Conversion, Translation) (711/202)
International Classification: G06F012/10; G06F012/00;