TECHNICAL FIELD

This disclosure generally relates to artificial reality, such as virtual reality and augmented reality.

BACKGROUND

Artificial reality is a form of reality that has been adjusted in some manner before presentation to a user, which may include, e.g., a virtual reality (VR), an augmented reality (AR), a mixed reality (MR), a hybrid reality, or some combination and/or derivatives thereof. Artificial reality content may include completely generated content or generated content combined with captured content (e.g., real-world photographs). The artificial reality content may include video, audio, haptic feedback, or some combination thereof, and any of which may be presented in a single channel or in multiple channels (such as stereo video that produces a three-dimensional effect to the viewer). Artificial reality may be associated with applications, products, accessories, services, or some combination thereof, that are, e.g., used to create content in an artificial reality and/or used in (e.g., perform activities in) an artificial reality. The artificial reality system that provides the artificial reality content may be implemented on various platforms, including a head-mounted display (HMD) connected to a host computer system, a standalone HMD, a mobile device or computing system, or any other hardware platform capable of providing artificial reality content to one or more viewers.

SUMMARY OF PARTICULAR EMBODIMENTS

Particular embodiments described herein relate to a generic configurable framework including a number of distributed bridging units (e.g., also referred to as control units or racing control units (RCUs)) for coordinating a data producing unit to share data with one or more data consuming units through a dynamically allocated buffer (e.g., a linear buffer or a circular buffer) in a shared memory unit (e.g., rather than dedicated memory unit). The framework may include a number of bridging units each being associated with a data producing unit or a data consuming unit. The bridging units may be connected to the shared memory unit through a network (e.g., a network on chip) for transmitting data and/or control commands. The bridging units may control the memory access of the respective data producing unit and data consuming units. The dynamically allocated buffer could be a linear buffer or circular buffer for passing data from the data producing unit to the data consuming units. The bridging units may be connected to each other through communication links (e.g., a ring bus, a point-to-point link) for exchanging memory address information.

In particular embodiments, a data producing unit may generate and write data into a guarded writing region (also referred to as a guarded writing window) in the buffer while the data consuming units read data from a guarded reading region (also referred to as a guarded reading window) of the buffer. A first bridging unit associated with the data producing unit may send a first memory address (e.g., a position tracker of the guarded writing region such as a starting address or a reference address of the guarded writing region, or a current write pointer address) to one or more bridging units associated with the data consuming units. The bridging units associated with the data consuming units may determine the guarded writing region of the buffer based on the first memory address and prevent the corresponding data consuming units from accessing the guarded writing region of the buffer. The bridging units associated with data consuming units may send a second memory address, associated with the data reading processes of the data consuming units, to the first bridging unit associated with the data producing unit. The first bridging unit may determine the guarded reading region of the buffer based on the second memory address and prevent the data producing unit from accessing the guarded reading region. The data producing unit may access the guarded writing region of the buffer using a raster scanning pattern, a tile-row scanning pattern, a slice scanning pattern, or a random accessing pattern. The data consuming unit may access the guarded reading region of the buffer using a raster scanning pattern, a tile-row scanning pattern, a slice scanning pattern, or a random accessing pattern. The data consuming units may access the guarded reading region using a pattern which could be the same to or different from the memory accessing pattern of the data producing unit. The data consuming units may start to read data from buffer, as soon as the data producing unit generates a programmable data amount (e.g., a minimum data amount allowing the data consuming units to work on), without waiting for the data producing unit to finish generating a whole frame of data. By using distributed bridging units, the framework could reduce the memory footprint of the buffer for sharing data and reduce the latency and the total execution time of the data processing pipeline including the data producing unit and data consuming units.

In an embodiment, a method may comprise, by one or more control units:storing a first position tracker associated with a first window of memory blocks in a memory unit, the first window being associated with a data writing process of a first processing unit;allowing the first processing unit to write within the first window;receiving, from a second processing unit, a read request for reading data stored at a memory-reading address;comparing the memory-reading address to a first starting address of the first window; preventing the second processing unit from reading the data based on a determination that the memory-reading address is greater than or equal to the first starting address of the first window;storing, based on a determination that the data writing process is complete, an updated first position tracker associated with a second window of memory blocks in the memory unit; andallowing the second processing unit to read the data based on a determination that the memory-reading address is less than a second starting address of the second window.

The memory unit may be shared with one or more other functional modules, and the first window of memory blocks and the second window of memory blocks may be within a dynamically allocated linear buffer in the memory unit.

The first window of memory blocks may be protected from being accessed by the second processing unit before the first processing unit finishes writing within the first window of memory blocks.

In an embodiment, a method may comprise:releasing the first window of memory blocks from the data writing process after the data writing process is complete; andallowing the second processing unit to read from the released first window of memory blocks.

The second window of memory blocks may have a third starting address equal to an ending address of the first window of memory blocks.

The one or more control units may comprise a first control unit associated with the first processing unit and a second control unit associated with the second processing unit, and the first control unit and the second control unit may be connected by a communication link.

In an embodiment, the comparing the memory-reading address to the first starting address of the first window may comprise:receiving, by the second control unit, the first position tracker associated with the first window from the first control unit via the communication link; and determining the first starting address of the first window based on the first position tracker.

The first and second windows of memory blocks may be within a dynamically allocated circular buffer in the memory unit, and the dynamically allocated circular buffer may comprise a third window of memory blocks associated with a data reading process of the second processing unit for reading data from the third window of memory blocks.

In an embodiment, a method may comprise:storing, by the second control unit, a second position tracker associated with the third window of memory blocks in the memory unit; andallowing, by the second control unit, the second processing unit to read from the third window of memory blocks.

In an embodiment, a method may comprise:receiving, by the first control unit, the second position tracker associated with the third window of memory blocks from the second control unit via the communication link; anddetermining, by the first control unit, an address range associated with the third window.

In an embodiment, a method may comprise:receiving, by the first control unit, a write request from the first processing unit for writing into a memory-writing address; andpreventing, by the first control unit, the first processing unit from writing into the memory-writing address based on a determination that the memory-writing address falls within the address range associated with the third window.

In an embodiment, a method may comprise:releasing the third window of memory blocks from the data reading process of the second processing unit after the data reading process is complete; andallowing the first processing unit to write within the released third window of memory blocks.

In an embodiment, a method may comprise:storing, by the second control unit, based on a determination that the data reading process is complete, an updated second position tracker associated with a fourth window of memory blocks in the memory unit; andallowing, by the second control unit, the second processing unit to read from the fourth window.

The fourth window of memory blocks may have a third starting address equal to an ending address of the third window of memory blocks.

The fourth window of memory blocks may be protected from being accessed by the first processing unit before the second processing unit finishes reading data from the fourth window of memory blocks.

The first processing unit may write into the first window of memory blocks using a first memory accessing pattern, and the second process unit may read from the third window of memory blocks using a second memory accessing pattern different from the first memory accessing pattern.

The first processing unit may write into the first window of memory blocks using a tile-row scanning pattern, and the second process unit may read from the third window of memory blocks using a raster scanning pattern.

The first memory accessing pattern and the second memory accessing pattern may be random memory accessing patterns.

In an embodiment, one or more computer-readable non-transitory storage media may embody software that is operable when executed to:store a first position tracker associated with a first window of memory blocks in a memory unit, the first window being associated with a data writing process of a first processing unit; allow the first processing unit to write within the first window;receive, from a second processing unit, a read request for reading data stored at a memory-reading address;compare the memory-reading address to a first starting address of the first window;prevent the second processing unit from reading the data based on a determination that the memory-reading address is greater than or equal to the first starting address of the first window;store, based on a determination that the data writing process is complete, an updated first position tracker associated with a second window of memory blocks in the memory unit; andallow the second processing unit to read the data based on a determination that the memory-reading address is less than a second starting address of the second window.

In an embodiment, a system may comprise: one or more non-transitory computer-readable storage media embodying instructions; and one or more processors coupled to the storage media and operable to execute the instructions to:store a first position tracker associated with a first window of memory blocks in a memory unit, the first window being associated with a data writing process of a first processing unit;allow the first processing unit to write within the first window;receive, from a second processing unit, a read request for reading data stored at a memory-reading address;compare the memory-reading address to a first starting address of the first window;prevent the second processing unit from reading the data based on a determination that the memory-reading address is greater than or equal to the first starting address of the first window;store, based on a determination that the data writing process is complete, an updated first position tracker associated with a second window of memory blocks in the memory unit; andallow the second processing unit to read the data based on a determination that the memory-reading address is less than a second starting address of the second window.

In an embodiment, one or more computer-readable non-transitory storage media may embody software that is operable when executed to perform a method according to or within any of the above mentioned embodiments.

In an embodiment, a system may comprise: one or more processors; and at least one memory coupled to the processors and comprising instructions executable by the processors, the processors operable when executing the instructions to perform a method according to or within any of the above mentioned embodiments.

In an embodiment, a computer program product, preferably comprising a computer-readable non-transitory storage media, may be operable when executed on a data processing system to perform a method according to or within any of the above mentioned embodiments.

Particular embodiments described herein relate to systems and methods for efficiently buffering data generated by a data producing unit and consumed by one or more data consuming units. In particular embodiments, the buffer could be a linear buffer (e.g., with a size equal to a frame of data of a video stream). A first memory address (e.g., a write pointer or a position tracker) associated with the guarded writing region of the data producing unit may be sent to a data consuming unit which may determine the guarded writing region based on the first memory address. The control unit associated with data consuming unit may compare the current read pointer to the starting address of the guarded writing region and prevent the data consuming unit from reading from the memory space corresponding to the current read pointer when the current read pointer is equal to or higher than the starting address of the guarded writing region. The data producing unit may release memory space of the guarded writing region after finishing writing data into the guarded writing region. The memory space of the guarded writing region, after being released by the data producing unit, may be accessed by the data consuming unit for reading data from this memory space.

In particular embodiments, the buffer could be a circular buffer which could have a smaller size than a frame size of the buffered video stream. A first memory address (e.g., a write pointer or a position tracker) associated with the guarded writing region of the data producing unit may be sent to a control unit associated with a data consuming unit which may determine the guarded writing region based on the first memory address. The control unit associated with the data consuming unit may compare the current read pointer of the data consuming unit to the address range of the guarded writing region and prevent the data consuming unit from reading from the memory space corresponding to the current read pointer when the current read pointer falls within the address range of the guarded writing region, inclusively. The data consuming unit may release the guarded reading region after finishing reading data from the guarded reading region. The memory space released by the data consuming unit may be recycled and accessed by the data producing unit for writing data into this memory space. A second memory address (e.g., a read pointer) associated with the guarded reading region may be sent to the control unit associated with the data producing unit which may determine the guarded reading region based on the second memory address. The control unit associated with data producing unit may compare the current write pointer of the data producing unit to the address range of the guarded reading region and prevent the data producing unit from writing data into the memory space corresponding to the current write pointer when the current write pointer falls within the address range of the guarded reading region, inclusively. The data producing unit may release the memory space of the guarded writing region after finishing writing data into the guarded writing region. The memory space released by the data producing unit may be accessed by the data consuming unit for reading data from this memory space.

The embodiments disclosed herein are only examples, and the scope of this disclosure is not limited to them. Particular embodiments may include all, some, or none of the components, elements, features, functions, operations, or steps of the embodiments disclosed above. Embodiments according to the invention are in particular disclosed in the attached claims directed to a method, a storage medium, a system and a computer program product, wherein any feature mentioned in one claim category, e.g. method, can be claimed in another claim category, e.g. system, as well. The dependencies or references back in the attached claims are chosen for formal reasons only. However, any subject matter resulting from a deliberate reference back to any previous claims (in particular multiple dependencies) can be claimed as well, so that any combination of claims and the features thereof are disclosed and can be claimed regardless of the dependencies chosen in the attached claims. The subject-matter which can be claimed comprises not only the combinations of features as set out in the attached claims but also any other combination of features in the claims, wherein each feature mentioned in the claims can be combined with any other feature or combination of other features in the claims. Furthermore, any of the embodiments and features described or depicted herein can be claimed in a separate claim and/or in any combination with any embodiment or feature described or depicted herein or with any of the features of the attached claims.

