摘要:
A method and system for cycle accurate data transfer between skewed source synchronous clocks is envisaged. The procedure starts through reset. On reset, both the write and read address registers are set to point to location 0. Source clock is stopped to disable active clock edges to both write and read address registers during the reset procedure. The source clock is subsequently started to deliver active edges w both write and read address registers. On every active source clock edge, data is pushed into the data register based on the location pointed by write address resister. On every skewed active clock edge, data is read from the data register based on the address pointed by read address register. Due to the delayed nature of clock reaching the read address register, write address register increments first and stores data into the data register.
摘要:
One embodiment of the present invention provides a system that performs a lock-free update to one or more fields in an existing node in a linked list. To perform the update, the system first obtains a new node to be added to the linked list, wherein other processes do not possess references to the new node and therefore cannot initially access the new node. Next, the system copies a snapshot of the existing node to the new node, and then updates one or more fields in the new node that correspond to the one or more fields in the existing node. Next, in a single atomic operation the system modifies a next pointer of the existing node to point to the new node and also marks the next pointer to indicate that the existing node is deleted. In this way, the new node becomes part of the linked list and the existing node is deleted in a single atomic operation.
摘要:
A method for accessing cells of a ring buffer by one or more writers, comprising: storing a current writer cell position value in each of a done writer index and a reserved writer index; storing a current reader cell position value in a done reader index; copying the current writer cell position value to an old writer variable of a writer of the one or more writers; assigning a trial next writer cell position value to a new writer variable of the writer; accepting the trial next writer cell position value if the trial next writer cell position value is not equal to the done reader index value; as a single operation, first, accepting the trial next writer cell position value as a next writer cell position value if the reserved writer index value is equal to the old writer variable value, and second, replacing the reserved writer index value with the new writer variable value; writing data by the writer to a cell of the ring buffer indicated by the next writer cell position value; and, when the done writer index value is equal to the old writer variable value, replacing the done writer index value with the new writer variable value; whereby the one or more writers are prevented from simultaneously accessing the cell of the ring buffer. In addition, a method for accessing cells of a ring buffer by one or more readers, comprising: storing a current reader cell position value in each of a done reader index and a reserved reader index; storing a current writer cell position value in a done writer index; copying the current reader cell position value to an old reader variable of a reader of the one or more readers; assigning a trial next reader cell position value to a new reader variable of the reader; accepting the trial next reader cell position value if the old reader variable value is not equal to the done writer index value; as a single operation, first, accepting the trial next reader cell position value as a next reader cell position value if the reserved reader index value is equal to the old reader variable value, and second, replacing the reserved reader index value with the new reader variable value; reading data by the reader from a cell of the ring buffer indicated by the next reader cell position value; and, when the done reader index value is equal to the old reader variable value, replacing the done reader index value with the new reader variable value; whereby the one or more readers are prevented from simultaneously accessing the cell of the ring buffer.
摘要:
A method and computing device for providing concurrent read and write access to a linked list of elements is presented. A linked list is provided wherein read access by a reader process and write access by a writer process may occur substantially concurrently. The linked list includes three internal lists for processes to reference elements of the linked list. The linked list also includes an updated indicator. Read access to the linked list is provided to a reader process such that the reader process accesses elements in the linked list according to a read list of the three internal lists. Write access to the linked list is provided to a writer process such that the writer process accesses elements in the linked list according to a write list of the three internal lists.
摘要:
The present invention discloses a method of managing lists in a multiprocessor system without the use of locks that prevent contention for the list. List management in a linear list with a front and a back of the list has applications where it is desirable to manage the list in a Last In First Out (LIFO) and a First In First Out (FIFO) or a combination of LIFO and FIFO. LIFO and FIFO list management can be done by restrictively adding data elements to the front, back and removing data elements from the front of a managed list. At certain times there can be contention for a list and either locking routines are in place to prevent contention or some other method is used to guarantee data element integrity. The present invention discloses a set of operations that when used with certain protocols allow two or more processors to access a list as a LIFO or FIFO in a multiprocessor system without the use of locks.
摘要:
A mechanism for maintaining the first-in first-out order of commands in a multiple-input and multiple-output buffer structure includes a command number generator for generating and assigning a command number to each command entering the buffer structure, and a command number comparator for comparing the command number of the outgoing command at each buffer in the buffer structure to determine which command should exit. Both command number generator and command comparator have a cyclic counter that has a period greater than or equal to the total number of allowable buffer entries in the buffer structure. For maintaining order of posted and non-posted command queues, a pending posted write counter is used in the posted command queue to record the number of pending posted write command and each entry in the non-posted command queue is associated with a dependency counter.
摘要:
A control apparatus controls writing and reading of data with respect to a memory which is randomly accessible. An address producing device produces an address by a method according to a predetermined rule, in response to a request to access the memory by the method according to the predetermined rule. A switching device selects one of an address with which the memory is randomly accessed and the address produced by the address producing device. Data is written into and read from the memory, at a location that corresponds to the address that is selected by the switching device and supplied to the memory. It is advantageous to provide a control device which supplies a switching signal to the switching device to cause the switching device to select one of the address with which the memory is randomly accessed and the address produced by the address producing device, depending upon the presence of a request to access the memory by the method according to the predetermined rule and the presence of a request to randomly access the memory.
摘要:
A FIFO stack is implemented using a DPRAM. One of the ports of the DPRAM is used to add elements to the FIFO stack, and the other port is used to remove elements from the FIFO stack. The ports operate in separate clock domains. A synchronization circuit coordinates the read and write operations across the clock domains.
摘要:
A data collision avoidance circuit is utilized in a memory write control circuit of an image signal processing apparatus for preventing the write and read clocks of a FIFO memory from colliding. The circuit contains a write enable signal generating unit, a window pulse section set up unit, and a write enable signal control unit. The write enable signal generating unit generates a write enable signal in response to the write control odd/even field signal to write the data into the FIFO memory. The window pulse section set up unit generates a window pulse signal having a predetermined pulse width. The time interval of the predetermined pulse width is designed to be greater than a time interval during which write and read clocks of the FIFO memory can potentially collide, and the window pulse signal is generated in response to a read control odd/even field signal. The write enable signal control unit is designed to suppress the write enable signal generated by the write enable signal generating unit in response to a predetermined edge of the write control odd/even field signal during the window pulse signal. As a result, the collision of the write and read clocks is prevented.
摘要:
The subject device manages the access to message queues in a memory (6) by an enqueuer 2 and a dequeuer 7 when the enqueuer has priority over the dequeuer. It solves the contention problem raised when the dequeuer dequeues the last message from a queue while the enqueuer is enqueuing anew one. A queue control block QCB and queue status bits E, A, D are assigned to each queue and stored in memories 20 and 22. Each time dequeuer 7 performs a dequeuing operation it sets its D bit (dequeuer active) before updating the queue head field in the QCB block. When the enqueuer performs an enqueuing operation it sets an abort bit A, if it finds the D bit active and E bit active indicating that the queue contains at least one message to warn the dequeuer that it has to abort its process if it is dequeuing the last message from the queue.