Dead nozzle compensation
Abstract
A printer controller for supplying dot data to a printhead in a predetermine d order, the printhead comprising at least first and second printhead modules, each of which comprises a plurality of printing nozzles and being disposed adjacent each other such that a printing width of the printhead is wider tha n a printing width of either of the printhead modules, the printer controller being configured to order and time supply of the dot data to the printhead modules in accordance with their respective widths, such that a difference i n relative widths of the printhead modules is at least partially compensated f or.

Term
Term ended
Expired 2 December 2023, 2.8 years ago.
- Priority
- Filed
- Granted
- Expired
- Today
12 claims: 2 independent, 10 dependent
- 1CA 02508141 2006-10-23 CLAIMS 1. A method of compensating for an inoperative nozzle in a bi-lithic printhead, the bilithic printhead including a plurality of sets of nozzles for printing a corresponding plurality of channels of dot data, the method comprising the steps of:(a) rendering compressed pages to form a bi-level layer for a given print line intended for the bi-lithic printhead;(b) expanding the compressed bi-level layer;(c) compositing the bi-level layer to produce bi-level dots;(d) determining which combination of one or more available operative nozzles near the inoperative nozzle will minimise perceived error in an image that the dot data forms part of, the determination being performed on the basis of a color model;(e) mapping the dot data intended for the inoperative nozzle to that combination of one or more operative nozzles from the same set;and, (f) passing resultant bi-level channel dot data to the bi-lithic printhead.
- 4The method according to 1, including the substeps of:(i) determining one or more operative nozzles capable of printing a dot on print media close to a position at which the inoperative nozzle would have printed a dot had it been operative;and (ii) mapping the dot data from the inoperative nozzle to an operative nozzle determined in substep (i). 5. The method according to claim 4, wherein, in the event more than one operative nozzle CA 02508141 2006-10-23 is determined in substep (i), the dot data is remapped to one of the operative nozzles that will print a dot on print media closest to that which would have been printed by the inoperative nozzle.
Independent claims2
4,845 paragraphs in 737 sections, as filed
DEMANDE OU BREVET VOLUMINEUX
LA PRÉSENTE PARTIE DE CETTE DEMANDE OU CE BREVET COMPREND PLUS D’UN TOME.
CECI EST LE TOME 1 DE 4
CONTENANT LES PAGES 1 À 284
NOTE : Pour les tomes additionels, veuillez contacter le Bureau canadien des brevets
JUMBO APPLICATIONS/PATENTS
THIS SECTION OF THE APPLICATION/PATENT CONTAINS MORE THAN ONE VOLUME
THIS IS VOLUME 1 OF 4
CONTAINING PAGES 1 TO 284
NOTE: For additional volumes, please contact the Canadian Patent Office
NOM DU FICHIER / FILE NAME :
NOTE POUR LE TOME / VOLUME NOTE:
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
TITLE: DEAD NOZZLE COMPENSATION
FIELD OF INVENTION
The present invention relates to techniques for compensating for one or more dead nozzles in a multinozzle printhead.
The invention has primarily been developed for use with a printhead comprising one or more printhead modules constructed using microelectromechanical systems (MEMS) techniques, and will be described with reference to this application. However, it will be appreciated that the invention can be applied to other types of printing technologies in which analogous problems are faced.
BACKGROUND OF INVENTION
Manufacturing a printhead that has relatively high resolution and print-speed raises a number of problems.
Difficulties in manufacturing pagewidth printheads of any substantial size arise due to the relatively small dimensions of standard silicon wafers that are used in printhead (or printhead module) manufacture. For example, if it is desired to make an 8 inch wide pagewidth printhead, only one such printhead can be laid out on a standard 8-inch wafer, since such wafers are circular in plan. Manufacturing a pagewidth printhead from two or more smaller modules can reduce this limitation to some extent, but raises other problems related to providing a joint between adjacent printhead modules that is precise enough to avoid visible artefacts (which would typically take the form of noticeable lines) when the printhead is used. The problem is exacerbated in relatively high-resolution applications because of the tight tolerances dictated by the small spacing between nozzles.
The quality of a joint region between adjacent printhead modules relies on factors including a precision with which the abutting ends of each module can be manufactured, the accuracy with which they can be aligned when assembled into a single printhead, and other more practical factors such as management of ink channels behind the nozzles. It will be appreciated that the difficulties include relative vertical displacement of the printhead modules with respect to each other.
Whilst some of these issues may be dealt with by careful design and manufacture, the level of precision required renders it relatively expensive to manufacture printheads within the required tolerances. It would be desirable to provide a solution to one or more of the problems associated with precision manufacture and assembly of multiple printhead modules to form a printhead, and especially a pagewidth printhead.
In some cases, it is desirable to produce a number of different printhead module types or lengths on a substrate to maximise usage of the substrate’s surface area. However, different sizes and types of modules will have different numbers and layouts of print nozzles, potentially including different
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 horizontal and vertical offsets. Where two or more modules are to be joined to form a single printhead, there is also the problem of dealing with different seam shapes between abutting ends of joined modules, which again may incorporate vertical or horizontal offsets between the modules. Printhead controllers are usually dedicated application specific integrated circuits (ASICs) designed for specific use with a single type of printhead module, that is used by itself rather than with other modules. It would be desirable to provide a way in which different lengths and types of printhead modules could be accounted for using a single printer controller.
Printer controllers face other difficulties when two or more printhead modules are involved, especially if it is desired to send dot data to each of the printheads directly (rather than via a single printhead connected to the controller). One concern is that data delivered to different length controllers at the same rate will cause the shorter of the modules to be ready for printing before any longer modules. Where there is little difference involved, the issue may not be of importance, but for large length differences, the result is that the bandwidth of a shared memory from which the dot data is supplied to the modules is effectively left idle once one of the modules is full and the remaining module or modules is still being filled. It would be desirable to provide a way of improving memory bandwidth usage in a system comprising a plurality of printhead modules of uneven length.
In any printing system that includes multiple nozzles on a printhead or printhead module, there is the possibility of one or more of the nozzles failing in the field, or being inoperative due to manufacturing defect. Given the relatively large size of a typical printhead module, it would be desirable to provide some form of compensation for one or more “ dead” nozzles. Where the printhead also outputs fixative on a per-nozzle basis, it is also desirable that the fixative is provided in such a way that dead nozzles are compensated for.
A printer controller can take the form of an integrated circuit, comprising a processor and one or more peripheral hardware units for implementing specific data manipulation functions. A number of these units and the processor may need access to a common resource such as memory. One way of arbitrating between multiple access requests for a common resource is timeslot arbitration, in which access to the resource is guaranteed to a particular requestor during a predetermined timeslot.
One difficulty with this arrangement lies in the fact that not all access requests make the same demands on the resource in terms of timing and latency. For example, a memory read requires that data be fetched from memory, which may take a number of cycles, whereas a memory write can commence immediately. Timeslot arbitration does not take into account these differences, which may result in accesses being performed in a less efficient manner than might otherwise be the case. It would be desirable to provide a timeslot arbitration scheme that improved this efficiency as compared with prior art timeslot arbitration schemes.
Also of concern when allocating resources in a timeslot arbitration scheme is the fact that the priority of
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 an access request may not be the same for all units. For example, it would be desirable to provide a timeslot arbitration scheme in which one requestor (typically the memory) is granted special priority such that its requests are dealt with earlier than would be the case in the absence of such priority.
In systems that use a memory and cache, a cache miss (in which an attempt to load data or an instruction from a cache fails) results in a memory access followed by a cache update. It is often desirable when updating the cache'in this way to update data other than that which was actually missed. A typical example would be a cache miss for a byte resulting in an entire word or line of the cache associated with that byte being updated. However, this can have the effect of tying up bandwidth between the memory (or a memory manager) and the processor where the bandwidth is such that several cycles are required to transfer the entire word or line to the cache. It would be desirable to provide a mechanism for updating a cache that improved cache update speed and/or efficiency.
Most integrated circuits an externally provided signal as (or to generate) a clock, often provided from a dedicated clock generation circuit. This is often due to the difficulties of providing an onboard clock that can operate at a speed that is predictable. Manufacturing tolerances of such on-board clock generation circuitry can result in clock rates that vary by a factor of two, and operating temperatures can increase this margin by an additional factor of two. In some cases, the particular rate at which the clock operates is not of particular concern. However, where the integrated circuit will be writing to an internal circuit that is sensitive to the time over which a signal is provided, it may be undesirable to have the signal be applied for too long or short a time. For example, flash memory is sensitive to being written too for too long a period. It would be desirable to provide a mechanism for adjusting a rate of an on-chip system clock to take into account the impact of manufacturing variations on clockspeed.
One form of attacking a secure chip is to induce (usually by increasing) a clock speed that takes the logic outside its rated operating frequency. One way of doing this is to reduce the temperature of the integrated circuit, which can cause the clock to race. Above a certain frequency, some logic will start malfunctioning. In some cases, the malfunction can be such that information on the chip that would otherwise be secure may become available to an external connection. It would be desirable to protect an integrated circuit from such attacks.
In an integrated circuit comprising non-volatile memory, a power failure can result in unintentional behaviour. For example, if an address or data becomes unreliable due to falling voltage supplied to the circuit but there is still sufficient power to cause a write, incorrect data can be written. Even worse, the data (incorrect or not) could be written to the wrong memory. The problem is exacerbated with multiword writes. It would be desirable to provide a mechanism for reducing or preventing spurious writes when power to an integrated circuit is failing.
In an integrated circuit, it is often desirable to reduce unauthorised access to the contents of memory. This is particularly the case where the memory includes a key or some other form of security information
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 that allows the integrated circuit to communicate with another entity (such as another integrated circuit, for example) in a secure manner. It would be particularly advantageous to prevent attacks involving direct probing of memory addresses by physically investigating the chip (as distinct from electronic or logical attacks via manipulation of signals and power supplied to the integrated circuit).
It is also desirable to provide an environment where the manufacturer of the integrated circuit (or some other authorised entity) can verify or authorize code to be run on an integrated circuit.
Another desideratum would be the ability of two or more entities, such as integrated circuits, to communicate with each other in a secure manner. It would also be desirable to provide a mechanism for secure communication between a first entity and a second entity, where the two entities, whilst capable of some form of secure communication, are not able to establish such communication between themselves.
In a system that uses resources (such as a printer, which uses inks) it may be desirable to monitor and update a record related to resource usage. Authenticating ink quality can be a major issue, since the attributes of inks used by a given printhead can be quite specific. Use of incorrect ink can result in anything from misfiring or poor performance to damage or destruction of the printhead. It would therefore be desirable to provide a system that enables authentication of the correct ink being used, as well as providing various support systems secure enabling refilling of ink cartridges.
In a system that prevents unauthorized programs from being loaded onto or run on an integrated circuit, it can be laborious to allow developers of software to access the circuits during software development. Enabling access to integrated circuits of a particular type requires authenticating software with a relatively high-level key. Distributing the key for use by developers is inherently unsafe, since a single leak of the key outside the organization could endanger security of all chips that use a related key to authorize programs. Having a small number of people with high-security clearance available to authenticate programs for testing can be inconvenient, particularly in the case where frequent incremental changes in programs during development require testing. It would be desirable to provide a mechanism for allowing access to one or more integrated circuits without risking the security of other integrated circuits in a series of such integrated circuits.
In symmetric key security, a message, denoted by M, is plaintext. The process of transforming M into ciphertext C, where the substance of M is hidden, is called encryption. The process of transforming C back into M is called decryption. Referring to the encryption function as E, and the decryption function as D, we have the following identities:
E[M] = C
D[C] = M
Therefore the following identity is true:
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
DtÆ'tM]] = Μ
A symmetric encryption algorithm is one where:
• the encryption function E relies on key Ki, • the decryption function. D relies on key K<sub>2</sub>, • K<sub>2</sub> can be derived from Ki, and • Ki can be derived from K<sub>2</sub>.
In most symmetric algorithms, Ki equals K<sub>2</sub>. However, even if Kj does not equal K<sub>2</sub>, given that one key can be derived from the other, a single key K can suffice for the mathematical definition. Thus:
E<sub>K</sub>[M\ = C
Z^[C] = M
The security of these algorithms rests very much in the key K. Knowledge of K allows anyone to encrypt or decrypt. Consequently K must remain a secret for the duration of the value of M. For example, M may be a wartime message My current position is grid position 123-456. Once the war is over the value of M is greatly reduced, and if K is made public, the knowledge of the combat unit's position may be of no relevance whatsoever. The security of the particular symmetric algorithm is a function of two things: the strength of the algorithm and the length of the key.
An asymmetric encryption algorithm is one where:
• the encryption function E relies on key Ki, • the decryption function D relies on key K<sub>2</sub>, • K<sub>2</sub> cannot be derived from Ki in a reasonable amount of time, and • Ki cannot be derived from K<sub>2</sub> in a reasonable amount of time.
Thus:
E<sub>KX</sub>[M\ = C
Z)^<sub>2</sub>[C] = M
These algorithms are also called public-key because one key Kj can be made public. Thus anyone can encrypt a message (using Ki) but only the person with the corresponding decryption key (K<sub>2</sub>) can decrypt and thus read the message.
In most cases, the following identity also holds:
Ej^LM] <sup>=</sup> C
D<sub>Ki</sub>[C] = M
This identity is very important because it implies that anyone with the public key Ki can see M and know
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616 that it came from the owner of K2. No-one else could have generated C because to do so would imply knowledge of K<sub>2</sub>. This gives rise to a different application, unrelated to encryption - digital signatures.
A number of public key cryptographic algorithms exist. Most are impractical to implement, and many generate a very large C for a given M or require enormous keys. Still others, while secure, are far too slow to be practical for several years. Because of this, many public key systems are hybrid - a public key mechanism is used to transmit a symmetric session key, and then the session key is used for the actual messages.
All of the algorithms have a problem in terms of key selection. A random number is simply not secure enough. The two large primes p and q must be chosen carefully - there are certain weak combinations that can be factored more easily (some of the weak keys can be tested for). But nonetheless, key selection is not a simple matter of randomly selecting 1024 bits for example. Consequently the key selection process must also be secure.
Symmetric and asymmetric schemes both suffer from a difficulty in allowing establishment of multiple relationships between one entity and a two or more others, without the need to provide multiple sets of keys. For example, if a main entity wants to establish secure communications with two or more additional entities, it will need to maintain a different key for each of the additional entities. For practical reasons, it is desirable to avoid generating and storing large numbers of keys. To reduce key numbers, two or more of the entities may use the same key to communicate with the main entity. However, this means that the main entity cannot be sure which of the entities it is communicating with. Similarly, messages from the main entity to one of the entities can be decrypted by any of the other entities with the same key. It would be desirable if a mechanism could be provided to allow secure communication between a main entity and one or more other entities that overcomes at least some of the shortcomings of prior art.
In a system where a first entity is capable of secure communication of some form, it may be desirable to establish a relationship with another entity without providing the other entity with any information related the first entity’s security features. Typically, the security features might include a key or a cryptographic function. It would be desirable to provide a mechanism for enabling secure communications between a first and second entity when they do not share the requisite secret function, key or other relationship to enable them to establish trust.
A number of other aspects, features, preferences and embodiments are disclosed in the Detailed Description of the Preferred Embodiment below.
SUMMARY OF THE INVENTION
In accordance with the invention, there is provided a method of compensating for an inoperative nozzle in a printhead, the method comprising the step of:
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 (a) mapping dot data intended for the inoperative nozzle into one or more operative nozzles of the printhead.
Preferably, step (a) includes the substep of mapping the dot data intended for the inoperative nozzle into a nozzle that will print a dot on print media close to a position at which the inoperative nozzle would have printed a dot had it been operative.
Preferably also, step (a) includes the substep of mapping tire dot data intended for the inoperative nozzle into a nozzle that will print a dot on print media immediately adjacent a position at which the inoperative nozzle would have printed a dot had it been operative.
In a preferred embodiment, step (a) includes the substeps of:
(i) determining one or more operative nozzles capable of printing a dot on print media close to a position at which the inoperative nozzle would have printed a dot had it been operative; and (ii) mapping the dot data from the inoperative nozzle to an operative nozzle determined in substep (i).
More preferably, in the event more than one operative nozzle is determined in substep (i), the dot data is remapped to one of the operative nozzles that will print a dot on print media closest to that which would have been printed by the inoperative nozzle.
It is preferred that during successive firings of the printhead, the dot data is remapped alternately to operative nozzles that will print a dot on print media either side of that which would have been printed by the inoperative nozzle.
In an alternative embodiment, during successive firings of the printhead, the dot data is remapped randomly, pseudo-randomly, or arbitrarily to operative nozzles that will print a dot on print media either side of that which would have been printed by the inoperative nozzle.
Preferably, the printhead including a plurality of sets of the nozzles for printing a corresponding plurality of channels of dot data, wherein step (a) includes the substep of mapping the dot data intended for the inoperative nozzle into one or more operative nozzles from the same set.
In one form, step (a) includes the substep of mapping the dot data into one or more operative nozzles that will print a dot on print media close to a position at which the inoperative nozzle would have printed a dot had it been operative.
In an alternative form, step (a) includes the substep of mapping the dot data intended for the inoperative nozzle into one or more operative nozzles including at least one nozzle from a different one of the sets.
In yet another embodiment, step (a) includes the substeps of:
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 determining which combination of one or more available operative nozzles near the inoperative nozzle will minimise perceived error in an image that the dot data forms part of, the determination being performed on the basis of a color model; and mapping the dot data intended for the inoperative nozzle to that combination of one or more operative nozzles.
Preferably, the inoperative nozzle is associated with a black print channel, and wherein step (a) includes remapping the dot data intended for the inoperative nozzle into a plurality of operative nozzles in other color channels to produce a process black output at or adjacent a location on print media where the inoperative nozzle would have deposited a droplet of a black printing substance in accordance with the dot data.
In a preferred embodiment, a plurality of dot data intended for a corresponding plurality of inoperative nozzles are mapped to operative nozzles.
In accordance with a second aspect of the invention, there is provided a printer controller configured to implement the method of the first aspect.
In accordance with a third aspect of the invention, there is provided a printer controller configured to implement the method of the first aspect to a printhead comprising a plurality of the nozzles.
In accordance with the invention, there is provided a method for outputting a portion of a dither matrix stored in a memory, comprising the step of:
(b) determining a start position and an end position in the memory;
(c) reading a plurality of dither values of the dither matrix from the memory, commencing at the start position; and (d) outputting a portion of the plurality of dither values read in step (b)
Preferably two or more dither matrices are stored in the memory. A plurality of dither values are read from at least two of die dither matrices with a single read. The matrices can be different sizes.
It is preferred that each read from the memory reads at least one, and preferably two or more, lines from one or more dither matrices.
The method can also be embodied in hardware.
It is also preferred that the memory is configurable to store different dither matrices for different color channels. It is particularly preferred that a single read of the memory loads a frill line for two or more dither matrices into a dither buffer. Typically, each dither matrix will be for a different color channel.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
In accordance with another aspect of the invention, there is provided a printer controller for supplying dot data to a printhead in a predetermined order, the printhead comprising at least a first printhead module having a plurality of rows of printing nozzles, the printer controller being configured to order and time the supply of the dot data to the first printhead module such that a relative skew between adjacent rows of printing nozzles on the at least one printhead module, in a direction normal to a direction of printing, is at least partially compensated for.
Preferably, the printer controller is configured to at least partially compensate for the relative skew between adjacent rows in each of a plurality of sets of the adjacent rows.
In a preferred embodiment, wherein the relative skew between each of the plurality of the sets of the adjacent rows is the same.
Preferably, the printer controller is configured to compensate for the skew by introducing a relative delay into the dot data destined for at least one of the rows of printing nozzles. More preferably, the printhead is configured to print the dots at a predetermined spacing across its width, and the delay introduced by the printer controller equates to an integral multiple of the spacing.
It is particularly preferred, that the printhead defines a printable region between printing boundaries. Nozzles of at least one of the rows of at least one of the at least one printhead modules are positioned outside the printable region due to the skew between adjacent rows of the nozzles on the at least one printhead module. The printer controller is configured to introduce a relative delay into the dot data supplied to at least one of the rows such that the nozzles outside the printable region do not print.
Preferably, the at least one printhead module includes at least one pair of adjacent rows of the nozzles such that each row of the pair is configured to print the same ink. The printhead is configured to provide the dot data to the pair of adjacent rows such that the dot data is shifted serially through the first of the rows then through the second of the rows, until the dot data has been supplied to all the nozzles. More preferably, the printhead is configured to provide the dot data to the pair of adjacent rows such that the dot data is shifted serially through the first of the rows in a first direction then looped back through the second of the rows in a second direction opposite the first, until the dot data has been supplied to all the nozzles.
Preferably, the printhead is configured to print a series of printhead-width rows of the dots, and wherein the first and second rows are configured to print odd and even dots, respectively, of the printhead-width rows, the printhead controller being configured to supply the one or more first rows with odd dot data and the one or more second rows with even dot data.
Preferably, the printhead has a plurality of the pairs of rows. The printer controller is configured to supply the dot data such that any relative skew between the first and second rows of each pair of rows, in a direction normal to a direction of printing, is at least partially compensated for.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
In one embodiment, each printhead module is configured to print a plurality of independent inks, and the nozzles in each row are configured to print in one of the inks. The printhead controller being configured to supply each of the inks to at least one row of at least one of the printhead modules.
Preferably, at least some of the printhead modules are of mutually unequal length, the printer controller being configured to order and time the supply of the dot data to the compensate for the unequal length.
It is also preferable that the printer controller is configured to at least partially compensate for any relative skew between adjacent rows of the nozzles on adjacent ones of the printhead modules.
In a preferred form of the invention, the printer controller is selectively configurable to compensate at least partially for a plurality of potential relative skews.
In one form, the controller is configured to compensate at least partly for a fixed amount of the skew.
In accordance with a further aspect, the invention comprises the printer engine comprising a printer controller according to the first aspect and a printhead, wherein the nozzles of the printhead are disposed in a printable region between printing boundaries of the printhead. The printhead includes at least one logical nozzle located outside the printable zone that can accept data but is not capable of printing. The logical nozzles are arranged to introduce a relative delay into the dot data supplied to at least one of the rows, such that dot data is supplied to the correct nozzles for printing.
In accordance with another aspect of the invention, there is provided a printer controller for supplying dot data to a printhead in a predetermined order, the printhead comprising at least first and second printhead modules, each comprising a plurality of printing nozzles and being disposed adjacent each other such that a printing width of the printhead is wider than a printing width of either of the printhead modules, the printer controller being configurable during or after manufacture to order and time supply of the dot data to the printhead modules such that any relative displacement between the printhead nozzles in a direction normal to the printhead printing width is at least partially compensated for.
Preferably, the printer controller is configurable to provide compensation for any of a plurality of different amounts of the relative displacement.
More preferably, where each of the printhead modules comprises a plurality of parallel rows of the printing nozzles, the printhead is configured such that each of the rows of each printhead module has a corresponding row in each of the other printhead modules. The printer controller is controllable to introduce a relative delay into the dot data supplied to one or more of the rows, thereby to provide the compensation.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
In a particularly preferred embodiment, where the printhead is configured to print the dots at a predetermined spacing in a direction in which print media is supplied for printing, the delay introduced by the printer controller equates to an integral multiple of the spacing during printing.
In accordance with a further aspect of the invention, there is a printer controller for supplying dot data to a printhead in a predetermined order, the printhead comprising at least first and second printhead modules, each of which comprises a plurality of printing nozzles and being disposed adjacent each other such that a printing width of the printhead is wider than a printing width of either of the printhead modules, the printer controller being configured to order and time supply of the dot data to the printhead modules in accordance with their respective widths, such that a difference in relative widths of the printhead modules is at least partially compensated for.
Preferably, each of the printhead modules comprises a plurality of rows of the printing nozzles, the controller being configured to supply the dot data to the rows of nozzles in serial form. More preferably, each of the printhead modules comprises one or more parallel pairs of the rows, the controller being configured to serially supply the data to a first of each of the rows of nozzles in the or each pair of rows, the data being serially clocked through the first row of the or each pair of rows, then through a second row of the or each pair or rows, until all printhead nozzles have received their respective data.
It is preferred that the data is clocked through the second row in a direction substantially opposite to that in which it was clocked through the first row.
In another aspect, there is provided a printer controller for supplying dot data to a printhead comprising at least one printhead module, the printer controller being configurable to supply the dot data to a selectable one of a plurality of potential printhead module types, each having a different number of nozzles for receiving the dot data.
Preferably, the printer controller includes non-volatile memory for storing at least one parameter value, the at least one parameter value determining which of the potential printhead types the printer controller has been configured to supply the dot data to.
More preferably, the printer controller is configurable to supply the dot data to the printhead module on the basis of one or more printer module widths indicated by the at least one parameter.
In a preferred embodiment, the printer controller is configurable to supply the dot data to a plurality of the printhead modules, on the basis of one or more widths of the printhead modules indicated by the at least one parameter.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
In accordance with a further aspect of the invention, there is provided a method of accounting for dead nozzle remapping in a multi-nozzle printhead, including remapping a fixative intended for a dot to be printed by the dead nozzle.
In one form, the remapping includes remapping the fixative to an operative nozzle to which dot data intended for the dead nozzle for printing at or adjacent a position at which the dead nozzle would have printed.
Alternatively, or in addition, the remapping includes preventing output of fixative onto the position where the dead nozzle would have printed a dot had it been operative.
In accordance with a further aspect of the invention, there is provided a method for arbitrating between a plurality of access requests issued in relation to a resource by a plurality of requestors, wherein each request can be one of at least two types, a first of the types having a higher latency associated with its performance than at least some of the other types, the method including the steps of:
(e) receiving a plurality of the access requests; (the requests are not placed anywhere, they are simply received) (f) maintaining a current pointer that points to a current timeslot in a timeslot list, and at least one lookahead pointer that points to a future timeslot in the timeslot list; and (g) in the event an access request as arbitrated via the lookahead pointer is of the first type, initiating performance of the access request earlier than the position in the list suggests it would be performed should it be started when the current pointer reached the timeslot.
Preferably, step (g) includes the substep of performing the access request indicated by the lookahead pointer immediately after the access request indicated by the current pointer is performed.
It is preferred that step (g) includes the substep of performing the access request indicated by the lookahead pointer immediately after the access request indicated by the current pointer is performed.
In a preferred embodiment, the number of timeslots between the timeslot indicated by the lookahead pointer and the timeslot indicated by the current pointer takes into account a latency difference between performing an access request of the first type and at least one of the other access request types.
In accordance with another aspect of the invention, there is provided an integrated circuit including:
a plurality of operative units, each of which is capable of issuing a request for access to a memory accessible by the integrated circuit; and an timeslot arbitrator for arbitrating between requests issued by the operative units for access to the memory, wherein each request can be one of at least two types, a first of the types having a higher latency associated with its performance than at least some of the other types, the timeslot arbitrator being configured to:
(h) receive a plurality of the access requests;
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616 (i) maintain a current pointer that points to a current timeslot in a timeslot list, and at least one lookahead pointer that points to a future timeslot in the timeslot list; and (j) in the event the access request as arbitrated via the lookahead pointer is of the first type, performing the access request earlier than the position in the list suggests it should be performed should it be started when the current pointer reached the timeslot.
Preferably, the first type of access request is a memory write request.
Preferably, the integrated circuit includes a memory interface unit operatively connected with, and under the control of, the timeslot arbitrator, and wherein the memory interface is operatively connected to:
one or more of the operative units via one or more communications buses, and the memory via a memory bus of greater width than the communications buses.
In a preferred form, the number of timeslots between the timeslot indicated by the lookahead pointer and the timeslot indicated by the current pointer takes into account a latency difference between performing an access request of the first type and at least one of access request types.
In accordance with a further aspect of the invention, there is provided a method of arbitrating between access requests from a plurality of requestors for access to a resource, wherein at least one of the requestors is defined as higher priority access to the resource, the method comprising the steps of:
(k) receiving a plurality of the access requests;
(l) in the event an access request from the at least one of the requestors is received, initiating performance of the access request in preference to the requestor as specified by the timeslot list and regardless of whether or not the at least one of the requestors is in the timeslot list.
Preferably, the at least one requestor requires lower latency access to the resource than at least one of the other requestors from which access requests can be received.
Preferably, the at least one requestor is a processor and/or the resource is a memory.
Preferably, step (1) includes the substep of performing the access request from the requestor immediately following completion of any cunent access request being reformed.
In a preferred form, step (1) is performed such that a frequency of the at least one requestor being granted preferential performance of its access requests is limited within a time period. More preferably, early performance of access requests from the at least one requestor is restricted to a maximum number of times within a predetermined number of timeslots.
Preferably, the requestors are hardware units on an integrated circuit and the method is implemented by a timeslot arbitrator unit on the integrated circuit.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
In accordance with another aspect of the invention, there is provided a method according to the third aspect, wherein each request can also be one of at least two types, a first of the types having a higher latency associated with its performance than at least some of the other types, the method including the steps of:
(m) receiving a plurality of the access requests;
(n) maintaining a current pointer that points to a current timeslot in the timeslot list, and at least one lookahead pointer that points to a future timeslot in the timeslot list; and (o) in the event an access request as arbitrated via the lookahead pointer is of the first type, initiating performance of the access request earlier than its position in the list suggests it should be performed should it be started when the current pointer reached the timeslot.
In accordance with another aspect of the invention, there is provided a method of updating a cache in an integrated circuit comprising:
the cache a processor connected to the cache via a cache bus;
a memory interface connected to the cache via a first bus and to the processor via a second bus, the first bus being wider than the second bus or the cache bus; and memory connected to the memory interface via a memory bus;
the method comprising the steps of:
(p) following a cache miss, using the processor to issue a request for first data via a first address, the first data being that associated with the cache miss;
(q) in response to the request, using the memory interface to fetch the first data from the memory, and sending the first data to the processor;
(r) sending, from the memory interface and via the first bus, the first data and additional data, the additional data being that stored in the memory adjacent the first data;
(s) updating the cache with the first data and the additional data via the first bus; and (t) updating flags in the cache associated with the first data and the additional data, such that the updated first data and additional data in the cache is valid.
Preferably, the processor is configured to attempt a cache update with the first data upon receiving it from the memory interface, the method further including the step of preventing the attempted cache update by the processor from being successful, thereby preventing interference with the cache update of steps (s) and/or (t).
More preferably, steps (r), (s), and (t) are performed substantially simultaneously.
In one embodiment, steps (s) and (t) are performed by the memory interface.
Preferably, steps (s) and (t) are performed in response to the processor attempting to update the cache following step (r). More preferably, the memory interface is configured to monitor the processor to determine when it attempts to update the cache following step (r).
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
In accordance with a further aspect of the invention, there is provided an integrated circuit, comprising a processor, an onboard system clock for generating a clock signal, and clock trim circuitry, the integrated circuit being configured to:
(u) receive an external signal;
(v) determine either the number of cycles of the clock signal during a predetermined number of cycles of the external signal, or the number of cycles of the external signal during a predetermined number of cycles of the clock signal;
(w) store a trim value in the integrated circuit, the trim value having been determined on the basis of the determined number of cycles; and (x) use the trim value to control the internal clock frequency.
Preferably, the integrated circuit is configured to, between steps (v) and (w):
output the result of the determination of step (v); and receive the trim value from an external source.
Preferably, the integrated circuit includes non-volatile memory, and (w) includes storing the trim value in the memory. More preferably, the memory is flash RAM.
In a preferred form step (x) includes loading the trim value from the memory into a register and using the trim value in the register to control a frequency of the internal clock.
In a preferred form, the trim value is determined and stored permanently in the integrated circuit. More preferably, the circuit includes one or more fuses that are intentionally blown following step (w), thereby preventing the stored trim value from subsequently being changed.
In a preferred embodiment, the system clock further includes a voltage controlled oscillator (VCO), an output frequency of which is controlled by the trim value. More preferably, the integrated circuit further includes a digital to analog convertor configured to convert the trim value to a voltage and supply the voltage to an input of the VCO, thereby to control the output frequency of the VCO.
Preferably, the integrated circuit is configured to operate under conditions in which the signal for which the number of cycles is being determined is at a considerably higher frequency than the other signal.
More preferably, the integrated circuit is configured to operate when a ratio of the number of cycles determined in step (v) and the predetermined number of cycles is greater than about 2. It is particularly preferred that the ratio is greater than about 4.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Preferably, the integrated circuit is disposed in a package having an external pin for receiving the external signal. More preferably, the pin is a serial communication pin configurable for serial communication when the trim value is not being set
Preferably, the trim value was also determined on the basis of a compensation factor that took into account a temperature of the integrated circuit when the number of cycles are being determined.
Preferably, the trim value received was determined by the external source, the external source having determined the trim value including a compensation factor based on a temperature of the integrated circuit when the number of cycles are being determined.
Preferably, the trim value is determined by performing a number of iterations of determining the number of cycles, and averaging the determined number.
In accordance with a further aspect of the invention, there is provided an integrated circuit comprising a processor, non-volatile memory, an input for receiving power from a power supply and a power detection unit, wherein the integrated circuit is configured to enable multi-word writes to the non-volatile memory, the power detection unit being configured to:
monitor a quality of power supplied to the input;
in the event the quality of the power drops below a predetermined threshold, preventing subsequent words in any multi-word write currently being performed from being written to the memory.
Preferably, the integrated circuit is configured to prevent any further writes of any type to the memory once the quality is determined to have dropped below the threshold.
Preferably, the quality is a voltage.
Preferably, the memory is flash memory.
Preferably, the power detection unit is configured to provide a reset signal to at least some other circuits on the integrated circuit once any current writes have been finished.
In accordance with another aspect of the invention, there is provided an integrated circuit comprising a processor, a memory that the processor can access, a memory access unit for controlling accesses to the memory, an input for receiving power for the integrated circuit from an external power source, and a power detection unit, the power detection unit being configured to:
monitor a quality of power supplied to the input;
in the event the quality of the power drops below a predetermined threshold, disabling a power supply to circuitry for use in writing to the memory, such that the memory access unit’s ability to alter data in
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 the memory is disabled prior to address or data values to be written to the memory becoming unreliable due to failing power.
Preferably, the memory is flash memory and the power supply is one or more charge pump circuits. More preferably, a voltage output by the power supply falls fast enough that the voltage supplied to the flash memory becomes too low to enable a change in contents of the flash memory before the voltage levels of the address or data values become invalid.
Preferably, the integrated circuit is configured to cause a reset of at least some of the circuitry on the integrated circuit following disabling of the power supply.
More preferably, the integrated circuit is programmed or designed to have a variable delay between disabling of the power supply and causing the reset.
In accordance with a further aspect of the invention, there is provided an integrated circuit comprising a processor and memory, the memory storing a set of data representing program code and/or an operating value, wherein each bit of the data is stored as a bit/inverse-bit pair in corresponding pairs of physically adjacent bit cells in the memory.
Preferably, the integrated circuit further includes a memory management unit configured to receive a request for the set of data and to test, during processing of the request, whether the respective pairs of physically adjacent bit-cells that correspond to the set of data contain bit/inverse-bit pairs, thereby to confirm the validity of the set of data as stored in the memory. More preferably, the memory management unit is configured to store sets of data as sets of bit/inverse-bit pairs in the memory.
Preferably, the integrated circuit is selectively operable in either of first and second modes, wherein:
in the first mode, the memory management unit is configured to receive and process a request for the set of data, and to test, during processing of the request, whether the respective pairs of physically adjacent bit-cells corresponding to the set of data contain bit/inverse-bit pairs, thereby to confirm the validity of the set of data as stored in the memory; and in the second mode, the memory management unit is configured to receive and process a request for data stored in the memory, without testing whether pairs of physically adjacent bit-cells contain bit/inverse-bit pairs.
More preferably:
in the first mode, the memory management unit is configured to store a set of data associated with a memory write request as a corresponding set of bit/inverse-bit pairs, each of the bit/inverse-bit pairs being physically adjacent each other; and in the second mode, the memory management unit is configured to store a set of data associated with a memory write request as the set of data without corresponding inverse-bits.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Preferably, the integrated circuit is configured to boot into the first mode by default.
Preferably, the integrated circuit is configured to implement a defensive action in the event the test fails.
More preferably, the defensive action includes resetting the integrated circuit.
In an alternative embodiment, the defensive reaction includes returning second data other than that the subject of the test.
Preferably, the second data is a string of identical digits.
Preferably, the defensive reaction is different depending upon whether the set of data represents program code or an operating value.
More preferably, in the event the test fails and the set of data is an operating value, the integrated circuit is configured to replace the failed value with a substitute value.
More preferably, the substitute value is selected to disrupt a program running on the integrated circuit.
Preferably, the substitute causes at least some circuitry on the integrated circuit to reset.
In a preferred embodiment, in the event the test fails, the integrated circuit is permanently prevented from running software.
Preferably, in the event the test fails, the integrated circuit is configured to delete from the memory some or all of the bit values associated with the set of data.
More preferably, in the event the test fails, the integrated circuit is configured to delete some or all of the contents of the memory.
In accordance with another aspect of the invention, there is provided an integrated circuit comprising a processor and memory storing:
secret information accessible via a first address, the secret information comprising a string of bit values;
an inverse-string accessible via a second address, the inverse-string comprising a string of bit values, wherein each of the bit values in the inverse-string is the logical inverse of a bit value at a corresponding bit position in the secret information, the integrated circuit being programmed with code configured to:
(i) receive a request for the secret information; and
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 (ii) test whether the bit-values of the inverse string are the inverse of the bit-values at respective corresponding bit positions of the secret information.
In accordance with a further aspect of the invention, there is provided a method of ensuring validity of secret information stored in a memory in the form of a string of bit values accessible via a first address, the memory also storing an inverse-string accessible via a second address, the inverse-string comprising a string of bit values that are the logical inverses of the bit values at corresponding respective bit positions of the secret information, the method including the steps of:
receiving a request for the secret information; and testing whether the bit-values of the inverse string are the inverse of the bit-values at respective corresponding bit positions of the secret information.
Preferably, the integrated circuit is configured and programmed to perform a defensive action in the event the test fails.
More preferably, the defensive action incudes deleting or destroying some or all of the contents of the memory in the event the test fails. Preferably, the defensive action includes deleting or destroying at least the secret information and/or the inverse string.
Preferably, the defensive action includes preventing the processor from executing software.
Preferably, the defensive action includes resetting some or all of logic on the integrated circuit.
Preferably, the first and second addresses are at the same address in the memory.
Preferably, the string and inverse string are stored at different sub-addresses within the same address.
In accordance with a further aspect of the invention, there is provided method of manufacturing a plurality of the integrated circuits, comprising the steps, for each of the plurality of integrated circuits, of:
storing the secret information and the inverse string at the first and second addresses in the memory of the integrated circuit; and storing the code on the integrated circuit;
wherein the first and second addresses are randomly, pseudo-randomly or arbitrarily selected for each of the integrated circuits and the code for each integrated circuit is customised to know the first and second addresses of its secret information and inverse string.
Preferably, the first and second addresses are restricted to one of two potential locations in the memory of each integrated circuit, the secret information and the inverse string for each integrated circuit being allocated to the first and second addresses randomly, pseudo-randomly or arbitrarily.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
More preferably, the secret information differs between at least two of the integrated circuits.
In accordance with another aspect of the invention, there is provided a plurality of integrated circuits, each of the integrated circuits comprising a processor and non-volatile memory, and including code for running identical software processes, wherein each of the integrated circuits also includes secret information used by the software process, the secret information in each chip being located in a different location in the memory relative to a plurality of the other chips.
Preferably, the code on each integrated circuit is such that the software process of each chip knows the location in memory via which the secret information is accessible.
In accordance with a further aspect of the invention, there is provided a method of manufacturing a plurality of the integrated circuits, including the steps of:
manufacturing a plurality of physical integrated circuits; and injecting, into the non-volatile memory of each of the integrated circuits:
code for running a software process; and secret information;
wherein the secret information is positioned in relatively different locations of the non-volatile memories and the code on each integrated circuit is such that the software process of each integrated circuit knows the location in memory via which the secret information is accessible on that integrated circuit.
In accordance with another aspect of the invention, there is provided an integrated circuit comprising a processor and non-volatile memory, the non-volatile memory storing a first number and a second number, wherein the second number is the result of an encryption function taking a third number and secret information as operands, the integrated circuit comprising software configured to decrypt the second number using the first number, thereby to determine the secret information as required.
Preferably, the first and third numbers are the same.
Preferably, the first and second numbers are of the same length.
Preferably, the first number is a random number that was generated using a stochastic process.
Preferably, the encryption function is an XOR logical function.
Preferably, the software is configured to decrypt the second number by performing an XOR logical function using the first and second numbers as operands.
In accordance with a further aspect of the invention, there is provided a method of manufacturing a plurality of integrated circuits in accordance with claim 1, including the steps, for each integrated circuit, of:
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616 determining the first number, the third number and the secret information;
generating the second number by way of an encryption function that uses the third number and the secret information as operands;
storing the first and second numbers on the integrated circuit.
Preferably, the first number is different amongst at least a plurality of the integrated circuits.
Preferably, the first numbers are determined randomly, pseudo-randomly, or arbitrarily.
Preferably, the first number is stored on the integrated circuit first, then extracted therefrom for use in generating the third and thence the second number.
In accordance with another aspect of the invention, there is provided a method of enabling authenticated communication of information between at least a primary entity and each of one or more secondary entities, each of the one or more secondary entities having an identifier associated with it, the method including the steps of:
allocating first secret information to the primary entity;
for each of the one or more secondary entities, determining second secret information, the second secret information being the result of a one way function applied to that second secret entity’s identifier and the first secret information;
allocating the second secret information to the or each secondary entity.
Preferably, the identifiers allocated to the secondary entities are generated stochastically, pseudo-randomly or arbitrarily.
Preferably, the one way function is a hash function.
Preferably, the first secret information is a key. More preferably, the one way function is a SHA function.
Preferably, each of the entities is implemented in an integrated circuit.
Preferably, each of the entities is implemented in an integrated circuit separate from the integrated circuits in which the other entities are implemented.
Preferably, one or more of the secondary entities are implemented in a corresponding plurality of integrated circuits.
Preferably, the primary entity is implemented in an integrated circuit.
Preferably, both the primary and secondary entities are implemented in integrated circuits.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Preferably, the first entity wishes to communicate with one of the second entities, the method including the steps, in the first entity, of:
receiving data from the second entity;
using the data and the first secret information to generate the second secret information associated with the second entity.
Preferably, the data contains an identifier for the second entity
Preferably, the first entity wishes to send an authenticated message to the second entity, the method including the steps, in the first entity, of:
using the generated second secret information to sign a message, thereby generating a digital signature;
outputting the message and the digital signature for use by the second entity, which can validate the message by using the digital signature and its own copy of the second secret information.
Preferably, the generated signature includes a nonce from the first entity, and the output from the first entity includes the nonce, thereby enabling the second entity to validate the message using the digital signature, the nonce, and its own copy of the second secret information.
Preferably, the data contains a first nonce.
Preferably, the first entity wishes to send an authenticated message to the second entity, the method including the steps, in the first entity, of:
using the generated second secret information and the first nonce to sign a message, thereby generating a digital signature;
outputting the message and the digital signature for use by the second entity, which can validate the message by using the digital signature and its own copy of the second secret information.
Preferably, the generated signature includes a second nonce from the first entity, and the output from the first entity includes the second nonce, thereby enabling the second entity to validate the message using the digital signature, the first and second nonces, and its own copy of the second secret information.
Preferably, the first entity wishes to send an encrypted message to the second entity, the method including the steps, in the first entity, of:
using the generated second secret information to encrypt a message, thereby generating an encrypted message;
outputting the encrypted message for use by the second entity, which can decrypt the message by using its own copy of the second secret information.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Preferably, the encrypted message includes a nonce from the first entity, and the output from the first entity includes the nonce, thereby enabling the second entity to decrypt the message using the nonce, and its own copy of the second secret information.
Preferably, the first entity wishes to send an encrypted message that incorporates the first nonce to the second entity, the method including the steps, in the first entity, of:
using the generated second secret information to encrypt a message and the first nonce, thereby generating an encrypted message;
outputting the encrypted message for use by the second entity, which can decrypt the encrypted message by using its own copy of the second secret information.
Preferably, the encrypted message includes a second nonce from the first entity, and the output from the first entity includes the second nonce.
In accordance with another aspect of the invention, there is provided a method of generating and sending a message from a first entity, the method including the steps of:
determining a message including an action;
generating an authentication code on the basis of the action and a parameter, the parameter being indicative of an attribute of the action; and sending the message and authentication code from the first entity.
In accordance with a further aspect of the invention, there is provided a method of generating and sending a message from a first entity, the first entity including an identifier that distinguishes it from a plurality of other entities of a similar type, the method comprising the steps of:
determining a message including an action;
generating an authentication code on the basis of the action and a parameter, the parameter being based on the identifier; and sending the message and authentication code from the first entity.
Preferably, the action is a function, and the parameter is indicative of the function.
More preferably, the entity is capable of generating messages for each of a plurality of types of function, and the parameter is indicative of the type of function comprised by the message that is sent.
Preferably, the message includes one or more operands of the function.
Preferably, the function is a read function and the one or more operands include an address to be read.
Preferably, the function is a write function and the one or more operands include data to be written.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Preferably, the types of function include at least a read and a write, wherein the authentication step produces a different authentication code depending upon whether the action is a read or a write.
Preferably, the authentication step produces includes authentication codes
In accordance with another aspect of the invention, there is provided a method of generating a first authentication code for a first message for a first function, wherein operands for the first authentication function used to generate the first authentication code include at least part of the first message and at least one identifier associated with the first function,
Preferably, the method further including the steps of verifying the authentication code in accordance with the at least one identifier associated with the first function.
Preferably, the identifier is indicative of a type of the function.
Preferably, the at least one identifier is indicative of the entity generating the authentication code.
Preferably, the at least one identifier is indicative of an entity for which the authentication code is generated.
Preferably, the method includes the step, prior to generating the authentication code, of receiving a request from the entity for the first message, the request including information indicative of an identity of the entity.
In accordance with another aspect of the invention, there is provided a method of preventing a first action associated with a first message from being performed in a target entity, the method including the steps of: sending the first message to the target entity, the first message being configured to cause the entity to perform the first action and a second action; and sending a second message to the target entity, the second message being configured to cause the entity to perform a third action;
wherein the entity is configured such that performance of the second action and the third action is mutually incompatible.
In accordance with a further aspect of the invention, there is provided a method of attempting first write and a second write to first and second security fields in a target entity, the method including the steps of:
sending a first message to the target entity, the first message being configured to cause the entity to perform an action and to update the first and second security fields; and sending a second message to the target entity, the second message being configured to cause the entity to update the first and second security fields;
wherein the security fields have write restrictions associated with them such that updating the security fields in accordance with the first message prevents subsequent updating of the security fields in accordance with the second message, and wherein updating the security fields in accordance with the second
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 message prevents subsequent updating of the security fields with the first message, and wherein the first action is only performed when updating of the security fields by the first message is successful.
In accordance with a further aspect of the invention, there is provided a method of performing a second attempted write to two security fields in a target entity to prevent subsequent application of an earlier attempted write to a data field, wherein:
each of the first and second security fields has a monotonically changeable write restriction associated with it; and the first attempted write included a first data value for the data field and first and second security values for the first and second security fields respectively;
the method including the step of sending a second write to the target entity, the second write including third and fourth security values for the first and second security fields respectively, wherein the write restrictions are such that application of the third and fourth security values to the first and second fields are mutually incompatible with application of the first and second security values to the first and second security fields, such that if any of the fields cannot be written to, none of them are written to.
Preferably, the write restrictions:
prevent the second write from being performed in the event that the first write was previously performed; and prevent the first write from subsequently being performed in the event that the second write is performed.
Preferably, the second write is sent in response to a notification that the first write was not successfully performed.
Preferably, the second write is sent in response to a notification that the first write was not received.
Preferably, the second write is sent after a predetermined time has elapsed after sending the first write without receiving confirmation of the first write being received or successfully performed.
Preferably, the method further includes the step of sending the second write a plurality of times until the second write is successfully received and/or performed.
Preferably, the method further includes the step of verifying the successful second write by performing an authenticated read of the first and second security fields.
Preferably, the method further includes updating a value related to the data field.
Preferably, the write permissions are such that only decrementing or incrementing of the security fields are permitted.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
More preferably, the write permissions are such that only decrementing of the security fields is permitted, and wherein:
the value in the first security field prior to the first attempted write was x;
the value in the second security field prior to the first attempted write was y;
the value of the first security data was x-a;
the value of the second security data was y-b;
the value of the third security data being x-c; and the value of the fourth security data being y-d;
wherein a<b, d<c and a, b, c and d are >0.
It is particularly preferable that a=d and b=c, and even more preferable that a=d=l and b=c=2.
Preferably, the target entity is a first integrated circuit and the messages are sent by a second integrated circuit.
In accordance with another aspect of the invention, there is provided a method of enabling selection of one or more pieces of secret information stored in a first entity, the first entity also storing at least one value indicative of at least one attribute for each of the one or more pieces of secret information, the method comprising the steps of:
(y) receiving at the first entity a request from a second entity for one or more of the values for one or more of the pieces of secret information stored in the first entity; and (z) in response to the request, outputting the values to the second entity.
Preferably, each of the pieces of secret information has an associated index and the request in step (y) includes one or more of the indexes to identify those pieces of secret information for which the values are requested.
Preferably, the request in step (y) is a request for the values all of the pieces of secret information and the response in step (z) orders the values such that the second entity can determine which values are associated with which piece of secret information, and can use the order to generate an index for the secret information.
Preferably, the method further includes the steps, in the first entity and following step (z), of:
(iii) receiving a request from the second entity identifying a function and identifying the index of a piece of secret information to be used in performing the function; and (iv) performing the function using the identified piece of secret information.
Preferably, the method further includes the steps, in the first entity and following step (z), of:
(v) receiving a request from the second entity identifying a function and a piece of secret information to be used in performing the function; and
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 (vi) performing the function using at least the identified piece of secret information, the identified piece of secret information being identified in the request of step (v) on the basis of at least one of the values output in step (z).
Preferably, the secret information is stored in one or more physical locations of the first entity, and wherein the values are not indicative of those physical locations.
Preferably, the first entity is implemented in a first integrated circuit and the second entity is implemented in a second integrated circuit.
Preferably, the first integrated circuit includes a memory for storing the pieces of secret information and the values.
Preferably, there is a plurality of the first integrated circuits, wherein the physical location of a piece of the secret information having particular attributes is mutually different for at least some of the first integrated circuits.
Preferably, each of the pieces of secret information is a key for use with a corresponding authentication, encryption or decryption function.
Preferably, the integrated circuit is programmed and configured to apply at least one of the authentication, encryption or decryption functions to data using the corresponding key as an operand.
Preferably, the attribute stored for at least one of the pieces of secret information is the length of that at least one of the pieces of secret information.
Preferably, the attribute stored for at least one of the pieces of secret information is the authentication, encryption or decryption type associated with that at least one of the pieces of secret information.
Preferably, the attribute value stored for at least one of the pieces of secret information is indicative of a permission associated with that at least one of the pieces of secret information.
In accordance with a further aspect of the invention, there is provided a system including first and second integrated circuits, the first integrated circuit implementing the first entity of claim 1, the second integrated circuit being programmed and configured to issue a request to the first integrated circuit for attribute values of any secret information stored by the first integrated circuit, and the first integrated circuit being programmed and configured to respond to the request by supplying the attribute values of the pieces of secret information to the external source.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Preferably, the second integrated circuit is a printer controller chip and the first integrated circuit is a peripheral chip in communication with the printer controller.
Preferably, the printer controller chip is installed in a printer and the peripheral chip is in a package that is releasably attachable to the printer via a connector, the connector enabling communication between the printer controller chip and the peripheral chip.
Preferably, the printer controller chip and the peripheral chip are installed in a printer.
Preferably, the package is an ink refill cartridge.
Preferably, the package is a performance setting cartridge configured to set a performance level of the printer.
Preferably, in the event at least one of the pieces of secret information can be altered or updated, the first integrated circuit is configured to alter the attribute values associated with that at least one piece of secret information as required by the alteration or update such that the update or alteration of the at least one piece of secret information and its associated attributes is atomic.
In accordance with another aspect of the invention, there is provided an integrated circuit including an onboard system clock, the integrated circuit including a clock filter configured to determine a temperature of the integrated circuit and to alter an output of the system clock based on the temperature.
Preferably, the clock filter is configured to alter the output of the system clock in the event the temperature is outside a predetermined temperature range.
More preferably, altering the output includes preventing the clock signal from reaching one or more logical circuits on the integrated circuit to which it would otherwise be applied.
It is particularly preferred that the predetermined temperature range is selected such that a temperature-related speed of the system clock output that is not due to the clock filter is within a predetermined frequency range.
It is desirable that the frequency range be within an operating frequency of some or all of the logic circuitry to which the system clock is supplied.
In the preferred form of the invention, the clock filter is configured to prevent the system clock from reaching some or all of the logic circuitry in the event the temperature falls below a predetermined level. This level is chosen to be high enough that race conditions, in which the clock speeds up to the point where logic circuitry behaviour becomes unpredictable, are avoided.
In accordance with another aspect of the present invention, there is provided a method of manufacturing a series of integrated circuits having related functionality, the method including the steps of:
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616 (vii) determining an identifier;
(viii) permanently storing the identifier on one of the integrated circuits;
(ix) repeating steps (vii) and (viii) for each integrated circuit in the series;
wherein the identifiers for the series are determined in such a way that knowing the identifier of one of the integrated circuits does not improve the ability of an attacker to determine the identifier of any of the other integrated circuits.
Preferably, the identifier for each integrated circuit is determined using a stochastic mechanism, thereby rendering highly improbable the replication of some or all of the series of identifiers stored on the series of the integrated circuits.
In accordance with another aspect of the invention, there is provided a series of integrated circuits having related functionality, wherein each of the integrated circuits incorporates an identifier determined and stored in accordance with the first aspect.
Preferably, each of the integrated circuits is a printer controller.
In accordance with another aspect of the invention, there is provided a first integrated circuit of a series of integrated circuits according to the second aspect, operable in first and second mode, wherein in the first mode, supervisor code can access the identifier and in the second mode, user code cannot access the identifier.
Preferably, the supervisor mode is available to a program upon verification of that program by a boot program of the integrated circuit.
Preferably, the identifier is mapped into a key K.
Preferably, K is the identifier.
Preferably, K is created by applying a hash function or one-way function to the identifier.
Preferably, the integrated circuit is configured to produce and output a message, the message including a result of encrypting K.
In accordance with another aspect of the invention, there is provided a method of injecting a key into a target integrated circuit, comprising the step of receiving the message generated by the first integrated circuit of claim 10, and transferring a second key into the target integrated circuit, the second key being based on K.
Preferably, the method includes generating the second key by manipulating K with a function.
More preferably, the function uses K and a code associated with the target integrated circuit as operands.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Preferably, the code is a code that is relatively unique to the target integrated circuit.
Preferably, K and the second key enable secure communication between the first integrated circuit and the target integrated circuit.
Preferably, the second integrated circuit is configured to communicate securely with a third integrated circuit, thereby enabling it to act as an intermediary between the first integrated circuit and the third integrated circuit, allowing secure communication therebetween.
Preferably, the first integrated circuit and the third integrated circuit do not share a key for use in the secure communication.
Preferably, the first integrated circuit is a printer controller configured to perform an authenticated read of the third integrated circuit by securely communicating via the second integrated circuit.
Preferably, the authenticated read relates to monitoring or updating usage of a resource.
In accordance with another aspect of the invention,, there is provided a method of enabling software development for an integrated circuit, the integrated circuit being configured to run a boot program that prevents unverified software from subsequently being loaded onto, or run by, the integrated circuit, the method including the step of loading an intermediate program onto the integrated circuit, the intermediate program being customised for a particular one or more of a plurality of potential integrated circuits that, when run on the processor, enables loading or running of code on only the particular one or more integrated circuits.
Preferably, the intermediate program enables the loading or running of unverified code on only the particular one or more integrated circuits.
Preferably, the intermediate program enables the loading or running of the code only when the code includes data indicative of the particular one or more integrated circuits.
Preferably, the intermediate program includes an intermediate boot key, such that the intermediate program enables loading or running of the code only when the code is verified in accordance with the intermediate boot key.
In accordance with another aspect of the invention, there is provided an integrated circuit configured to run a boot program that prevents unverified software from subsequently being loaded onto, or run by, the integrated circuit.
Preferably, the integrated circuit is programmed with program code configured to:
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616 receive software data and a digital signature of the software data generate a first digest from the software data; and compare the first digest against a second digest obtained via the digital signature that accompanied the received software data;
wherein the program is considered valid when the first and second digests match.
Preferably, one or both of the digests were generated using a SHA1 function.
Preferably, the boot program contains a plurality of keys, and one of the keys is selected for use in generating the first digest, the key being selected in accordance with a selection criterion.
Preferably, the selection criterion is time-based, a particular one of the keys being selected depending on the time the selection is made.
Preferably, the selection criteria relates to a physical arrangement or configuration of the integrated circuit.
Preferably, the physical arrangement or configuration includes one or more of the following:
one or more pads wired to a reference voltage or to ground;
one or more fuses, one or more of which has been blown; or the contents of non-volatile memory.
Preferably, the integrated circuit is programmed with program code configured to:
receive encrypted software data, decrypt the software data; and validate the software data;
wherein the decrypted software is executed only when the validation is successful.
Preferably, the encryption function is RSA.
Preferably, the boot program contains a plurality of keys, and one of the keys is selected for use in decrypting the software data, the key being selected in accordance with a selection criterion.
Preferably, the selection criterion is time-based, a particular one of the keys being selected depending on the time the selection is made.
Preferably, the selection criteria relates to a physical arrangement or configuration of the integrated circuit.
Preferably, the physical arrangement or configuration includes one or more of the following:
one or more pads wired to a reference voltage or to ground;
one or more fuses, one or more of which has been blown; or
CA 02508141 2005-06-01
WO 2004/050369 , PCT/AU2003/001616 the contents of non-volatile memory.
In accordance with a further aspect of the invention, there is provided a method of passing validated information along a series of entities, the series of entities including a source entity, a series of at least one intermediate entity, and a target entity, wherein each of the entities shares a validation parameter with its immediately neighbouring entity or entities in the series, the method comprising the steps, commencing in the source entity, of:
(x) in the current entity, generating a validation code for the information, the validation code being based on the validation parameter shared between the current entity and the next entity in the series;
(xi) outputting the validation code;
(xii) receiving the validation code in the next entity in the series and making that entity the cunent entity; (xiii) verifying the information via the validation code in the current entity using the validation parameter required to verify it;
(xiv) repeating steps (x) to (xi) until the last intermediate entity in the series has output the validation code it generated;
(xv) receiving the validation code in the target entity and verifying the information via the validation code and the validation parameter required to verify it.
Preferably, step (xi) includes the substep of outputting the information.
Preferably, step (xv) includes receiving the information and using it during the verification.
Preferably, step (xii) includes receiving the information and using it during the verification.
Preferably, a controller is in contact with at least some of the entities, the controller being configured to pass the information and/or the validation codes between adjacent entities in the series.
Preferably, step (x) is performed in response to an instruction issued by the controller.
Preferably, the instruction includes a request for the information upon which the validation is to be performed.
Preferably, the validation code is a digital signature produced by a digital signature function using the information and the validation parameter as operands.
Preferably, the validation parameter is a key
Preferably, the key is a symmetric key
Preferably, the validation parameter is an asymmetric key-pair, and the public and private components of the key-pair are in respective neighbouring entities in the series.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Preferably, the validation code is a digital signature generated with a digital signature function using the key or key-pair component, the information and at least one nonce as inputs.
Preferably, the at least one nonce is generated in the current entity in response to an instruction issued by the neighbouring entity of the current entity closer to the target entity.
Preferably, the at least one nonce is randomly, pseudo-randomly or arbitrarily generated number.
Preferably, the at least one nonce is supplied to the current entity in an instruction issued by the neighbouring entity of the current entity closer to the target entity.
Preferably, the nonce is randomly, pseudo-randomly or arbitrarily generated number.
Preferably, a different validation parameter is used for the validation step performed at any two adjacent entities.
Preferably, at least one of the entities is an integrated circuit.
Preferably, the target entity is a printer controller integrated circuit.
Preferably, the source entity is a printer controller integrated circuit.
Preferably, either the source entity or the target entity is a printer controller integrated circuit and the at least one intermediate entity is a verification chip associated with the printer controller.
Preferably, the controller is a printer controller integrated circuit.
Preferably, one of the entities is the controller.
Preferably, the printer controller has a relatively unique identity and the verification chip includes a key based on the unique identity.
Preferably, the source or target entity is an integrated circuit associated with a package that contains ink.
In accordance with a further aspect of the invention, there is provided an integrated circuit incorporating microelectromechanical systems (MEMS), having a total area greater than an area of at least one of the reticles used to manufacture it.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Preferably, the integrated circuit includes a stitch region where the multiple reticle fields overlapped during manufacturing of the integrated circuit.
Preferably, the surface area of the integrated circuit is larger than a single stepping field of a reticle used to manufacture the integrated circuit.
In accordance with another aspect of the invention, there is provided an integrated circuit according to the first aspect, manufactured using at least two different types of reticles.
Preferably, the integrated circuit is manufactured using multiple applications of the same reticle.
Preferably, the integrated circuit is a printhead.
In accordance with a further aspect of the invention, there is provided a method of manufacturing an integrated circuit incorporating MEMS, comprising laying out the integrated circuit using a plurality of overlapping reticles.
Preferably, the overlapping reticles are the same as each other.
Preferably, the reticles are different to each other.
Preferably, the reticles are different lengths.
Preferably, a plurality of the integrated circuits are manufactured on a single substrate wafer, wherein each of the integrated circuits is manufactured incorporating MEMS, comprising laying out of the integrated circuit using a plurality of overlapping reticles.
Preferably, at least some of the integrated circuits are different to each other.
Preferably, the integrated circuits are of different lengths.
In accordance with another aspect of the invention, there is provided a method of laying out an integrated circuit, the method including the steps of:
deling a layout of an integrated circuit;
defining a joint path;
modifying at least one element within an overlap area adjacent the joint path to take into account reticle field overlap during a subsequent manufacturing step.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
In accordance with another embodiment of the invention, there is provided, in a system comprising a plurality of consumers of one or more common resources, a method of tracking usage of the one or more common resources, comprising the steps of:
from each consumer, broadcasting to each of the other consumers a value indicative of an amount of the one or more resources consumed;
at each of the consumers, receiving the broadcasted values from the other consumers; and in each consumer, storing a record of the total of the values that the consumer broadcasted and the values received from the other consumers.
Preferably, a memory stores a total indicative of the sum of all values broadcast by the consumers, the method further comprising the steps of, for each of at least a plurality of the consumers:
performing an authenticated read of the total in the memory; comparing the total in the consumer's record with the total read from the memory; and in the event the totals do not match, performing an action.
Preferably, the memory is in one of the consumers and comprises that consumer's record.
Preferably, the action includes halting printing and or outputting an error message;
Preferably, the values are broadcast in a non-secure manner.
Preferably, the value is signless, thereby preventing recrediting of the total in the memory.
Preferably, the consumers are printer controllers.
Preferably, each of the printer controllers controls printing to a different part of print media to be printed.
Preferably, the resource is ink and the one or more values represent one or more corresponding inks consumed by one or more printheads associated with the printer controllers.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
BRIEF DESCRIPTION OF THE DRAWINGS
Preferred and other embodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
Figure 1 is an example of state machine notation
Figure 2 shows document data flow in a printer
Figure 3 is an example of a single printer controller (hereinafter “SoPEC”) A4 simplex printer system
Figure 4 is an example of a dual SoPEC A4 duplex printer system
Figure 5 is an example of a dual SoPEC A3 simplex printer system
Figure 6 is an example of a quad SoPEC A3 duplex printer system
Figure 7 is an example of a SoPEC A4 simplex printing system with an extra SoPEC used as
DRAM storage
Figure 8 is an example of an A3 duplex printing system featuring four printing SoPECs
Figure 9 shows pages containing different numbers of bands
Figure 10 shows the contents of a page band
Figure 11 illustrates a page data path from host to SoPEC
Figure 12 shows a page structure
Figure 13 shows a SoPEC system top level partition
Figure 14 shows a SoPEC CPU memory map (not to scale)
Figure 15 is a block diagram of CPU
Figure 16 shows CPU bus transactions
Figure 17 shows a state machine for a CPU subsystem slave
Figure 18 shows a SoPEC CPU memory map (not to scale)
Figure 19 shows an external signal view of a memory management unit (hereinafter MMU”) subblock partition
Figure 20 shows an internal signal view of an MMU sub-block partition
Figure 21 shows a DRAM write buffer
Figure 22 shows DIU waveforms for multiple transactions
Figure 23 shows a SoPEC LEON CPU core
Figure 24 shows a cache data RAM wrapper
Figure 25 shows a realtime debug unit block diagram
Figure 26 shows interrupt acknowledge cycles for single and pending interrupts
Figure 27 shows an A3 duplex system featuring four printing SoPECs with a single SoPEC DRAM device
Figure 28 is an SCB block diagram
Figure 29 is a logical view of the SCB of figure 28
Figure 30 shows an ISI configuration with four SoPEC devices
Figure 31 shows half-duplex interleaved transmission from ISIMaster to ISISIave
Figure 32 shows ISI transactions
Figure 33 shows an ISI long packet
Figure 34 shows an ISI ping packet
CA 02508141 2008-08-01
Figure 35 shows a short ISI packet
Figure 36 shows successful transmission of two long packets with sequence bit toggling
Figure 37 shows sequence bit operation with errored long packet
Figure 38 shows sequence bit operation with ACK error
Figure 39 shows an ISI sub-block partition
Figure 40 shows an ISI serial interface engine functional block diagram
Figure 41 is an SIE edge detection and data IO diagram
Figure 42 is an SIE Rx/Tx state machine Tx cycle state diagram
Figure 43 shows an SIE Rx/Tx state machine Tx bit stuff Ό’ cycle state diagram
Figure 44 shows an SIE Rx/Tx state machine Tx bit stuff T cycle state diagram
Figure 45 shows an SIE Rx/Tx state machine Rx cycle state diagram
Figure 46 shows an SIE Tx functional timing example
Figure 47 shows an SiE Rx functional timing example
Figure 48 shows an SIE Rx/Tx FIFO block diagram
Figure 49 shows SIE Rx/Tx FIFO control signal gating
Figure 50 shows an SIE bit stuffing state machine Tx cycle state diagram
Figure 51 shows an SIE bit stripping state machine Rx cycle state diagram
Figure 52 shows a CRC16 generation/checking shift register
Figure 53 shows circular buffer operation
Figure 54 shows duty cycle select
Figure 55 shows a GPIO partition
Figure 56 shows a motor control RTL diagram
Figure 57 is an input de-glitch RTL diagram
Figure 58 is a frequency analyser RTL diagram
Figure 59 shows a brushless DC controller
Figure 60 shows a period measure unit
Figure 61 shows line synch generation logic
Figure 62 shows an ICU partition
Figure 63 is an interrupt clear state diagram
Figure 63A Timers sub-block partition diagram
Figure 64 is a watchdog timer RTL diagram
Figure 65 is a generic timer RTL diagram
Figure 66 is a schematic of a timing pulse generator
Figure 67 is a Pulse generator RTL diagram
Figure 68 shows a SoPEC clock relationship
Figure 69 shows a CPR block partition
Figure 70 shows reset deglitch logic
Figure 71 shows reset synchronizer logic
Figure 72 is a clock gate logic diagram
Figure 73 shows a PLL and Clock divider logic
CA 02508141 2008-08-01
Figure 74 shows a PLL control state machine diagram
Figure 75 shows a LSS master system-level interface
Figure 76 shows START and STOP conditions
Figure 77 shows an LSS transfer of 2 data bytes
Figure 78 is an example of an LSS write to a QA Chip
Figure 79 is an example of an LSS read from QA Chip
Figure 80 shows an LSS block diagram
Figure 81 shows an LSS rnulti-command transaction
Figure 82 shows start and stop generation based on previous bus state
Figure 83 shows an LSS master state machine
Figure 84 shows LSS master timing
Figure 85 shows a SoPEC system top level partition
Figure 86 shows an ead bus with 3 cycle random DRAM read accesses
Figure 87 shows interleaving of CPU and non-CPU read accesses
Figure 88 shows interleaving of read and write accesses with 3 cycle random DRAM accesses
Figure 89 shows interleaving of write accesses with 3 cycle random DRAM accesses
Figure 90 shows a read protocol for a SoPEC Unit making a single 256-bit access
Figure 91 shows a read protocol for a SoPEC Unit making a single 256-bit access
Figure 92 shows a write protocol for a SoPEC Unit making a single 256-bit access
Figure 93 shows a protocol for a posted, masked, 128-bit write by the CPU
Figure 94 shows a write protocol shown for CDU making four contiguous 64-bit accesses
Figure 95 shows timeslot-based arbitration
Figure 96 shows timeslot-based arbitration with separate pointers
Figure 97 shows a first example (a) of separate read and write arbitration
Figure 98 shows a second example (b) of separate read and write arbitration
Figure 99 shows a third example (c) ofseparate read and write arbitration
Figure 100 shows a DIU partition
Figure 101 shows a DIU partition
Figure 102 shows multiplexing and address translation logic for two memory instances
Figure 103 shows a timing of dau_dcu_valid, dcu_dau_adv and dcu_dau_wadv
Figure 104 shows a DCU state machine
Figure 105 shows random read timing
Figure 106 shows random write timing
Figure 107 shows refresh timing
Figure 108 shows page mode write timing
Figure 109 shows timing of non-CPU DIU read access
Figure 110 shows timing of CPU DIU read access
Figure 111 shows a CPU DIU read access
Figure 112 shows timing of CPU DIU write access
Figure 113 shows timing of a non-CDU / non-CPU DIU write access
CA 02508141 2008-08-01
Figure 114 shows timing of CDU DIU write access
Figure 115 shows command multiplexor sub-block partition
Figure 116 shows command multiplexor timing at DIU requestors interface
Figure 117 shows generation of re_arbitrate and re_arbitrate_wadv
Figure 118 shows CPU interface and arbitration logic
Figure 119 shows arbitration timing
Figure 120 shows setting RotationSync to enable a new rotation.
Figure 121 shows a timeslot based arbitration
Figure 122 shows a timeslot based arbitration with separate pointers
Figure 123 shows a CPU pre-access write lookahead pointer
Figure 124 shows arbitration hierarchy
Figure 125 shows hierarchical round-robin priority comparison
Figure 126 shows a read multiplexor partition
Figure 127 shows a read command queue (4 deep buffer)
Figure 128 shows state-machines for shared read bus accesses
Figure 129 shows a write multiplexor partition
Figure 130 shows a read multiplexer timing for back-to-back shared read bus transfer
Figure 131 shows a write multiplexer partition
Figure 132 shows a block diagram of a PCU
Figure 133 shows PCU accesses to PEP registers
Figure 134 shows command arbitration and execution
Figure 135 shows DRAM command access state machine
Figure 136 shows an outline of contone data flow with respect to CDU
Figure 137 shows a DRAM storage arrangement for a single line of JPEG 8x8 blocks in 4 colors
Figure 138 shows a read control unit state machine
Figure 139 shows a memory arrangement of JPEG blocks
Figure 140 shows a contone data write state machine
Figure 141 shows lead-in and lead-out clipping of contone data in multi-SoPEC environment
Figure 142 shows a block diagram of CFU
Figure 143 shows a DRAM storage arrangement for a single line of JPEG blocks in 4 colors
Figure 144 shows a block diagram of color space converter
Figure 145 shows a converter/invertor
Figure 146 shows a high-level block diagram of LBD in context
Figure 147 shows a schematic outline of the LBD and the SFU
Figure 148 shows a block diagram of lossless bi-level decoder
Figure 149 shows a stream decoder block diagram
Figure 150 shows a command controller block diagram
Figure 151 shows a state diagram for command controller (CC) state machine
Figure 152 shows a next edge unit block diagram
Figure 153 shows a next edge unit buffer diagram
CA 02508141 2008-08-01
Figure 154 shows a next edge unit edge detect diagram
Figure 155 shows a state diagram for the next edge unit state machine
Figure 156 shows a line fill unit block diagram
Figure 157 shows a state diagram for the Line Fill Unit (LFU) state machine
Figure 158 shows a bi-level DRAM buffer
Figure 159 shows interfaces between LBD/SFU/HCU
Figure 160 shows an SFU sub-block partition
Figure 161 shows an LBDPrevLineFifo sub-block
Figure 162 shows timing of signals on the LBDPrevLineFIFO interface to DIU and address generator
Figure 163 shows timing of signals on LBDPrevLineFIFO interface to DIU and address generator
Figure 164 shows LBDNextLineFifo sub-block
Figure 165 shows timing of signals on-LBDNextLineFIFO interface to DIU and address generator
Figure 166 shows LBDNextLineFIFO DIU interface state diagram
Figure 167 shows an LDB to SFU write interface
Figure 168 shows an LDB to SFU read interface (within a line)
Figure 169 shows an HCUReadLineFifo Sub-block
Figure 170 shows a DIU write Interface
Figure 171 shows a DIU Read Interface multiplexing by select_hrfplf
Figure 172 shows DIU read request arbitration logic
Figure 173 shows address generation
Figure 174 shows an X scaling control unit
Figure 175 Y shows a scaling control unit
Figure 176 shows an overview of X and Y scaling at HCU interface
Figure 177 shows a high level block diagram of TE in context
Figure 178 shows a QR Code
Figure 179 shows Netpage tag structure
Figure 180 shows a Netpage tag with data rendered at 1600 dpi (magnified view)
Figure 181 shows an example of 2x2 dots for each block of QR code
Figure 182 shows placement of tags for portrait & landscape printing
Figure 183 shows agGeneral representation of tag placement
Figure 184 shows composition of SoPEC’s tag format structure
Figure 185 shows a simple 3x3 tag structure
Figure 186 shows 3x3 tag redesigned for 21 x 21 area (not simple replication)
Figure 187 shows a TE Block Diagram
Figure 188 shows a TE Hierarchy
Figure 189 shows a block diagram of PCU accesses
Figure 190 shows a tag encoder top-level FSM
Figure 191 shows generated control signals
Figure 192 shows logic to combine dot information and encoded data
CA 02508141 2008-08-01
Figure 193 shows generation of Lastdotintag/1
Figure 194 shows generation of Dot Position Valid
Figure 195 shows generation of write enable to the TFU
Figure 196 shows generation of Tag Dot Number
Figure 197 shows TDI Architecture
Figure 198 shows data flow through the TDI
Figure 199 shows raw tag data interface block diagram
Figure 200 shows an RTDI State Flow Diagram
Figure 201 shows a relationship between TE_endoftagdata, cdu_startofbandstore and cdu_endofbandstore
Figure 202 shows a TDi State Flow Diagram
Figure 203 shows mapping of the tag data to codewords 0-7
Figure 204 shows coding and mapping of uncoded fixed tag data for (15,5) RS encoder
Figure 205 shows mapping of pre-coded fixed tag data
Figure 206 shows coding and mapping of variable tag data for (15,7) RS encoder
Figure 207 shows coding and mapping of uncoded fixed tag data for (15,7) RS encoder
Figure 208 shows mapping of 2D decoded variable tag data
Figure 209 shows a simple block diagram for an m=4 Reed Solomon encoder
Figure 210 shows an RS encoder I/O diagram
Figure 211 shows a (15,5) & (15,7) RS encoder block diagram
Figure 212 shows a (15,5) RS encoder timing diagram
Figure 213 shows a (15,7) RS encoder timing diagram
Figure 214 shows a circuit for multiplying by alpha<sup>3</sup>
Figure 215 shows adding two field elements
Figure 216 shows an RS encoder implementation
Figure 217 shows an encoded tag data interface
Figure 218 shows an encoded fixed tag data interface
Figure 219 shows an encoded variable tag data interface .Figure 220 shows an encoded variable tag data sub-buffer
Figure 221 shows a breakdown of the tag format structure
Figure 222 shows a TFSIFSM state flow diagram
Figure 223 shows a TFS block diagram
Figure 224 shows a table A interface block diagram
Figure 225 shows a table A address generator
Figure 226 shows a table C interface block diagram
Figure 227 shows a table B interface block diagram
Figure 228 shows interfaces between TE, TFU and HCU
Figure 229 shows a 16-byte FIFO in TFU
Figure 230 shows a high level block diagram showing the HCU and its external interfaces
Figure 231 shows a block diagram of the HCU
CA 02508141 2008-08-01
Figure 232 shows a block diagram of the control unit
Figure 233 shows a block diagram of determine advdot unit
Figure 234 shows a page structure
Figure 235 shows a block diagram of a margin unit
Figure 236 shows a block diagram of a dither matrix table interface
Figure 237 shows an example of reading lines of dither matrix from DRAM
Figure 238 shows a state machine to read dither matrix table
Figure 239 shows a contone dotgen unit
Figure 240 shows a block diagram of dot reorg unit
Figure 241 shows an HCU to DNC interface (also used in DNC to DWU, LLU to PHI)
Figure 242 shows SFU to HCU interface (all feeders to HCU)
Figure 243 shows representative logic of the SFU to HCU interface
Figure 244 shows a high-level block diagram of DNC
Figure 245 shows a dead nozzle table format
Figure 246 shows set of dots operated on for error diffusion
Figure 247 shows a block diagram of DNC
Figure 248 shows a sub-block diagram of ink replacement unit
Figure 249 shows a dead nozzle table state machine
Figure 250 shows logic for dead nozzle removal and ink replacement
Figure 251 shows a sub-block diagram of error diffusion unit
Figure 252 shows a maximum length 32-bit LFSR used for random bit generation
Figure 253 shows a high-level data flow diagram of DWU in context
Figure 254 shows a printhead nozzle layout for 36-nozzle bi-lithic printhead
Figure 255 shows a printhead nozzle layout for a 36-nozzle bi-lithic printhead
Figure 256 shows a dot line store logical representation
Figure 257 shows a conceptual view of printhead row alignment
Figure 258 shows a conceptual view of printhead rows (as seen by the LLU and PHI)
Figure 259 shows a comparison of 1.5x v 2x buffering
Figure 260 shows an even dot order in DRAM (increasing sense, 13320 dot wide line)
Figure 261 shows an even dot order in DRAM (decreasing sense, 13320 dot wide line)
Figure 262 shows a dotline FIFO data structure in DRAM
Figure 263 shows a DWU partition
Figure 264 shows a buffer address generator sub-block
Figure 265 shows a DIU Interface sub-block
Figure 266 shows an interface controller state diagram
Figure 267 shows a high level data flow diagram of LLU in context
Figure 268 shows paper and printhead nozzles relationship (example with Di=D<sub>2</sub>=5)
Figure 269 shows printhead structure and dot generate order
Figure 270 shows an order of dot data generation and transmission
Figure 271 shows a conceptual view of printhead rows
CA 02508141 2008-08-01
Figure 272 shows a dotline FIFO data structure in DRAM (LLU specification)
Figure 273 shows an LLU partition
Figure 274 shows a dot generator RTL diagram
Figure 275 shows a DIU interface
Figure 276 shows an interface controller state diagram
Figure 277 shows high-level data flow diagram of PHI in context
Figure 278 shows power on reset
Figure 279 shows printhead data rate equalization
Figure 280 shows a printhead structure and dot generate order
Figure 281 shows an order of dot data generation and transmission
Figure 282 shows an order of dot data generation and transmission (single printhead case)
Figure 283 shows printhead interface timing parameters
Figure 284 shows printhead timing with margining
Figure 285 shows a PHI block partition
Figure 286 shows a sync generator state diagram
Figure 287 shows a line sync de-glitch RTL diagram
Figure 288 shows a fire generator state diagram
Figure 289 shows a PHI controller state machine
Figure 290 shows a datapath unit partition
Figure 291 shows a dot order controller state diagram
Figure 292 shows a data generator state diagram
Figure 293 shows data serializer timing
Figure 294 shows a data serializer RTL Diagram
Figure 295 shows printhead types 0 to 7
Figure 296 shows an ideal join between two dilithic printhead segments
Figure 297 shows an example of a join between two bilithic printhead segments
Figure 298 shows printable vs non-printable area under new definition (looking at colors as if 1 row only)
Figure 299 shows identification of printhead nozzles and shift-register sequences for printheads in arrangement 1
Figure 300 shows demultiplexing of data within the printheads in arrangement 1
Figure 301 shows double data rate signalling for a type 0 printhead in arrangement 1
Figure 302 shows double data rate signalling for a type 1 printhead in arrangement 1
Figure 303 shows identification of printheads nozzles and shift-register sequences for printheads in arrangement 2
Figure 304 shows demultiplexing of data within the printheads in arrangement 2
Figure 305 shows double data rate signalling for a type 0 printhead in arrangement 2
Figure 306 shows double data rate signalling for a type 1 printhead in arrangement 2
Figure 307 shows all 8 printhead arrangements
Figure 308 shows a printhead structure
CA 02508141 2008-08-01
Figure 309 shows a column Structure
Figure 310 shows a printhead dot shift register dot mapping to page
Figure 311 shows data timing during printing
Figure 312 shows print quality
Figure 313 shows fire and select shift register setup for printing
Figure 314 shows a fire pattern across butt end of printhead chips
Figure 315 shows fire pattern generation
Figure 316 shows determination of select shift register value
Figure 317 shows timing for printing signals figure 318 shows initialisation of printheads figure 319 shows a nozzle test latching circuit figure 320 shows nozzle testing figure 321 shows a temperature reading figure 322 shows CMOS testing figure 323 shows a reticle layout figure 324 shows a stepper pattern on Wafer Figure 325 shows relationship between datasets Figure 326 shows a validation hierarchy
Figure 327 shows development of operating system code
Figure 328 shows protocol for directly verifying reads from ChipR
Figure 329 shows a protocol for signature translation protocol
Figure 330 shows a protocol for a direct authenticated write
Figure 331 shows an alternative protocol for a direct authenticated write
Figure 332 shows a protocol for basic update of permissions
Figure 333 shows a protocol for a multiple-key update
Figure 334 shows a protocol for a single-key authenticated read
Figure 335 shows a protocol for a single-key authenticated write
Figure 336 shows a protocol for a single-key update of permissions
Figure 337 shows a protocol for a single-key update
Figure 338 shows a protocol for a multiple-key singie-M authenticated read
Figure 339 shows a protocol for a multiple-key authenticated write
Figure 340 shows a protocol for a multiple-key update of permissions
Figure 341 shows a protocol for a multiple-key update
Figure 342 shows a protocol for a multiple-key multiple-M authenticated read
Figure 343 shows a protocol for a multiple-key authenticated write
Figure 344 shows a protocol for a multiple-key update of permissions
Figure 345 shows a protocol for a multiple-key update
Figure 346 shows relationship of permissions bits to M[n] access bits
Figure 347 shows 160-bit maximal period LFSR
Figure 348 shows clock filter
CA 02508141 2008-08-01
Figure 349 shows tamper detection line
Figure 350 shows an oversize nMOS transistor layout of Tamper Detection Line
Figure 351 shows a Tamper Detection Line
Figure 352 shows how Tamper Detection Lines cover the Noise Generator
Figure 353 shows a prior art FET Implementation of CMOS inverter
Figure 354 shows non-flashing CMOS
Figure 355 shows components of a printer-based refill device
Figure 356 shows refilling of printers by printer-based refill device
Figure 357 shows components of a home refill station
Figure 358 shows a three-ink reservoir unit
Figure 359 shows refill of ink cartridges in a home refill station
Figure 360 shows components of a commercial refill station
Figure 361 shows an ink reservoir unit
Figure 362 shows refill of ink cartridges in a commercial refill station (showing a single refill unit)
Figure 363 shows equivalent signature generation
Figure 364 shows a basic field definition
Figure 365 shows an example of defining field sizes and positions
Figure 366 shows permissions
Figure 367 shows a first example of permissions for a field
Figure 368 shows a second example of permissions for a field
Figure 369 shows field attributes
Figure 370 shows an output signature generation data format for Read
Figure 371 shows an input signature verification data format for Test
Figure 372 shows an output signature generation data format for Translate
Figure 373 shows an input signature verification data format for WriteAuth
Figure 374 shows input signature data format for ReplaceKey
Figure 375 shows a key replacement map
Figure 376 shows a key replacement map after tÇ is replaced
Figure 377 shows a key replacement process
Figure 378 shows an output signature data format for GetProgramKey
Figure 379 shows transfer and rollback process
Figure 380 shows an upgrade flow
Figure 381 shows authorised ink refill paths in the printing system
Figure 382 shows an input signature verification data format for XferAmount
Figure 383 shows a transfer and rollback process
Figure 384 shows an upgrade flow
Figure 385 shows authorised upgrade paths in the printing system
Figure 386 shows a direct signature validation sequence
Figure 387 shows signature validation using translation
Figure 388 shows setup of preauth field attributes
CA 02508141 2008-08-01
Figure 389 shows a high level block diagram of QA Chip
Figure 390 shows an analogue unit
Figure 391 shows a serial bus protocol for trimming
Figure 392 shows a block diagram of a trim unit
Figure 393 shows a block diagram of a CPU of the QA chip
Figure 394 shows block diagram of an MIU
Figure 395 shows a block diagram of memory components
Figure 396 shows a first byte sent to an IOU
Figure 397 shows a block diagram of the IOU
Figure 398 shows a relationship between external SDa and SCIk and generation of internal signals
Figure 399 shows block diagram of ALU
Figure 400 shows a block diagram of DataSel
Figure 401 shows a block diagram of ROR
Figure 402 shows a block diagram of the ALU’s IO block
Figure 403 shows a block diagram of PCU
Figure 404 shows a block diagram of an Address Generator Unit
Figure 405 shows a block diagram for a Counter Unit
Figure 406 shows a block diagram of PMU
Figure 407 shows a state machine for PMU
Figure 408 shows a block diagram of MRU
Figure 409 shows simplified MAU state machine
Figure 410 shows power-on reset behaviour
Figure 411 shows a ring oscillator block diagram
Figure 412 shows a system clock duty cycle
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
DETAILED DESCRIPTION OF PREFERRED AND OTHER EMBODIMENTS
It will be appreciated that the detailed description that follows takes the form of a highly detailed design of the invention, including supporting hardware and software. A high level of detailed disclosure is provided to ensure that one skilled in the art will have ample guidance for implementing the invention.
Imperative phrases such as “must”, “requires”, “necessary” and “important” (and similar language) should be read as being indicative of being necessary only for the preferred embodiment actually being described. As such, unless the opposite is clear from the context, imperative wording should not be interpreted as such. Nothing in the detailed description is to be understood as limiting the scope of the invention, which is intended to be defined as widely as is defined in the accompanying claims.
Indications of expected rates, frequencies, costs, and other quantitative values are exemplary and estimated only, and are made in good faith. Nothing in this specification should be read as implying that a particular commercial embodiment is or will be capable of a particular performance level in any measurable area.
It will be appreciated that the principles, methods and hardware described throughout this document can be applied to other fields. Much of the security-related disclosure, for example, can be applied to many other fields that require secure communications between entities, and certainly has application far beyond the field of printers.
SYSTEM OVERVIEW
The preferred of the present invention is implemented in a printer using microelectromechanical systems (MEMS) printheads. The printer can receive data from, for example, a personal computer such as an IBM compatible PC or Apple computer. In other embodiments, the printer can receive data directly from, for example, a digital still or video camera. The particular choice of communication link is not important, and can be based, for example, on USB, Firewire, Bluetooth or any other wireless or hardwired communications protocol.
Print System Overview
Introduction
This document describes the SoPEC (Small office home office Print Engine Controller) ASIC (Application Specific Integrated Circuit) suitable for use in, for example, SoHo printer products. The SoPEC ASIC is intended to be a low cost solution for bi-lithic printhead control, replacing the multichip solutions in larger more professional systems with a single chip. The increased cost competitiveness is achieved by integrating several systems such as a modified PEC1 printing pipeline, CPU control system, peripherals and memory sub-system onto one SoC ASIC, reducing component count and simplifying board design.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
This section will give a general introduction to Memjet printing systems, introduce the components that make a bi-lithic printhead system, describe possible system architectures and show how several SoPECs can be used to achieve A3 and A4 duplex printing. The section “SoPEC ASIC” describes the SoC SoPEC ASIC, with subsections describing the CPU, DRAM and Print Engine Pipeline subsystems. Each section gives a detailed description of the blocks used and their operation within the overall print system. The final section describes the bi-lithic printhead construction and associated implications to the system due to its makeup.
Nomenclature
4.1 Bi-lithic Printhead Notation
A bi-lithic based printhead is constructed from 2 printhead ICs of varying sizes. The notation M:N is used to express the size relationship of each IC, where M specifies one printhead IC in inches and N specifies the remaining printhead IC in inches.
The ‘SoPEC/MoPEC Bilithic Printhead Reference’ document [10] contains a description of the bilithic printhead and related terminology.
4.2 Definitions
The following terms are used throughout this specification:
<td> Bi-lithic printhead CPU</td><td> Refers to printhead constructed from 2 printhead ICs Refers to CPU core, caching system and MMU.</td>
<td> ISI-Bridge chip</td><td> A device with a high speed interface (such as USB2.0, Ethernet or IEEE1394) and one or more ISI interfaces. The ISI-Bridge would be the ISIMaster for each of the ISI buses it interfaces to.</td>
<td> ISIMaster</td><td> The ISIMaster is the only device allowed to initiate communication on the Inter Sopec Interface (ISI) bus. The ISIMaster interfaces with the host.</td>
<td> ISISIave</td><td> Multi-SoPEC systems will contain one or more ISISIave SoPECs connected to the ISI bus. ISISIaves can only respond to communication initiated by the ISIMaster.</td>
<td> LEON</td><td> Refers to the LEON CPU core.</td>
<td> LineSyncMaster</td><td> The LineSyncMaster device generates the line synchronisation pulse that all SoPECs in the system must synchronise their line outputs to.</td>
<td> Multi-SoPEC</td><td> Refers to SoPEC based print system with multiple SoPEC devices</td>
<td> Netpage PEC1</td><td> Refers to page printed with tags (normally in infrared ink). Refers to Print Engine Controller version 1, precursor to SoPEC used to control printheads constructed from multiple angled printhead segments.</td>
<td> Printhead IC</td><td> Single MEMS IC used to construct bi-lithic printhead</td>
<td> PrintMaster</td><td> The PrintMaster device is responsible for coordinating all aspects of the print operation. There may only be one PrintMaster in a system.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> QA Chip</td><td> Quality Assurance Chip</td>
Storage SoPEC An ISISIave SoPEC used as a DRAM store and which does not print.
<td> Tag</td><td> Refers to pattern which encodes information about its position and orientation which allow it to be optically located and its data contents read.</td>
4.3 Acronym and Abbreviations
The following acronyms and abbreviations are used in this specification
<td> CFU</td><td> Contone FIFO Unit</td>
<td> CPU</td><td> Central Processing Unit</td>
<td> DIU</td><td> DRAM Interface Unit</td>
<td> DNC</td><td> Dead Nozzle Compensator</td>
<td> DRAM</td><td> Dynamic Random Access Memory</td>
<td> DWU</td><td> DotLine Writer Unit</td>
<td> GPIO</td><td> General Purpose Input Output</td>
<td> HCU</td><td> Halftoner Compositor Unit</td>
<td> ICU</td><td> Interrupt Controller Unit</td>
<td> ISI</td><td> Inter SoPEC Interface</td>
<td> LDB</td><td> Lossless Bi-level Decoder</td>
<td> LLU</td><td> Line Loader Unit</td>
<td> LSS</td><td> Low Speed Serial interface</td>
<td> MEMS</td><td> Micro Electro Mechanical System</td>
<td> MMU</td><td> Memory Management Unit</td>
<td> PCU</td><td> SoPEC Controller Unit</td>
<td> PHI</td><td> PrintHead Interface</td>
<td> PSS</td><td> Power Save Storage Unit</td>
<td> RDU</td><td> Real-time Debug Unit</td>
<td> ROM</td><td> Read Only Memory</td>
<td> SCB</td><td> Serial Communication Block</td>
<td> SFU</td><td> Spot FIFO Unit</td>
<td> SMG4</td><td> Silverbrook Modified Group 4.</td>
<td> SoPEC</td><td> Small office home office Print Engine Controller</td>
<td> SRAM</td><td> Static Random Access Memory</td>
<td> TE</td><td> Tag Encoder</td>
<td> TFU</td><td> Tag FIFO Unit</td>
<td> TIM</td><td> Timers Unit</td>
<td> USB</td><td> Universal Serial Bus</td>
4.4 Pseudocode notation
In general the pseudocode examples use C like statements with some exceptions.
Symbol and naming convections used for pseudocode.
<td> //</td><td> Comment Assignment</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> ==,!=,<,> & | A « » ~ J>5</td><td> Operator equal, not equal, less than, greater than Operator addition, subtraction, multiply, divide, modulus Bitwise AND, bitwise OR, bitwise exclusive OR, left shift, right shift, complement</td>
AND,OR,NOT Logical AND, Logical OR, Logical inversion
<td> [XX:YY] {a, b, c} ++, -</td><td> Array/vector specifier Concatenation operation Increment and decrement</td>
4.4.1 Register and signal naming conventions
In general register naming uses the C style conventions with capitalization to denote word delimiters. Signals use RTL style notation where underscore denote word delimiters. There is a direct translation between both convention. For example the CmdSourceFifo register is equivalent to cmd_source_fifo signal.
4.5 State machine notation
State machines should be described using the pseudocode notation outlined above. State machine descriptions use the convention of underline to indicate the cause of a transition from one state to another and plain text (no underline) to indicate the effect of the transition i.e. signal transitions which occur when the new state is entered.
A sample state machine is shown in Figure 1.
Printing Considerations
A bi-lithic printhead produces 1600 dpi bi-level dots. On low-diffusion paper, each ejected drop forms a 22.5pm diameter dot. Dots are easily produced in isolation, allowing dispersed-dot dithering to be exploited to its fullest. Since the bi-lithic printhead is the width of the page and operates with a constant paper velocity, color planes are printed in perfect registration, allowing ideal dot-on-dot printing. Dot-on-dot printing minimizes ‘muddying’ of midtones caused by inter-color bleed.
A page layout may contain a mixture of images, graphics and text. Continuous-tone (contone) images and graphics are reproduced using a stochastic dispersed-dot dither. Unlike a clustered-dot (or amplitude-modulated) dither, a dispersed-dot (or frequency-modulated) dither reproduces high spatial frequencies (i.e. image detail) almost to the limits of the dot resolution, while simultaneously reproducing lower spatial frequencies to their full color depth, when spatially integrated by the eye.
A stochastic dither matrix is carefully designed to be free of objectionable low-frequency patterns when tiled across the image. As such its size typically exceeds the minimum size required to support a particular number of intensity levels (e.g. 16χ16χ 8 bits for 257 intensity levels).
Human contrast sensitivity peaks at a spatial frequency of about 3 cycles per degree of visual field and then falls off logarithmically, decreasing by a factor of 100 beyond about 40 cycles per degree and becoming immeasurable beyond 60 cycles per degree [25][25j. At a normal viewing distance of 12 inches (about 300mm), this translates roughly to 200-300 cycles per inch (cpi) on the printed page, or 400-600 samples per inch according to Nyquist’s theorem.
In practice, contone resolution above about 300 ppi is of limited utility outside special applications such as medical imaging. Offset printing of magazines, for example, uses contone resolutions in the range 150 to 300 ppi. Higher resolutions contribute slightly to color error through the dither.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Black text and graphics are reproduced directly using bi-level black dots, and are therefore not antialiased (i.e. low-pass filtered) before being printed. Text should therefore be supersampled beyond the perceptual limits discussed above, to produce smoother edges when spatially integrated by the eye. Text resolution up to about 1200 dpi continues to contribute to perceived text sharpness (assuming low-diffusion paper, of course).
A Netpage printer, for example, may use a contone resolution of 267 ppi (i.e. 1600 dpi / 6), and a black text and graphics resolution of 800 dpi. A high end office or departmental printer may use a contone resolution of 320 ppi (1600 dpi / 5) and a black text and graphics resolution of 1600 dpi. Both formats are capable of exceeding the quality of commercial (offset) printing and photographic reproduction.
Document Data Flow
6.1 Considerations
Because of the page-width nature of the bi-lithic printhead, each page must be printed at a constant speed to avoid creating visible artifacts. This means that the printing speed can’t be varied to match the input data rate. Document rasterization and document printing are therefore decoupled to ensure the printhead has a constant supply of data. A page is never printed until it is fully rasterized. This can be achieved by storing a compressed version of each rasterized page image in memory. This decoupling also allows the RIP(s) to run ahead of the printer when rasterizing simple pages, buying time to rasterize more complex pages.
Because contone color images are reproduced by stochastic dithering, but black text and line graphics are reproduced directly using dots, the compressed page image format contains a separate foreground bi-level black layer and background contone color layer. The black layer is composited over the contone layer after the contone layer is dithered (although the contone layer has an optional black component). A final layer of Netpage tags (in infrared or black ink) is optionally added to the page for printout.
Figure 2 shows the flow of a document from computer system to printed page.
At 267 ppi for example, a A4 page (8.26 inches x 11.7 inches) of contone CMYK data has a size of 26.3MB. At 320 ppi, an A4 page of contone data has a size of 37.8MB. Using lossy contone compression algorithms such as JPEG [27], contone images compress with a ratio up to 10:1 without noticeable loss of quality, giving compressed page sizes of 2.63MB at 267 ppi and 3.78 MB at 320 ppi.
At 800 dpi, a A4 page of bi-level data has a size of 7.4MB. At 1600 dpi, a Letter page of bi-level data has a size of 29.5 MB. Coherent data such as text compresses very well. Using lossless bilevel compression algorithms such as SMG4 fax as discussed in Section 8.1.2.3.1, ten-point plain text compresses with a ratio of about 50:1. Lossless bi-level compression across an average page is about 20:1 with 10:1 possible for pages which compress poorly. The requirement for SoPEC is to be able to print text at 10:1 compression. Assuming 10:1 compression gives compressed page sizes of 0.74 MB at 800 dpi, and 2.95 MB at 1600 dpi.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Once dithered, a page of CMYK contone image data consists of 116MB of bi-level data. Using lossless bi-level compression algorithms on this data is pointless precisely because the optimal dither is stochastic - i.e. since it introduces hard-to-compress disorder.
Netpage tag data is optionally supplied with the page image. Rather than storing a compressed bilevel data layer for the Netpage tags, the tag data is stored in its raw form. Each tag is supplied up to 120 bits of raw variable data (combined with up to 56 bits of raw fixed data) and covers up to a 6mm x 6mm area (at 1600 dpi). The absolute maximum number of tags on a A4 page is 15,540 when the tag is only 2mm x 2mm (each tag is 126 dots x 126 dots, for a total coverage of 148 tags x 105 tags). 15,540 tags of 128 bits per tag gives a compressed tag page size of 0.24 MB.
The multi-layer compressed page image format therefore exploits the relative strengths of lossy JPEG contone image compression, lossless bi-level text compression, and tag encoding. The format is compact enough to be storage-efficient, and simple enough to allow straightforward realtime expansion during printing.
Since text and images normally don’t overlap, the normal worst-case page image size is image only, while the normal best-case page image size is text only. The addition of worst case Netpage tags adds 0.24MB to the page image size. The worst-case page image size is text over image plus tags. The average page size assumes a quarter of an average page contains images. Table 1 shows data sizes for compressed Letter page for these different options.
Table 1. Data sizes for A4 page (8.26 inches x 11.7 inches)
<td></td><td> 267 ppi contone 800 dpi bi-level</td><td> 320 ppi contone 1600 dpi bi-level</td>
<td> Image only (contone), 10:1 compression</td><td> 2.63 MB</td><td> 3.78 MB</td>
<td> Text only (bi-level), 10:1 compression</td><td> 0.74 MB</td><td> 2.95 MB</td>
<td> Netpage tags, 1600 dpi</td><td> 0.24 MB</td><td> 0.24 MB</td>
<td> Worst case (text + image + tags)</td><td> 3.61 MB</td><td> 6.67 MB</td>
<td> Average (text + 25% image + tags)</td><td> 1.64 MB</td><td> 4.25 MB</td>
6.2 Document Data Flow
The Host PC rasterizes and compresses the incoming document on a page by page basis. The page is restructured into bands with one or more bands used to construct a page. The compressed data is then transferred to the SoPEC device via the USB link. A complete band is stored in SoPEC embedded memory. Once the band transfer is complete the SoPEC device reads the compressed data, expands the band, normalizes contone, bi-level and tag data to 1600 dpi and transfers the resultant calculated dots to the bi-lithic printhead.
The document data flow is • The RIP software rasterizes each page description and compress the rasterized page image.
• The infrared layer of the printed page optionally contains encoded Netpage [5] tags at a programmable density.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616 • The compressed page image is transferred to the SoPEC device via the USB normally on a band by band basis.
• The print engine takes the compressed page image and starts the page expansion.
• The first stage page expansion consists of 3 operations performed in parallel • expansion of the JPEG-compressed contone layer • expansion of the SMG4 fax compressed bi-level layer • encoding and rendering of the bi-level tag data.
• The second stage dithers the contone layer using a programmable dither matrix, producing up to four bi-level layers at full-resolution.
• The second stage then composites the bi-level tag data layer, the bi-level SMG4 fax decompressed layer and up to four bi-level JPEG de-compressed layers into the full-resolution page image.
• A fixative layer is also generated as required.
• The last stage formats and prints the bi-level data through the bi-lithic printhead via the printhead interface.
The SoPEC device can print a full resolution page with 6 color planes. Each of the color planes can be generated from compressed data through any channel (either JPEG compressed, bi-level SMG4 fax compressed, tag data generated, or fixative channel created) with a maximum number of 6 data channels from page RIP to bi-lithic printhead color planes.
The mapping of data channels to color planes is programmable, this allows for multiple color planes in the printhead to map to the same data channel to provide for redundancy in the printhead to assist dead nozzle compensation.
Also a data channel could be used to gate data from another data channel. For example in stencil mode, data from the bilevel data channel at 1600 dpi can be used to filter the contone data channel at 320 dpi, giving the effect of 1600 dpi contone image.
6.3 Page considerations due to SoPEC
The SoPEC device typically stores a complete page of document data on chip. The amount of storage available for compressed pages is limited to 2Mbytes, imposing a fixed maximum on compressed page size. A comparison of the compressed image sizes in Table 2 indicates that SoPEC would not be capable of printing worst case pages unless they are split into bands and printing commences before all the bands for the page have been downloaded. The page sizes in the table are shown for comparison purposes and would be considered reasonable for a professional level printing system. The SoPEC device is aimed at the consumer level and would not be required to print pages of that complexity. Target document types for the SoPEC device are shown Table 2.
Table 2. Page content targets for SoPEC
<td> Page Content Description</td><td> Calculation</td><td> Size</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
<td></td><td></td><td> (MByte)</td>
<td> Best Case picture Image, 267ppi with 3 colors, A4 size</td><td> 8.26x11.7x267x267x3 @10:1</td><td> 1.97</td>
<td> Full page text, 800dpi A4 size</td><td> 8.26x11.7x800x800 @ 10:1</td><td> 0.74</td>
<td> Mixed Graphics and Text - Image of 6 inches x 4 inches @ 267 ppi and 3 colors - Remaining area text ~73 inches<sup>2</sup>, 800 dpi</td><td> 6x4x267x267x3 @ 5:1 800x800x73 @10:1</td><td> 1.55</td>
<td> Best Case Photo, 3 Colors, 6.6 MegaPixel Image</td><td> 6.6 Mpixel @ 10:1</td><td> 2.00</td>
If a document with more complex pages is required, the page RIP software in the host PC can determine that there is insufficient memory storage in the SoPEC for that document. In such cases the RIP software can take two courses of action. It can increase the compression ratio until the compressed page size will fit in the SoPEC device, at the expense of document quality, or divide the page into bands and allow SoPEC to begin printing a page band before all bands for that page are downloaded. Once SoPEC starts printing a page it cannot stop, if SoPEC consumes compressed data faster than the bands can be downloaded a buffer underrun error could occur causing the print to fail. A buffer underrun occurs if a line synchronisation pulse is received before a line of data has been transferred to the printhead.
Other options which can be considered if the page does not fit completely into the compressed page store are to slow the printing or to use multiple SoPECs to print parts of the page. A Storage SoPEC ( Section 7.2.5) could be added to the system to provide guaranteed bandwidth data delivery. The print system could also be constructed using an ISI-Bridge chip (Section 7.2.6) to provide guaranteed data delivery.
Memjet Printer Architecture
The SoPEC device can be used in several printer configurations and architectures.
In the general sense every SoPEC based printer architecture will contain:
• One or more SoPEC devices.
• One or more bi-lithic printheads.
• Two or more LSS busses.
• Two or more QA chips.
• USB 1.1 connection to host or ISI connection to Bridge Chip.
• ISI bus connection between SoPECs (when multiple SoPECs are used).
Some example printer configurations as outlined in Section 7.2. The various system components are outlined briefly in Section 7.1.
7.1 System Components
7.1.1 SoPEC Print Engine Controller
The SoPEC device contains several system on a chip (SoC) components, as well as the print engine pipeline control application specific logic.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
7.1.1.1 Print Engine Pipeline (PEP) Logic
The PEP reads compressed page store data from the embedded memory, optionally decompresses the data and formats it for sending to the printhead. The print engine pipeline functionality includes expanding the page image, dithering the contone layer, compositing the black layer over the contone layer, rendering of Netpage tags, compensation for dead nozzles in the printhead, and sending the resultant image to the bi-lithic printhead.
7.1.1.2 Embedded CPU
SoPEC contains an embedded CPU for general purpose system configuration and management. The CPU performs page and band header processing, motor control and sensor monitoring (via the GPIO) and other system control functions. The CPU can perform buffer management or report buffer status to the host. The CPU can optionally run vendor application specific code for general print control such as paper ready monitoring and LED status update.
7.1.1.3 Embedded Memory Buffer
A 2.5Mbyte embedded memory buffer is integrated onto the SoPEC device, of which approximately 2Mbytes are available for compressed page store data. A compressed page is divided into one or more bands, with a number of bands stored in memory. As a band of the page is consumed by the PEP for printing a new band can be downloaded. The new band may be for the current page or the next page.
Using banding it is possible to begin printing a page before the complete compressed page is downloaded, but care must be taken to ensure that data is always available for printing or a buffer underrun may occur.
An Storage SoPEC acting as a memory buffer (Section 7.2.5) or an ISl-Bridge chip with attached DRAM (Section 7.2.6) could be used to provide guaranteed data delivery.
7.1.1.4 Embedded USB 1.1 Device
The embedded USB 1.1 device accepts compressed page data and control commands from the host PC, and facilitates the data transfer to either embedded memory or to another SoPEC device in multi-SoPEC systems.
7.1.2 Bi-lithic Printhead
The printhead is constructed by abutting 2 printhead ICs together. The printhead ICs can vary in size from 2 inches to 8 inches, so to produce an A4 printhead several combinations are possible.
For example two printhead ICs of 7 inches and 3 inches could be used to create a A4 printhead (the notation is 7:3). Similarly 6 and 4 combination (6:4), or 5:5 combination. For an A3 printhead it can be constructed from 8:6 or an 7:7 printhead IC combination. For photographic printing smaller printheads can be constructed.
7.1.3 LSS interface bus
Each SoPEC device has 2 LSS system buses for communication with QA devices for system authentication and ink usage accounting. The number of QA devices per bus and their position in the system is unrestricted with the exception that PRINTER_QA and INK_QA devices should be on separate LSS busses.
7.1.4 QA devices
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Each SoPEC system can have several QA devices. Normally each printing SoPEC will have an associated PRINTER_QA. Ink cartridges will contain an INK_QA chip. PRINTER_QA and INK__QA devices should be on separate LSS busses. All QA chips in the system are physically identical with flash memory contents defining PRINTER_QA from INK_QA chip.
7.1.5 ISI interface
The Inter-SoPEC Interface (ISI) provides a communication channel between SoPECs in a multiSoPEC system. The ISIMaster can be SoPEC device or an ISI-Bridge chip depending on the printer configuration. Both compressed data and control commands are transferred via the interface.
7.1.6 ISI-Bridge Chip
A device, other than a SoPEC with a USB connection, which provides print data to a number of slave SoPECs. A bridge chip will typically have a high bandwidth connection, such as USB2.0, Ethernet or IEEE1394, to a host and may have an attached external DRAM for compressed page storage. A bridge chip would have one or more ISI interfaces. The use of multiple ISI buses would allow the construction of independent print systems within the one printer. The ISI-Bridge would be the ISIMaster for each of the ISI buses it interfaces to.
7.2 Possible SoPEC Systems
Several possible SoPEC based system architectures exist. The following sections outline some possible architectures. It is possible to have extra SoPEC devices in the system used for DRAM storage. The QA chip configurations shown are indicative of the flexibility of LSS bus architecture, but not limited to those configurations.
7.2.1 A4 Simplex with 1 SoPEC device
In Figure 3, a single SoPEC device can be used to control two printhead ICs. The SoPEC receives compressed data through the USB device from the host. The compressed data is processed and transferred to the printhead.
7.2.2 A4 Duplex with 2 SoPEC devices
In Figure 4, two SoPEC devices are used to control two bi-lithic printheads, each with two printhead ICs. Each bi-lithic printhead prints to opposite sides of the same page to achieve duplex printing. The SoPEC connected to the USB is the ISIMaster SoPEC, the remaining SoPEC is an ISISIave. The ISIMaster receives all the compressed page data for both SoPECs and re-distributes the compressed data over the Inter-SoPEC Interface (ISI) bus.
It may not be possible to print an A4 page every 2 seconds in this configuration since the USB 1.1 connection to the host may not have enough bandwidth. An alternative would be for each SoPEC to have its own USB 1.1 connection. This would allow a faster average print speed.
7.2.3 A3 Simplex with 2 SoPEC devices
In Figure 5, two SoPEC devices are used to control one A3 bi-lithic printhead. Each SoPEC controls only one printhead IC (the remaining PHI port typically remains idle). This system uses the SoPEC with the USB connection as the ISIMaster. In this dual SoPEC configuration the compressed page store data is split across 2 SoPECs giving a total of 4Mbyte page store, this allows the system to
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 use compression rates as in an A4 architecture, but with the increased page size of A3. The ISIMaster receives all the compressed page data for all SoPECs and re-distributes the compressed data over the Inter-SoPEC Interface (ISl) bus.
It may not be possible to print an A3 page every 2 seconds in this configuration since the USB 1.1 connection to the host will only have enough bandwidth to supply 2Mbytes every 2 seconds. Pages which require more than 2MBytes every 2 seconds will therefore print more slowly. An alternative would be for each SoPEC to have its own USB 1.1 connection. This would allow a faster average print speed.
7.2.4 A3 Duplex with 4 SoPEC devices
In Figure 6 a 4 SoPEC system is shown. It contains 2 A3 bi-lithic printheads, one for each side of an A3 page. Each printhead contain 2 printhead ICs, each printhead IC is controlled by an independent SoPEC device, with the remaining PHI port typically unused. Again the SoPEC with USB 1.1 connection is the ISIMaster with the other SoPECs as ISISIaves. In total, the system contains 8Mbytes of compressed page store (2Mbytes per SoPEC), so the increased page size does not degrade the system print quality, from that of an A4 simplex printer. The ISIMaster receives all the compressed page data for all SoPECs and re-distributes the compressed data over the InterSoPEC Interface (ISl) bus.
It may not be possible to print an A3 page every 2 seconds in this configuration since the USB 1.1 connection to the host will only have enough bandwidth to supply 2Mbytes every 2 seconds. Pages which require more than 2MBytes every 2 seconds will therefore print more slowly. An alternative would be for each SoPEC or set of SoPECs on the same side of the page to have their own USB
1.1 connection (as ISISIaves may also have direct USB connections to the host). This would allow a faster average print speed.
7.2.5 SoPEC DRAM storage solution: A4 Simplex with 1 printing SoPEC and 1 memory SoPEC Extra SoPECs can be used for DRAM storage e.g. in Figure 7 an A4 simplex printer can be built with a single extra SoPEC used for DRAM storage. The DRAM SoPEC can provide guaranteed bandwidth delivery of data to the printing SoPEC. SoPEC configurations can have multiple extra SoPECs used for DRAM storage.
7.2.6 ISI-Bridge chip solution: A3 Duplex system with 4 SoPEC devices
In Figure 8, an ISI-Bridge chip provides slave-only ISl connections to SoPEC devices. Figure 8 shows a ISI-Bridge chip with 2 separate ISl ports. The ISI-Bridge chip is the ISIMaster on each of the ISl busses it is connected to. All connected SoPECs are ISISIaves. The ISI-Bridge chip will typically have a high bandwidth connection to a host and may have an attached external DRAM for compressed page storage.
An alternative to having a ISI-Bridge chip would be for each SoPEC or each set of SoPECs on the same side of a page to have their own USB 1.1 connection. This would allow a faster average print speed.
Page Format and Printflow
When rendering a page, the RIP produces a page header and a number of bands (a non-blank page requires at least one band) for a page. The page header contains high level rendering
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 parameters, and each band contains compressed page data. The size of the band will depend on the memory available to the RIP, the speed of the RIP, and the amount of memory remaining in SoPEC while printing the previous band(s). Figure 9 shows the high level data structure of a number of pages with different numbers of bands in the page.
Each compressed band contains a mandatory band header, an optional bi-level plane, optional sets of interleaved contone planes, and an optional tag data plane (for Netpage enabled applications). Since each of these planes is optional<sup>1</sup>, the band header specifies which planes are included with the band. Figure 10 gives a high-level breakdown of the contents of a page band.
A single SoPEC has maximum rendering restrictions as follows:
• 1 bi-level plane • 1 contone interleaved plane set containing a maximum of 4 contone planes • 1 tag data plane • a bi-lithic printhead with a maximum of 2 printhead ICs
The requirement for single-sided A4 single SoPEC printing is • average contone JPEG compression ratio of 10:1, with a local minimum compression ratio of 5:1 for a single line of interleaved JPEG blocks.
• average bi-level compression ratio of 10:1, with a local minimum compression ratio of 1:1 for a single line.
If the page contains rendering parameters that exceed these specifications, then the RIP or the Host PC must split the page into a format that can be handled by a single SoPEC.
In the general case, the SoPEC CPU must analyze the page and band headers and generate an appropriate set of register write commands to configure the units in SoPEC for that page. The various bands are passed to the destination SoPEC(s) to locations in DRAM determined by the host.
The host keeps a memory map for the DRAM, and ensures that as a band is passed to a SoPEC, it is stored in a suitable free area in DRAM. Each SoPEC is connected to the ISI bus or USB bus via its Serial communication Block (SCB). The SoPEC CPU configures the SCB to allow compressed data bands to pass from the USB or ISI through the SCB to SoPEC DRAM. Figure 11 shows an example data flow for a page destined to be printed by a single SoPEC. Band usage information is generated by the individual SoPECs and passed back to the host.
SoPEC has an addressing mechanism that permits circular band memory allocation, thus facilitating easy memory management. However it is not strictly necessary that all bands be stored together.
As long as the appropriate registers in SoPEC are set up for each band, and a given band is contiguous , the memory can be allocated in any way.
Although a band must contain at least one plane
Contiguous allocation also includes wrapping around in SoPECs band store memory.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
8.1 PRINT ENGINE EXAMPLE PAGE FORMAT
This section describes a possible format of compressed pages expected by the embedded CPU in SoPEC. The format is generated by software in the host PC and interpreted by embedded software in SoPEC. This section indicates the type of information in a page format structure, but implementations need not be limited to this format. The host PC can optionally perform the majority of the header processing.
The compressed format and the print engines are designed to allow real-time page expansion during printing, to ensure that printing is never interrupted in the middle of a page due to data underrun.
The page format described here is for a single black bi-level layer, a contone layer, and a Netpage tag layer. The black bi-level layer is defined to composite over the contone layer.
The black bi-level layer consists of a bitmap containing a 1 -bit opacity for each pixel. This black layer matte has a resolution which is an integer or non-integer factor of the printer’s dot resolution. The highest supported resolution is 1600 dpi, i.e. the printer’s full dot resolution.
The contone layer, optionally passed in as YCrCb, consists of a 24-bit CMY or 32-bit CMYK color for each pixel. This contone image has a resolution which is an integer or non-integer factor of the printer’s dot resolution. The requirement for a single SoPEC is to support 1 side per 2 seconds A4/Letter printing at a resolution of 267 ppi, i.e. one-sixth the printer’s dot resolution.
Non-integer scaling can be performed on both the contone and bi-level images. Only integer scaling can be performed on the tag data.
The black bi-level layer and the contone layer are both in compressed form for efficient storage in the printer’s internal memory.
8.1.1 Page structure
A single SoPEC is able to print with full edge bleed for Letter and A3 via different stitch part combinations of the bi-lithic printhead. It imposes no margins and so has a printable page area which corresponds to the size of its paper. The target page size is constrained by the printable page area, less the explicit (target) left and top margins specified in the page description. These relationships are illustrated below.
8.1.2 Compressed page format
Apart from being implicitly defined in relation to the printable page area, each page description is complete and self-contained. There is no data stored separately from the page description to which the page description refers.<sup>3</sup> The page description consists of a page header which describes the size and resolution of the page, followed by one or more page bands which describe the actual page content.
8.1.2.1 Page header
Table 3 shows an example format of a page header.
<sup>3</sup>SoPEC relies on dither matrices and tag structures to have already been set up, but these are not considered to be part of a general page format. It is trivial to extend the page format to allow exact specification of dither matrices and tag structures.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Table 3. Page header format
<td> field</td><td> format</td><td> description</td>
<td> signature</td><td> 16-bit integer</td><td> Page header format signature.</td>
<td> version</td><td> 16-bit integer</td><td> Page header format version number.</td>
<td> structure size</td><td> 16-bit integer</td><td> Size of page header.</td>
<td> band count</td><td> 16-bit integer</td><td> Number of bands specified for this page.</td>
<td> target resolution (dpi)</td><td> 16-bit integer</td><td> Resolution of target page. This is always 1600 for the Memjet printer.</td>
<td> target page width</td><td> 16-bit integer</td><td> Width of target page, in dots.</td>
<td> target page height</td><td> 32-bit integer</td><td> Height of target page, in dots.</td>
<td> target left margin for black and contone</td><td> 16-bit integer</td><td> Width of target left margin, in dots, for black and contone.</td>
<td> target top margin for black and contone</td><td> 16-bit integer</td><td> Height of target top margin, in dots, for black and contone.</td>
<td> target right margin for black and contone</td><td> 16-bit integer</td><td> Width of target right margin, in dots, for black and contone.</td>
<td> target bottom margin for black and contone</td><td> 16-bit integer</td><td> Height of target bottom margin, in dots, for black and contone.</td>
<td> target left margin for tags</td><td> 16-bit integer</td><td> Width of target left margin, in dots, for tags.</td>
<td> target top margin for tags</td><td> 16-bit integer</td><td> Height of target top margin, in dots, for tags.</td>
<td> target right margin for tags</td><td> 16-bit integer</td><td> Width of target right margin, in dots, for tags.</td>
<td> target bottom margin for tags</td><td> 16-bit integer</td><td> Height of target bottom margin, in dots, for tags.</td>
<td> generate tags</td><td> 16-bit integer</td><td> Specifies whether to generate tags for this page (0 - no, 1 - yes).</td>
<td> fixed tag data</td><td> 128-bit integer</td><td> This is only valid if generate tags is set.</td>
<td> tag vertical scale factor</td><td> 16-bit integer</td><td> Scale factor in vertical direction from tag data resolution to target resolution. Valid range = 1-511. Integer scaling only</td>
<td> tag horizontal scale factor</td><td> 16-bit integer</td><td> Scale factor in horizontal direction from tag data resolution to target resolution. Valid range = 1-511. Integer scaling only.</td>
<td> bi-level layer vertical scale factor</td><td> 16-bit integer</td><td> Scale factor in vertical direction from bi-level resolution to target resolution (must be 1 or greater). May be non-integer. Expressed as a fraction with upper 8-bits the numerator and the lower 8 bits the denominator.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> bi-level layer horizontal scale factor</td><td> 16-bit integer</td><td> Scale factor in horizontal direction from bilevel resolution to target resolution (must be 1 or greater). May be non-integer. Expressed as a fraction with upper 8-bits the numerator and the lower 8 bits the denominator.</td>
<td> bi-level layer page width</td><td> 16-bit integer</td><td> Width of bi-level layer page, in pixels.</td>
<td> bi-level layer page height</td><td> 32-bit integer</td><td> Height of bi-level layer page, in pixels.</td>
<td> contone flags</td><td> 16 bit integer</td><td> Defines the color conversion that is required for the JPEG data. Bits 2-0 specify how many contone planes there are (e.g. 3 for CMY and 4 for CMYK). Bit 3 specifies whether the first 3 color planes need to be converted back from YCrCb to CMY. Only valid if b2-0 = 3 or 4. 0 - no conversion, leave JPEG colors alone 1 - color convert. Bits 7-4 specifies whether the YCrCb was generated directly from CMY, or whether it was converted to RGB first via the step: R = 255-C, G = 255-M, B = 255-Y. Each of the color planes can be individually inverted. Bit 4: 0 - do not invert color plane 0 1 - invert color plane 0 Bit 5: 0 - do not invert color plane 1 1 - invert color plane 1 Bit 6: 0 - do not invert color plane 2 1 - invert color plane 2 Bit 7: 0 - do not invert color plane 3 1 - invert color plane 3 Bit 8 specifies whether the contone data is JPEG compressed or non-com pressed: 0 - JPEG compressed 1 - non-com pressed The remaining bits are reserved (0).</td>
<td> contone vertical scale factor</td><td> 16-bit integer</td><td> Scale factor in vertical direction from contone channel resolution to target resolution. Valid</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td></td><td></td><td> range = 1-255. May be non-integer. Expressed as a fraction with upper 8-bits the numerator and the lower 8 bits the denominator.</td>
<td> contone horizontal scale factor</td><td> 16-bit integer</td><td> Scale factor in horizontal direction from contone channel resolution to target resolution. Valid range = 1-255. May be noninteger. Expressed as a fraction with upper 8-bits the numerator and the lower 8 bits the denominator.</td>
<td> contone page width</td><td> 16-bit integer</td><td> Width of contone page, in contone pixels.</td>
<td> contone page height</td><td> 32-bit integer</td><td> Height of contone page, in contone pixels.</td>
<td> reserved</td><td> up to 128 bytes</td><td> Reserved and 0 pads out page header to multiple of 128 bytes.</td>
The page header contains a signature and version which allow the CPU to identify the page header format. If the signature and/or version are missing or incompatible with the CPU, then the CPU can reject the page.
The contone flags define how many contone layers are present, which typically is used for defining whether the contone layer is CMY or CMYK. Additionally, if the color planes are CMY, they can be optionally stored as YCrCb, and further optionally color space converted from CMY directly or via RGB. Finally the contone data is specified as being either JPEG compressed or non-com pressed. The page header defines the resolution and size of the target page. The bi-level and contone layers are clipped to the target page if necessary. This happens whenever the bi-level or contone scale factors are not factors of the target page width or height.
The target left, top, right and bottom margins define the positioning of the target page within the printable page area.
The tag parameters specify whether or not Netpage tags should be produced for this page and what orientation the tags should be produced at (landscape or portrait mode). The fixed tag data is also provided.
The contone, bi-level and tag layer parameters define the page size and the scale factors.
8.1.2.2 Band format
Table 4 shows the format of the page band header.
Table 4. Band header format
<td> field</td><td> format</td><td> description</td>
<td> signature</td><td> 16-bit integer</td><td> Page band header format signature.</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
<td> version</td><td> 16-bit integer</td><td> Page band header format version number.</td>
<td> structure size</td><td> 16-bit integer</td><td> Size of page band header.</td>
<td> bi-level layer band height</td><td> 16-bit integer</td><td> Height of bi-level layer band, in black pixels.</td>
<td> bi-level layer band data size</td><td> 32-bit integer</td><td> Size of bi-level layer band data, in bytes.</td>
<td> contone band height</td><td> 16-bit integer</td><td> Height of contone band, in contone pixels.</td>
<td> contone band data size</td><td> 32-bit integer</td><td> Size of contone plane band data, in bytes.</td>
<td> tag band height</td><td> 16-bit integer</td><td> Height of tag band, in dots.</td>
<td> tag band data size</td><td> 32-bit integer</td><td> Size of unencoded tag data band, in bytes. Can be 0 which indicates that no tag data is provided.</td>
<td> reserved</td><td> up to 128 bytes</td><td> Reserved and 0 pads out band header to multiple of 128 bytes.</td>
The bi-level layer parameters define the height of the black band, and the size of its compressed band data. The variable-size black data follows the page band header.
The contone layer parameters define the height of the contone band, and the size of its compressed page data. The variable-size contone data follows the black data.
The tag band data is the set of variable tag data half-lines as required by the tag encoder. The format of the tag data is found in Section 26.5.2. The tag band data follows the contone data. Table 5 shows the format of the variable-size compressed band data which follows the page band header.
Table 5. Page band data format
<td> field</td><td> format</td><td> Description</td>
<td> black data</td><td> Modified G4 facsimile bitstream<sup>4</sup></td><td> Compressed bi-level layer.</td>
<td> contone data</td><td> JPEG bytestream</td><td> Compressed contone datalayer.</td>
<td> tag data map</td><td> Tag data array</td><td> Tag data format. See Section 26.5.2.</td>
The start of each variable-size segment of band data should be aligned to a 256-bit DRAM word boundary.
The following sections describe the format of the compressed bi-level layers and the compressed contone layer, section 26.5.1 on page 442 describes the format of the tag data structures.
8.1.2.3 Bi-level data compression
The (typically 1600 dpi) black bi-level layer is losslessly compressed using Silverbrook Modified Group 4 (SMG4) compression which is a version of Group 4 Facsimile compression [22] without Huffman and with simplified run length encodings. Typically compression ratios exceed 10:1. The encoding are listed in Table 6 and Table 7.
Table 6. Bi-Level group 4 facsimile style compression encodings
<td></td><td> Encoding</td><td> Description</td>
<td> same as Group 4</td><td> 1000</td><td> Pass Command: aO <- b2, skip next two edges</td>
See section 8.1.2,3 on page 63 for note regarding the use of this standard
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
<td> Facsimile</td><td></td><td></td>
<td rowspan="5"></td><td> 1</td><td> Vertical(O): aO <- b1, color = Icolor</td>
<td> 110</td><td> Vertical^ ): aO <- b1 + 1, color = Icolor</td>
<td> 010</td><td> Vertical(-1 ): aO <- b1 -1, color = icolor</td>
<td> 110000</td><td> Vertical(2): aO <- b1 + 2, color = Icolor</td>
<td> 010000</td><td> Vertical(-2): aO <- b1 - 2, color = Icolor</td>
<td> Unique to this implementation</td><td> 100000</td><td> Vertical(3): aO <- b1 + 3, color = Icolor</td>
<td rowspan="2"></td><td> 000000</td><td> Vertical(-3): aO <- b1 - 3, color = Icolor</td>
<td> <RL><RL>100</td><td> Horizontal: aO <- aO + <RL> + <RL></td>
SMG4 has a pass through mode to cope with local negative compression. Pass through mode is activated by a special run-length code. Pass through mode continues to either end of line or for a pre-programmed number of bits, whichever is shorter. The special run-length code is always executed as a run-length code, followed by pass through. The pass through escape code is a medium length run-length with a run of less than or equal to 31.
Table 7. Run length (RL) encodings
<td></td><td> Encoding</td><td> Description</td>
<td> Unique to this implementation</td><td> RRRRR1</td><td> Short Black Runlength (5 bits)</td>
<td></td><td> RRRRR1</td><td> Short White Runlength (5 bits)</td>
<td></td><td> RRRRRRRRRR10</td><td> Medium Black Runlength (10 bits)</td>
<td></td><td> RRRRRRRR10</td><td> Medium White Runlength (8 bits)</td>
<td></td><td> RRRRRRRRRR10</td><td> Medium Black Runlength with RRRRRRRRRR <= 31, Enter pass through</td>
<td></td><td> RRRRRRRR10</td><td> Medium White Runlength with RRRRRRRR <= 31, Enter pass through</td>
<td></td><td> RRRRRRRRRRRRRRR00</td><td> Long Black Runlength (15 bits)</td>
<td></td><td> RRRRRRRRRRRRRRR00</td><td> Long White Runlength (15 bits)</td>
Since the compression is a bitstream, the encodings are read right (least significant bit) to left (most significant bit). The run lengths given as RRRR in Table are read in the same way (least significant bit at the right to most significant bit at the left).
Each band of bi-level data is optionally self contained. The first line of each band therefore is based on a ‘previous’ blank line or the last line of the previous band.
8.1.2.3.1 Group 3 and 4 facsimile compression
The Group 3 Facsimile compression algorithm [22] losslessly compresses bi-level data for transmission over slow and noisy telephone lines. The bi-level data represents scanned black text and graphics on a white background, and the algorithm is tuned for this class of images (it is explicitly not tuned, for example, for halftoned bi-level images). The 1D Group 3 algorithm
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 runlength-encodes each scanline and then Huffman-encodes the resulting runlengths. Runlengths in the range 0 to 63 are coded with terminating codes. Runlengths in the range 64 to 2623 are coded with make-up codes, each representing a multiple of 64, followed by a terminating code. Runlengths exceeding 2623 are coded with multiple make-up codes followed by a terminating code. The Huffman tables are fixed, but are separately tuned for black and white runs (except for make-up codes above 1728, which are common). When possible, the 2D Group 3 algorithm encodes a scanline as a set of short edge deltas (0, +1, +2, +3) with reference to the previous scanline. The delta symbols are entropy-encoded (so that the zero delta symbol is only one bit long etc.) Edges within a 2D-encoded line which can’t be delta-encoded are runlength-encoded, and are identified by a prefix. 1D- and 2D-encoded lines are marked differently. 1 D-encoded lines are generated at regular intervals, whether actually required or not, to ensure that the decoder can recover from line noise with minimal image degradation. 2D Group 3 achieves compression ratios of up to 6:1 [32], The Group 4 Facsimile algorithm [22] losslessly compresses bi-level data for transmission over error-free communications lines (i.e. the lines are truly error-free, or error-correction is done at a lower protocol level). The Group 4 algorithm is based on the 2D Group 3 algorithm, with the essential modification that since transmission is assumed to be error-free, ID-encoded lines are no longer generated at regular intervals as an aid to error-recovery. Group 4 achieves compression ratios ranging from 20:1 to 60:1 for the CCITT set of test images [32].
The design goals and performance of the Group 4 compression algorithm qualify it as a compression algorithm for the bi-level layers. However, its Huffman tables are tuned to a lower scanning resolution (100-400 dpi), and it encodes runlengths exceeding 2623 awkwardly.
8.1.2.4 Contone data compression
The contone layer (CMYK) is either a non-com pressed bytestream or is compressed to an interleaved JPEG bytestream. The JPEG bytestream is complete and self-contained. It contains all data required for decompression, including quantization and Huffman tables.
The contone data is optionally converted to YCrCb before being compressed (there is no specific advantage in color-space converting if not compressing). Additionally, the CMY contone pixels are optionally converted (on an individual basis) to RGB before color conversion using R=255-C, G=255-M, B=255-Y. Optional bitwise inversion of the K plane may also be performed. Note that this CMY to RGB conversion is not intended to be accurate for display purposes, but rather for the purposes of later converting to YCrCb. The inverse transform will be applied before printing.
8.1.2.4.1 JPEG compression
The JPEG compression algorithm [27] lossily compresses a contone image at a specified quality level. It introduces imperceptible image degradation at compression ratios below 5:1, and negligible image degradation at compression ratios below 10:1 [33].
JPEG typically first transforms the image into a color space which separates luminance and chrominance into separate color channels. This allows the chrominance channels to be subsampled without appreciable loss because of the human visual system’s relatively greater sensitivity to luminance than chrominance. After this first step, each color channel is compressed separately.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
The image is divided into 8x8 pixel blocks. Each block is then transformed into the frequency domain via a discrete cosine transform (DCT). This transformation has the effect of concentrating image energy in relatively lower-frequency coefficients, which allows higher-frequency coefficients to be more crudely quantized. This quantization is the principal source of compression in JPEG. Further compression is achieved by ordering coefficients by frequency to maximize the likelihood of adjacent zero coefficients, and then runlength-encoding runs of zeroes. Finally, the runlengths and non-zero frequency coefficients are entropy coded. Decompression is the inverse process of compression.
8.1.2.4.2 Non-com pressed format
If the contone data is non-com pressed, it must be in a block-based format bytestream with the same pixel order as would be produced by a JPEG decoder. The bytestream therefore consists of a series of 8x8 block of the original image, starting with the top left 8x8 block, and working horizontally across the page (as it will be printed) until the top rightmost 8x8 block, then the next row of 8x8 blocks (left to right) and so on until the lower row of 8x8 blocks (left to right). Each 8x8 block consists of 64 8-bit pixels for color plane 0 (representing 8 rows of 8 pixels in the order top left to bottom right) followed by 64 8-bit pixels for color plane 1 and so on for up to a maximum of 4 color planes.
If the original image is not a multiple of 8 pixels in X or Y, padding must be present (the extra pixel data will be ignored by the setting of margins).
8.1.2.4.3 Compressed format
If the contone data is compressed the first memory band contains JPEG headers (including tables) plus MCUs (minimum coded units). The ratio of space between the various color planes in the JPEG stream is 1:1:1:1. No subsampling is permitted. Banding can be completely arbitrary i.e there can be multiple JPEG images per band or 1 JPEG image divided over multiple bands. The break between bands is only memory alignment based.
8.1.2.4.4 Conversion of RGB to YCrCb (in RIP)
YCrCb is defined as per CCIR 601-1 [24] except that Y, Cr and Cb are normalized to occupy all 256 levels of an 8-bit binary encoding and take account of the actual hardware implementation of the inverse transform within SoPEC.
The exact color conversion computation is as follows:
• Y* = (9805/32768)R + (19235/32768)G + (3728/32768)B • Cr* = (16375/32768)R - (13716/32768)G - (2659/32768)B + 128 • Cb* = -(5529/32768)R - (10846/32768)G + (16375/32768)B + 128
Y, Cr and Cb are obtained by rounding to the nearest integer. There is no need for saturation since ranges of Y*, Cr* and Cb* after rounding are [0-255], [1-255] and [1-255] respectively. Note that full accuracy is possible with 24 bits. See [14] for more information.
SoPEC ASIC
Overview
The Small Office Home Office Print Engine Controller (SoPEC) is a page rendering engine ASIC that takes compressed page images as input, and produces decompressed page images at up to 6
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 channels of bi-level dot data as output. The bi-level dot data is generated for the Memjet bi-lithic printhead. The dot generation process takes account of printhead construction, dead nozzles, and allows for fixative generation.
A single SoPEC can control 2 bi-lithic printheads and up to 6 color channels at 10,000 lines/sec<sup>5</sup>, equating to 30 pages per minute. A single SoPEC can perform full-bleed printing of A3, A4 and Letter pages. The 6 channels of colored ink are the expected maximum in a consumer SOHO, or office Bi-lithic printing environment:
• CMY, for regular color printing.
• K, for black text, line graphics and gray-scale printing.
• IR (infrared), for Netpage-enabled [5] applications.
• F (fixative), to enable printing at high speed. Because the bi-lithic printer is capable of printing so fast, a fixative may be required to enable the ink to dry before the page touches the page already printed. Otherwise the pages may bleed on each other. In low speed printing environments the fixative may not be required.
SoPEC is color space agnostic. Although it can accept contone data as CMYX or RGBX, where X is an optional 4th channel, it also can accept contone data in any print color space. Additionally, SoPEC provides a mechanism for arbitrary mapping of input channels to output channels, including combining dots for ink optimization, generation of channels based on any number of other channels etc. However, inputs are typically CMYK for contone input, K for the bi-level input, and the optional Netpage tag dots are typically rendered to an infra-red layer. A fixative channel is typically generated for fast printing applications.
SoPEC is resolution agnostic. It merely provides a mapping between input resolutions and output resolutions by means of scale factors. The expected output resolution is 1600 dpi, but SoPEC actually has no knowledge of the physical resolution of the Bi-lithic printhead.
SoPEC is page-length agnostic. Successive pages are typically split into bands and downloaded into the page store as each band of information is consumed and becomes free.
SoPEC provides an interface for synchronization with other SoPECs. This allows simple multiSoPEC solutions for simultaneous A3/A4/Letter duplex printing. However, SoPEC is also capable of printing only a portion of a page image. Combining synchronization functionality with partial page rendering allows multiple SoPECs to be readily combined for alternative printing requirements including simultaneous duplex printing and wide format printing.
Table 8 lists some of the features and corresponding benefits of SoPEC.
Table 8. Features and Benefits of SoPEC
<td> Feature</td><td> Benefits</td>
<td> Optimised print architecture in hardware</td><td> 30ppm full page photographic quality color printing from a desktop PC</td>
<sup>5</sup>10,000 lines per second equates to 30 A4/Letter pages per minute at 1600 dpi
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> 0.13micron CMOS (>3 million transistors)</td><td> High speed Low cost High functionality</td>
<td> 900 Million dots per second</td><td> Extremely fast page generation</td>
<td> 10,000 lines per second at 1600 dpi</td><td> 0.5 A4/Letter pages per SoPEC chip per second</td>
<td> 1 chip drives up to 133,920 nozzles</td><td> Low cost page-width printers</td>
<td> 1 chip drives up to 6 color planes</td><td> 99% of SoHo printers can use 1 SoPEC device</td>
<td> Integrated DRAM</td><td> No external memory required, leading to low cost systems</td>
<td> Power saving sleep mode</td><td> SoPEC can enter a power saving sleep mode to reduce power dissipation between print jobs</td>
<td> JPEG expansion</td><td> Low bandwidth from PC Low memory requirements in printer</td>
<td> Lossless bitplane expansion</td><td> High resolution text and line art with low bandwidth from PC (e.g. over USB)</td>
<td> Netpage tag expansion</td><td> Generates interactive paper</td>
<td> Stochastic dispersed dot dither</td><td> Optically smooth image quality No moire effects</td>
<td> Hardware compositor for 6 image planes</td><td> Pages composited in real-time</td>
<td> Dead nozzle compensation</td><td> Extends printhead life and yield Reduces printhead cost</td>
<td> Color space agnostic</td><td> Compatible with all inksets and image sources including RGB, CMYK, spot, CIE L*a*b*, hexachrome, YCrCbK, sRGB and other</td>
<td> Color space conversion</td><td> Higher quality / lower bandwidth</td>
<td> Computer interface</td><td> USB1.1 interface to host and ISI interface to ISI-Bridge chip thereby allowing connection to IEEE 1394, Bluetooth etc.</td>
<td> Cascadable in resolution</td><td> Printers of any resolution</td>
<td> Cascadable in color depth</td><td> Special color sets e.g. hexachrome can be used</td>
<td> Cascadable in image size</td><td> Printers of any width up to 16 inches</td>
<td> Cascadable in pages</td><td> Printers can print both sides simultaneously</td>
<td> Cascadable in speed</td><td> Higher speeds are possible by having each SoPEC print one vertical strip of the page.</td>
<td> Fixative channel data generation</td><td> Extremely fast ink drying without wastage</td>
<td> Built-in security</td><td> Revenue models are protected</td>
<td> Undercolor removal on dot-by-dot basis</td><td> Reduced ink usage</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
<td> Does not require fonts for high speed operation</td><td> No font substitution or missing fonts</td>
<td> Flexible printhead configuration</td><td> Many configurations of printheads are supported by one chip type</td>
<td> Drives Bi-lithic printheads directly</td><td> No print driver chips required, results in lower cost</td>
<td> Determines dot accurate ink usage</td><td> Removes need for physical ink monitoring system in ink cartridges</td>
9.1 Printing rates
The required printing rate for SoPEC is 30 sheets per minute with an inter-sheet spacing of 4 cm.
To achieve a 30 sheets per minute print rate, this requires:
300mm x 63 (dot/mm) 12 sec = 105.8 μseconds per line, with no inter-sheet gap.
340mm x 63 (dot/mm) / 2 sec = 93.3 μseconds per line, with a 4 cm inter-sheet gap.
A Printline for an A4 page consists of 13824 nozzles across the page [2]. At a system clock rate of 160 MHz 13824 dots of data can be generated in 86.4 pseconds. Therefore data can be generated fast enough to meet the printing speed requirement. It is necessary to deliver this print data to the print-heads.
Printheads can be made up of 5:5, 6:4, 7:3 and 8:2 inch printhead combinations [2], Print data is transferred to both print heads in a pair simultaneously. This means the longest time to print a line is determined by the time to transfer print data to the longest print segment. There are 9744 nozzles across a 7 inch printhead. The print data is transferred to the printhead at a rate of 106 MHz (2/3 of the system clock rate) per color plane. This means that it will take 91.9 με to transfer a single line for a 7:3 printhead configuration. So we can meet the requirement of 30 sheets per minute printing with a 4 cm gap with a 7:3 printhead combination. There are 11160 across an 8 inch printhead. To transfer the data to the printhead at 106 MHz will take 105.3 με. So an 8:2 printhead combination printing with an inter-sheet gap will print slower than 30 sheets per minute.
9.2 SOPEC BASIC ARCHITECTURE
From the highest point of view the SoPEC device consists of 3 distinct subsystems • CPU Subsystem • DRAM Subsystem • Print Engine Pipeline (PEP) Subsystem
See Figure 13 for a block level diagram of SoPEC.
9.2.1 CPU Subsystem
The CPU subsystem controls and configures all aspects of the other subsystems. It provides general support for interfacing and synchronising the external printer with the internal print engine. It also controls the low speed communication to the QA chips. The CPU subsystem contains various peripherals to aid the CPU, such as GPIO (includes motor control), interrupt controller, LSS Master and general timers. The Serial Communications Block (SCB) on the CPU subsystem provides a full speed USB1.1 interface to the host as well as an Inter SoPEC Interface (ISI) to other SoPEC devices.
9.2.2 DRAM Subsystem
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
The DRAM subsystem accepts requests from the CPU, Serial Communications Block (SCB) and blocks within the PEP subsystem. The DRAM subsystem (in particular the DIU) arbitrates the various requests and determines which request should win access to the DRAM. The DIU arbitrates based on configured parameters, to allow sufficient access to DRAM for all requestors. The DIU also hides the implementation specifics of the DRAM such as page size, number of banks, refresh rates etc.
9.2.3 Print Engine Pipeline (PEP) subsystem
The Print Engine Pipeline (PEP) subsystem accepts compressed pages from DRAM and renders them to bi-level dots for a given print line destined for a printhead interface that communicates directly with up to 2 segments of a bi-lithic printhead.
The first stage of the page expansion pipeline is the CDU, LBD and TE. The CDU expands the JPEG-compressed contone (typically CMYK) layer, the LBD expands the compressed bi-level layer (typically K), and the TE encodes Netpage tags for later rendering (typically in IR or K ink). The output from the first stage is a set of buffers: the CFU, SFU, and TFU. The CFU and SFU buffers are implemented in DRAM.
The second stage is the HCU, which dithers the contone layer, and composites position tags and the bi-level spotO layer over the resulting bi-level dithered layer. A number of options exist for the way in which compositing occurs. Up to 6 channels of bi-level data are produced from this stage. Note that not all 6 channels may be present on the printhead. For example, the printhead may be CM Y only, with K pushed into the CMY channels and IR ignored. Alternatively, the position tags may be printed in K if IR ink is not available (or for testing purposes).
The third stage (DNC) compensates for dead nozzles in the printhead by color redundancy and error diffusing dead nozzle data into surrounding dots.
The resultant bi-level 6 channel dot-data (typically CMYK-IRF) is buffered and written out to a set of line buffers stored in DRAM via the DWU.
Finally, the dot-data is loaded back from DRAM, and passed to the printhead interface via a dot FIFO. The dot FIFO accepts data from the LLU at the system clock rate (pc/fc), while the PHI removes data from the FIFO and sends it to the printhead at a rate of 2/3 times the system clock rate (see Section 9.1).
9.3 SoPEC Block Description
Looking at Figure 13, the various units are described here in summary form:
Table 9. Units within SoPEC
<td> Subsystem</td><td> Unit Acronym</td><td> Unit Name</td><td> Description</td>
<td> DRAM</td><td> DIU</td><td> DRAM interface unit</td><td> Provides the interface for DRAM read and write access for the various SoPEC units, CPU and the SCB block. The DIU provides arbitration between competing units controls DRAM</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td></td><td></td><td></td><td> access.</td>
<td></td><td> DRAM</td><td> Embedded DRAM</td><td> 20Mbits of embedded DRAM,</td>
<td> CPU</td><td> CPU</td><td> Central Processing Unit</td><td> CPU for system configuration and control</td>
<td></td><td> MMU</td><td> Memory Management Unit</td><td> Limits access to certain memory address areas in CPU user mode</td>
<td></td><td> RDU</td><td> Real-time Debug Unit</td><td> Facilitates the observation of the contents of most of the CPU addressable registers in SoPEC in addition to some pseudo-registers in realtime.</td>
<td></td><td> TIM</td><td> General Timer</td><td> Contains watchdog and general system timers</td>
<td></td><td> LSS</td><td> Low Speed Serial Interfaces</td><td> Low level controller for interfacing with the QA chips</td>
<td></td><td> GPIO</td><td> General Purpose IOs</td><td> General IO controller, with built-in Motor control unit, LED pulse units and de-glitch circuitry</td>
<td></td><td> ROM</td><td> Boot ROM</td><td> 16 KBytes of System Boot ROM code</td>
<td></td><td> ICU</td><td> Interrupt Controller Unit</td><td> General Purpose interrupt controller with configurable priority, and masking.</td>
<td></td><td> CPR</td><td> Clock, Power and Reset block</td><td> Central Unit for controlling and generating the system clocks and resets and powerdown mechanisms</td>
<td></td><td> PSS</td><td> Power Save Storage</td><td> Storage retained while system is powered down</td>
<td></td><td> USB</td><td> Universal Serial Bus Device</td><td> USB device controller for interfacing with the host USB.</td>
<td></td><td> ISI</td><td> Inter-SoPEC Interface</td><td> ISI controller for data and control communication with other SoPEC’s in a multiSoPEC system</td>
<td></td><td> SCB</td><td> Serial Communication Block</td><td> Contains both the USB and ISI blocks.</td>
<td> Print Engine Pipeline (PEP)</td><td> PCU</td><td> PEP controller</td><td> Provides external CPU with the means to read and write PEP Unit registers, and read and write DRAM in single 32-bit chunks.</td>
<td></td><td> CDU</td><td> Contone decoder unit</td><td> Expands JPEG compressed contone layer and writes decompressed contone to DRAM</td>
<td></td><td> CFU</td><td> Contone FIFO Unit</td><td> Provides line buffering between CDU and HCU</td>
<td></td><td> LBD</td><td> Lossless Bi-level Decoder</td><td> Expands compressed bi-level layer.</td>
<td></td><td> SFU</td><td> Spot FIFO Unit</td><td> Provides line buffering between LBD and HCU</td>
<td></td><td> TE</td><td> Tag encoder</td><td> Encodes tag data into line of tag dots.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td></td><td> TFU</td><td> Tag FIFO Unit</td><td> Provides tag data storage between TE and HCU</td>
<td></td><td> HCU</td><td> Halftoner compositor unit</td><td> Dithers contone layer and composites the bilevel spot 0 and position tag dots.</td>
<td></td><td> DNC</td><td> Dead Nozzle Compensator</td><td> Compensates for dead nozzles by color redundancy and error diffusing dead nozzle data into surrounding dots.</td>
<td></td><td> DWU</td><td> Dotline Writer Unit</td><td> Writes out the 6 channels of dot data for a given Printline to the line store DRAM</td>
<td></td><td> LLU</td><td> Line Loader Unit</td><td> Reads the expanded page image from line store, formatting the data appropriately for the bi-lithic printhead.</td>
<td></td><td> PHI</td><td> PrintHead Interface</td><td> Is responsible for sending dot data to the bilithic printheads and for providing line synchronization between multiple SoPECs. Also provides test interface to printhead such as temperature monitoring and Dead Nozzle Identification.</td>
9.4 Addressing scheme in SoPEC
SoPEC must address • 20 Mbit DRAM.
• PCU addressed registers in PEP.
• CPU-subsystem addressed registers.
SoPEC has a unified address space with the CPU capable of addressing all CPU-subsystem and PCU-bus accessible registers (in PEP) and all locations in DRAM. The CPU generates byte-aligned addresses for the whole of SoPEC.
bits are sufficient to byte address the whole SoPEC address space.
9.4.1 DRAM addressing scheme
The embedded DRAM is composed of 256-bit words. However the CPU-subsystem may need to write individual bytes of DRAM. Therefore it was decided to make the DIU byte addressable. 22 bits are required to byte address 20 Mbits of DRAM.
Most blocks read or write 256-bit words of DRAM. Therefore only the top 17 bits i.e. bits 21 to 5 are required to address 256-bit word aligned locations.
The exceptions are • CDU which can write 64-bits so only the top 19 address bits i.e. bits 21-3 are required.
• The CPU-subsystem always generates a 22-bit byte-aligned DIU address but it will send flags to the DIU indicating whether it is an 8, 16 or 32-bit write.
All DIU accesses must be within the same 256-bit aligned DRAM word.
9.4.2 PEP Unit DRAM addressing
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
PEP Unit configuration registers which specify DRAM locations should specify 256-bit aligned DRAM addresses i.e. using address bits 21:5. Legacy blocks from PEC1 e.g. the LBD and TE may need to specify 64-bit aligned DRAM addresses if these reused blocks DRAM addressing is difficult to modify. These 64-bit aligned addresses require address bits 21:3. However, these 64-bit aligned addresses should be programmed to start at a 256-bit DRAM word boundary.
Unlike PEC1, there are no constraints in SoPEC on data organization in DRAM except that all data structures must start on a 256-bit DRAM boundary. If data stored is not a multiple of 256-bits then the last word should be padded.
9.4.3 CPU subsystem bus addressed registers
The CPU subsystem bus supports 32-bit word aligned read and write accesses with variable access timings. See section 11.4 for more details of the access protocol used on this bus. The CPU subsystem bus does not currently support byte reads and writes but this can be added at a later date if required by imported IP.
9.4.4 PCU addressed registers in PEP
The PCU only supports 32-bit register reads and writes for the PEP blocks. As the PEP blocks only occupy a subsection of the overall address map and the PCU is explicitly selected by the MMU when a PEP block is being accessed the PCU does not need to perform a decode of the higherorder address bits. See Table 11 for the PEP subsystem address map.
9.5 SoPEC Memory Map
9.5.1 Main memory map
The system wide memory map is shown in Figure 14 below. The memory map is discussed in detail in Section 1111 Centra! Processing Unit (CPU).
9.5.2 CPU-bus peripherals address map
The address mapping for the peripherals attached to the CPU-bus is shown in Table 10 below. The MMU performs the decode of cpu_adr[21:12] to generate the relevant cpu_block_select signal for each block. The addressed blocks decode however many of the lower order bits of cpu_adr[11:2] are required to address all the registers within the block.
Table 10. CPU-bus peripherals address map
<td> Block_base</td><td> Address</td>
<td> ROM_base</td><td> 0x0000_0000</td>
<td> MMU_base</td><td> 0x0001_0000</td>
<td> TIM_base</td><td> 0x0001_1000</td>
<td> LSS_base</td><td> 0x0001_2000</td>
<td> GPIO_base</td><td> 0x0001_3000</td>
<td> SCB_base</td><td> 0x0001_4000</td>
<td> ICU_base</td><td> 0x0001_5000</td>
<td> CPR_base</td><td> 0x0001_6000</td>
<td> DIU_base</td><td> 0x0001_7000</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
<td> PSS_base</td><td> 0x0001_8000</td>
<td> Reserved</td><td> 0x0001_9000 to 0x0001_FFFF</td>
<td> PCU_base</td><td> 0x0002_0000 to 0x0002_BFFF</td>
9.5.3 PCU Mapped Registers (PEP blocks) address map
The PEP blocks are addressed via the PCU. From Figure 14, the PCU mapped registers are in the range 0x0002_0000 to 0x0002_BFFF. From Table 11 it can be seen that there are 12 sub-blocks within the PCU address space. Therefore, only four bits are necessary to address each of the sub5 blocks within the PEP part of SoPEC. A further 12 bits may be used to address any configurable register within a PEP block. This gives scope for 1024 configurable registers per sub-block (the PCU mapped registers are all 32-bit addressed registers so the upper 10 bits are required to individually address them). This address will come either from the CPU or from a command stored in DRAM. The bus is assembled as follows:
· address[15:12] = sub-block address, • address[n:2] = register address within sub-block, only the number of bits required to decode the registers within each sub-block are used, • address[1:0] = byte address, unused as PCU mapped registers are all 32-bit addressed registers.
So for the case of the HCU, its addresses range from 0x7000 to 0x7FFF within the PEP subsystem or from 0x0002_7000 to 0x0002_7FFF in the overall system.
Table 11. PEP blocks address map
<td> Block_base</td><td> Address</td>
<td> PCU_base</td><td> 0x0002_0000</td>
<td> CDU_base</td><td> 0x0002_1000</td>
<td> CFU_base</td><td> 0x0002_2000</td>
<td> LBD_base</td><td> 0x0002_3000</td>
<td> SFU_base</td><td> 0x0002_4000</td>
<td> TE_base</td><td> 0x0002_5000</td>
<td> TFU_base</td><td> 0x0002_6000</td>
<td> HCU_base</td><td> 0x0002_7000</td>
<td> DNC_base</td><td> 0x0002^8000</td>
<td> DWU_base</td><td> 0x0002_9000</td>
<td> LLU_base</td><td> Ox0002_AOOO</td>
<td> PHI_base</td><td> OxOOQ2_BOOO to 0x0002_BFFF</td>
9.6 Buffer management in SoPEC
As outlined in Section 9.1, SoPEC has a requirement to print 1 side every 2 seconds i.e. 30 sides per minute.
9.6.1 Page buffering
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Approximately 2 Mbytes of DRAM are reserved for compressed page buffering in SoPEC. If a page is compressed to fit within 2 Mbyte then a complete page can be transferred to DRAM before printing. However, the time to transfer 2 Mbyte using USB 1.1 is approximately 2 seconds. The worst case cycle time to print a page then approaches 4 seconds. This reduces the worst-case print speed to 15 pages per minute.
9.6.2 Band buffering
The SoPEC page-expansion blocks support the notion of page banding. The page can be divided into bands and another band can be sent down to SoPEC while we are printing the current band. Therefore we can start printing once at least one band has been downloaded.
The band size granularity should be carefully chosen to allow efficient use of the USB bandwidth and DRAM buffer space. It should be small enough to allow seamless 30 sides per minute printing but not so small as to introduce excessive CPU overhead in orchestrating the data transfer and parsing the band headers. Band-finish interrupts have been provided to notify the CPU of free buffer space. It is likely that the host PC will supervise the band transfer and buffer management instead of the SoPEC CPU.
If SoPEC starts printing before the complete page has been transferred to memory there is a risk of a buffer underrun occurring if subsequent bands are not transferred to SoPEC in time e.g. due to insufficient USB bandwidth caused by another USB peripheral consuming USB bandwidth. A buffer underrun occurs if a line synchronisation pulse is received before a line of data has been transferred to the printhead and causes the print job to fail at that line. If there is no risk of buffer underrun then printing can safely start once at least one band has been downloaded.
If there is a risk of a buffer underrun occurring due to an interruption of compressed page data transfer, then the safest approach is to only start printing once we have loaded up the data for a complete page. This means that a worst case latency in the region of 2 seconds (with USB1.1 ) will be incurred before printing the first page. Subsequent pages will take 2 seconds to print giving us the required sustained printing rate of 30 sides per minute.
A Storage SoPEC (Section 7.2.5) could be added to the system to provide guaranteed bandwidth data delivery. The print system could also be constructed using an ISI-Bridge chip (Section 7.2.6) to provide guaranteed data delivery.
The most efficient page banding strategy is likely to be determined on a per page/ print job basis and so SoPEC will support the use of bands of any size.
SoPEC Use Cases
10.1 Introduction
This chapter is intended to give an overview of a representative set of scenarios or use cases which SoPEC can perform. SoPEC is by no means restricted to the particular use cases described and not every SoPEC system is considered here.
In this chapter we discuss SoPEC use cases under four headings:
1) Normal operation use cases.
2) Security use cases.
3) Miscellaneous use cases.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
4) Failure mode use cases.
Use cases for both single and multi-SoPEC systems are outlined.
Some tasks may be composed of a number of sub-tasks.
The realtime requirements for SoPEC software tasks are discussed in “ 11 Central Processing Unit (CPU)” under Section 11.3 Realtime requirements.
10.2 Normal operation in a single SoPEC System with USB Host connection
SoPEC operation is broken up into a number of sections which are outlined below. Buffer management in a SoPEC system is normally performed by the host
10.2.1 Powerup
Powerup describes SoPEC initialisation following an external reset or the watchdog timer system reset.
A typical powerup sequence is:
) Execute reset sequence for complete SoPEC.
2) CPU boot from ROM.
3) Basic configuration of CPU peripherals, SCB and DIU. DRAM initialisation. USB Wakeup.
4) Download and authentication of program (see Section 10.5.2).
5) Execution of program from DRAM.
6) Retrieve operating parameters from PRINTER_QA and authenticate operating parameters.
7) Download and authenticate any further datasets.
10.2.2 USB wakeup
The CPU can put different sections of SoPEC into sleep mode by writing to registers in the CPR block (chapter 16). Normally the CPU sub-system and the DRAM will be put in sleep mode but the SCB and power-safe storage (PSS) will still be enabled.
Wakeup describes SoPEC recovery from sleep mode with the SCB and power-safe storage (PSS) still enabled. In a single SoPEC system, wakeup can be initiated following a USB reset from the SCB.
A typical USB wakeup sequence is:
) Execute reset sequence for sections of SoPEC in sleep mode.
2) CPU boot from ROM, if CPU-subsystem was in sleep mode.
3) Basic configuration of CPU peripherals and DIU, and DRAM initialisation, if required.
4) Download and authentication of program using results in Power-Safe Storage (PSS) (see Section 10.5.2).
5) Execution of program from DRAM.
6) Retrieve operating parameters from PRINTER_QA and authenticate operating parameters.
7) Download and authenticate using results in PSS of any further datasets (programs).
10.2.3 Print initialization
This sequence is typically performed at the start of a print job following powerup or wakeup:
) Check amount of ink remaining via QA chips.
2) Download static data e.g. dither matrices, dead nozzle tables from host to DRAM.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
3) Check printhead temperature, if required, and configure printhead with firing pulse profile etc. accordingly.
4) Initiate printhead pre-heat sequence, if required.
10.2.4 First page download
Buffer management in a SoPEC system is normally performed by the host.
First page, first band download and processing:
) The host communicates to the SoPEC CPU over the USB to check that DRAM space remaining is sufficient to download the first band.
2) The host downloads the first band (with the page header) to DRAM.
3) When the complete page header has been downloaded the SoPEC CPU processes the page header, calculates PEP register commands and writes directly to PEP registers or to DRAM.
4) If PEP register commands have been written to DRAM, execute PEP commands from DRAM via PCU.
Remaining bands download and processing:
) Check DRAM space remaining is sufficient to download the next band.
2) Download the next band with the band header to DRAM.
3) When the complete band header has been downloaded, process the band header according to whichever band-related register updating mechanism is being used.
10.2.5 Start printing ) Wait until at least one band of the first page has been downloaded.
One approach is to only start printing once we have loaded up the data for a complete page. If we start printing before the complete page has been transferred to memory we run the risk of a buffer underrun occurring because compressed page data was not transferred to SoPEC in time e.g. due to insufficient USB bandwidth caused by another USB peripheral consuming USB bandwidth.
2) Start all the PEP Units by writing to their Go registers, via PCU commands executed from DRAM or direct CPU writes. A rapid startup order for the PEP units is outlined in Table 12. Table 12. Typical PEP Unit startup order for printing a page.
<td> Step#</td><td> Unit</td>
<td> 1</td><td> DNC</td>
<td> 2</td><td> DWU</td>
<td> 3</td><td> HCU</td>
<td> 4</td><td> PHI</td>
<td> 5</td><td> LLU</td>
<td> 6</td><td> CFU, SFU, TFU</td>
<td> 7</td><td> CDU</td>
<td> 8</td><td> TE, LBD</td>
3) Print ready interrupt occurs (from PHI).
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
4) Start motor control, if first page, otherwise feed the next page. This step could occur before the print ready interrupt.
5) Drive LEDs, monitor paper status.
6) Wait for page alignment via page sensor(s) GPIO interrupt.
7) CPU instructs PHI to start producing line syncs and hence commence printing, or wait for an external device to produce line syncs.
8) Continue to download bands and process page and band headers for next page.
10.2.6 Next page(s) download
As for first page download, performed during printing of current page.
10.2.7 Between bands
When the finished band flags are asserted band related registers in the CDU, LBD, TE need to be re-programmed before the subsequent band can be printed. This can be via PCU commands from DRAM. Typically only 3-5 commands per decompression unit need to be executed. These registers can also be reprogrammed directly by the CPU or most likely by updating from shadow registers. The finished band flag interrupts the CPU to tell the CPU that the area of memory associated with the band is now free.
10.2.8 During page print
Typically during page printing ink usage is communicated to the QA chips.
) Calculate ink printed (from PHI).
2) Decrement ink remaining (via QA chips).
3) Check amount of ink remaining (via QA chips). This operation may be better performed while the page is being printed rather than at the end of the page.
10.2.9 Page finish
These operations are typically performed when the page is finished:
) Page finished interrupt occurs from PHI.
2) Shutdown the PEP blocks by de-asserting their Go registers. A typical shutdown order is defined in Table 13. This will set the PEP Unit state-machines to their idle states without resetting their configuration registers.
3) Communicate ink usage to QA chips, if required.
Table 13. End of page shutdown order for PEP Units.
<td> Step#</td><td> Unit</td>
<td> 1</td><td> PHI (will shutdown by itself in the normal case at the end of a page)</td>
<td> 2</td><td> DWU (shutting this down stalls the DNC and therefore the HCU and above)</td>
<td> 3</td><td> LLU (should already be halted due to PHI at end of last line of page)</td>
<td> 4</td><td> TE (this is the only dot supplier likely to be running, halted by the HCU)</td>
<td> 5</td><td> CDU (this is likely to already be halted due to end of contone band)</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> 6</td><td> CFU, SFU, TFU, LBD (order unimportant, and should already be halted due to end of band)</td>
<td> 7</td><td> HCU, DNC (order unimportant, should already have halted)</td>
10.2.10 Start of next page
These operations are typically performed before printing the next page:
1) Re-program the PEP Units via PCU command processing from DRAM based on page header.
2) Go to Start printing.
10.2.11 End of document ) Stop motor control.
10.2.12 Sleep mode
The CPU can put different sections of SoPEC into sleep mode by writing to registers in the CPR block described in Section 16.
) Instruct host PC via USB that SoPEC is about to sleep.
2) Store reusable authentication results in Power-Safe Storage (PSS).
3) Put SoPEC into defined sleep mode.
10.3 Normal operation in a Multi-SoPEC System - ISIMaster SoPEC
In a multi-SoPEC system the host generally manages program and compressed page download to all the SoPECs. Inter-SoPEC communication is over the ISl link which will add a latency.
In the case of a multi-SoPEC system with just one USB 1.1 connection, the SoPEC with the USB connection is the ISIMaster. The ISI-bridge chip is the ISIMaster in the case of an ISI-Bridge SoPEC configuration. While it is perfectly possible for an ISISIave to have a direct USB connection to the host we do not treat this scenario explicitly here to avoid possible confusion.
In a multi-SoPEC system one of the SoPECs will be the PrintMaster. This SoPEC must manage and control sensors and actuators e.g. motor control. These sensors and actuators could be distributed over all the SoPECs in the system. An ISIMaster SoPEC may also be the PrintMaster SoPEC.
In a multi-SoPEC system each printing SoPEC will generally have its own PRINTER_QA chip (or at least access to a PRINTER_QA chip that contains the SoPEC’s SOPEC_id_key) to validate operating parameters and ink usage. The results of these operations may be communicated to the PrintMaster SoPEC.
In general the ISIMaster may need to be able to:
• Send messages to the ISISIaves which will cause the ISISIaves to send their status to the ISIMaster.
• Instruct the ISISIaves to perform certain operations.
As the ISl is an insecure interface commands issued over the ISl are regarded as user mode commands. Supervisor mode code running on the SoPEC CPUs will allow or disallow these commands. The software protocol needs to be constructed with this in mind.
The ISIMaster will initiate all communication with the ISISIaves.
SoPEC operation is broken up into a number of sections which are outlined below.
10.3.1 Powerup
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Powerup describes SoPEC initialisation following an external reset or the watchdog timer system reset.
I ) Execute reset sequence for complete SoPEC.
2) CPU boot from ROM.
3) Basic configuration of CPU peripherals, SCB and DIU. DRAM initialisation USB Wakeup
4) SoPEC identification by activity on USB end-points 2-4 indicates it is the ISIMaster (unless the SoPEC CPU has explicitly disabled this function).
5) Download and authentication of program (see Section 10.5.3).
6) Execution of program from DRAM.
7) Retrieve operating parameters from PRINTER_QA and authenticate operating parameters.
8) Download and authenticate any further datasets (programs).
9) The initial dataset may be broadcast to all the ISISIaves.
10) ISIMaster master SoPEC then waits for a short time to allow the authentication to take place on the ISISIave SoPECs.
II ) Each ISISIave SoPEC is polled for the result of its program code authentication process.
12) If all ISISIaves report successful authentication the OEM code module can be distributed and authenticated. OEM code will most likely reside on one SoPEC.
10.3.2 USB wakeup
The CPU can put different sections of SoPEC into sleep mode by writing to registers in the CPR block [16]. Normally the CPU sub-system and the DRAM will be put in sleep mode but the SCB and power-safe storage (PSS) will still be enabled.
Wakeup describes SoPEC recovery from sleep mode with the SCB and power-safe storage (PSS) still enabled. For an ISIMaster SoPEC connected to the host via USB, wakeup can be initiated following a USB reset from the SCB.
A typical USB wakeup sequence is:
) Execute reset sequence for sections of SoPEC in sleep mode.
2) CPU boot from ROM, if CPU-subsystem was in sleep mode.
3) Basic configuration of CPU peripherals and DIU, and DRAM initialisation, if required.
4) SoPEC identification by activity on USB end-points 2-4 indicates it is the ISIMaster (unless the SoPEC CPU has explicitly disabled this function).
5) Download and authentication of program using results in Power-Safe Storage (PSS) (see Section 10.5.3).
6) Execution of program from DRAM.
7) Retrieve operating parameters from PRINTER_QA and authenticate operating parameters.
8) Download and authenticate any further datasets (programs) using results in Power-Safe Storage (PSS) (see Section 10.5.3).
9) Following steps as per Powerup.
10.3.3 Print initialization
This sequence is typically performed at the start of a print job following powerup or wakeup:
) Check amount of ink remaining via QA chips which may be present on a ISISIave SoPEC.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
2) Download static data e.g. dither matrices, dead nozzle tables from host to DRAM.
3) Check printhead temperature, if required, and configure printhead with firing pulse profile etc. accordingly. Instruct ISISIaves to also perform this operation.
4) Initiate printhead pre-heat sequence, if required. Instruct ISISIaves to also perform this operation
10.3.4 First page download
Buffer management in a SoPEC system is normally performed by the host.
) The host communicates to the SoPEC CPU over the USB to check that DRAM space remaining is sufficient to download the first band.
2) The host downloads the first band (with the page header) to DRAM.
3) When the complete page header has been downloaded the SoPEC CPU processes the page header, calculates PEP register commands and write directly to PEP registers or to DRAM.
4) If PEP register commands have been written to DRAM, execute PEP commands from DRAM via PCU.
Poll ISISIaves for DRAM status and download compressed data to ISISIaves.
Remaining first page bands download and processing:
) Check DRAM space remaining is sufficient to download the next band.
2) Download the next band with the band header to DRAM.
3) When the complete band header has been downloaded, process the band header according to whichever band-related register updating mechanism is being used.
Poll ISISIaves for DRAM status and download compressed data to ISISIaves.
10.3.5 Start printing ) Wait until at least one band of the first page has been downloaded.
2) Start all the PEP Units by writing to their Go registers, via PCU commands executed from
DRAM or direct CPU writes, in the suggested order defined in Table .
3) Print ready interrupt occurs (from PHI). Poll ISISIaves until print ready interrupt.
4) Start motor control (which may be on an ISISIave SoPEC), if first page, otherwise feed the next page. This step could occur before the print ready interrupt.
5) Drive LEDS, monitor paper status (which may be on an ISISIave SoPEC).
6) Wait for page alignment via page sensor(s) GPIO interrupt (which may be on an ISISIave SoPEC).
7) If the LineSyncMaster is a SoPEC its CPU instructs PHI to start producing master line syncs. Otherwise wait for an external device to produce line syncs.
8) Continue to download bands and process page and band headers for next page.
10.3.6 Next page(s) download
As for first page download, performed during printing of current page.
10.3.7 Between bands
When the finished band flags are asserted band related registers in the CDU, LBD and TE need to be re-programmed. This can be via PCU commands from DRAM. Typically only 3-5 commands per decompression unit need to be executed. These registers can also be reprogrammed directly by the
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
CPU or by updating from shadow registers. The finished band flag interrupts to the CPU, tell the CPU that the area of memory associated with the band is now free.
10.3.8 During page print
Typically during page printing ink usage is communicated to the QA chips.
1) Calculate ink printed (from PHI).
2) Decrement ink remaining (via QA chips).
3) Check amount of ink remaining (via QA chips). This operation may be better performed while the page is being printed rather than at the end of the page.
10.3.9 Page finish
These operations are typically performed when the page is finished:
1) Page finished interrupt occurs from PHI. Poll ISISIaves for page finished interrupts.
2) Shutdown the PEP blocks by de-asserting their Go registers in the suggested order in Table . This will set the PEP Unit state-machines to their startup states.
3) Communicate ink usage to QA chips, if required.
10.3.10 Start of next page
These operations are typically performed before printing the next page:
) Re-program the PEP Units via PCU command processing from DRAM based on page header.
2) Go to Start printing.
10.3.11 End of document ) Stop motor control. This may be on an ISISIave SoPEC.
10.3.12 Sleep mode
The CPU can put different sections of SoPEC into sleep mode by writing to registers in the CPR block [16], This may be as a result of a command from the host or as a result of a timeout.
) Inform host PC of which parts of SoPEC system are about to sleep.
2) Instruct ISISIaves to enter sleep mode.
3) Store reusable cryptographic results in Power-Safe Storage (PSS).
4) Put ISIMaster SoPEC into defined sleep mode.
10.4 Normal operation in a Multi-SoPEC System - ISISlave SoPEC
This section the outline typical operation of an ISISIave SoPEC in a multi-SoPEC system. The ISIMaster can be another SoPEC or an ISI-Bridge chip. The ISISIave communicates with the host either via the ISIMaster or using a direct connection such as USB. For this use case we consider only an ISISIave that does not have a direct host connection. Buffer management in a SoPEC system is normally performed by the host.
10.4.1 Powerup
Powerup describes SoPEC initialisation following an external reset or the watchdog timer system reset.
A typical powerup sequence is:
) Execute reset sequence for complete SoPEC.
2) CPU boot from ROM.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
3) Basic configuration of CPU peripherals, SCB and DIU. DRAM initialisation.
4) Download and authentication of program (see Section 10.5.3).
5) Execution of program from DRAM.
6) Retrieve operating parameters from PRINTER_QA and authenticate operating parameters.
7) SoPEC identification by sampling GPIO pins to determine ISIId. Communicate ISIId to ISIMaster.
8) Download and authenticate any further datasets.
10.4.2 ISI wakeup
The CPU can put different sections of SoPEC into sleep mode by writing to registers in the CPR block [16]. Normally the CPU sub-system and the DRAM will be put in sleep mode but the SCB and power-safe storage (PSS) will still be enabled.
Wakeup describes SoPEC recovery from sleep mode with the SCB and power-safe storage (PSS) still enabled. In an ISISIave SoPEC, wakeup can be initiated following an ISI reset from the SCB.
A typical ISI wakeup sequence is:
) Execute reset sequence for sections of SoPEC in sleep mode.
2) CPU boot from ROM, if CPU-subsystem was in sleep mode.
3) Basic configuration of CPU peripherals and DIU, and DRAM initialisation, if required.
4) Download and authentication of program using results in Power-Safe Storage (PSS) (see Section 10.5.3).
5) Execution of program from DRAM.
6) Retrieve operating parameters from PRINTER_QA and authenticate operating parameters.
7) SoPEC identification by sampling GPIO pins to determine ISIId. Communicate ISIId to ISIMaster.
8) Download and authenticate any further datasets.
10.4.3 Print initialization
This sequence is typically performed at the start of a print job following powerup or wakeup:
) Check amount of ink remaining via QA chips.
2) Download static data e.g. dither matrices, dead nozzle tables from ISI to DRAM.
3) Check printhead temperature, if required, and configure printhead with firing pulse profile etc. accordingly.
4) Initiate printhead pre-heat sequence, if required.
10.4.4 First page download
Buffer management in a SoPEC system is normally performed by the host via the ISI.
) Check DRAM space remaining is sufficient to download the first band.
2) The host downloads the first band (with the page header) to DRAM via the ISI.
3) When the complete page header has been downloaded, process the page header, calculate
PEP register commands and write directly to PEP registers or to DRAM.
4) If PEP register commands have been written to DRAM, execute PEP commands from DRAM via PCU.
Remaining first page bands download and processing:
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 ) Check DRAM space remaining is sufficient to download the next band.
2) The host downloads the first band (with the page header) to DRAM via the ISI.
3) When the complete band header has been downloaded, process the band header according to whichever band-related register updating mechanism is being used.
10.4.5 Start printing ) Wait until at least one band of the first page has been downloaded.
2) Start all the PEP Units by writing to their Go registers, via PCU commands executed from DRAM or direct CPU writes, in the order defined in Table .
3) Print ready interrupt occurs (from PHI). Communicate to PrintMaster via ISI.
4) Start motor control, if attached to this ISISIave, when requested by PrintMaster, if first page, otherwise feed next page. This step could occur before the print ready interrupt
5) Drive LEDS, monitor paper status, if on this ISISIave SoPEC, when requested by PrintMaster
6) Wait for page alignment via page sensor(s) GPIO interrupt, if on this ISISIave SoPEC, and send to PrintMaster.
7) Wait for line sync and commence printing.
8) Continue to download bands and process page and band headers for next page.
10.4.6 Next page(s) download
As for first band download, performed during printing of current page.
10.4.7 Between bands
When the finished band flags are asserted band related registers in the CDU, LBD and TE need to be re-programmed. This can be via PCU commands from DRAM. Typically only 3-5 commands per decompression unit need to be executed. These registers can also be reprogrammed directly by the CPU or by updating from shadow registers. The finished band flag interrupts to the CPU tell the CPU that the area of memory associated with the band is now free.
10.4.8 During page print
Typically during page printing ink usage is communicated to the QA chips.
1) Calculate ink printed (from PHI).
2) Decrement ink remaining (via QA chips).
3) Check amount of ink remaining (via QA chips). This operation may be better performed while the page is being printed rather than at the end of the page.
10.4.9 Page finish
These operations are typically performed when the page is finished:
) Page finished interrupt occurs from PHI. Communicate page finished interrupt to PrintMaster.
2) Shutdown the PEP blocks by de-asserting their Go registers in the suggested order in Table . This will set the PEP Unit state-machines to their startup states.
3) Communicate ink usage to QA chips, if required.
10.4.10 Start of next page
These operations are typically performed before printing the next page:
1) Re-program the PEP Units via PCU command processing from DRAM based on page header.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
2) Go to Start printing.
10.4.11 End of document
Stop motor control, if attached to this ISISIave, when requested by PrintMaster.
10.4.12 Powerdown
In this mode SoPEC is no longer powered.
) Powerdown ISISIave SoPEC when instructed by ISIMaster.
10.4.13 Sleep
The CPU can put different sections of SoPEC into sleep mode by writing to registers in the CPR block [16], This may be as a result of a command from the host or ISIMaster or as a result of a timeout.
) Store reusable cryptographic results in Power-Safe Storage (PSS).
2) Put SoPEC into defined sleep mode.
10.5 Security Use Cases
Please see the ‘SoPEC Security Overview’ [9] document for a more complete description of SoPEC security issues. The SoPEC boot operation is described in the ROM chapter of the SoPEC hardware design specification, Section 17.2.
10.5.1 Communication with the QA chips
Communication between SoPEC and the QA chips (i.e. INK_QA and PRINTER_QA) will take place on at least a per power cycle and per page basis. Communication with the QA chips has three principal purposes: validating the presence of genuine QA chips (i.e the printer is using approved consumables), validation of the amount of ink remaining in the cartridge and authenticating the operating parameters for the printer. After each page has been printed, SoPEC is expected to communicate the number of dots fired per ink plane to the QA chipset. SoPEC may also initiate decoy communications with the QA chips from time to time.
Process:
• When validating ink consumption SoPEC is expected to principally act as a conduit between the PRINTER_QA and INK_QA chips and to take certain actions (basically enable or disable printing and report status to host PC) based on the result. The communication channels are insecure but all traffic is signed to guarantee authenticity.
Known Weaknesses • All communication to the QA chips is over the LSS interfaces using a serial communication protocol. This is open to observation and so the communication protocol could be reverse engineered. In this case both the PRINTER_QA and INK_QA chips could be replaced by impostor devices (e.g. a single FPGA) that successfully emulated the communication protocol. As this would require physical modification of each printer this is considered to be an acceptably low risk. Any messages that are not signed by one of the symmetric keys (such as the SoPEC_id_key) could be reverse engineered. The imposter device must also have access to the appropriate keys to crack the system.
• If the secret keys in the QA chips are exposed or cracked then the system, or parts of it, is compromised.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
Assumptions:
[1] The QA chips are not involved in the authentication of downloaded SoPEC code
[2] The QA chip in the ink cartridge (INK_QA) does not directly affect the operation of the cartridge in any way i.e. it does not inhibit the flow of ink etc.
[3] The INK_QA and PRINTER_QA chips are identical in their virgin state. They only become a INK_QA or PRINTER_QA after their FlashROM has been programmed.
10.5.2 Authentication of downloaded code in a single SoPEC system
Process:
) SoPEC identification by activity on USB end-points 2-4 indicates it is the ISIMaster (unless the SoPEC CPU has explicitly disabled this function).
2) The program is downloaded to the embedded DRAM.
3) The CPU calculates a SHA-1 hash digest of the downloaded program.
4) The ResetSrc register in the CPR block is read to determine whether or not a power-on reset occurred.
5) If a power-on reset occurred the signature of the downloaded code (which needs to be in a known location such as the first or last N bytes of the downloaded code) is decrypted using the Silverbrook public bootOkey stored in ROM. This decrypted signature is the expected SHA-1 hash of the accompanying program. The encryption algorithm is likely to be a public key algorithm such as RSA. If a power-on reset did not occur then the expected SHA-1 hash is retrieved from the PSS and the compute intensive decryption is not required.
6) The calculated and expected hash values are compared and if they match then the programs authenticity has been verified.
7) If the hash values do not match then the host PC is notified of the failure and the SoPEC will await a new program download.
8) If the hash values match then the CPU starts executing the downloaded program.
9) If, as is very likely, the downloaded program wishes to download subsequent programs (such as OEM code) it is responsible for ensuring the authenticity of everything it downloads. The downloaded program may contain public keys that are used to authenticate subsequent downloads, thus forming a hierarchy of authentication. The SoPEC ROM does not control these authentications - it is solely concerned with verifying that the first program downloaded has come from a trusted source.
10) At some subsequent point OEM code starts executing. The Silverbrook supervisor code acts as an O/S to the OEM user mode code. The OEM code must access most SoPEC functionality via system calls to the Silverbrook code.
11) The OEM code is expected to perform some simple ‘turn on the lights’ tasks after which the host PC is informed that the printer is ready to print and the Start Printing use case comes into play.
Known Weaknesses:
• If the Silverbrook private bootOkey is exposed or cracked then the system is seriously compromised. A ROM mask change would be required to reprogram the bootOkey.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
10.5.3 Authentication of downloaded code in a multi-SoPEC system
10.5.3.1 ISIMaster SoPEC Process:
1) SoPEC identification by activity on USB end-points 2-4 indicates it is the ISIMaster.
2) The SCB is configured to broadcast the data received from the host PC.
3) The program is downloaded to the embedded DRAM and broadcasted to all ISISIave SoPECs over the ISI.
4) The CPU calculates a SHA-1 hash digest of the downloaded program.
5) The ResetSrc register in the CPR block is read to determine whether or not a power-on reset occurred.
6) If a power-on reset occurred the signature of the downloaded code (which needs to be in a known location such as the first or last N bytes of the downloaded code) is decrypted using the Silverbrook public bootOkey stored in ROM. This decrypted signature is the expected SHA-1 hash of the accompanying program. The encryption algorithm is likely to be a public key algorithm such as RSA. If a power-on reset did not occur then the expected SHA-1 hash is retrieved from the PSS and the compute intensive decryption is not required.
7) The calculated and expected hash values are compared and if they match then the programs authenticity has been verified.
8) If the hash values do not match then the host PC is notified of the failure and the SoPEC will await a new program download.
9) If the hash values match then the CPU starts executing the downloaded program.
10) It is likely that the downloaded program will poll each ISISIave SoPEC for the result of its authentication process and to determine the number of slaves present and their ISIIds.
) If any ISISIave SoPEC reports a failed authentication then the ISIMaster communicates this to the host PC and the SoPEC will await a new program download.
12) If all ISISlaves report successful authentication then the downloaded program is responsible for the downloading, authentication and distribution of subsequent programs within the multiSoPEC system.
13) At some subsequent point OEM code starts executing. The Silverbrook supervisor code acts as an O/S to the OEM user mode code. The OEM code must access most SoPEC functionality via system calls to the Silverbrook code.
14) The OEM code is expected to perform some simple ‘turn on the lights’ tasks after which the master SoPEC determines that all SoPECs are ready to print. The host PC is informed that the printer is ready to print and the Start Printing use case comes into play.
10.5.3.2 ISISIave SoPEC Process:
) When the CPU comes out of reset the SCB will be in slave mode, and the SCB is already configured to receive data from both the ISI and USB.
2) The program is downloaded (via ISI or USB) to embedded DRAM.
3) The CPU calculates a SHA-1 hash digest of the downloaded program.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
4) The ResetSrc register in the CPR block is read to determine whether or not a power-on reset occurred.
5) If a power-on reset occurred the signature of the downloaded code (which needs to be in a known location such as the first or last N bytes of the downloaded code) is decrypted using the Silverbrook public bootOkey stored in ROM. This decrypted signature is the expected SHA-1 hash of the accompanying program. The encryption algorithm is likely to be a public key algorithm such as RSA. If a power-on reset did not occur then the expected SHA-1 hash is retrieved from the PSS and the compute intensive decryption is not required.
6) The calculated and expected hash values are compared and if they match then the programs authenticity has been verified.
7) If the hash values do not match, then the ISISIave device will await a new program again
8) If the hash values match then the CPU starts executing the downloaded program.
9) It is likely that the downloaded program will communicate the result of its authentication process to the ISIMaster. The downloaded program is responsible for determining the SoPECs ISI Id, receiving and authenticating any subsequent programs.
10) At some subsequent point OEM code starts executing. The Silverbrook supervisor code acts as an O/S to the OEM user mode code. The OEM code must access most SoPEC functionality via system calls to the Silverbrook code.
) The OEM code is expected to perform some simple ‘turn on the lights’ tasks after which the master SoPEC is informed that this slave is ready to print. The Start Printing use case then comes into play.
Known Weaknesses • If the Silverbrook private bootOkey is exposed or cracked then the system is seriously compromised.
• ISI is an open interface i.e. messages sent over the ISI are in the clear. The communication channels are insecure but all traffic is signed to guarantee authenticity. As all communication over the ISI is controlled by Supervisor code on both the ISIMaster and ISISIave then this also provides some protection against software attacks.
10.5.4 Authentication and upgrade of operating parameters for a printer
The SoPEC IC will be used in a range of printers with different capabilities (e.g. A3/A4 printing, printing speed, resolution etc.). It is expected that some printers will also have a software upgrade capability which would allow a user to purchase a license that enables an upgrade in their printer’s capabilities (such as print speed). To facilitate this it must be possible to securely store the operating parameters in the PRINTER_QA chip, to securely communicate these parameters to the SoPEC and to securely reprogram the parameters in the event of an upgrade. Note that each printing SoPEC (as opposed to a SoPEC that is only used for the storage of data) will have its own PRINTER_QA chip (or at least access to a PRINTER_QA that contains the SoPEC’s SoPEC_id_key). Therefore both ISIMaster and ISISIave SoPECs will need to authenticate operating parameters.
Process:
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
1) Program code is downloaded and authenticated as described in sections 10.5.2 and 10.5.3 above.
2) The program code has a function to create the SoPEC_id_key from the unique SoPECJd that was programmed when the SoPEC was manufactured.
3) The SoPEC retrieves the signed operating parameters from its PRINTER_QA chip. The PRINTER_QA chip uses the SoPEC_id_key (which is stored as part of the pairing process executed during printhead assembly manufacture & test) to sign the operating parameters which are appended with a random number to thwart replay attacks.
4) The SoPEC checks the signature of the operating parameters using its SoPEC_id_key. If this signature authentication process is successful then the operating parameters are considered valid and the overall boot process continues. If not the error is reported to the host PC.
5) Operating parameters may also be set or upgraded using a second key, the PrintEngineLicense_key, which is stored on the PRINTER_QA and used to authenticate the change in operating parameters.
Known Weaknesses:
It may be possible to retrieve the unique SoPECJd by placing the SoPEC in test mode and scanning it out. It is certainly possible to obtain it by reverse engineering the device. Either way the SoPECJd (and by extension the SoPECJd_key) so obtained is valid only for that specific SoPEC and so printers may only be compromised one at a time by parties with the appropriate specialised equipment. Furthermore even if the SoPECJd is compromised, the other keys in the system, which protect the authentication of consumables and of program code, are unaffected.
10.6 Miscellaneous Use Cases
There are many miscellaneous use cases such as the following examples. Software running on the SoPEC CPU or host will decide on what actions to take in these scenarios.
10.6.1 Disconnect / Re-connect of QA chips.
) Disconnect of a QA chip between documents or if ink runs out mid-document.
2) Re-connect of a QA chip once authenticated e.g. ink cartridge replacement should allow the system to resume and print the next document
10.6.2 Page arrives before print ready interrupt.
) Engage clutch to stop paper until print ready interrupt occurs.
10.6.3 Dead-nozzle table upgrade
This sequence is typically performed when dead nozzle information needs to be updated by performing a printhead dead nozzle test.
) Run printhead nozzle test sequence
2) Either host or SoPEC CPU converts dead nozzle information into dead nozzle table.
3) Store dead nozzle table on host.
4) Write dead nozzle table to SoPEC DRAM.
10.7 Failure Mode Use Cases
10.7.1 System errors and security violations
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
System errors and security violations are reported to the SoPEC CPU and host. Software running on the SoPEC CPU or host will then decide what actions to take.
Silverbrook code authentication failure.
) Notify host PC of authentication failure.
2) Abort print run.
OEM code authentication failure.
) Notify host PC of authentication failure.
2) Abort print run.
Invalid QA chip(s).
) Report to host PC.
2) Abort print run.
MMU security violation interrupt.
) This is handled by exception handler.
2) Report to host PC
3) Abort print run.
Invalid address interrupt from PCU.
) This is handled by exception handler.
2) Report to host PC.
3) Abort print run.
Watchdog timer interrupt.
) This is handled by exception handler.
2) Report to host PC.
3) Abort print run.
Host PC does not acknowledge message that SoPEC is about to power down.
) Power down anyway.
10.7.2 Printing errors
Printing errors are reported to the SoPEC CPU and host. Software running on the host or SoPEC CPU will then decide what actions to take.
Insufficient space available in SoPEC compressed band-store to download a band.
) Report to the host PC.
Insufficient ink to print.
) Report to host PC.
Page not downloaded in time while printing.
) Buffer underrun interrupt will occur.
2) Report to host PC and abort print run.
JPEG decoder error interrupt.
I ) Report to host PC.
CPU Subsystem
II Central Processing Unit (CPU)
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
11.1 Overview
The CPU block consists of the CPU core, MMU, cache and associated logic. The principal tasks for the program running on the CPU to fulfill in the system are:
Communications:
• Control the flow of data from the USB interface to the DRAM and ISI • Communication with the host via USB or ISI • Running the USB device driver
PEP Subsystem Control:
• Page and band header processing (may possibly be performed on host PC) • Configure printing options on a per band, per page, per job or per power cycle basis • Initiate page printing operation in the PEP subsystem • Retrieve dead nozzle information from the printhead interface (PHI) and forward to the host PC • Select the appropriate firing pulse profile from a set of predefined profiles based on the printhead characteristics • Retrieve printhead temperature via the PHI
Security:
• Authenticate downloaded program code • Authenticate printer operating parameters • Authenticate consumables via the PRINTER_QA and INK_QA chips • Monitor ink usage • Isolation of OEM code from direct access to the system resources
Other:
• Drive the printer motors using the GPIO pins • Monitoring the status of the printer (paper jam, tray empty etc.) • Driving front panel LEDs • Perform post-boot initialisation of the SoPEC device • Memory management (likely to be in conjunction with the host PC) • Miscellaneous housekeeping tasks
To control the Print Engine Pipeline the CPU is required to provide a level of performance at least equivalent to a 16-bit Hitachi H8-3664 microcontroller running at 16 MHz. An as yet undetermined amount of additional CPU performance is needed to perform the other tasks, as well as to provide the potential for such activity as Netpage page assembly and processing, RIPing etc. The extra performance required is dominated by the signature verification task and the SCB (including the USB) management task. An operating system is not required at present. A number of CPU cores have been evaluated and the LEON P1754 is considered to be the most appropriate solution. A diagram of the CPU block is shown in Figure 15 below.
11.2 Definitions of I/Os
Table 14. CPU Subsystem I/Os
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td colspan="4"> Clocks and Resets</td>
<td> prst_n</td><td> 1</td><td> In</td><td> Global reset. Synchronous to pclk, active low.</td>
<td> Pclk</td><td> 1</td><td> In</td><td> Globa! clock</td>
<td colspan="4"> CPU to DIU DRAM interface</td>
<td> cpu_adr[21:2]</td><td> 20</td><td> Out</td><td> Address bus for both DRAM and peripheral access</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> Out</td><td> Data out to both DRAM and peripheral devices. This should be driven at the same time as the cpu_adr and request signals.</td>
<td> dram_cpu_data[255:0]</td><td> 256</td><td> In</td><td> Read data from the DRAM</td>
<td> cpu_diu_rreq</td><td> 1</td><td> Out</td><td> Read request to the DIU DRAM</td>
<td> diu_cpu_rack</td><td> 1</td><td> In</td><td> Acknowledge from DIU that read request has been accepted.</td>
<td> diu_cpu_rvalid</td><td> 1</td><td> In</td><td> Signal from DIU telling SoPEC Unit that valid read data is on the dram_cpu_data bus</td>
<td> cpu_diu_wdatavalid</td><td> 1</td><td> Out</td><td> Signal from the CPU to the DIU indicating that the data currently on the cpu_diu_wdata bus is valid and should be committed to the DIU posted write buffer</td>
<td> diu_cpu_write_rdy</td><td> 1</td><td> In</td><td> Signal from the DIU indicating that the posted write buffer is empty</td>
<td> cpu_diu_wdadr[21:4]</td><td> 18</td><td> Out</td><td> Write address bus to the DIU</td>
<td> cpu_diu_wdata[127:0]</td><td> 128</td><td> Out</td><td> Write data bus to the DIU</td>
<td> cpu_diu_wmask[15:0]</td><td> 16</td><td> Out</td><td> Write mask for the cpu_diu_wdata bus. Each bit corresponds to a byte of the 128-bit cpu_diu_wdata bus.</td>
<td colspan="4"> CPU to peripheral blocks</td>
<td> cpu_rwn</td><td> 1</td><td> Out</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> Out</td><td> CPU access code signals. cpu_acode[0] - Program (0) / Data (1 ) access cpu_acode[1] - User (0) / Supervisor (1) access</td>
<td> cpu_cpr_sel</td><td> 1</td><td> Out</td><td> CPR block select.</td>
<td> cpr_cpu_rdy</td><td> 1</td><td> In</td><td> Ready signal to the CPU. When cpr_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the CPR block and for a read cycle this means the data on cpr_cpu_data is valid.</td>
<td> cpr_cpu_berr</td><td> 1</td><td> In</td><td> CPR bus error signal to the CPU.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> cpr_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the CPR block</td>
<td> cpu_gpio_sel</td><td> 1</td><td> Out</td><td> GPIO block select.</td>
<td> gpio_cpu_rdy</td><td> 1</td><td> In</td><td> GPIO ready signal to the CPU.</td>
<td> gpio_cpu_berr</td><td> 1</td><td> In</td><td> GPIO bus error signal to the CPU.</td>
<td> gpio_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the GPIO block</td>
<td> cpu_icu_sel</td><td> 1</td><td> Out</td><td> ICU block select.</td>
<td> icu_cpu_rdy</td><td> 1</td><td> In</td><td> ICU ready signal to the CPU.</td>
<td> icu_cpu_berr</td><td> 1</td><td> In</td><td> ICU bus error signal to the CPU.</td>
<td> icu_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the ICU block</td>
<td> cpu_lss_sel</td><td> 1</td><td> Out</td><td> LSS block select.</td>
<td> lss_cpu_rdy</td><td> 1</td><td> In</td><td> LSS ready signal to the CPU.</td>
<td> lss_cpu_berr</td><td> 1</td><td> In</td><td> LSS bus error signal to the CPU.</td>
<td> lss_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the LSS block</td>
<td> cpu_pcu_sel</td><td> 1</td><td> Out</td><td> PCU block select.</td>
<td> pcu_cpu_rdy</td><td> 1</td><td> In</td><td> PCU ready signal to the CPU.</td>
<td> pcu_cpu_berr</td><td> 1</td><td> In</td><td> PCU bus error signal to the CPU.</td>
<td> pcu_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the PCU block</td>
<td> cpu_scb_sel</td><td> 1</td><td> Out</td><td> SCB block select.</td>
<td> scb_cpu_rdy</td><td> 1</td><td> In</td><td> SCB ready signal to the CPU.</td>
<td> scb_cpu_berr</td><td> 1</td><td> In</td><td> SCB bus error signal to the CPU.</td>
<td> scb_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the SCB block</td>
<td> cpu_tim_sel</td><td> 1</td><td> Out</td><td> Timers block select.</td>
<td> tim_cpu_rdy</td><td> 1</td><td> In</td><td> Timers block ready signal to the CPU.</td>
<td> tim_cpu_berr</td><td> 1</td><td> In</td><td> Timers bus error signal to the CPU.</td>
<td> tim_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the Timers block</td>
<td> cpu_rom_sel</td><td> 1</td><td> Out</td><td> ROM block select.</td>
<td> rom_cpu_rdy</td><td> 1</td><td> In</td><td> ROM block ready signal to the CPU.</td>
<td> rom_cpu_berr</td><td> 1</td><td> In</td><td> ROM bus error signal to the CPU.</td>
<td> rom_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the ROM block</td>
<td> cpu_pss_sel</td><td> 1</td><td> Out</td><td> PSS block select.</td>
<td> pss_cpu_rdy</td><td> 1</td><td> In</td><td> PSS block ready signal to the CPU.</td>
<td> pss_cpu_berr</td><td> 1</td><td> In</td><td> PSS bus error signal to the CPU.</td>
<td> pss_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the PSS block</td>
<td> cpu_diu_sel</td><td> 1</td><td> Out</td><td> DIU register block select.</td>
<td> diu_cpu_rdy</td><td> 1</td><td> In</td><td> DIU register block ready signal to the CPU.</td>
<td> diu_cpu_berr</td><td> 1</td><td> In</td><td> DIU bus error signal to the CPU.</td>
<td> diu_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the DIU block</td>
<td colspan="4"> Interrupt signals</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> icu_cpu_ilevel[3:0]</td><td> 3</td><td> In</td><td> An interrupt is asserted by driving the appropriate priority level on icu_cpu_ilevel. These signals must remain asserted until the CPU executes an interrupt acknowledge cycle.</td>
<td></td><td> 3</td><td> Out</td><td> Indicates the level of the interrupt the CPU is acknowledging when cpujack is high</td>
<td> cpujack</td><td> 1</td><td> Out</td><td> Interrupt acknowledge signal. The exact timing depends on the CPU core implementation</td>
<td colspan="4"> Debug signals</td>
<td> diu_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the diu_cpu_data bus is valid debug data.</td>
<td> tim_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the tim_cpu_data bus is valid debug data.</td>
<td> scb_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the scb_cpu_data bus is valid debug data.</td>
<td> pcu_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the pcu_cpu_data bus is valid debug data.</td>
<td> lss_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the lss_cpu_data bus is valid debug data.</td>
<td> icu_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the icu_cpu_data bus is valid debug data.</td>
<td> gpio_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the gpio_cpu_data bus is valid debug data.</td>
<td> cpr_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the cpr_cpu_data bus is valid debug data.</td>
<td> debug_data_out</td><td> 32</td><td> Out</td><td> Output debug data to be muxed on to the GPIO & PHI pins</td>
<td> debug_data_valid</td><td> 1</td><td> Out</td><td> Debug valid signal indicating the validity of the data on debug_data_out. This signal is used in all debug configurations</td>
<td> debug_cntrl</td><td> 33</td><td> Out</td><td> Control signal for each PHI bound debug data line indicating whether or not the debug data should be selected by the pin mux</td>
11.3 Realtime requirements
The SoPEC realtime requirements have yet to be fully determined but they may be split into three categories: hard, firm and soft
11.3.1 Hard realtime requirements
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
Hard requirements are tasks that must be completed before a certain deadline or failure to do so will result in an error perceptible to the user (printing stops or functions incorrectly). There are three hard realtime tasks:
• Motor control: The motors which feed the paper through the printer at a constant speed during printing are driven directly by the SoPEC device. Four periodic signals with different phase relationships need to be generated to ensure the paper travels smoothly through the printer. The generation of these signals is handled by the GPIO hardware (see section 13.2 for more details) but the CPU is responsible for enabling these signals (i.e. to start or stop the motors) and coordinating the movement of the paper with the printing operation of the printhead.
• Buffer management: Data enters the SoPEC via the SCB at an uneven rate and is consumed by the PEP subsystem at a different rate. The CPU is responsible for managing the DRAM buffers to ensure that neither overrun nor underrun occur. This buffer management is likely to be performed under the direction of the host.
• Band processing: In certain cases PEP registers may need to be updated between bands. As the timing requirements are most likely too stringent to be met by direct CPU writes to the PCU a more likely scenario Is that a set of shadow registers will programmed in the compressed page units before the current band is finished, copied to band related registers by the finished band signals and the processing of the next band will continue immediately. An alternative solution is that the CPU will construct a DRAM based set of commands (see section 21.8.5 for more details) that can be executed by the PCU. The task for the CPU here is to parse the band headers stored in DRAM and generate a DRAM based set of commands for the next number of bands. The location of the DRAM based set of commands must then be written to the PCU before the current band has been processed by the PEP subsystem. It is also conceivable (but currently considered unlikely) that the host PC could create the DRAM based commands. In this case the CPU will only be required to point the PCU to the correct location in DRAM to execute commands from.
11.3.2 Firm requirements
Firm requirements are tasks that should be completed by a certain time or failure to do so will result in a degradation of performance but not an error. The majority of the CPU tasks for SoPEC fall into this category including all interactions with the QA chips, program authentication, page feeding, configuring PEP registers for a page or job, determining the firing pulse profile, communication of printer status to the host over the USB and the monitoring of ink usage. The authentication of downloaded programs and messages will be the most compute intensive operation the CPU will be required to perform. Initial investigations indicate that the LEON processor, running at 160 MHz, will easily perform three authentications in under a second.
Table 15. Expected firm requirements
<td> Requirement</td><td> Duration</td>
<td> Power-on to start of printing first page [USB and slave SoPEC</td><td> ~ 8 secs ??</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
<td> enumeration, 3 or more RSA signature verifications, code and compressed page data download and chip initialisation]</td><td></td>
<td> Wake-up from sleep mode to start printing [3 or more SHA-1 / RSA operations, code and compressed page data download and chip reinitialisation</td><td> ~ 2 secs</td>
<td> Authenticate ink usage in the printer</td><td> ~ 0.5 secs</td>
<td> Determining firing pulse profile</td><td> ~ 0.1 secs</td>
<td> Page feeding, gap between pages</td><td> OEM dependent</td>
<td> Communication of printer status to host PC</td><td> ~ 10 ms</td>
<td> Configuring PEP registers</td><td> ??</td>
11.3.3 Soft requirements
Soft requirements are tasks that need to be done but there are only light time constraints on when they need to be done. These tasks are performed by the CPU when there are no pending higher priority tasks. As the SoPEC CPU is expected to be lightly loaded these tasks will mostly be executed soon after they are scheduled.
11.4 Bus Protocols
As can be seen from Figure 15 above there are different buses in the CPU block and different protocols are used for each bus. There are three buses in operation·.
11.4.1 AHB bus
The LEON CPU core uses an AMBA2.0 AHB bus to communicate with memory and peripherals (usually via an APB bridge). See the AMBA specification [38], section 5 of the LEON users manual [37] and section 11.6.6.1 of this document for more details.
11.4.2 CPU to DIU bus
This bus conforms to the DIU bus protocol described in Section 20.14.8. Note that the address bus used for DIU reads (i.e. cpu_adr(21:2)) is also that used for CPU subsystem with bus accesses while the write address bus (cpu_diu_wadr) and the read and write data buses (dram_cpu__data and cpu_diu_wdata) are private buses between the CPU and the DIU. The effective bus width differs between a read (256 bits) and a write (128 bits). As certain CPU instructions may require byte write access this will need to be supported by both the DRAM write buffer (in the AHB bridge) and the DIU. See section 11.6.6.1 for more details.
11.4.3 CPU Subsystem Bus
For access to the on-chip peripherals a simple bus protocol is used. The MMU must first determine which particular block is being addressed (and that the access is a valid one) so that the appropriate block select signal can be generated. During a write access CPU write data is driven out with the address and block select signals in the first cycle of an access. The addressed slave peripheral responds by asserting its ready signal indicating that it has registered the write data and the access can complete. The write data bus is common to all peripherals and is also used for CPU writes to the embedded DRAM. A read access is initiated by driving the address and select signals during the first cycle of an access. The addressed slave responds by placing the read data on its
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 bus and asserting its ready signal to indicate to the CPU that the read data is valid. Each block has a separate point-to-point data bus for read accesses to avoid the need for a tri-stateable bus. All peripheral accesses are 32-bit (Programming note: char or short C types should not be used to access peripheral registers). The use of the ready signal allows the accesses to be of variable length. In most cases accesses will complete in two cycles but three or four (or more) cycles accesses are likely for PEP blocks or IP blocks with a different native bus interface. All PEP blocks are accessed via the PCU which acts as a bridge. The PCU bus uses a similar protocol to the CPU subsystem bus but with the PCU as the bus master.
The duration of accesses to the PEP blocks is influenced by whether or not the PCU is executing commands from DRAM. As these commands are essentially register writes the CPU access will need to wait until the PCU bus becomes available when a register access has been completed. This could lead to the CPU being stalled for up to 4 cycles if it attempts to access PEP blocks while the PCU is executing a command. The size and probability of this penalty is sufficiently small to have any significant impact on performance.
In order to support user mode (i.e. OEM code) access to certain peripherals the CPU subsystem bus propagates the CPU function code signals (cpu_acode[1:0]). These signals indicate the type of address space (i.e. User/Supervisor and Program/Data) being accessed by the CPU for each access. Each peripheral must determine whether or not the CPU is in the correct mode to be granted access to its registers and in some cases (e.g. Timers and GPIO blocks) different access permissions can apply to different registers within the block. If the CPU is not in the correct mode then the violation is flagged by asserting the block’s bus error signal (block_cpu_berr) with the same timing as its ready signal (block_cpu_rdy) which remains deasserted. When this occurs invalid read accesses should return 0 and write accesses should have no effect.
Figure 16 shows two examples of the peripheral bus protocol in action. A write to the LSS block from code running in supervisor mode is successfully completed. This is immediately followed by a read from a PEP block via the PCU from code running in user mode. As this type of access is not permitted the access is terminated with a bus error. The bus error exception processing then starts directly after this - no further accesses to the peripheral should be required as the exception handler should be located in the DRAM.
Each peripheral acts as a slave on the CPU subsystem bus and its behavior is described by the state machine in section 11.4.3.1
11.4.3.1 CPU subsystem bus slave state machine
CPU subsystem bus slave operation is described by the state machine in Figure 17.This state machine will be implemented in each CPU subsystem bus slave. The only new signals mentioned here are the va!id_access and reg_available signals. The valid_access is determined by comparing the cpu_acode value with the block or register (in the case of a block that allow user access on a per register basis such as the GPIO block) access permissions and asserting valid_access if the permissions agree with the CPU mode. The reg_available signal is only required in the PCU or in blocks that are not capable of two-cycle access (e.g. blocks containing imported IP with different bus protocols). In these blocks the reg_available signal is an internal signal used to insert wait
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616 states (by delaying the assertion of block_cpu_rdy) until the CPU bus slave interface can gain access to the register.
When reading from a register that is less than 32 bits wide the CPU subsystems bus slave should return zeroes on the unused upper bits of the block_cpu_data bus.
To support debug mode the contents of the register selected for debug observation, debug_reg, are always output on the block_cpu_data bus whenever a read access is not taking place. See section 11.8 for more details of debug operation.
11.5 LEON CPU
The LEON processor is an open-source implementation of the IEEE-1754 standard (SPARC V8) instruction set. LEON is available from and actively supported by Gaisler Research (www.gaisler.com).
The following features of the LEON-2 processor will be utilised on SoPEC:
• IEEE-1754 (SPARC V8) compatible integer unit with 5-stage pipeline • Separate instruction and data cache (Harvard architecture). 1 kbyte direct mapped caches will be used for both.
• Full implementation of AMBA-2.0 AHB on-chip bus
The standard release of LEON incorporates a number of peripherals and support blocks which will not be included on SoPEC. The LEON core as used on SoPEC will consist of: 1 ) the LEON integer unit, 2) the instruction and data caches (currently 1 kB each), 3) the cache control logic, 4) the AHB interface and 5) possibly the AHB controller (although this functionality may be implemented in the LEON AHB bridge).
The version of the LEON database that the SoPEC LEON components will be sourced from is LEON2-1.0.7 although later versions may be used if they offer worthwhile functionality or bug fixes that affect the SoPEC design.
The LEON core will be clocked using the system clock, polk, and reset using the prst_n_section[1] signal. The ICU will assert all the hardware interrupts using the protocol described in section 11.9.
The LEON hardware multipliers and floating-point unit are not required. SoPEC will use the recommended 8 register window configuration.
Further details of the SPARC V8 instruction set and the LEON processor can be found in [36] and [37] respectively.
11.5.1 LEON Registers
Only two of the registers described in the LEON manual are implemented on SoPEC - the LEON configuration register and the Cache Control Register (CCR). The addresses of these registers are shown in Table 16. The configuration register bit fields are described below and the CCR is described in section 11.7.1.1.
11.5.1.1 LEON configuration register
The LEON configuration register allows runtime software to determine the settings of LEONs various configuration options. This is a read-only register whose value for the SoPEC ASIC will be
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
0x1071_8C00. Further descriptions of many of the bitfields can be found in the LEON manual. The values used for SoPEC are highlighted in bold for clarity.
Table 16. LEON Configuration Register
<td> Field Name</td><td> bit(s)</td><td> Description</td>
<td> WriteProtection</td><td> 1:0</td><td> Write protection type. 00 - none 01 - standard</td>
<td> PCICore</td><td> 3:2</td><td> PCI core type 00 - none 01 - InSilicon 10-ESA 11 - Other</td>
<td> FPUType</td><td> 5:4</td><td> FPU type. 00 - none 01 - Meiko</td>
<td> MemStatus</td><td> 6</td><td> 0 - No memory status and failing address register present 1 - Memory status and failing address register present</td>
<td> Watchdog</td><td> 7</td><td> 0 - Watchdog timer not present (Note this refers to the LEON watchdog timer in the LEON timer block). 1 - Watchdog timer present</td>
<td> UMUL/SMUL</td><td> 8</td><td> 0 - UMUL/SMUL instructions are not implemented 1 - UMUL/SMUL instructions are implemented</td>
<td> UDIV/SDIV</td><td> 9</td><td> 0 - UMUL/SMUL instructions are not implemented 1 - UMUL/SMUL instructions are implemented</td>
<td> DLSZ</td><td> 11:10</td><td> Data cache line size in 32-bit words: 00-1 word 01-2 words 10- 4 words 11- 8 words</td>
<td> DCSZ</td><td> 14:12</td><td> Data cache size in kBbytes = 2<sup>UUbZ</sup>. SoPEC DCSZ = 0.</td>
<td> ILSZ</td><td> 16:15</td><td> Instruction cache line size in 32-bit words: 00 -1 word 01-2 words 10- 4 words 11- 8 words</td>
<td> ICSZ</td><td> 19:17</td><td> Instruction cache size in kBbytes = 2<sup>IUbz</sup>. SoPEC ICSZ = 0.</td>
<td> RegWin</td><td> 24:20</td><td> The implemented number of SPARC register windows -1. SoPEC value = 7.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
100
<td> UMAC/SMAC</td><td> 25</td><td> 0 - UMAC/SMAC instructions are not implemented 1 - UMAC/SMAC instructions are implemented</td>
<td> Watchpoints</td><td> 28:26</td><td> The implemented number of hardware watchpoints. SoPEC value = 4.</td>
<td> SDRAM</td><td> 29</td><td> 0 - SDRAM controller not present 1 - SDRAM controller present</td>
<td> DSU</td><td> 30</td><td> 0 - Debug Support Unit not present 1 - Debug Support Unit present</td>
<td> Reserved</td><td> 31</td><td> Reserved. SoPEC value = 0.</td>
11.6 Memory Management Unit (MMU)
Memory Management Units are typically used to protect certain regions of memory from invalid accesses, to perform address translation for a virtual memory system and to maintain memory page status (swapped-in, swapped-out or unmapped)
The SoPEC MMU is a much simpler affair whose function is to ensure that all regions of the SoPEC memory map are adequately protected. The MMU does not support virtual memory and physical addresses are used at all times. The SoPEC MMU supports a full 32-bit address space. The SoPEC memory map is depicted in Figure 18 below.
The MMU selects the relevant bus protocol and generates the appropriate control signals depending on the area of memory being accessed. The MMU is responsible for performing the address decode and generation of the appropriate block select signal as well as the selection of the correct block read bus during a read access. The MMU will need to support all of the bus transactions the CPU can produce including interrupt acknowledge cycles, aborted transactions etc. When an MMU error occurs (such as an attempt to access a supervisor mode only region when in user mode) a bus error is generated. While the LEON can recognise different types of bus error (e.g. data store error, instruction access error) it handles them in the same manner as it handles all traps i.e it will transfer control to a trap handler. No extra state information is be stored because of the nature of the trap. The location of the trap handler is contained in the TBR (Trap Base Register). This is the same mechanism as is used to handle interrupts.
11.6.1 CPU-bus peripherals address map
The address mapping for the peripherals attached to the CPU-bus is shown in Table 17 below. The MMU performs the decode of the high order bits to generate the relevant cpu_block_select signal. Apart from the PCU, which decodes the address space for the PEP blocks, each block only needs to decode as many bits of cpu_adr[11:2] as required to address all the registers within the block.
Table 17. CPU-bus peripherals address map
<td> Block_base</td><td> Address</td>
<td> ROM_base</td><td> 0x0000.0000</td>
<td> MMU base</td><td> 0x0001 0000</td>
<td></td><td></td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
101
<td> TIM_base</td><td> 0x0001_1000</td>
<td> LSS_base</td><td> 0x0001_2000</td>
<td> GPIO_base</td><td> 0x0001_3000</td>
<td> SCB_base</td><td> 0x0001_4000</td>
<td> ICU_base</td><td> 0x0001_5000</td>
<td> CPR_base</td><td> 0x0001_6000</td>
<td> DIU_base</td><td> 0x0001_7000</td>
<td> PSS_base</td><td> 0x0001_8000</td>
<td> Reserved</td><td> 0x0001_9000 to 0x0001_FFFF</td>
<td> PCU base</td><td> 0x0002 0000</td>
<td></td><td></td>
11.6.2 DRAM Region Mapping
The embedded DRAM is broken into 8 regions, with each region defined by a lower and upper bound address and with its own access permissions.
The association of an area in the DRAM address space with a MMU region is completely under software control. Table 18 below gives one possible region mapping. Regions should be defined according to their access requirements and position in memory. Regions that share the same access requirements and that are contiguous in memory may be combined into a single region. The example below is purely for indicative purposes - real mappings are likely to differ significantly from this. Note that the RegionBottom and RegionTop fields in this example include the DRAM base address offset (0x4000_0000) which is not required when programming the RegionNTop and RegionNBottom registers. For more details, see 11.6.5.1 and 11.6.5.2.
Table 18. Example region mapping
<td> Region</td><td> RegionBottom</td><td> RegionTop</td><td> Description</td>
<td> 0</td><td> 0x4000_0000</td><td> 0x4000_0FFF</td><td> Silverbrook OS (supervisor) data</td>
<td> 1</td><td> 0x4000_1000</td><td> 0x4000_BFFF</td><td> Silverbrook OS (supervisor) code</td>
<td> 2</td><td> 0x4000_C000</td><td> 0x4000_C3FF</td><td> Silverbrook (supervisor/user) data</td>
<td> 3</td><td> Ox4000_C400</td><td> Ox4000_CFFF</td><td> Silverbrook (supervisor/user) code</td>
<td> 4</td><td> 0x4026_D000</td><td> 0x4026_D3FF</td><td> OEM (user) data</td>
<td> 5</td><td> 0x4026_D400</td><td> 0x4026_DFFF</td><td> OEM (user) code</td>
<td> 6</td><td> Ox4027_EOOO</td><td> 0x4027_FFFF</td><td> Shared Silverbrook/OEM space</td>
<td> 7</td><td> 0x4000_D000</td><td> 0x4026_CFFF</td><td> Compressed page store (supervisor data)</td>
11.6.3 Non-DRAM regions
As shown in Figure 18 the DRAM occupies only 2.5 MBytes of the total 4 GB SoPEC address space. The non-DRAM regions of SoPEC are handled by the MMU as follows:
ROM (0x0000_0000 to 0x0000_FFFF): The ROM block will control the access types allowed. The cpu_acode[1:0] signals will indicate the CPU mode and access type and the ROM block will assert rom_cpu_berr if an attempted access is forbidden. The protocol is described in more detail in
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
102 section 11.4.3. The ROM block access permissions are hard wired to allow all read accesses except to the FuseChipID registers which may only be read in supervisor mode.
MMU Internal Registers (0x0001_0000 to 0x0001_0FFF): The MMU is responsible for controlling the accesses to its own internal registers and will only allow data reads and writes (no instruction fetches) from supervisor data space. All other accesses will result in the mmu_cpu_berr signal being asserted in accordance with the CPU native bus protocol.
CPU Subsystem Peripheral Registers (0x0001_1000 to 0x0001_FFFF): Each peripheral block will control the access types allowed. Every peripheral will allow supervisor data accesses (both read and write) and some blocks (e.g. Timers and GPIO) will also allow user data space accesses as outlined in the relevant chapters of this specification. Neither supervisor nor user instruction fetch accesses are allowed to any block as it is not possible to execute code from peripheral registers. The bus protocol is described in section 11.4.3.
PCU Mapped Registers (0x0002_0000 to 0x0002_BFFF): All of the PEP blocks registers which are accessed by the CPU via the PCU will inherit the access permissions of the PCU. These access permissions are hard wired to allow supervisor data accesses only and the protocol used is the same as for the CPU peripherals.
Unused address space (0x0002_C000 to 0x3FFF_FFFF and 0x4028_0000 to 0xFFFF_FFFF): All accesses to the unused portion of the address space will result in the mmu_cpu_berr signal being asserted in accordance with the CPU native bus protocol. These accesses will not propagate outside of the MMU i.e. no external access will be initiated.
11.6.4 Reset exception vector and reference zero traps
When a reset occurs the LEON processor starts executing code from address 0x0000_0000. A common software bug is zero-referencing or null pointer de-referencing (where the program attempts to access the contents of address 0x0000_0000). To assist software debug the MMU will assert a bus error everytime the locations 0x0000_0000 to 0x0000_000F (i.e. the first 4 words of the reset trap) are accessed after the reset trap handler has legitimately been retrieved immediately after reset.
11.6.5 MMU Configuration Registers
The MMU configuration registers include the RDU configuration registers and two LEON registers. Note that all the MMU configuration registers may only be accessed when the CPU is running in supervisor mode.
Table 19. MMU Configuration Registers
<td> Address offset from MMU_base</td><td> Register</td><td> tfbits</td><td> Reset</td><td> Description ;</td>
<td> 0x00</td><td> Region0Bottom[21:5 I</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the bottom of region 0</td>
<td> 0x04</td><td> Region0Top[21:5]</td><td> 17</td><td> 0xF_FFF F</td><td> This register contains the physical address that marks the top of region 0. Region 0 covers the</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
103
<td></td><td></td><td></td><td></td><td> entire address space after reset whereas all other regions are zero-sized initially.</td>
<td> 0x08</td><td> Regionl Bottom[21:5 l</td><td> 17</td><td> OxF_FFF F</td><td> This register contains the physical address that marks the bottom of region 1</td>
<td> OxOC</td><td> Region 1Top[21:5]</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the top of region 1</td>
<td> 0x10</td><td> Region2Bottom[21:5 ]</td><td> 17</td><td> OxF_FFF F</td><td> This register contains the physical address that marks the bottom of region 2</td>
<td> 0x14</td><td> Region3Top[21:5]</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the top of region 2</td>
<td> 0x18</td><td> Region3Bottom[21:5 I</td><td> 17</td><td> OxF_FFF F</td><td> This register contains the physical address that marks the bottom of region 3</td>
<td> 0x1 C</td><td> Region3Top[21:5]</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the top of region 3</td>
<td> 0x20</td><td> Region4Bottom[21:5 l</td><td> 17</td><td> OxF_FFF F</td><td> This register contains the physical address that marks the bottom of region 4</td>
<td> 0x24</td><td> Region4Top[21:5]</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the top of region 4</td>
<td> 0x28</td><td> Region5Bottom[21:5 l</td><td> 17</td><td> OxF_FFF F</td><td> This register contains the physical address that marks the bottom of region 5</td>
<td> 0x2C</td><td> Region5Top[21:5]</td><td> 17</td><td> O O X '° O O</td><td> This register contains the physical address that marks the top of region 5</td>
<td> 0x30</td><td> Region6Bottom[21:5 l</td><td> 17</td><td> 0xF_FFF F</td><td> This register contains the physical address that marks the bottom of region 6</td>
<td> 0x34</td><td> Region6Top[21:5]</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the top of region 6</td>
<td> 0x38</td><td> Region7Bottom[21:5 I</td><td> 17</td><td> 0xF_FFF F</td><td> This register contains the physical address that marks the bottom of region 7</td>
<td> 0x3C</td><td> Region7Top[21:5]</td><td> 17</td><td> 0x0_000 0</td><td> This register contains the physical address that marks the top of region 7</td>
<td> 0x40</td><td> RegionOControl</td><td> 6</td><td> 0x07</td><td> Control register for region 0</td>
<td> 0x44</td><td> Regionl Control</td><td> 6</td><td> 0x07</td><td> Control register for region 1</td>
<td> 0x48</td><td> Region2Control</td><td> 6</td><td> 0x07</td><td> Control register for region 2</td>
<td> Ox4C</td><td> Region3Control</td><td> 6</td><td> 0x07</td><td> Control register for region 3</td>
<td> 0x50</td><td> Region4Control</td><td> 6</td><td> 0x07</td><td> Control register for region 4</td>
<td> 0x54</td><td> Region5Control</td><td> 6</td><td> 0x07</td><td> Control register for region 5</td>
<td> 0x58</td><td> Region6Control</td><td> 6</td><td> 0x07</td><td> Control register for region 6</td>
<td> 0x5C</td><td> Region7Control</td><td> 6</td><td> 0x07</td><td> Control register for region 7</td>
<td> 0x60</td><td> RegionLock</td><td> 8</td><td> 0x00</td><td> Writing a 1 to a bit in the RegionLock register</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
104
<td></td><td></td><td></td><td></td><td> locks the value of the corresponding RegionTop, RegionBottom and RegionControl registers. The lock can only be cleared by a reset and any attempt to write to a locked register will result in a bus error.</td>
<td> 0x64</td><td> BusTimeout</td><td> 8</td><td> OxFF</td><td> This register should be set to the number of pclk cycles to wait after an access has started before aborting the access with a bus error. Writing 0 to this register disables the bus timeout feature.</td>
<td> 0x68</td><td> Exceptionsource</td><td> 6</td><td> 0x00</td><td> This register identifies the source of the last exception. See Section 11.6.5.3 for details.</td>
<td> 0x6C</td><td> DebugSelect</td><td> 7</td><td> 0x00</td><td> Contains address of the register selected for debug observation. It is expected that a number of pseudo-registers will be made available for debug observation and these will be outlined during the implementation phase.</td>
<td> 0x80 to 0x108</td><td> RDU Registers</td><td></td><td></td><td> See Table for details.</td>
<td> 0x140</td><td> LEON Configuration Register</td><td> 32</td><td> 0x1071_ 8 COO</td><td> The LEON configuration register is used by software to determine the configuration of this LEON implementation. See section 11.5.1.1 for details. This register is Readonly.</td>
<td> 0x144</td><td> LEON Cache Control Register</td><td> 32</td><td> 0x0000_ 0 000</td><td> The LEON Cache Control Register is used to control the operation of the caches. See section 11.6 for details.</td>
11.6.5.1 Region Top and RegionBottom registers
The 20 Mbit of embedded DRAM on SoPEC is arranged as 81920 words of 256 bits each. All region boundaries need to align with a 256-bit word. Thus only 17 bits are required for the
RegionNTop and RegionNBottom registers. Note that the bottom 5 bits of the RegionNTop and RegionNBottom registers cannot be written to and read as Ό’ i.e. the RegionNTop and RegionNBottom registers represent byte-aligned DRAM addresses
Both the RegionNTop and RegionNBottom registers are inclusive i.e. the addresses in the registers are included in the region. Thus the size of a region is (RegionNTop - RegionNBottom) +1 DRAM words.
If DRAM regions overlap (there is no reason for this to be the case but there is nothing to prohibit it either) then only accesses allowed by all overlapping regions are permitted. That is if a DRAM address appears in both Regionl and Region3 (for example) the cpu_acode of an access is
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
105 checked against the access permissions of both regions. If both regions permit the access then it will proceed but if either or both regions do not permit the access then it will not be allowed. The MMU does not support negatively sized regions i.e. the value of the RegionNTop register should always be greater than or equal to the value of the RegionNBottom register. If RegionNTop is lower in the address map than RegionNTop then the region is considered to be zero-sized and is ignored.
When both the RegionNTop and RegionNBottom registers for a region contain the same value the region is then simply one 256-bit word in length and this corresponds to the smallest possible active region.
11.6.5.2 Region Control registers
Each memory region has a control register associated with it. The RegionNControl register is used to set the access conditions for the memory region bounded by the RegionNTop and RegionNBottom registers. Table 20 describes the function of each bit field in the RegionNControl registers. All bits in a RegionNControl register are both readable and writable by design. However, like all registers in the MMU, the RegionNControl registers can only be accessed by code running in supervisor mode.
Table 20. Region Control Register
<td> Field Name V v .</td><td> bit(s)</td><td> Description</td>
<td> Supervisor Access</td><td> 2:0</td><td> Denotes the type of access allowed when the CPU is running in Supervisor mode. For each access type a 1 indicates the access is permitted and a 0 indicates the access is not permitted. bitO - Data read access permission bit1 - Data write access permission bit2 - Instruction fetch access permission</td>
<td> UserAccess</td><td> 5:3</td><td> Denotes the type of access allowed when the CPU is running in User mode. For each access type a 1 indicates the access is permitted and a 0 indicates the access is not permitted. bit3 - Data read access permission bit4 - Data write access permission bit5 - Instruction fetch access permission</td>
11.6.5.3 Exceptionsource Register
The SPARC V8 architecture allows for a number of types of memory access error to be trapped. These trap types and trap handling in general are described in chapter 7 of the SPARC architecture manual [36], However on the LEON processor only data_store_error and data_access_exception trap types will result from an external (to LEON) bus error. According to the SPARC architecture manual the processor will automatically move to the next register window (i.e. it decrements the current window pointer) and copies the program counters (PC and nPC) to two local registers in the
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
106 new window. The supervisor bit in the PSR is also set and the PSR can be saved to another local register by the trap handler (this does not happen automatically in hardware). The Exceptionsource register aids the trap handler by identifying the source of an exception. Each bit in the Exceptionsource register is set when the relevant trap condition and should be cleared by the trap handler by writing a ’T to that bit position.
Table 21. Exceptionsource Register
<td> Field Name</td><td> bit(s)</td><td> Description</td>
<td> DramAccessExcptn</td><td> 0</td><td> The permissions of an access did not match those of the DRAM region it was attempting to access. This bit will also be set if an attempt is made to access an undefined DRAM region (i.e. a location that is not within the bounds of any RegionTop/RegionBottom pair)</td>
<td> PeriAccessExcptn</td><td> 1</td><td> An access violation occurred when accessing a CPU subsystem block. This occurs when the access permissions disagree with those set by the block.</td>
<td> UnusedAreaExcptn</td><td> 2</td><td> An attempt was made to access an unused part of the memory map</td>
<td> Locked W riteExcptn</td><td> 3</td><td> An attempt was made to write to a regions registers (RegionTop/ Bottom/Control) after they had been locked.</td>
<td> ResetHandlerExcptn</td><td> 4</td><td> An attempt was made to access a ROM location between 0x0000_0000 and 0x0000_000F after the reset handler was executed. The most likely cause of such an access is the use of an uninitialised pointer or structure.</td>
<td> TimeoutExcptn</td><td> 5</td><td> A bus timeout condition occurred.</td>
11.6.6 MMU Sub-block partition
As can be seen from Figure 19 and Figure 20 the MMU consists of three principal sub-blocks. For clarity the connections between these sub-blocks and other SoPEC blocks and between each of the sub-blocks are shown in two separate diagrams.
11.6.6.1 LEON AHB Bridge
The LEON AHB bridge consists of an AHB bridge to DIU and an AHB to CPU subsystem bus bridge. The AHB bridge will convert between the AHB and the DIU and CPU subsystem bus protocols but the address decoding and enabling of an access happens elsewhere in the MMU. The AHB bridge will always be a slave on the AHB. Note that the AMBA signals from the LEON core are contained within the ahbso and ahbsi records. The LEON records are described in more detail in section 11.7. Glue logic may be required to assist with enabling memory accesses, endianness coherency, interrupts and other miscellaneous signalling.
Table 22. LEON AHB bridge I/Os
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
107
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td> Global SoPEC signals</td><td></td><td></td><td></td>
<td> prst_n</td><td> 1</td><td> In</td><td> Global reset. Synchronous to pclk, active low.</td>
<td> pclk</td><td> 1</td><td> In</td><td> Global clock</td>
<td colspan="4"> LEON core to LEON AHB signals (ahbsi and ahbso records)</td>
<td> ahbsi.haddr[31:0]</td><td> 32</td><td> In</td><td> AHB address bus</td>
<td> ahbsi. hwdata[31:0]</td><td> 32</td><td> In</td><td> AHB write data bus</td>
<td> ahbso.hrdata[31:0]</td><td> 32</td><td> Out</td><td> AHB read data bus</td>
<td> ahbsi.hsel</td><td> 1</td><td> In</td><td> AHB slave select signal</td>
<td> ahbsi. hwrite</td><td> 1</td><td> In</td><td> AHB write signal: 1 - Write access 0 - Read access</td>
<td> ahbsi.htrans</td><td> 2</td><td> In</td><td> Indicates the type of the current transfer: 00 - IDLE 01 - BUSY 10-NONSEQ 11 -SEQ</td>
<td> ahbsi.hsize</td><td> 3</td><td> In</td><td> Indicates the size of the current transfer: 000 - Byte transfer 001 - Halfword transfer 010 - Word transfer 011 - 64-bit transfer (unsupported?) 1xx - Unsupported larger wordsizes</td>
<td> ahbsi.hburst</td><td> 3</td><td> In</td><td> Indicates if the current transfer forms part of a burst and the type of burst: 000 - SINGLE 001 - INCR 010-WRAP4 011 -INCR4 100-WRAP8 101 -INCR8 110-WRAP16 111 -INCR16</td>
<td> ahbsi.hprot</td><td> 4</td><td> In</td><td> Protection control signals pertaining to the current access: hprot[0] - Opcode(O) / Data(1 ) access hprot[1] - User(0) / Supervisor access hprot[2] - Non-bufferable(O) / Bufferable(1 ) access (unsupported)</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
108
<td></td><td></td><td></td><td> hprot[3] - Non-cacheable(O) / Cacheable access</td>
<td> ahbsi.hmaster</td><td> 4</td><td> In</td><td> Indicates the identity of the current bus master. This will always be the LEON core.</td>
<td> ahbsi.hmastlock</td><td> 1</td><td> In</td><td> Indicates that the current master is performing a locked sequence of transfers.</td>
<td> ahbso.hready</td><td> 1</td><td> Out</td><td> Active high ready signal indicating the access has completed</td>
<td> ahbso.hresp</td><td> 2</td><td> Out</td><td> Indicates the status of the transfer: 00 - OKAY 01 - ERROR 10-RETRY 11 - SPLIT</td>
<td> ahbso.hsplit[15:0]</td><td> 16</td><td> Out</td><td> This 16-bit split bus is used by a slave to indicate to the arbiter which bus masters should be allowed attempt a split transaction. This feature will be unsupported on the AHB bridge</td>
<td colspan="3"> Toplevel/ Common LEON AHB bridge signais</td><td></td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> Out</td><td> Data out bus to both DRAM and peripheral devices.</td>
<td> cpu_rwn</td><td> 1</td><td> Out</td><td> Read/NotWrite signal. 1 = Current access is a read access, 0 = Current access is a write access</td>
<td> icu_cpu_ilevel[3:0]</td><td> 4</td><td> In</td><td> An interrupt is asserted by driving the appropriate priority level on icu_cpujlevel. These signals must remain asserted until the CPU executes an interrupt acknowledge cycle.</td>
<td> cpu_icuJlevel[3:0]</td><td> 4</td><td> In</td><td> Indicates the level of the interrupt the CPU is acknowledging when cpujack is high</td>
<td> cpujack</td><td> 1</td><td> Out</td><td> Interrupt acknowledge signal. The exact timing depends on the CPU core implementation</td>
<td> cpu_start_access</td><td> 1</td><td> Out</td><td> Start Access signal indicating the start of a data transfer and that the cpu_adr, cpu_dataout, cpu_rwn and cpu_acode signals are all valid. This signal is only asserted during the first cycle of an access.</td>
<td> cpu_ben[1:0]</td><td> 2</td><td> Out</td><td> Byte enable signals.</td>
<td> dram_cpu_data[255:0]</td><td> 256</td><td> In</td><td> Read data from the DRAM.</td>
<td> diu_cpu_rreq</td><td> 1</td><td> Out</td><td> Read request to the DIU.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
109
<td> diu_cpu_rack</td><td> 1</td><td> In</td><td> Acknowledge from DIU that read request has been accepted.</td>
<td> diu_cpu_rvalid</td><td> 1</td><td> In</td><td> Signal from DIU indicating that valid read data is on the dram_cpu_data bus</td>
<td> cpu_diu_wdatavalid</td><td> 1</td><td> Out</td><td> Signal from the CPU to the DIU indicating that the data currently on the cpu_diu_wdata bus is valid and should be committed to the DIU posted write buffer</td>
<td> diu_cpu_write_rdy</td><td> 1</td><td> In</td><td> Signal from the DIU indicating that the posted write buffer is empty</td>
<td> cpu_diu_wdadr[21:4]</td><td> 18</td><td> Out</td><td> Write address bus to the DIU</td>
<td> cpu_diu_wdata[127:0]</td><td> 128</td><td> Out</td><td> Write data bus to the DIU</td>
<td> cpu_diu_wmask[15:0]</td><td> 16</td><td> Out</td><td> Write mask for the cpu_diu_wdata bus. Each bit corresponds to a byte of the 128-bit cpu_diu_wdata bus.</td>
<td colspan="4"> LEON AHB bridge to MMU Control Block signals</td>
<td> cpu_mmu_adr</td><td> 32</td><td> Out</td><td> CPU Address Bus.</td>
<td> mmu_cpu_data</td><td> 32</td><td> In</td><td> Data bus from the MMU</td>
<td> mmu_cpu_rdy</td><td> 1</td><td> In</td><td> Ready signal from the MMU</td>
<td> cpu_mmu_acode</td><td> 2</td><td> Out</td><td> Access code signals to the MMU</td>
<td> mmu_cpu_berr</td><td> 1</td><td> In</td><td> Bus error signal from the MMU</td>
<td> dram_access_en</td><td> 1</td><td> In</td><td> DRAM access enable signal. A DRAM access cannot be initiated unless it has been enabled by the MMU control unit.</td>
Description:
The LEON AHB bridge must ensure that all CPU bus transactions are functionally correct and that the timing requirements are met. The AHB bridge also implements a 128-bit DRAM write buffer to improve the efficiency of DRAM writes, particularly for multiple successive writes to DRAM. The
AHB bridge is also responsible for ensuring endianness coherency i.e. guaranteeing that the correct data appears in the correct position on the data buses (hrdata, cpu_dataout and cpu_mmu_wdata) for every type of access. This is a requirement because the LEON uses big-endian addressing while the rest of SoPEC is little-endian.
The LEON AHB bridge will assert request signals to the DIU if the MMU control block deems the access to be a legal access. The validity (i.e. is the CPU running in the correct mode for the address space being accessed) of an access is determined by the contents of the relevant RegionNControl register. As the SPARC standard requires that all accesses are aligned to their word size (i.e. byte, half-word, word or double-word) and so it is not possible for an access to traverse a 256-bit boundary (as required by the DIU). Invalid DRAM accesses are not propagated to the DIU and will result in an error response (ahbso.hresp = Ό1’) on the AHB. The DIU bus protocol
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
110 is described in more detail in section 20.9. The DIU will return a 256-bit dataword on dram_cpu_data[255:0] for every read access.
The CPU subsystem bus protocol is described in section 11.4.3. While the LEON AHB bridge performs the protocol translation between AHB and the CPU subsystem bus the select signals for each block are generated by address decoding in the CPU subsystem bus interface. The CPU subsystem bus interface also selects the correct read data bus, ready and error signals for the block being addressed and passes these to the LEON AHB bridge which puts them on the AHB bus. It is expected that some signals (especially those external to the CPU block) will need to be registered here to meet the timing requirements. Careful thought will be required to ensure that overall CPU access times are not excessively degraded by the use of too many register stages.
11.6.6.1.1 DRAM write buffer
The DRAM write buffer improves the efficiency of DRAM writes by aggregating a number of CPU write accesses into a single DIU write access. This is achieved by checking to see if a CPU write is to an address already in the write buffer and if so the write is immediately acknowledged (i.e. the ahbsi.hready signal is asserted without any wait states) and the DRAM write buffer updated accordingly. When the CPU write is to a DRAM address other than that in the write buffer then the current contents of the write buffer are sent to the DIU (where they are placed in the posted write buffer) and the DRAM write buffer is updated with the address and data of the CPU write. The DRAM write buffer consists of a 128-bit data buffer, an 18-bit write address tag and a 16-bit write mask. Each bit of the write mask indicates the validity of the corresponding byte of the write buffer as shown in Figure 21 below.
The operation of the DRAM write buffer is summarised by the following set of rules:
1) The DRAM write buffer only contains DRAM write data i.e. peripheral writes go directly to the addressed peripheral.
) CPU writes to locations within the DRAM write buffer or to an empty write buffer (i.e. the write mask bits are all 0) complete with zero wait states regardless of the size of the write (byte/halfword/word/ double-word).
) The contents of the DRAM write buffer are flushed to DRAM whenever a CPU write to a location outside the write buffer occurs, whenever a CPU read from a location within the write buffer occurs or whenever a write to a peripheral register occurs.
) A flush resulting from a peripheral write will not cause any extra wait states to be inserted in the peripheral write access.
5) Flushes resulting from a DRAM accesses will cause wait states to be inserted until the DIU posted write buffer is empty. If the DIU posted write buffer is empty at the time the flush is required then no wait states will be inserted for a flush resulting from a CPU write or one wait state will be inserted for a flush resulting from a CPU read (this is to ensure that the DIU sees the write request ahead of the read request). Note that in this case further wait states will also be inserted as a result of the delay in servicing the read request by the DIU.
11.6.6.1.2 DIU interface waveforms
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
111
Figure 22 below depicts the operation of the AHB bridge over a sample sequence of DRAM transactions consisting of a read into the DCache, a double-word store to an address other than that currently in the DRAM write buffer followed by an ICache line refill. To avoid clutter a number of AHB control signals that are inputs to the MMU have been grouped together as ahbsi.CONTROL and only the ahbso.HREADY is shown of the output AHB control signals.
The first transaction is a single word load (’LD’). The MMU (specifically the MMU control block) uses the first cycle of every access (i.e. the address phase of an AHB transaction) to determine whether or not the access is a legal access. The read request to the DIU is then asserted in the following cycle (assuming the access is a valid one) and is acknowledged by the DIU a cycle later. Note that the time from cpu_diu_rreq being asserted and diu_cpu_rack being asserted is variable as it depends on the DIU configuration and access patterns of DIU requestors. The AHB bridge will insert wait states until it sees the diu_cpu_rvalid signal is high, indicating the data (’LD 1 ’) on the dram_cpu_data bus is valid. The AHB bridge terminates the read access in the same cycle by asserting the ahbso.HREADY signal (together with an OKAY’ HRESP code). The AHB bridge also selects the appropriate 32 bits (’RDT) from the 256-bit DRAM line data (’LDT) returned by the DIU corresponding to the word address given by A1.
The second transaction is an AHB two-beat incrementing burst issued by the LEON acache block in response to the execution of a double-word store instruction. As LEON is a big endian processor the address issued (Ά2’) during the address phase of the first beat of this transaction is the address of the most significant word of the double-word while the address for the second beat (’A3’) is that of the least significant word i.e. A3 = A2 +4. The presence of the DRAM write buffer allows these writes to complete without the insertion of any wait states. This is true even when, as shown here, the DRAM write buffer needs to be flushed into the DIU posted write buffer, provided the DIU posted write buffer is empty. If the DIU posted write buffer is not empty (as would be signified by diu_cpu_write_rdy being low) then wait states would be inserted until it became empty. The cpu_diu_wdata buffer builds up the data to be written to the DIU over a number of transactions (’BDT and ’BD2’ here) while the cpu_diu_wmask records every byte that has been written to since the last flush - in this case the lowest word and then the second lowest word are written to as a result of the double-word store operation.
The final transaction shown here is a DRAM read caused by an ICache miss. Note that the pipelined nature of the AHB bus allows the address phase of this transaction to overlap with the final data phase of the previous transaction. All ICache misses appear as single word loads (’LD’) on the AHB bus. In this case we can see that the DIU is slower to respond to this read request than to the first read request because it is processing the write access caused by the DRAM write buffer flush. The ICache refill will complete just after the window shown in Figure 22.
11.6.6.2 CPU Subsystem Bus Interface
The CPU Subsystem Interface block handles all valid accesses to the peripheral blocks that comprise the CPU Subsystem.
Table 23. CPU Subsystem Bus Interface I/Os
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
112
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td> Global SoPEC signals</td><td></td><td></td><td></td>
<td> prst_n</td><td> 1</td><td> In</td><td> Global reset. Synchronous to pclk, active low.</td>
<td> pclk</td><td> 1</td><td> In</td><td> Global clock</td>
<td> Toplevel/Common CPU Su</td><td colspan="2"> Dsystem Bus</td><td> nterface signals</td>
<td> cpu_cpr_sel</td><td> 1</td><td> Out</td><td> CPR block select.</td>
<td> cpu_gpio_sel</td><td> 1</td><td> Out</td><td> GPIO block select.</td>
<td> cpu_icu_sel</td><td> 1</td><td> Out</td><td> ICU block select.</td>
<td> cpu_lss_sel</td><td> 1</td><td> Out</td><td> LSS block select.</td>
<td> cpu_pcu_sel</td><td> 1</td><td> Out</td><td> PCU block select.</td>
<td> cpu_scb_sel</td><td> 1</td><td> Out</td><td> SCB block select.</td>
<td> cpu_tim_sel</td><td> 1</td><td> Out</td><td> Timers block select.</td>
<td> cpu_rom_sel</td><td> 1</td><td> Out</td><td> ROM block select.</td>
<td> cpu_pss_sel</td><td> 1</td><td> Out</td><td> PSS block select.</td>
<td> cpu_diu_sel</td><td> 1</td><td> Out</td><td> DIU block select..</td>
<td> cpr_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the CPR block</td>
<td> gpio_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the GPIO block</td>
<td> icu_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the ICU block</td>
<td> lss_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the LSS block</td>
<td> pcu_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the PCU block</td>
<td> scb_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the SCB block</td>
<td> tim_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the Timers block</td>
<td> rom_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the ROM block</td>
<td> pss_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the PSS block</td>
<td> diu_cpu_data[31:0]</td><td> 32</td><td> In</td><td> Read data bus from the DIU block</td>
<td> cpr_cpu_rdy</td><td> 1</td><td> In</td><td> Ready signal to the CPU. When cpr_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu__dataout has been registered by the CPR block and for a read cycle this means the data on cpr_cpu_data is valid.</td>
<td> gpio_cpu_rdy</td><td> 1</td><td> In</td><td> GPIO ready signal to the CPU.</td>
<td> icu_cpu_rdy</td><td> 1</td><td> In</td><td> ICU ready signal to the CPU.</td>
<td> lss_cpu_rdy</td><td> 1</td><td> In</td><td> LSS ready signal to the CPU.</td>
<td> pcu_cpu_rdy</td><td> 1</td><td> In</td><td> PCU ready signal to the CPU.</td>
<td> scb_cpu_rdy</td><td> 1</td><td> In</td><td> SCB ready signal to the CPU.</td>
<td> tim_cpu_rdy</td><td> 1</td><td> In</td><td> Timers block ready signal to the CPU.</td>
<td> rom_cpu_rdy</td><td> 1</td><td> In</td><td> ROM block ready signal to the CPU.</td>
<td> pss_cpu_rdy</td><td> 1</td><td> In.</td><td> PSS block ready signal to the CPU.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
113
<td> diu_cpu_rdy</td><td> 1</td><td> In</td><td> DIU register block ready signal to the CPU.</td>
<td> cpr_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the CPR block</td>
<td> gpio_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the GPIO block</td>
<td> icu_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the ICU block</td>
<td> lss_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the LSS block</td>
<td> pcu_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the PCU block</td>
<td> scb_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the SCB block</td>
<td> tim_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the Timers block</td>
<td> rom_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the ROM block</td>
<td> pss_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the PSS block</td>
<td> diu_cpu_berr</td><td> 1</td><td> In</td><td> Bus Error signal from the DIU block</td>
<td colspan="4"> CPU Subsystem Bus Interface to MMU Control Block signals</td>
<td> cpu_adr[19:12]</td><td> 8</td><td> In</td><td> Toplevel CPU Address bus. Only bits 19-12 are required to decode the peripherals address space</td>
<td> peri_access_en</td><td> 1</td><td> In</td><td> Enable Access signal. A peripheral access cannot be initiated unless it has been enabled by the MMU Control Unit</td>
<td> peri_mmu_data[31:0]</td><td> 32</td><td> Out</td><td> Data bus from the selected peripheral</td>
<td> peri_mmu_rdy</td><td> 1</td><td> Out</td><td> Data Ready signal. Indicates the data on the peri_mmu_data bus is valid for a read cycle or that the data was successfully written to the peripheral for a write cycle.</td>
<td> peri_mmu_berr</td><td> 1</td><td> Out</td><td> Bus Error signal. Indicates a bus error has occurred in accessing the selected peripheral</td>
<td colspan="4"> CPU Subsystem Bus Interface to LEON AHB bridge signals</td>
<td> cpu_start_access</td><td> 1</td><td> In</td><td> Start Access signal from the LEON AHB bridge indicating the start of a data transfer and that the cpu_adr, cpu_dataout, cpu_rwn and cpu_acode signals are all valid. This signal is only asserted during the first cycle of an access.</td>
Description:
The CPU Subsystem Bus Interface block performs simple address decoding to select a peripheral and multiplexing of the returned signals from the various peripheral blocks. The base addresses used for the decode operation are defined in Table . Note that access to the MMU configuration 5 registers are handled by the MMU Control Block rather than the CPU Subsystem Bus Interface block. The CPU Subsystem Bus Interface block operation is described by the following pseudocode:
masked_cpu_adr = cpu_adr[17:12]
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
114 case (masked_cpu_adr) when TIM_base[17:12] cpu_tim_sel = peri_access_en signal will have the peri_mmu_data = tim_cpu_data block selects // The peri_access_en // timing required for peri_mmu_rdy = tim_cpu_rdy peri_mmu_berr = tim_cpu_berr all_other_selects = 0 // Shorthand to ensure other cpu_block_sel signals // remain deasserted when LSS_base[17:12] cpu_lss_sel = peri_access_en peri_mmu_data = lss_cpu_data peri_mmu_rdy = lss_cpu_rdy peri_mmu_berr = lss_cpu_berr all_other_selects = 0 when GPIO_base[17:12] cpu_gpio_sel = peri_access_en peri_mmu_data = gpio_cpu_data peri_mmu_rdy = gpio_cpu_rdy peri_mmu_berr = gpio_cpu_berr all other selects = 0 when SCB_base[17:12] cpu_scb_sel = peri_access_en peri_mmu_data = scb_cpu_data peri_mmu_rdy = scb_cpu_rdy peri_mmu_berr = scb_cpu_berr all_other_selects = 0 when ICU_base[17:12] cpu_icu_sel = peri_access_en peri_mmu_data = icu_cpu_data peri_mmu_rdy = icu_cpu_rdy peri_mmu_berr = icu_cpu_berr all_other_selects = 0 when CPR_base[17:12] cpu_cpr_sel = peri_access_en peri_mmu_data = cpr_cpu_data peri_mmu_rdy = cpr_cpu_rdy peri_mmu_berr = cpr_cpu_berr all_other_selects = 0
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
115 when ROM_base[17:12] cpu_rom_sel = peri_access_en peri_mmu_data = rom__cpu_data peri_mmu_rdy = rom._cpu._rdy peri_mmu_berr = rom_cpu_berr all_other_selects = 0 when PSS_base [17:12] cpu_jpss_sel = peri_access_en peri_mmu_data = pss__cpu_data peri_mmu_rdy = pss_cpu_rdy peri_mmu_berr = pss_cpu_berr all_other_selects = 0 when DIU_base[17:12] cpu_diu__sel = peri_access_en peri_mmu_data = diu_cpu_data peri_mmu_rdy = diu_cpu_rdy peri_mmu_berr = diu_cpu_berr all_other_selects = 0 when PCU_base[17:12] cpu_pcu_sel = peri_access_en peri_mmu_data = pcu_cpu_data peri_mmu_rdy = pcu_cpu_rdy peri_mmu_berr = pcu_cpu_berr all_other_selects = 0 when others all_block_selects = 0 peri_mmu_data = 0x00000000 peri_mmu_rdy = 0 peri_mmu_berr = 1 end case
11.6.6.3 MMU Control Block
The MMU Control Block determines whether every CPU access is a valid access. No more than one cycle is to be consumed in determining the validity of an access and all accesses must terminate with the assertion of either mmu_cpu_rdy or mmu_cpu_berr. To safeguard against stalling the CPU a simple bus timeout mechanism will be supported.
Table 24. MMU Control Block I/Os
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td colspan="4"> Global SoPEC signals</td>
<td> prst_n</td><td> 1</td><td> In</td><td> Global reset. Synchronous to pclk, active low.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
116
<td> pclk</td><td> 1</td><td> In</td><td> Global clock</td>
<td colspan="4"> Toplevel/Common MMU Control Block signals</td>
<td> cpu_adr[21:2]</td><td> 22</td><td> Out</td><td> Address bus for both DRAM and peripheral access.</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> Out</td><td> CPU access code signals (cpu_mmu_acode) retimed to meet the CPU Subsystem Bus timing requirements</td>
<td> dram_access_en</td><td> 1</td><td> Out</td><td> DRAM Access Enable signal. Indicates that the current CPU access is a valid DRAM access.</td>
<td colspan="2"> MMU Control Block to LEON A</td><td colspan="2"> HB bridge signals</td>
<td> cpu_mmu_adr[31:0]</td><td> 32</td><td> In</td><td> CPU core address bus.</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Toplevel CPU data bus</td>
<td> mmu_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Data bus to the CPU core. Carries the data for all CPU read operations</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Toplevel CPU Read/notWrite signal.</td>
<td> cpu_mmu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU access code signals</td>
<td> mmu_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU core. Indicates the completion of all valid CPU accesses.</td>
<td> mmu_cpu_berr</td><td> 1</td><td> Out</td><td> Bus Error signal to the CPU core. This signal is asserted to terminate an invalid access.</td>
<td> cpu_start_access</td><td> 1</td><td> In</td><td> Start Access signal from the LEON AHB bridge indicating the start of a data transfer and that the cpu_adr, cpu_dataout, cpu_rwn and cpu_acode signals are all valid. This signal is only asserted during the first cycle of an access.</td>
<td> cpujack</td><td> 1</td><td> In</td><td> Interrupt Acknowledge signal from the CPU. This signal is only asserted during an interrupt acknowledge cycle.</td>
<td> cpu_ben[1:0]</td><td> 2</td><td> In</td><td> Byte enable signals indicating which bytes of the 32bit bus are being accessed.</td>
<td colspan="4"> MMU Control Block to CPU Subsystem Bus Interface signals</td>
<td> cpu_adr[17:12]</td><td> 8</td><td> Out</td><td> Toplevel CPU Address bus. Only bits 17-12 are required to decode the peripherals address space</td>
<td> peri_access_en</td><td> 1</td><td> Out</td><td> Enable Access signal. A peripheral access cannot be initiated unless it has been enabled by the MMU Control Unit</td>
<td> peri_mmu_data[31:0]</td><td> 32</td><td> In</td><td> Data bus from the selected peripheral</td>
<td> peri_mmu_rdy</td><td> 1</td><td> In</td><td> Data Ready signal. Indicates the data on the peri_mmu_data bus is valid for a read cycle or that the data was successfully written to the peripheral for a write cycle.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
117
<td> peri_mmu_berr</td><td> 1</td><td> In</td><td> Bus Error signal. Indicates a bus error has occurred in</td>
<td></td><td></td><td></td><td> accessing the selected peripheral</td>
Description:
The MMU Control Block is responsible for the MMU’s core functionality, namely determining whether or not an access to any part of the address map is valid. An access is considered valid if it is to a mapped area of the address space and if the CPU is running in the appropriate mode for that address space. Furthermore the MMU control block must correctly handle the special cases that are: an interrupt acknowledge cycle, a reset exception vector fetch, an access that crosses a 256bit DRAM word boundary and a bus timeout condition. The following pseudocode shows the logic required to implement the MMU Control Block functionality. It does not deal with the timing relationships of the various signals - it is the designer’s responsibility to ensure that these relationships are correct and comply with the different bus protocols. For simplicity the pseudocode is split up into numbered sections so that the functionality may be seen more easily.
It is important to note that the style used for the pseudocode will differ from the actual coding style used in the RTL implementation. The pseudocode is only intended to capture the required functionality, to clearly show the criteria that need to be tested rather than to describe how the implementation should be performed. In particular the different comparisons of the address used to determine which part of the memory map, which DRAM region (if applicable) and the permission checking should all be performed in parallel (with results ORed together where appropriate) rather than sequentially as the pseudocode implies.
PS0 Description: This first segment of code defines a number of constants and variables that are used elsewhere in this description. Most signals have been defined in the I/O descriptions of the MMU sub-blocks that precede this section of the document. The post_reset_state variable is used later (in section PS4) to determine if we should trap a null pointer access.
PS0:
const UnusedBottom = 0x002AC000 const DRAMTop = Ox4027FFFF const UserDataSpace = bOl const UserProgramSpace = bOO const SupervisorDataSpace = bll const SupervisorProgramSpace = blO const ResetExceptionCycles = 0x2 cpu__adr_peri_masked [5 : 0] = cpu_mmu_adr[17:12] cpu_adr_dram_masked[16:0] = cpu_mmu_adr & 0x003FFFE0 if (prst_n == 0) then // Initialise everything cpu_adr = cpu_mmu_adr[21:2] peri_access_en = 0
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
118 dram_access_en = 0 mmu_cpu_data = peri_mmu_data mmu_cpu_rdy = 0 mmu_cpu_berr = 0 post_reset_state = TRUE access_initiated = FALSE cpu_access_cnt = 0 // The following is used to determine if we are coming out of reset for the purposes of // reset exception vector redirection. There may be a convenient signal in the CPU core // that we could use instead of this.
if ((cpu_start_access == 1) AND (cpu_access_cnt <
ResetExceptionCycles) AND (clock_tick == TRUE)) then cpu_access_cnt = cpu_access_cnt +1 else post_reset_state = FALSE
PS1 Description: This section is at the top of the hierarchy that determines the validity of an access. The address is tested to see which macro-region (i.e. Unused, CPU Subsystem or DRAM) it falls into or whether the reset exception vector is being accessed.
PSI:
if (cpu_mmu_adr >= UnusedBottom) then
<td> // The access is to an invalid area of the address space. See section PS2</td>
<td> elsif ((cpu_mmu_adr > DRAMTop) AND (cpu_mmu_adr <</td>
<td> UnusedBottom)) then</td>
<td> // We are in the CPU Subsystem/PEP Subsystem address</td>
<td> space. See section PS3</td>
// Only remaining possibility is an access to DRAM address space // First we need to intercept the special case for the reset exception vector elsif (cpu_mmu_adr < 0x00000010) then // The reset exception is being accessed. See section PS4
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
119
<td> elsif ((cpu_adr_dram_masked</td><td> >=</td><td> RegionOBottom)</td><td> AND</td>
<td> ( cpu_adr_dram__masked < =</td><td></td><td></td><td></td>
<td> RegionOTop) ) then</td><td></td><td></td><td></td>
<td> // We are in RegionO. See</td><td> section</td><td> PS5</td><td></td>
<td> elsif ((cpu_adr_dram_masked</td><td> >=</td><td> RegionNBottom)</td><td> AND</td>
(cpu_adr_dram_masked <=
RegionNTop) ) then // we are in RegioriN // Repeat the RegionO (i.e. section PS5) logic for each of Regionl to Region7 else // We could end up here if there were gaps in the DRAM regions peri_access_en = 0 dram_access_en = 0 mmu_cpu_berr = 1 // we have an unknown access error, most likely due to hitting mmu_cpu_rdy = 0 // a gap in the DRAM regions // Only thing remaining is to implement a bus timeout function. This is done in PS6 end
PS2 Description: Accesses to the large unused area of the address space are trapped by this section. No bus transactions are initiated and the mmu_cpu_berr signal is asserted.
PS2:
elsif (cpu_mmu_adr >= UnusedBottom) then peri_access_en = 0 // The access is to an invalid area of the address space dram_access_en = 0 mmu_cpu_berr = 1 mmu_cpu_rdy = 0
PS3 Description: This section deals with accesses to CPU Subsystem peripherals, including the MMU itself. If the MMU registers are being accessed then no external bus transactions are required. Access to the MMU registers is only permitted if the CPU is making a data access from supervisor mode, otherwise a bus error is asserted and the access terminated. For non-MMU accesses then transactions occur over the CPU Subsystem Bus and each peripheral is responsible for determining whether or not the CPU is in the correct mode (based on the cpu_acode signals) to be permitted
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
120 access to its registers. Note that all of the PEP registers are accessed via the PCU which is on the CPU Subsystem Bus.
PS3:
elsif ((cpu_mmu_adr > DRAMTop) AND (cpu_mmu_adr <
UnusedBottom)) then // We are in the CPU Subsystem/PEP Subsystem address space cpu_adr = cpu_mmu_adr[21:2] if (cpu_adr_peri_masked == MMU_base) then // access is to local registers peri_access_en = 0 dram access en = 0 if (cpu_acode == SupervisorDataSpace) then for (i=0; i<26; i++) { if ((i == cpu_mmu_adr[6:2]) then addressed register if (cpu_rwn == 1) then mmu_cpu_data[16: 0] = MMURegti] is one of the mmu_cpu_rdy = 1 in Table // selects the // MMUReg[i] /1 registers mmu_cpu_berr = 0 else // write cycle
MMUReg[ i ] = cpu_dataoût[16:0] mmu_cpu_rdy = 1 mmu_cpu_berr = 0 else // there is no register mapped to this address mmu_cpu_berr = 1 // do we really want a bus_error here as registers mmu_cpu_rdy = 0 // are just mirrored in other blocks else // we have an access violation mmu_cpu_berr = 1 mmu_cpu_rdy = 0 else // access is to something else on the CPU Subsystem
Bus
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
121 peri_access_en = 1 dram_access_en = 0 mmu_cpu_data = peri_mmu_data mmu_cpu_rdy = peri_mmu_rdy mmu_cpu_berr = peri_mmu__berr
PS4 Description: The only correct accesses to the locations beneath 0x00000010 are fetches of the reset trap handling routine and these should be the first accesses after reset. Here we trap all other accesses to these locations regardless of the CPU mode. The most likely cause of such an access will be the use of a null pointer in the program executing on the CPU.
PS4:
elsif (cpu_mmu_adr < 0x00000010) then if (post_reset_state == TRUE)) then cpu_adr = cpu_mmu_adr[21:2] peri_access_en = 1 dram_access_en = 0 mmu_cpu_data = peri_mmu_data mmu_cpu_rdy = peri_mmu_rdy mmu_cpu_berr = peri_mmu_berr else // we have a problem (almost certainly a null pointer) peri_access_en = 0 dram_access_en = 0 mmu_cpu_berr = 1 mmu_cpu_rdy = 0
PS5 Description: This large section of pseudocode simply checks whether the access is within the bounds of DRAM RegionO and if so whether or not the access is of a type permitted by the RegionOControl register. If the access is permitted then a DRAM access is initiated. If the access is not of a type permitted by the RegionOControl register then the access is terminated with a bus error.
PS5:
elsif ((cpu_adr_dram_masked >= RegionOBottom) AND (cpu_adr_dram_masked <=
RegionOTop) ) then // we are in RegionO cpu_adr = cpu_mmu_adr[21:2] if (cpu_rwn == 1) then
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
122 if ((cpu_acode == SupervisorProgramSpace AND
RegionOControl[2] == 1))
<td colspan="2"> OR (cpu_acode</td><td> ==</td><td> UserProgramSpace AND</td>
<td> RegionOControl[5] ==</td><td> 1)) then</td><td></td><td></td>
<td></td><td> //</td><td> this</td><td> is a valid instruction</td>
<td> fetch from RegionO</td><td></td><td></td><td></td>
<td></td><td> //</td><td> The</td><td> dram_cpu_data bus goes</td>
<td> directly to the LEON</td><td></td><td></td><td></td>
<td></td><td> //</td><td> AHB</td><td> bridge which also handles</td>
the hready generation peri_access_en = 0 dram_access_en = 1 mmu_cpu_berr = 0
<td colspan="2"> elsif ((cpu_acode ==</td><td> SupervisorDataSpace</td><td> AND</td>
<td> RegionOControl[0]</td><td> == 1)</td><td></td><td></td>
<td> OR</td><td> (cpu_acode ==</td><td> UserDataSpace</td><td> AND</td>
<td> RegionOControl[3]</td><td> == 1)) then</td><td></td><td></td>
<td></td><td></td><td> // this is a</td><td> valid</td>
read access from RegionO peri_access_en = 0 dram_access_en = 1 mmu_cpu_berr = 0 else violation peri_access_en = 0 dram_access_en = 0 mmu_cpu_berr = 1 mmu_cpu_rdy = 0 // we have an access else // it is a write access
<td colspan="2"> if ((cpu_acode ==</td><td> SupervisorDataSpace</td><td> AND</td>
<td> RegionOControl[1]</td><td> == 1)</td><td></td><td></td>
<td> OR</td><td> (cpu_acode</td><td> == UserDataSpace</td><td> AND</td>
<td> RegionOControl[4]</td><td> == 1)) then</td><td></td><td></td>
<td></td><td></td><td> // this is a</td><td> valid</td>
write access to RegionO peri_access_en = 0 dram_access_en = 1 mmu_cpu_berr = 0
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
123 else // we have an access violation peri_access_en = 0 dram_access_en = 0 mmu_cpu_berr = 1 mmu_cpu_rdy = 0
PS6 Description: This final section of pseudocode deals with the special case of a bus timeout. This occurs when an access has been initiated but has not completed before the BusTimeout number of pclk cycles. While access to both DRAM and CPU/PEP Subsystem registers will take a variable number of cycles (due to DRAM traffic, PCU command execution or the different timing required to access registers in imported IP) each access should complete before a timeout occurs. Therefore it should not be possible to stall the CPU by locking either the CPU Subsystem or DIU buses. However given the fatal effect such a stall would have it is considered prudent to implement bus timeout detection.
PS6:
// Only thing remaining is to implement a bus timeout function.
if ((cpu_start_access == 1) then access_initiated = TRUE timeout_countdown = BusTimeout if ((mmu_cpu_rdy == 1 ) OR (mmu_cpu_berr ==1 )) then access_initiated = FALSE peri_access_en = 0 dram_access_en = 0 if ((clock_tick == TRUE) AND (access_initiated == TRUE) AND (BusTimeout 1= 0)) if (timeout_countdown > 0) then timeout_countdown-else // timeout has occurred peri_access_en = 0 // abort the access dram_access_en = 0 mmu_cpu_berr = 1 mmu_cpu_rdy = 0
11.7 LEON Caches
The version of LEON implemented on SoPEC features 1 kB of ICache and 1 kB of DCache. Both caches are direct mapped and feature 8 word lines so their data RAMs are arranged as 32 x 256-bit
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
124 and their tag RAMs as 32 x 30-bit (itag) or 32 x 32-bit (dtag). Like most of the rest of the LEON code used on SoPEC the cache controllers are taken from the Ieon2-1.0.7 release. The LEON cache controllers and cache RAMs have been modified to ensure that an entire 256-bit line is refilled at a time to make maximum use out of the memory bandwidth offered by the embedded DRAM organization (DRAM lines are also 256-bit). The data cache controller has also been modified to ensure that user mode code cannot access the DCache contents unless it is authorised to do so. A block diagram of the LEON CPU core as implemented on SoPEC is shown in Figure 23 below. In this diagram dotted lines are used to indicate hierarchy and red items represent signals or wrappers added as part of the SoPEC modifications. LEON makes heavy use of VHDL records and the records used in the CPU core are described in Table 25. Unless otherwise stated the records are defined in the iface.vhd file (part of the LEON release) and this should be consulted for a complete breakdown of the record elements.
Table 25. Relevant LEON records
<td> Record Name</td><td> Description</td>
<td> rfi</td><td> Register File Input record. Contains address, datain and control signals for the register file.</td>
<td> rfo</td><td> Register File Output record. Contains the data out of the dual read port register file.</td>
<td> ici</td><td> Instruction Cache In record. Contains program counters from different stages of the pipeline and various control signals</td>
<td> ico</td><td> Instruction Cache Out record. Contains the fetched instruction data and various control signals. This record is also sent to the DCache (i.e. icol) so that diagnostic accesses (e.g. Ida/sta) can be serviced.</td>
<td> dci</td><td> Data Cache In record. Contains address and data buses from different stages of the pipeline (execute & memory) and various control signals</td>
<td> dco</td><td> Data Cache Out record. Contains the data retrieved from either memory or the caches and various control signals. This record is also sent to the ICache (i.e. dcol) so that diagnostic accesses (e.g. Ida/sta) can be serviced.</td>
<td> iui</td><td> Integer Unit In record. This record contains the interrupt request level and a record for use with LEONs Debug Support Unit (DSU)</td>
<td> iuo</td><td> Integer Unit Out record. This record contains the acknowledged interrupt request level with control signals and a record for use with LEONs Debug Support Unit (DSU)</td>
<td> mcii</td><td> Memory to Cache Icache In record. Contains the address of an Icache miss and various control signals</td>
<td> mcio</td><td> Memory to Cache Icache Out record. Contains the returned data from memory and various control signals</td>
<td> mcdi</td><td> Memory to Cache Dcache In record. Contains the address and data of a</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
125
<td></td><td> Dcache miss or write and various control signals</td>
<td> mcdo</td><td> Memory to Cache Dcache Out record. Contains the returned data from memory and various control signals</td>
<td> ahbi</td><td> AHB In record. This is the input record for an AHB master and contains the data bus and AHB control signals. The destination for the signals in this record is the AHB controller. This record is defined in the amba.vhd file</td>
<td> ah bo</td><td> AHB Out record. This is the output record for an AHB master and contains the address and data buses and AHB control signals. The AHB controller drives the signals in this record. This record is defined in the amba.vhd file</td>
<td> ahbsi</td><td> AHB Slave In record. This is the input record for an AHB slave and contains the address and data buses and AHB control signals. It is used by the DCache to facilitate cache snooping (this feature is not enabled in SoPEC). This record is defined in the amba.vhd file</td>
<td> crami</td><td> Cache RAM In record. This record is composed of records of records which contain the address, data and tag entries with associated control signals for both the ICache RAM and DCache RAM</td>
<td> cramo</td><td> Cache RAM Out record. This record is composed of records of records which contain the data and tag entries with associated control signals for both the ICache RAM and DCache RAM</td>
<td> iline_rdy</td><td> Control signal from the ICache controller to the instruction cache memory. This signal is active (high) when a full 256-bit line (on dram_cpu_data) is to be written to cache memory.</td>
<td> dline_rdy</td><td> Control signal from the DCache controller to the data cache memory. This signal is active (high) when a full 256-bit line (on dram_cpu_data) is to be written to cache memory.</td>
<td> dram_cpu_data</td><td> 256-bit data bus from the embedded DRAM</td>
11.7.1 Cache controllers
The LEON cache module consists of three components: the ICache controller (icache.vhd), the DCache controller (dcache.vhd) and the AHB bridge (acache.vhd) which translates all cache misses into memory requests on the AHB bus.
In order to enable full line refill operation a few changes had to be made to the cache controllers. The ICache controller was modified to ensure that whenever a location in the cache was updated (i.e. the cache was enabled and was being refilled from DRAM) all locations on that cache line had their valid bits set to reflect the fact that the full line was updated. The iline_rdy signal is asserted by the ICache controller when this happens and this informs the cache wrappers to update all locations 10 in the idata RAM for that line.
A similar change was made to the DCache controller except that the entire line was only updated following a read miss and that existing write through operation was preserved. The DCache controller uses the dline_rdy signal to instruct the cache wrapper to update all locations in the ddata RAM for a line. An additional modification was also made to ensure that a double-word load
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
126 instruction from a non-cached location would only result in one read access to the DIU i.e. the second read would be serviced by the data cache. Note that if the DCache is turned off then a double-word load instruction will cause two DIU read accesses to occur even though they will both be to the same 256-bit DRAM line.
The DCache controller was further modified to ensure that user mode code cannot access cached data to which it does not have permission (as determined by the relevant RegionNControl register settings at the time the cache line was loaded). This required an extra 2 bits of tag information to record the user read and write permissions for each cache line. These user access permissions can be updated in the same manner as the other tag fields (i.e. address and valid bits) namely by line refill, STA instruction or cache flush. The user access permission bits are checked every time user code attempts to access the data cache and if the permissions of the access do not agree with the permissions returned from the tag RAM then a cache miss occurs. As the MMU evaluates the access permissions for every cache miss it will generate the appropriate exception for the forced cache miss caused by the errant user code. In the case of a prohibited read access the trap will be immediate while a prohibited write access will result in a deferred trap. The deferred trap results from the fact that the prohibited write is committed to a write buffer in the DCache controller and program execution continues until the prohibited write is detected by the MMU which may be several cycles later. Because the errant write was treated as a write miss by the DCache controller (as it did not match the stored user access permissions) the cache contents were not updated and so remain coherent with the DRAM contents (which do not get updated because the MMU intercepted the prohibited write). Supervisor mode code is not subject to such checks and so has free access to the contents of the data cache.
In addition to AHB bridging, the ACache component also performs arbitration between ICache and DCache misses when simultaneous misses occur (the DCache always wins) and implements the Cache Control Register (CCR). The Ieon2-1.0.7 release is inconsistent in how it handles cacheability: For instruction fetches the cacheability (i.e. is the access to an area of memory that is cacheable) is determined by the ICache controller while the ACache determines whether or not a data access is cacheable. To further complicate matters the DCache controller does determine if an access resulting from a cache snoop by another AHB master is cacheable (Note that the SoPEC ASIC does not implement cache snooping as it has no need to do so). This inconsistency has been cleaned up in more recent LEON releases but is preserved here to minimise the number of changes to the LEON RTL. The cache controllers were modified to ensure that only DRAM accesses (as defined by the SoPEC memory map) are cached.
The only functionality removed as a result of the modifications was support for burst fills of the ICache. When enabled burst fills would refill an ICache line from the location where a miss occurred up to the end of the line. As the entire line is now refilled at once (when executing from DRAM) this functionality is no longer required. Furthermore more substantial modifications to the ICache controller would be needed if we wished to preserve this function without adversely affecting full line refills. The CCR was therefore modified to ensure that the instruction burst fetch bit (bit16) was tied low and could not be written to.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
127
11.7.1.1 LEON Cache Control Register
The CCR controls the operation of both the I and D caches. Note that the bitfields used on the SoPEC implementation of this register are based on the LEON v1.0.7 implementation and some bits have their values tied off. See section 4 of the LEON manual for a description of the LEON 5 cache controllers.
Table 26. LEON Cache Control Register
<td> Field Name</td><td> bit(s)</td><td> Description</td>
<td> ICS</td><td> 1:0</td><td> Instruction cache state: 00 - disabled 01 - frozen 10 - disabled 11 - enabled</td>
<td> Reserved</td><td> 13:6</td><td> Reserved. Reads as 0.</td>
<td> DCS</td><td> 3:2</td><td> Data cache state: 00 - disabled 01 - frozen 10 - disabled 11 - enabled</td>
<td> IF</td><td> 4</td><td> ICache freeze on interrupt 0 - Do not freeze the ICache contents on taking an interrupt 1 - Freeze the ICache contents on taking an interrupt</td>
<td> DF</td><td> 5</td><td> DCache freeze on interrupt 0 - Do not freeze the DCache contents on taking an interrupt 1 - Freeze the DCache contents on taking an interrupt</td>
<td> Reserved</td><td> 13:6</td><td> Reserved. Reads as 0.</td>
<td> DP</td><td> 14</td><td> Data cache flush pending. 0 - No DCache flush in progress 1 - DCache flush in progress This bit is Readonly.</td>
<td> IP</td><td> 15</td><td> Instruction cache flush pending. 0 - No ICache flush in progress 1 - ICache flush in progress This bit is Readonly.</td>
<td> IB</td><td> 16</td><td> Instruction burst fetch enable. This bit is tied low on SoPEC because it would interfere with the operation of the cache wrappers. Burst refill functionality is automatically provided in SoPEC by the cache wrappers.</td>
<td> Reserved</td><td> 20:17</td><td> Reserved. Reads as 0.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
128
<td> Fl</td><td> 21</td><td> Flush instruction cache. Writing a 1 this bit will flush the ICache. Reads as 0.</td>
<td> FD</td><td> 22</td><td> Flush data cache. Writing a 1 this bit will flush the DCache. Reads as 0.</td>
<td> DS</td><td> 23</td><td> Data cache snoop enable. This bit is tied low in SoPEC as there is no requirement to snoop the data cache.</td>
<td> Reserved</td><td> 31:24</td><td> Reserved. Reads as 0.</td>
11.7.2 Cache wrappers
The cache RAMs used in the Ieon2-1.0.7 release needed to be modified to support full line refills and the correct IBM macros also needed to be instantiated. Although they are described as RAMs throughout this document (for consistency), register arrays are actually used to implement the cache RAMs. This is because IBM SRAMs were not available in suitable configurations (offered configurations were too big) to implement either the tag or data cache RAMs. Both instruction and data tag RAMs are implemented using dual port (1 Read & 1 Write) register arrays and the clocked write-through versions of the register arrays were used as they most closely approximate the single port SRAM LEON expects to see.
11.7.2.1 Cache Tag RAM wrappers
The itag and dtag RAMs differ only in their width - the itag is a 32x30 array while the dtag is a 32x32 array with the extra 2 bits being used to record the user access permissions for each line. When read using a LDA instruction both tags return 32-bit words. The tag fields are described in Table 27 and Table 28 below. Using the IBM naming conventions the register arrays used for the tag RAMs are called RA032X30D2P2W1R1 M3 for the itag and RA032X32D2P2W1R1 M3 for the dtag. The ibm_syncram wrapper used for the tag RAMs is a simple affair that just maps the wrapper ports on to the appropriate ports of the IBM register array and ensures the output data has the correct timing by registering it. The tag RAMs do not require any special modifications to handle full line refills.
Table 27. LEON Instruction Cache Tag
<td> Field Name</td><td> bit(s)</td><td> Description</td>
<td> Valid</td><td> 7:0</td><td> Each valid bit indicates whether or not the corresponding word of the cache line contains valid data</td>
<td> Reserved</td><td> 9:8</td><td> Reserved - these bits do not exist in the itag RAM. Reads as 0.</td>
<td> Address</td><td> 31:10</td><td> The tag address of the cache line</td>
Table 28. LEON Data Cache Tag
<td> Field Name</td><td> bit(s)</td><td> Description</td>
<td> Valid</td><td> 7:0</td><td> Each valid bit indicates whether or not the corresponding word of the cache line contains valid data</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
129
<td> URP</td><td> 8</td><td> User read permission. 0 - User mode reads will force a refill of this line 1 - User mode code can read from this cache line.</td>
<td> UWP</td><td> 9</td><td> User write permission. 0 - User mode writes will not be written to the cache 1 - User mode code can write to this cache line.</td>
<td> Address</td><td> 31:10</td><td> The tag address of the cache line</td>
11.7.2.2 Cache Data RAM wrappers
The cache data RAM contains the actual cached data and nothing else. Both the instruction and data cache data RAMs are implemented using 8 32x32-bit register arrays and some additional logic to support full line refills. Using the IBM naming conventions the register arrays used for the tag RAMs are called RA032X32D2P2W1R1 M3. The ibm_cdram_wrap wrapper used for the tag RAMs is shown in Figure 24 below.
To the cache controllers the cache data RAM wrapper looks like a 256x32 single port SRAM (which is what they expect to see) with an input to indicate when a full line refill is taking place (the line_rdy signal). Internally the 8-bit address bus is split into a 5-bit lineaddress, which selects one of the 32 256-bit cache lines, and a 3-bit wordaddress which selects one of the 8 32-bit words on the cache line. Thus each of the 8 32x32 register arrays contains one 32-bit word of each cache line. When a full line is being refilled (indicated by both the line_rdy and write signals being high) every register array is written to with the appropriate 32 bits from the linedatain bus which contains the 256-bit line returned by the DIU after a cache miss. When just one word of the cache line is to be written (indicated by the write signal being high while the line_rdy is low) then the wordaddress is used to enable the write signal to the selected register array only - all other write enable signals are kept low. The data cache controller handles byte and half-word write by means of a read-modify-write operation so writes to the cache data RAM are always 32-bit.
The wordaddress is also used to select the correct 32-bit word from the cache line to return to the LEON integer unit.
11.8 Realtime Debug Unit (RDU)
The RDU facilitates the observation of the contents of most of the CPU addressable registers in the SoPEC device in addition to some pseudo-registers in realtime. The contents of pseudo-registers, i.e. registers that are collections of otherwise unobservable signals and that do not affect the functionality of a circuit, are defined in each block as required. Many blocks do not have pseudoregisters and some blocks (e.g. ROM, PSS) do not make debug information available to the RDU as it would be of little value in realtime debug.
Each block that supports realtime debug observation features a DebugSelect register that controls a local mux to determine which register is output on the block’s data bus (i.e. block_cpu_data). One small drawback with reusing the blocks data bus is that the debug data cannot be present on the same bus during a CPU read from the block. An accompanying active high block_cpu_debug_valid signal is used to indicate when the data bus contains valid debug data and when the bus is being
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
130 used by the CPU. There is no arbitration for the bus as the CPU will always have access when required. A block diagram of the RDU is shown in Figure 25.
Table 29. RDU I/Os
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td> diu_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the DIU block</td>
<td> cpr_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the CPR block</td>
<td> gpio_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the GPIO block</td>
<td> icu_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the ICU block</td>
<td> lss_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the LSS block</td>
<td> pcu_cpu_debug_data</td><td> 32</td><td> In</td><td> Read data bus from the PCU block</td>
<td> scb_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the SCB block</td>
<td> tim_cpu_data</td><td> 32</td><td> In</td><td> Read data bus from the TIM block</td>
<td> diu_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the diu_cpu_data bus is valid debug data.</td>
<td> tim_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the tim_cpu_data bus is valid debug data.</td>
<td> scb_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the scb_cpu_data bus is valid debug data.</td>
<td> pcu_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the pcu_cpu_data bus is valid debug data.</td>
<td> lss_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the lss_cpu_data bus is valid debug data.</td>
<td> icu_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the icu_cpu_data bus is valid debug data.</td>
<td> gpio_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the gpio_cpu_data bus is valid debug data.</td>
<td> cpr_cpu_debug_valid</td><td> 1</td><td> In</td><td> Signal indicating the data on the cpr_cpu_data bus is valid debug data.</td>
<td> debug_data_out</td><td> 32</td><td> Out</td><td> Output debug data to be muxed on to the PHI/GPIO/other pins</td>
<td> debug_data_valid</td><td> 1</td><td> Out</td><td> Debug valid signal indicating the validity of the data on debug_data_out. This signal is used in all debug configurations</td>
<td> debug_cntrl</td><td> 33</td><td> Out</td><td> Control signal for each debug data line indicating whether or not the debug data should be selected by the pin mux</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
131
As there are no spare pins that can be used to output the debug data to an external capture device some of the existing I/Os will have a debug multiplexer placed in front of them to allow them be used as debug pins. Furthermore not every pin that has a debug mux will always be available to carry the debug data as they may be engaged in their primary purpose e.g. as a GPIO pin. The RDU therefore outputs a debug_cntrl signal with each debug data bit to indicate whether the mux associated with each debug pin should select the debug data or the normal data for the pin. The DebugPinSell and DebugPinSel2 registers are used to determine which of the 33 potential debug pins are enabled for debug at any particular time.
As it may not always be possible to output a full 32-bit debug word every cycle the RDU supports the outputting of an n-bit sub-word every cycle to the enabled debug pins. Each debug test would then need to be re-run a number of times with a different portion of the debug word being output on the n-bit sub-word each time. The data from each run should then be correlated to create a full 32bit (or whatever size is needed) debug word for every cycle. The debug_data_valid and pclk_out signals will accompany every sub-word to allow the data to be sampled correctly. The pclk_out signal is sourced close to its output pad rather than in the RDU to minimise the skew between the rising edge of the debug data signals (which should be registered close to their output pads) and the rising edge of pclk_out.
As multiple debug runs will be needed to obtain a complete set of debug data the n-bit sub-word will need to contain a different bit pattern for each run. For maximum flexibility each debug pin has an associated DebugDataSrc register that allows any of the 32 bits of the debug data word to be output on that particular debug data pin. The debug data pin must be enabled for debug operation by having its corresponding bit in the DebugPinSel registers set for the selëcted debug data bit to appear on the pin.
The size of the sub-word is determined by the number of enabled debug pins which is controlled by the DebugPinSel registers. Note that the debug_data_valid signal is always output. Furthermore debug_cntri[0] (which is configured by DebugPinSell) controls the mux for both the debug_data_valid and pclk_out signals as both of these must be enabled for any debug operation. The mapping of debug_data_out[n] signals onto individual pins will take place outside the RDU. This mapping is described in Table 30 below.
Table 30. DebugPinSel mapping
<td> bit# ·</td><td> Pin ’ ;</td>
<td> DebugPinSell</td><td> phi frclk. The debug data valïd signal will appear on this pin when enabled. Enabling this pin also automatically enables the phi_readl pin which will output the pclk_out signal</td>
<td> DebugPinSel2(0-31 )</td><td> gpio[0...31]</td>
Table 31. RDU Configuration Registers
<td> Address offset from</td><td> Register</td><td> ftbits</td><td> Reset</td><td> Description</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
132
<td> MMU_base</td><td></td><td></td><td></td><td></td>
<td> 0x80</td><td> DebugSrc</td><td> 4</td><td> 0x00</td><td> Denotes which block is supplying the debug data. The encoding of this block is given below. 0-MMU 1 - TIM 2- LSS 3- GPIO 4- SCB 5- ICU 6- CPR 7- DIU 8- PCU</td>
<td> 0x84</td><td> DebugPinSel 1</td><td> 1</td><td> 0x0</td><td> Determines whether the phijfclk and phi_readl pins are used for debug output. 1 - Pin outputs debug data 0 - Normal pin function</td>
<td> 0x88</td><td> DebugPinSel 2</td><td> 32</td><td> 0x000 0_000 0</td><td> Determines whether a pin is used for debug data output. 1 - Pin outputs debug data 0 - Normal pin function</td>
<td> 0x8C to 0x108</td><td> DebugDataSr c[31:0]</td><td> 32x5</td><td> 0x00</td><td> Selects which bit of the 32-bit debug data word will be output on debug_data_out[N]</td>
11.9 Interrupt Operation
The interrupt controller unit (see chapter 14) generates an interrupt request by driving interrupt request lines with the appropriate interrupt level. LEON supports 15 levels of interrupt with level 15 as the highest level (the SPARC architecture manual [36] states that level 15 is non-maskable but we have the freedom to mask this if desired). The CPU will begin processing an interrupt exception when execution of the current instruction has completed and it will only do so if the interrupt level is higher than the current processor priority. If a second interrupt request arrives with the same level as an executing interrupt service routine then the exception will not be processed until the executing routine has completed.
When an interrupt trap occurs the LEON hardware will place the program counters (PC and nPC) into two local registers. The interrupt handler routine is expected, as a minimum, to place the PSR register in another local register to ensure that the LEON can correctly return to its pre-interrupt state. The 4-bit interrupt level (irl) is also written to the trap type (tt) field of the TBR (Trap Base Register) by hardware. The TBR then contains the vector of the trap handler routine the processor will then jump. The TBA (Trap Base Address) field of the TBR must have a valid value before any interrupt processing can occur so it should be configured at an early stage.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
133
Interrupt pre-emption is supported while ET (Enable Traps) bit of the PSR is set This bit is cleared during the initial trap processing. In initial simulations the ET bit was observed to be cleared for up to 30 cycles. This causes significant additional interrupt latency in the worst case where a higher priority interrupt arrives just as a lower priority one is taken.
The interrupt acknowledge cycles shown in Figure 26 below are derived from simulations of the LEON processor. The SoPEC toplevel interrupt signals used in this diagram map directly to the LEON interrupt signals in the iui and iuo records. An interrupt is asserted by driving its (encoded) level on the icu_cpu_ilevel[3:0] signals (which map to iui.irl[3:0J). The LEON core responds to this, with variable timing, by reflecting the level of the taken interrupt on the cpu_icu_ilevel[3:0] signals (mapped to iuo.irl[3:0]) and asserting the acknowledge signal cpujack (iuo.intack).7he interrupt controller then removes the interrupt level one cycle after it has seen the level been acknowledged by the core. If there is another pending interrupt (of lower priority) then this should be driven on icu_cpu_ilevel[3:0] and the CPU will take that interrupt (the level 9 interrupt in the example below) once it has finished processing the higher priority interrupt. The cpu_icu_ilevel[3:0] signals always reflect the level of the last taken interrupt, even when the CPU has finished processing all interrupts.
11.10 BootOperation
See section 17.2 for a description of the SoPEC boot operation.
11.11 Software Debug
Software debug mechanisms are discussed in the “SoPEC Software Debug” document [15],
Serial Communications Block (SCB)
12.1 Overview
The Serial Communications Block (SCB) handles the movement of all data between the SoPEC and the host device (e.g. PC) and between master and slave SoPEC devices. The main components of the SCB are a Full-Speed (FS) USB Device Core, a FS USB Host Core, a InterSoPEC Interface (ISI), a DMA manager, the SCB Map and associated control logic. The need for these components and the various types of communication they provide is evident in a multi-SoPEC printer configuration.
12.1.1 Multi-SoPEC systems
While single SoPEC systems are expected to form the majority of SoPEC systems the SoPEC device must also support its use in multi-SoPEC systems such as that shown in Figure 27. A SoPEC may be assigned any one of a number of identities in a multi-SoPEC system. A SoPEC may be one or more of a PrintMaster, a LineSyncMaster, an ISIMaster, a StorageSoPEC or an ISISIave SoPEC.
12.1.1.1 ISIMaster device
The ISIMaster is the only device that controls the common ISI lines (see Figure 30) and typically interfaces directly with the host. In most systems the ISIMaster will simply be the SoPEC connected to the USB bus. Future systems, however, may employ an ISI-Bridge chip to interface between the host and the ISI bus and in such systems the ISI-Bridge chip will be the ISIMaster. There can only be one ISIMaster on an ISI bus.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
134
Systems with multiple SoPECs may have more than one host connection, for example there could be two SoPECs communicating with the external host over their FS USB links (this would of course require two USB cables to be connected), but still only one ISIMaster.
While it is not expected to be required, it is possible for a device to hand over its role as the ISIMaster to another device on the ISI i.e. the ISIMaster is not necessarily fixed.
12.1.1.2 PrintMaster device
The PrintMaster device is responsible for co-ordinating all aspects of the print operation. This includes starting the print operation in all printing SoPECs and communicating status back to the external host. When the ISIMaster is a SoPEC device it is also likely to be the PrintMaster as well. There may only be one PrintMaster in a system and it is most likely to be a SoPEC device.
12.1.1.3 LineSyncMaster device
The LineSyncMaster device generates the Isync pulse that all SoPECs in the system must synchronize their line outputs with. Any SoPEC in the system could act as a LineSyncMaster although the PrintMaster is probably the most likely candidate. It is possible that the LineSyncMaster may not be a SoPEC device at all - it could, for example, come from some OEM motor control circuitry. There may only be one LineSyncMaster in a system.
12.1.1.4 Storage device
For certain printer types it may be realistic to use one SoPEC as a storage device without using its print engine capability - that is to effectively use it as an ISI-attached DRAM. A storage SoPEC would receive data from the ISIMaster (most likely to be an ISI-Bridge chip) and then distribute it to the other SoPECs as required. No other type of data flow (e.g. ISISIave -> storage SoPEC -> ISISIave) would need to be supported in such a scenario. The SCB supports this functionality at no additional cost because the CPU handles the task of transferring outbound data from the embedded DRAM to the ISI transmit buffer. The CPU in a storage SoPEC will have almost nothing else to do.
12.1.1.5 ISISIave device
Multi-SoPEC systems will contain one or more ISISIave SoPECs. An ISISIave SoPEC is primarily used to generate dot data for the printhead IC it is driving. An ISISIave will not transmit messages on the ISI without first receiving permission to do so, via a ping packet (see section 12.4.4.6), from the ISIMaster
12.1.1.6 ISI-Bridge device
SoPEC is targeted at the low-cost small office / home office (SoHo) market. It may also be used in future systems that target different market segments which are likely to have a high speed interface capability. A future device, known as an ISI-Bridge chip, is envisaged which will feature both a high speed interface (such as High-Speed (HS) USB, Ethernet or IEEE1394) and one or more ISI interfaces. The use of multiple ISI buses would allow the construction of independent print systems within the one printer. The ISI-Bridge would be the ISIMaster for each of the ISI buses it interfaces to.
12.1.1.7 External host
The external host is most likely (but is not required) to be, a PC. Any system that can act as a USB host or that can interface to an ISI-Bridge chip could be the external host. In particular, with the
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
135 development of USB On-The-Go (USB OTG), it is possible that a number of USB OTG enabled products such as PDAs or digital cameras will be able to directly interface with a SoPEC printer.
12.1.1.8 External USB device
The external USB device is most likely (but is not required) to be, a digital camera. Any system that can act as a USB device could be connected as an external USB device. This is to facilitate printing in the absence of a PC.
12.1.2 Types of communication
12.1.2.1 Communications with external host
The external host communicates directly with the ISIMaster in order to print pages. When the ISIMaster is a SoPEC, the communications channel is FS USB.
12.1.2.1.1 External host to ISIMaster communication
The external host will need to communicate the following information to the ISIMaster device:
• Communications channel configuration and maintenance information • Most data destined for PrintMaster, ISISIave or storage SoPEC devices. This data is simply relayed by the ISIMaster • Mapping of virtual communications channels, such as USB endpoints, to ISI destination
12.1.2.1.2 ISIMaster to external host communication
The ISIMaster will need to communicate the following information to the external host:
• Communications channel configuration and maintenance information • All data originating from the PrintMaster, ISISIave or storage SoPEC devices and destined for the external host. This data is simply relayed by the ISIMaster
12.1.2.1.3 External host to PrintMaster communication
The external host will need to communicate the following information to the PrintMaster device:
• Program code for the PrintMaster • Compressed page data for the PrintMaster • Control messages to the PrintMaster • Tables and static data required for printing e.g. dead nozzle tables, dither matrices etc.
• Authenticatable messages to upgrade the printer’s capabilities
12.1.2.1.4 PrintMaster to external host communication
The PrintMaster will need to communicate the following information to the external host:
• Printer status information (i.e. authentication results, paper empty/jammed etc.) • Dead nozzle information • Memory buffer status information • Power management status • Encrypted SoPECJd for use in the generation of PRINTER_QA keys during factory programming
12.1.2.1.5 External host to ISISIave communication
All communication between the external host and ISISIave SoPEC devices must be direct (via a dedicated connection between the external host and the ISISIave) or must take place via the
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
136
ISIMaster. In the case of a SoPEC ISIMaster it is possible to configure each individual USB endpoint to act as a control channel to an ISISIave SoPEC if desired, although the endpoints will be more usually used to transport data. The external host will need to communicate the following information to ISISIave devices over the comms/ISI:
• Program code for ISISIave SoPEC devices • Compressed page data for ISISIave SoPEC devices • Control messages to the ISISIave SoPEC (where a control channel is supported) • Tables and static data required for printing e.g. dead nozzle tables, dither matrices etc.
• Authenticatable messages to upgrade the printer’s capabilities
12.1.2.1.6 ISISIave to external host communication
All communication between the ISISIave SoPEC devices and the external host must take place via the ISIMaster. The ISISIave will need to communicate the following information to the external host over the comms/ISI:
• Responses to the external host’s control messages (where a control channel is supported) • Dead nozzle information from the ISISIave SoPEC.
• Encrypted SoPECJd for use in the generation of PRINTER_QA keys during factory programming
72.1.2.2 Communication with external USB device
12.1.2.2.1 ISIMaster to External USB device communication • Communications channel configuration and maintenance information.
12.1.2.2.2 External USB device to ISIMaster communication • Print data from a function on the external USB device.
72.7.2.3 Communication over ISl
12.1.2.3.1 ISIMaster to PrintMaster communication
The ISIMaster and PrintMaster will often be the same physical device. When they are different devices then the following information needs to be exchanged over the ISl:
• All data from the external host destined for the PrintMaster (see section 12.1.2.1.4). This data is simply relayed by the ISIMaster
12.1.2.3.2 PrintMaster to ISIMaster communication
The ISIMaster and PrintMaster will often be the same physical device. When they are different devices then the following information needs to be exchanged over the ISl:
• All data from the PrintMaster destined for the external host (see section 12.1.2.1.4). This data is simply relayed by the ISIMaster
12.1.2.3.3 ISIMaster to ISISIave communication
The ISIMaster may wish to communicate the following information to the ISISIaves:
• All data (including program code such as ISIId enumeration) originating from the external host and destined for the ISISIave (see section 12.1.2.1.5). This data is simply relayed by the ISIMaster • wake up from sleep mode
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
137
12.1.2.3.4 ISISIave to ISIMaster communication
The ISISIave may wish to communicate the following information to the ISIMaster:
• All data originating from the ISISIave and destined for the external host (see section 12.1.2.1.6). This data is simply relayed by the ISIMaster
12.1.2.3.5 PrintMaster to ISISIave communication
When the PrintMaster is not the ISIMaster all ISI communication is done in response to ISI ping packets (see 12.4.4.6). When the PrintMaster is the ISIMaster then it will of course communicate directly with the ISISIaves. The PrintMaster SoPEC may wish to communicate the following information to the ISISIaves:
• Ink status e.g. requests for dotCount data i.e. the number of dots in each color fired by the printheads connected to the ISISIaves • configuration of GPIO ports e.g. for clutch control and lid open detect • power down command telling the ISISIave to enter sleep mode • ink cartridge fail information
This list is not complete and the time constraints associated with these requirements have yet to be determined.
In general the PrintMaster may need to be able to:
• send messages to an ISISIave which will cause the ISISIave to return the contents of ISISIave registers to the PrintMaster or • to program ISISIave registers with values sent by the PrintMaster
This should be under the control of software running on the CPU which writes messages to the ISI/SCB interface.
12.1.2.3.6 ISISIave to PrintMaster communication
ISISIaves may need to communicate the following information to the PrintMaster:
• ink status e.g. dotCount data i.e. the number of dots in each color fired by the printheads connected to the ISISIaves • band related information e.g. finished band interrupts • page related information i.e. buffer underrun, page finished interrupts • MMU security violation interrupts • GPIO interrupts and status e.g. clutch control and lid open detect • printhead temperature • printhead dead nozzle information from SoPEC printhead nozzle tests • power management status
This list is not complete and the time constraints associated with these requirements have yet to be determined.
As the ISI is an insecure interface commands issued over the ISI should be of limited capability e.g. only limited register writes allowed. The software protocol needs to be constructed with this in mind. In general ISISIaves may need to return register or status messages to the PrintMaster or ISIMaster. They may also need to indicate to the PrintMaster or ISIMaster that a particular interrupt
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
138 has occurred on the ISISIave. This should be under the control of software running on the CPU which writes messages to the ISI block.
12.1.2.3.7 ISISIave to ISISIave communication
The amount of information that will need to be communicated between ISISIaves will vary considerably depending on the printer configuration. In some systems ISISIave devices will only need to exchange small amounts of control information with each other while in other systems (such as those employing a storage SoPEC or extra USB connection) large amounts of compressed page data may be moved between ISISIaves. Scenarios where ISISIave to ISISIave communication is required include: (a) when the PrintMaster is not the ISIMaster, (b) QA Chip ink usage protocols, (c) data transmission from data storage SoPECs, (d) when there are multiple external host connections supplying data to the printer.
12.1.3 SCB Block Diagram
The SCB consists of four main sub-blocks, as shown in the basic block diagram of Figure 28.
12.1.4 Definitions of I/Os
The toplevel I/Os of the SCB are listed in Table 32. A more detailed description of their functionality will be given in the relevant sub-block sections.
Table 32. SCB I/O
<td> Port name</td><td> s</td><td> I/O</td><td> Description</td>
<td> Clocks and Resets</td><td colspan="3"></td>
<td> prst_n</td><td> 1</td><td> In</td><td> System reset signal. Active low.</td>
<td> Pclk</td><td> 1</td><td> In</td><td> System clock.</td>
<td> usbclk</td><td> 1</td><td> In</td><td> 48MHz clock for the USB device and host cores. The cores also require a 12MHz clock, which will be generated locally by dividing the 48MHz clock by 4.</td>
<td> isi_cpr_reset_n</td><td> 1</td><td> Out</td><td> Signal from the ISI indicating that ISI activity has been detected while in sleep mode and so the chip should be reset. Active low.</td>
<td> usbd_cpr_reset_n</td><td> 1</td><td> Out</td><td> Signal from the USB device that a USB reset has occurred. Active low.</td>
<td> USB device IO transceiver</td><td></td><td></td><td></td>
<td> signals</td><td></td><td></td><td></td>
<td> usbd_ts</td><td> 1</td><td> Out</td><td> USB device IO transceiver (BUSB2_PM) driver three-state control. Active high enable.</td>
<td> usbd_a</td><td> 1</td><td> Out</td><td> USB device IO transceiver (BUSB2_PM) driver data input.</td>
<td> usbd_se0</td><td> 1</td><td> Out</td><td> USB device IO transceiver (BUSB2_PM) single-ended zero input. Active high.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
139
<td> usbd_zp</td><td> 1</td><td> In</td><td> USB device IO transceiver (BUSB2_PM) D+ receiver output.</td>
<td> usbd_zm</td><td> 1</td><td> In</td><td> USB device IO transceiver (BUSB2_PM) Dreceiver output.</td>
<td> usbd_z</td><td> 1</td><td> In</td><td> USB device IO transceiver (BUSB2_PM) differential receiver output.</td>
<td> usbd_pull_up_en</td><td> 1</td><td> Out</td><td> USB device pull-up resistor enable. Switches power to the external pull-up resistor, connected to the D+ line that is required for device identification to the USB. Active high.</td>
<td> usbd_vbus_sense</td><td> 1</td><td> In</td><td> USB device VBUS power sense. Used to detect power on VBUS. NOTE: The IBM Cu11 PADS are 3.3V, VBUS is 5V. An external voltage conversion will be necessary, e.g. resistor divider network. Active high.</td>
<td> USB host IO transceiver</td><td></td><td></td><td></td>
<td> signals</td><td></td><td></td><td></td>
<td> usbh_ts</td><td> 1</td><td> Out</td><td> USB host IO transceiver (BUSB2_PM) driver three-state control. Active high enable</td>
<td> usbh_a</td><td> 1</td><td> Out</td><td> USB host IO transceiver (BUSB2_PM) driver data input.</td>
<td> usbh_seO</td><td> 1</td><td> Out</td><td> USB host IO transceiver (BUSB2_PM) singleended zero input. Active high.</td>
<td> usbh_zp</td><td> 1</td><td> In</td><td> USB host IO transceiver (BUSB2_PM) D+ receiver output.</td>
<td> usbh_zm</td><td> 1</td><td> In</td><td> USB host IO transceiver (BUSB2_PM) Dreceiver output.</td>
<td> usbh_z</td><td> 1</td><td> In</td><td> USB host IO transceiver (BUSB2_PM) differential receiver output.</td>
<td> us bh_over_cu rrent</td><td> 1</td><td> In</td><td> USB host port power over current indicator. Active high.</td>
<td> usbh_power_en</td><td> 1</td><td> Out</td><td> USB host VBUS power enable. Used for port power switching. Active high.</td>
<td> CPU Interface</td><td colspan="3"></td>
<td> cpu_adr[n:2]</td><td> n-1</td><td> In</td><td> CPU address bus.</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> scb_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
140
<td></td><td></td><td></td><td> follows: 00 - User program access 01 - User data access 10 - Supervisor program access 11 - Supervisor data access</td>
<td> cpu_scb_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_scb_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> scb_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When scb_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the SCB and for a read cycle this means the data on scb_cpu_data is valid.</td>
<td> scb_cpu_berr</td><td> 1</td><td> Out</td><td> Bus error signal to the CPU indicating an invalid access.</td>
<td> scb_cpu_debug_valid</td><td> 1</td><td> Out</td><td> Signal indicating that the data currently on scb_cpu_data is valid debug data</td>
<td> Interrupt signals</td><td></td><td></td><td></td>
<td> dmajcujrq</td><td> 1</td><td> Out</td><td> DMA interrupt signal to the interrupt controller block.</td>
<td> isijcujrq</td><td> 1</td><td> Out</td><td> ISI interrupt signal to the interrupt controller block.</td>
<td> usbJeu Jrq[1:0]</td><td> 2</td><td> Out</td><td> USB host and device interrupt signals to the ICU. Bit 0 - USB Host interrupt Bit 1 - USB Device interrupt</td>
<td> DIU interface</td><td></td><td></td><td></td>
<td> scb_diu_wadr[21:5]</td><td> 17</td><td> Out</td><td> Write address bus to the DIU</td>
<td> scb_diu_data[63:0]</td><td> 64</td><td> Out</td><td> Data bus to the DIU.</td>
<td> scb_diu_wreq</td><td> 1</td><td> Out</td><td> Write request to the DIU</td>
<td> diu_scb_wack</td><td> 1</td><td> In</td><td> Acknowledge from the DIU that the write request was accepted.</td>
<td> scb_diu_wvalid</td><td> 1</td><td> Out</td><td> Signal from the SCB to the DIU indicating that the data currently on the scb_diu_data[63:0] bus is valid</td>
<td> scb_diu_wmask[7:0]</td><td> 7</td><td> Out</td><td> Byte aligned write mask. A 1 in a bitfield of scb_diu_wmask[7:0r means that the corresponding byte will be written to DRAM.</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
141
<td> scb_diu_rreq</td><td> 1</td><td> Out</td><td> Read request to the DIU.</td>
<td> scb_diu_radr[21:5]</td><td> 17</td><td> Out</td><td> Read address bus to the DIU</td>
<td> diu_scb_rack</td><td> 1</td><td> In</td><td> Acknowledge from the DIU that the read request was accepted.</td>
<td> diu_scb_rvalid</td><td> 1</td><td> In</td><td> Signal from the DIU to the SCB indicating that the data currently on the diu_data[63:0] bus is valid</td>
<td> diu_data[63:0]</td><td> 64</td><td> In</td><td> Common DIU data bus.</td>
<td> GPIO interface</td><td colspan="3"></td>
<td> isi_gpio_dout[3:0]</td><td> 4</td><td> Out</td><td> ISI output data to GPIO pins</td>
<td> isi_gpio_e[3:0]</td><td> 4</td><td> Out</td><td> ISI output enable to GPIO pins</td>
<td> gpio_isi_din[3:0]</td><td> 4</td><td> In</td><td> Input data from GPIO pins to ISI</td>
12.1.5 SCB Data Flow
A logical view of the SCB is shown in Figure 29, depicting the transfer of data within the SCB.
12.2 USBD (USB DEVICE SUB-BLOCK)
12.2.1 Overview
The FS USB device controller core and associated SCB logic are referred to as the USB Device (USBD).
A SoPEC printer has FS USB device capability to facilitate communication between an external USB host and a SoPEC printer. The USBD is self-powered. It connects to an external USB host via a dedicated USB interface on the SoPEC printer, comprising a USB connector, the necessary discretes for USB signalling and the associated SoPEC ASIC I/Os.
The FS USB device core will be third party IP from Synopsys: TymeWare™ USB1.1 Device Controller (UDCVCI). Refer to the UDCVCI User Manual [20] for a description of the core.
The device core does not support LS USB operation. Control and bulk transfers are supported by the device. Interrupt transfers are not considered necessary because the required interrupt-type functionality can be achieved by sending query messages over the control channel on a scheduled basis. There is no requirement to support isochronous transfers.
The device core is configured to support 6 USB endpoints (EPs): the default control EP (ΕΡ0), 4 bulk OUT EPs (EP1, EP2, EP3, EP4) and 1 bulk IN EP (EP5). It should be noted that the direction of each EP is with respect to the USB host, i.e. IN refers to data transferred to the external host and OUT refers to data transferred from the external host. The 4 bulk OUT EPs will be used for the transfer of data from the external host to SoPEC, e.g. compressed page data, program data or control messages. Each bulk OUT EP can be mapped on to any target destination in a multi-SoPEC system, via the SCB Map configuration registers. The bulk IN EP is used for the transfer of data from SoPEC to the external host, e.g. a print image downloaded from a digital camera that requires processing on the external host system. Any feedback data will be returned to the external host on ΕΡ0, e.g. status information.
The device core does not provide internal buffering for any of its EPs (with the exception of the 8 byte setup data payload for control transfers). All EP buffers are provided in the SCB. Buffers will be
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
142 grouped according to EP direction and associated packet destination. The SCB Map configuration registers contain a DestlSlld and DestlSISubld for each OUT EP, defining their EP mapping and therefore their packet destination. Refer to section Section 12.4 ISI (Inter SoPEC Interface Subblock) for further details on ISIId and ISISubld. Refer to section Section 12.5 CTRL (Control Subblock) for further details on the mapping of OUT EPs.
12.2.2 USBD effective bandwidth
The effective bandwidth between an external USB host and the printer will be influenced by:
• Amount of activity from other devices that share the USB with the printer.
• Throughput of the device controller core.
• EP buffering implementation.
• Responsiveness of the external host system CPU in handling USB interrupts.
To maximize bandwidth to the printer it is recommended that no other devices are active on the USB between the printer and the external host. If the printer is connected to a HS USB external host or hub it may limit the bandwidth available to other devices connected to the same hub but it would not significantly affect the bandwidth available to other devices upstream of the hub. The EP buffering should not limit the USB device core throughput, under normal operating conditions.
Used in the recommended configuration, under ideal operating conditions, it is expected that an effective bandwidth of 8-9 Mbit/s will be achieved with bulk transfers between the external host and the printer.
12.2.3 IN EP packet buffer
The IN EP packet buffer stores packets originating from the LEON CPU that are destined for transmission over the USB to the external USB host. CPU writes to the buffer are 32 bits wide. USB device core reads from the buffer 32 bits wide.
128 bytes of local memory are required in total for ΕΡ0-ΙΝ and EP5-IN buffering. The IN EP buffer is a single, 2-port local memory instance, with a dedicated read port and a dedicated write port. Both ports are 32 bits wide. Each IN EP has a dedicated 64 byte packet location available in the memory array to buffer a single USB packet (maximum USB packet size is 64 bytes). Each individual 64 byte packet location is structured as 16 x 32 bit words and is read/written in a FIFO manner.
When the device core reads a packet entry from the IN EP packet buffer, the buffer must retain the packet until the device core performs a status write, informing the SCB that the packet has been accepted by the external USB host and can be flushed. The CPU can therefore only write a single packet at a time to each IN EP. Any subsequent CPU write request to a buffer location containing a valid packet will be refused, until that packet has been successfully transmitted.
12.2.4 OUT EP packet buffer
The OUT EP packet buffer stores packets originating from the external USB host that are destined for transmission over DMAChannelO, DMAChannell or the ISI. The SCB control logic is responsible for routing the OUT EP packets from the OUT EP packet buffer to DMA or to the ISITx Buffer, based on the SCB Map configuration register settings. USB core writes to the buffer are 32 bits wide. DMA and ISI associated reads from the buffer are both 64 bits wide.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
143
512 bytes of local memory are required in total for EPO-OUT, EP1-OUT, EP2-OUT, EP3-OUT and EP4-OUT buffering. The OUT EP packet buffer is a single, 2-port local memory instance, with a dedicated read port and a dedicated write port. Both ports are 64 bits wide. Byte enables are used for the 32 bit wide USB device core writes to the buffer. Each OUT EP can be mapped to DMAChannelO, DMAChannell or the ISI.
The OUT EP packet buffer is partitioned accordingly, resulting in three distinct packet FIFOs:
• USBDDMAOFIFO, for USB packets destined for DMAChannelO on the local SoPEC.
• USBDDMA1 FIFO, for USB packets destined for DMAChannell on the local SoPEC.
• USBDISIFIFO, for USB packets destined for transmission over the ISI.
12.2.4.1 USBDDMAnFIFO
This description applies to USBDDMAOFIFO and USBDDMA1FIFO, where 'ri represents the respective DMA channel, i.e. n=0 for USBDDMAOFIFO, n=1 for USBDDMA1 FIFO. USBDDMAnFIFO services any EPs mapped to DMAChanneln on the local SoPEC device. This implies that a packet originating from an EP with an associated ISIId that matches the local SoPEC ISIId and an ISISubld=n will be written to USBDDMAnFIFO, if there is space available for that packet.
USBDDMAnFIFO has a capacity of 2 x 64 byte packet entries, and can therefore buffer up to 2 USB packets. It can be considered as a 2 packet entry FIFO. Packets will be read from it in the same order in which they were written, i.e. the first packet written will be the first packet read and the second packet written will be the second packet read. Each individual 64 byte packet location is structured as 8 x 64 bit words and is read/written in a FIFO manner.
The USBDDMAnFIFO has a write granularity of 64 bytes, to allow for the maximum USB packet size. The USBDDMAnFIFO will have a read granularity of 32 bytes to allow for the DMA write access bursts of 4 x 64 bit words, i.e. the DMA Manager will read 32 byte chunks at a time from the USBDDMAnFIFO 64byte packet entries, for transfer to the DIU.
It is conceivable that a packet which is not a multiple 32 bytes in size may be written to the USBDDMAnFIFO. When this event occurs, the DMA Manager will read the contents of the remaining address locations associated with the 32 byte chunk in the USBDDMAnFIFO, transferring the packet plus whatever data is present in those locations, resulting in a 32 byte packet (a burst of 4 x 64 bit words) transfer to the DIU.
The DMA channels should achieve an effective bandwidth of 160 Mbits/sec (1 bit/cycle) and should never become blocked, under normal operating conditions. As the USB bandwidth is considerably less, a 2 entry packet FIFO for each DMA channel should be sufficient.
12.2.4.2 USBDISIFIFO
USBDISIFIFO services any EPs mapped to ISI. This implies that a packet originating from an EP with an associated ISIId that does not match the local SoPEC ISIId will be written to USBDISIFIFO if there is space available for that packet.
USBDISIFIFO has a capacity of 4 x 64 byte packet entries, and can therefore buffer up to 4 USB packets. It can be considered as a 4 packet entry FIFO. Packets will be read from it in the same order in which they were written, i.e. the first packet written will be the first packet read and the
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
144 second packet written will be the second packet read, etc. Each individual 64 byte packet location is structured as 8 x 64 bit words and is read/written in a FIFO manner.
The ISI long packet format will be used to transfer data across the ISI. Each ISI long packet data payload is 32 bytes. The USBDISIFIFO has a write granularity of 64 bytes, to allow for the maximum USB packet size. The USBDISIFIFO will have a read granularity of 32 bytes to allow for the ISI packet size, i.e. the SCB will read 32 byte chunks at a time from the USBDISIFIFO 64byte packet entries, for transfer to the ISI.
It is conceivable that a packet which is not a multiple 32 bytes in size may be written to the USBDISIFIFO, either intentionally or due to a software error. A maskable interrupt per EP is provided to flag this event. There will be 2 options for dealing with this scenario on a per EP basis:
• Discard the packet.
• Read the contents of the remaining address locations associated with the 32 byte chunk in the USBDISIFIFO, transferring the irregular size packet plus whatever data is present in those locations, resulting in a 32 byte packet transfer to the ISITxBuffer.
The ISI should achieve an effective bandwidth of 100 Mbits/sec (4 wire configuration). It is possible to encounter a number of retries when transmitting an ISI packet and the LEON CPU will require access to the ISI transmit buffer. However, considering the relatively low bandwidth of the USB, a 4 packet entry FIFO should be sufficient.
12.2.5 Wake-up from sleep mode
The SoPEC will be placed in sleep mode after a suspend command is received by the USB device core. The USB device core will continue to be powered and clocked in sleep mode. A USB reset, as opposed to a device resume, will be required to bring SoPEC out of its sleep state as the sleep state is hoped to be logically equivalent to the power down state.
The USB reset signal originating from the USB controller will be propagated to the CPR (as usb_cpr_reset_ri) if the USBWakeupEnable bit of the WakeupEnable register (see Table ) has been set. The USBWakeupEnable bit should therefore be set just prior to entering sleep mode. There is a scenario that would require SoPEC to initiate a USB remote wake-up (i.e. where SoPEC signals resume to the external USB host after being suspended by the external USB host). A digital camera (or other supported external USB device) could be connected to SoPEC via the internal SoPEC USB host controller core interface. There may be a need to transfer data from this external USB device, via SoPEC, to the external USB host system for processing. If the USB connecting the external host system and SoPEC was suspended, then SoPEC would need to initiate a USB remote wake-up.
12.2.6 Implementation
12.2.6.1 USBD Sub-block Partition * Block diagram * Definition of I/Os
12.2.6.2
USB Device IP Core
12.2.6.3
12.2.6.4
PVCI Target
IN EP Buffer
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
145
12.2.6.5 OUT EP Buffer
12.3 USBH (USB HOST SUB-BLOCK)
12.3.1 Overview
The SoPEC USB Host Controller (HC) core, associated SCB logic and associated SoPEC ASIC I/Os are referred to as the USB Host (USBH).
A SoPEC printer has FS USB host capability, to facilitate communication between an external USB device and a SoPEC printer. The USBH connects to an external USB device via a dedicated USB interface on the SoPEC printer, comprising a USB connector, the necessary discretes for USB signalling and the associated SoPEC ASIC I/Os.
The FS USB HC core are third party IP from Synopsys: DesignWare<sup>R</sup> USB1.1 OHCI Host Controller with PVCI (UHOSTC_PVCI). Refer to the UHOSTC_PVCI User Manual [18] for details of the core. Refer to the Open Host Controller Interface (OHCI) Specification Release [19] for details of OHCI operation.
The HC core supports Low-Speed (LS) USB devices, although compatible external USB devices are most likely to be FS devices. It is expected that communication between an external USB device and a SoPEC printer will be achieved with control and bulk transfers. However, isochronous and interrupt transfers are also supported by the HC core.
There will be 2 communication channels between the Host Controller Driver (HCD) software running on the LEON CPU and the HC core:
• OHCI operational registers in the HC core. These registers are control, status, list pointers and a pointer to the Host Controller Communications Area (HCCA) in shared memory. A target Peripheral Virtual Component Interface (PCVI) on the HC core will provide LEON with direct read/write access to the operational registers. Refer to the OHCI Specification for details of these registers.
• HCCA in SoPEC eDRAM. An initiator Peripheral Virtual Component Interface (PCVI) on the HC core will provide the HC with DMA read/write access to an address space in eDRAM. The HCD running on LEON will have read/write access to the same address space. Refer to the OHCI Specification for details of the HCCA.
The target PVCI interface is a 32 bit word aligned interface, with byte enables for write access. All read/ write access to the target PVCI interface by the LEON CPU will be 32 bit word aligned. The byte enables will not be used, as all registers will be read and written as 32 bit words.
The initiator PVCI interface is a 32 bit word aligned interface with byte enables for write access. All DMA read/write accesses are 256 bit word aligned, in bursts of 4 x 64 bit words. As there is no guarantee that the read/write requests from the HC core will start at a 256 bit boundary or be 256 bits long, it is necessary to provide 8 byte enables for each of the 64 bit words in a write burst form the HC core to DMA. The signal scb_diu_wmask serves this purpose.
Configuration of the HC core will be performed by the HCD.
12.3.2 Read/Write Buffering
The HC core maximum burst size for a read/write access is 4 x 32 bit words. This implies that the minimum buffering requirements for the HC core will be a 1 entry deep address register and a 4
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
146 entry deep data register. It will be necessary to provide data and address mapping functionality to convert the 4 x 32 bit word HC core read/write bursts into 4 x 64 bit word DMA read/write bursts. This will meet the minimum buffering requirements.
12.3.3 USBH effective bandwidth
The effective bandwidth between an external USB device and a SoPEC printer will be influenced by:
• Amount of activity from other devices that share the USB with the external USB device.
• Throughput of the HC core.
• HC read/write buffering implementation.
• Responsiveness of the LEON CPU in handling USB interrupts.
Effective bandwidth between an external USB device and a SoPEC printer is not an issue. The primary application of this connectivity is the download of a print image from a digital camera. Printing speed is not important for this type of print operation. However, to maximize bandwidth to the printer it is recommended that no other devices are active on the USB between the printer and the external USB device. The HC read/write buffering in the SCB should not limit the USB HC core throughput, under normal operating conditions.
Used in the recommended configuration, under ideal operating conditions, it is expected that an effective bandwidth of 8-9 Mbit/s will be achieved with bulk transfers between the external USB device and the SoPEC printer.
12.3.4 Implementation
12.3.5 USBH Sub-block Partition • USBH Block Diagram • Definition of I/Os.
12.3.5.1 USB Host IP Core
12.3.5.2 PVCI Target
12.3.5.3 PVCI Initiator
12.3.5.4 Read/Write Buffer
12.4 ISl (Inter SoPEC Interface Sub-block)
12.4.1 Overview
The ISl is utilised in all system configurations requiring more than one SoPEC. An example of such a system which requires four SoPECs for duplex A3 printing and an additional SoPEC used as a storage device is shown in Figure 27.
The ISl performs much the same function between an ISISIave SoPEC and the ISIMaster as the USB connection performs between the ISIMaster and the external host. This includes the transfer of all program data, compressed page data and message (i.e. commands or status information) passing between the ISIMaster and the ISISIave SoPECs. The ISIMaster initiates all communication with the ISISIaves.
12.4.2 ISl Effective Bandwidth
The ISl will need to run at a speed that will allow error free transmission on the.PCB while minimising the buffering and hardware requirements on SoPEC. While an ISl speed of 10 Mbit/s is
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
147 adequate to match the effective FS USB bandwidth it would limit the system performance when a high-speed connection (e.g. USB2.0, IEEE1394) is used to attach the printer to the PC. Although they would require the use of an extra ISI-Bridge chip such systems are envisaged for more expensive printers (compared to the low-cost basic SoPEC powered printers that are initially being targeted) in the future.
An ISI line speed (i.e. the speed of each individual ISI wire) of 32 Mbit/s is therefore proposed as it will allow ISI data to be over-sampled 5 times (at a pclk frequency of 160MHz). The total bandwidth of the ISI will depend on the number of pins used to implement the interface. The ISI protocol will work equally well if 2 or 4 pins are used for transmission/reception. The ISINumPins register is used to select between a 2 or 4 wire ISI, giving peak raw bandwidths of 64 Mbit/s and 128 Mbit/s respectively. Using either a 2 or 4 wire ISI solution would allow the movement of data in to and out of a storage SoPEC (as described in 12.1.1.4 above), which is the most bandwidth hungry ISI use, in a timely fashion.
The ISINumPins register is used to select between a 2 or 4 wire ISI. A 2 wire ISI is the default setting for ISINumPins and this may be changed to a 4 wire ISI after initial communication has been established between the ISIMaster and all ISISIaves. Software needs to ensure that the switch from 2 to 4 wires is handled in a controlled and coordinated fashion so that nothing is transmitted on the ISI during the switch over period.
The maximum effective bandwidth of a two wire ISI, after allowing for protocol overheads and bus turnaround times, is expected to be approx. 50 Mbit/s.
12.4.3 ISI Device Identification and Enumeration
The ISIMasterSel bit of the ISICntrl register (see section Table ) determines whether a SoPEC is an ISIMaster (ISIMasterSel = 1), or an ISISIave (ISIMasterSel = 0).
SoPEC defaults to being an ISISIave (ISIMasterSel = 0) after a power-on reset - i.e. it will not transmit data on the ISI without first receiving a ping. If a SoPEC’s ISIMasterSel bit is changed to 1, then that SoPEC will become the ISIMaster, transmitting data without requiring a ping, and generating pings as appropriately programmed.
ISIMasterSel can be set to 1 explicitly by the CPU writing directly to the ISICntrl register.
ISIMasterSel can also be automatically set to 1 when activity occurs on any of USB endpoints 2-4 and the AutoMasterEnable bit of the ISICntrl register is also 1 (the default reset condition). Note that if AutoMasterEnable is 0, then activity on USB endpoints 2-4 will not result in ISIMasterSel being set to 1. USB endpoints 2-4 are chosen for the automatic detection since the power-on-reset condition has USB endpoints 0 and 1 pointing to ISIId 0 (which matches the local SoPEC’s ISIId after poweron reset). Thus any transmission on USB endpoints 2-4 indicate a desire to transmit on the ISI which would usually indicate ISIMaster status. The automatic setting of ISIMasterSel can be disabled by clearing AutoMasterEnable, thereby allowing the SoPEC to remain an ISISIave while still making use of the USB endpoints 2-4 as external destinations.
Thus the setting of a SoPEC being ISIMaster or ISISIave can be completely under software control, or can be completely automatic.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
148
The ISIId is established by software downloaded over the ISI (in broadcast mode) which looks at the input levels on a number of GPIO pins to determine the ISIId. For any given printer that uses a multi-SoPEC configuration it is expected that there will always be enough free GPIO pins on the ISISIaves to support this enumeration mechanism.
12.4.4 ISI protocol
The ISI is a serial interface utilizing a 2/4 wire half-duplex configuration such as the 2-wire system shown in Figure 30 below. An ISIMaster must always be present and a variable number of ISISIaves may also be on the ISI bus. The ISI protocol supports up to 14 addressable slaves, however to simplify electrical issues the ISI drivers need only allow for 5-6 ISI devices on a particular ISI bus. The ISI bus enables broadcasting of data, ISIMaster to ISISIave communication, ISISIave to ISIMaster communication and ISISIave to ISISIave communication. Flow control, error detection and retransmission of errored packets is also supported. ISI transmission is asynchronous and a Start field is present in every transmitted packet to ensure synchronization for the duration of the packet.
To maximize the effective ISI bandwidth while minimising pin requirements a half-duplex interleaved transmission scheme is used. Figure 31 below shows how a 16-bit word is transmitted from an ISIMaster to an ISISIave over a 2-wire ISI bus. Since data will be interleaved over the wires and a 4wire ISI is also supported, all ISI packets should be a multiple of 4 bits.
All ISI transactions are initiated by the ISIMaster and every non-broadcast data packet needs to be acknowledged by the addressed recipient. An ISISIave may only transmit when it receives a ping packet (see section 12.4.4.6) addressed to it. To avoid bus contention all ISI devices must wait ISITurnAround bit-times (5 pclk cycles per bit) after detecting the end of a packet before transmitting a packet (assuming they are required to transmit). All non-transmitting ISI devices must tristate their Tx drivers to avoid line contention. The ISI protocol is defined to avoid devices driving out of order (e.g. when an ISISIave is no longer being addressed). As the ISI uses standard I/O pads there is no physical collision detection mechanism.
There are three types of ISI packet: a long packet (used for data transmission), a ping packet (used by the ISIMaster to prompt ISISIaves for packets) and a short packet (used to acknowledge receipt of a packet). All ISI packets are delineated by a Start and Stop fields and transmission is atomic i.e. an ISI packet may not be split or halted once transmission has started.
12.4.4.1 ISI transactions
The different types of ISI transactions are outlined in Figure 32 below. As described later all NAKs are inferred and ACKs are not addressed to any particular ISI device.
12.4.4.2 Start Field Description
The Start field serves two purposes: To allow the start of a packet be unambiguously identified and to allow the receiving device synchronise to the data stream. The symbol, or data value, used to identify a Start field must not legitimately occur in the ensuing packet. Bit stuffing is used to guarantee that the Start symbol will be unique in any valid (i.e. error free) packet. The ISI needs to see a valid Start symbol before packet reception can commence i.e. the receive logic constantly looks for a Start symbol in the incoming data and will reject all data until it sees a Start symbol.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
149
Furthermore if a Start symbol occurs (incorrectly) during a data packet it will be treated as the start of a new packet. In this case the partially received packet will be discarded.
The data value of the Start symbol should guarantee that an adequate number of transitions occur on the physical ISI lines to allow the receiving ISI device to determine the best sampling window for the transmitted data. The Start symbol should also be sufficiently long to ensure that the bit stuffing overhead is low but should still be short enough to reduce its own contribution to the packet overhead. A Start symbol of b01010101 is therefore used as it is an effective compromise between these constraints.
Each SoPEC in a multi-SoPEC system will derive its system clock from a unique (i.e. one per SoPEC) crystal. The system clocks of each device will drift relative to each other over any period of time. The system clocks are used for generation and sampling of the ISI data. Therefore the sampling window can drift and could result in incorrect data values being sampled at a later point in time. To overcome this problem the ISI receive circuitry tracks the sampling window against the incoming data to ensure that the data is sampled in the centre of the bit period.
12.4.4.3 Stop Field Description
A 1 bit-time Stop field of b1 per ISI line ensures that all ISI lines return to the high state before the next packet is transmitted. The stop field is driven on to each ISI line simultaneously, i.e. b11 for a 2-wire ISI and b1111 for a 4-wire ISI would be interleaved over the respective ISI lines. Each ISI line is driven high for 1 bit-time. This is necessary because the first bit of the Start field is bO.
12.4.4.4 Bit Stuffing
This involves the insertion of bits into the bitstream at the transmitting SoPEC to avoid certain data patterns. The receiving SoPEC will strip these inserted bits from the bitstream.
Bit-stuffing will be performed when the Start symbol appears at a location other than the start field of any packet, i.e. when the bit pattern b0101010 occurs at the transmitter, a 0 will be inserted to escape the Start symbol, resulting in the bit pattern b01010100. Conversely, when the bit pattern b0101010 occurs at the receiver, if the next bit is a Ό’ it will be stripped, if it is a T then a Start symbol is detected.
If the frequency variations in the quartz crystal were large enough, it is conceivable that the resultant frequency drift over a large number of consecutive 1 s or 0s could cause the receiving SoPEC to loose synchronisation.<sup>6</sup> The quartz crystal that will be used in SoPEC systems is rated for 32MHz @ lOOppm. In a multi-SoPEC system with a 32MHz+100ppm crystal and a 32MHz-100ppm crystal, it would take approximately 5000 pclk cycles to cause a drift of 1 pclk cycle. This means that we would only need to bit-stuff somewhere before 1000 ISI bits of consecutive Is or consecutive 0s, to ensure adequate synchronization. As the maximum number of bits transmitted per ISI line in a packet is 145, it should not be <sup>6</sup>Current max packet size ~= 290 bits = 145 bits per ISI line (on a 2 wire ISI) = 725 160MHz cycles. Thus the pclks in the two communicating ISI devices should not drift by more than one cycle in 725 i.e. 1379 ppm. Careful analysis of the crystal, PLL and oscillator specs and the sync detection circuit is needed here to ensure our solution is robust.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
150 necessary to perform bit-stuffing for consecutive Is or 0s. We may wish to constrain the spec oixtalin and also xtalin for the ISI-Bridge chip to ensure the ISl cannot drift out of sync during packet reception.
Note that any violation of bit stuffing will result in the RxFrameErrorSticky status bit being set and the incoming packet will be treated as an errored packet.
12.4.4.5 ISl Long Packet
The format of a long ISl packet is shown in Figure 33 below. Data may only be transferred between ISl devices using a long packet as both the short and ping packets have no payload field. Except in the case of a broadcast packet, the receiving ISl device will always reply to a long packet with an explicit ACK (if no error is detected in the received packet) or will not reply at all (e.g. an error is detected in the received packet), leaving the transmitter to infer a NAK. As with all ISl packets the bitstream of a long packet is transmitted with its Isb (the leftmost bit in Figure 33) first. Note that the total length (in bits) of an ISl long packet differs slightly between a 2 and 4-wire ISl system due to the different number of bits required for the Start and Stop fields.
All long packets begin with the Start field as described earlier. The PktDesc field is described in Table 33.
Table 33. PktDesc field description
<td> Bit</td><td> Description</td>
<td> 0:1</td><td> 00 - Long packet 01 - Reserved 10 - Ping packet 11 - Reserved</td>
<td> 2</td><td> Sequence bit value. Only valid for long packets. See section 12.4.4.9 for a description of sequence bit operation</td>
Any ISl device in the system may transmit a long packet but only the ISIMaster may initiate an ISl transaction using a long packet. An ISISIave may only send a long packet in reply to a ping message from the ISIMaster. A long packet from an ISISIave may be addressed to any ISl device in the system.
The Address field is straightforward and complies with the ISl naming convention described in section 12.5.
The payload field is exactly what is in the transmit buffer of the transmitting ISl device and gets copied into the receive buffer of the addressed ISl device(s). When present the payload field is always 256 bits.
To ensure strong error detection a 16-bit CRC is appended.
12.4.4.6 ISl Ping Packet
The ISl ping packet is used to allow ISISIaves to transmit on the ISl bus. As can be seen from Figure 34 below the ping packet can be viewed as a special case of the long packet. In other words it is a long packet without any payload. Therefore the PktDesc field is the same as a long packet PktDesc, with the exception of the sequence bit, which is not valid for a ping packet. Both the ISISubld and the sequence bit are fixed at 1 for all ping packets. These values were chosen to maximize the hamming distance from an ACK symbol and to minimize the likelihood of bit stuffing.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
151
The ISISubld is unused in ping packets because the ISIMaster is addressing the ISI device rather than one of the DMA channels in the device. The ISISIave may address any ISIId.ISISubld in response if it wishes. The ISISIave will respond to a ping packet with either an explicit ACK (if it has nothing to send), an inferred NAK (if it detected an error in the ping packet) or a long packet (containing the data it wishes to send). Note that inferred NAKs do not result in the retransmission of a ping packet. This is because the ping packet will be retransmitted on a predetermined schedule (see 12.4.4.11 for more details).
An ISISIave should never respond to a ping message to the broadcast ISIId as this must have been sent in error. An ISI ping packet will never be sent in response to any packet and may only originate from an ISIMaster.
12.4.4.7 ISI Short Packet
The ISI short packet is only 17 bits long, including the Start and Stop fields. A value of b11101011 is proposed for the ACK symbol. As a 16-bit CRC is inappropriate for such a short packet it is not used. In fact there is only one valid value for a short ACK packet as the Start, ACK and Stop symbols all have fixed values. Short packets are only used for acknowledgements (i.e. explicit ACKs). The format of a short ISI packet is shown in Figure 35 below. The ACK value is chosen to ensure that no bit stuffing is required in the packet and to minimize its hamming distance from ping and long ISI packets.
12.4.4.8 Error Detection and Retransmission
The 16-bit CRC will provide a high degree of error detection and the probability of transmission errors occurring is very low as the transmission channel (i.e. PCB traces) will have a low inherent bit error rate. The number of undetected errors should therefore be minute.
The HDLC standard CRC-16 (i.e. G(x) = x<sup>16</sup> + x<sup>12</sup> + x<sup>5</sup> +1) is to be used for this calculation, which is to be performed serially. It is calculated over the entire packet (excluding the Start and Stop fields). A simple retransmission mechanism frees the CPU from getting involved in error recovery for most errors because the probability of a transmission error occurring more than once in succession is very, very low in normal circumstances.
After each non-short ISI packet is transmitted the transmitting device will open a reply window. The size of the reply window will be ISIShortReplyWin bit times when a short packet is expected in reply, i.e. the size of a short packet, allowing for worst case bit stuffing, bus turnarounds and timing differences. The size of the reply window will be ISILongReplyWin bit times when a long packet is expected in reply, i.e. this will be the max size of a long packet, allowing for worst case bit stuffing, bus turnarounds and timing differences. In both cases if an ACK is received the window will close and another packet can be transmitted but if an ACK is not received then the full length of the window must be waited out.
As no reply should be sent to a broadcast packet, no reply window should be required however all other long packets open a reply window in anticipation of an ACK. While the desire is to minimize the time between broadcast transmissions the simplest solution should be employed. This would imply the same size reply window as other long packets.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
152
When a packet has been received without any errors the receiving ISI device must transmit its acknowledge packet (which may be either a long or short packet) before the reply window closes. When detected errors do occur the receiving ISI device will not send any response. The transmitting ISI device interprets this lack of response as a NAK indicating that errors were detected in the transmitted packet or that the receiving device was unable to receive the packet for some reason (e.g. its buffers are full). If a long packet was transmitted the transmitting ISI device will keep the transmitted packet in its transmit buffer for retransmission. If the transmitting device is the ISIMaster it will retransmit the packet immediately while if the transmitting device is an ISISIave it will retransmit the packet in response to the next ping it receives from the ISIMaster.
The transmitting ISI device will continue retransmitting the packet when it receives a NAK until it either receives an ACK or the number of retransmission attempts equals the value of the NumRetries register. If the transmission was unsuccessful then the transmitting device sets the TxErrorSticky bit in its ISIIntStatus register. The receiving device also sets the RxErrorSticky bit in its ISIIntStatus register whenever it detects a CRC error in an incoming packet and is not required to take any further action, as it is up to the transmitting device to detect and rectify the problem. The NumRetries registers in all ISI devices should be set to the same value for consistent operation. Note that successful transmission or reception of ping packets do not affect retransmission operation.
Note that a transmit error will cause the ISI to stop transmitting. CPU intervention will be required to resolve the source of the problem and to restart the ISI transmit operation. Receive errors however do not affect receive operation and they are collected to facilitate problem debug and to monitor the quality of the ISI physical channel. Transmit or receive errors should be extremely rare and their occurrence will most likely indicate a serious problem.
Note that broadcast packets are never acknowledged to avoid contention on the common ISI lines. If an ISISIave detects an error in a broadcast packet it should use the message passing mechanism described earlier to alert the ISIMaster to the error if it so wishes.
12.4.4.9 Sequence Bit Operation
To ensure that communication between transmitting and receiving ISI devices is correctly ordered a sequence bit is included in every long packet to keep both devices in step with each other. The sequence bit field is a constant for short or ping packets as they are not used for data transmission. In addition to the transmitted sequence bit all ISI devices keep two local sequence bits, one for each ISISubld. Furthermore each ISI device maintains a transmit sequence bit for each ISIId and ISISubld it is in communication with. For packets sourced from the external host (via USB) the transmit sequence bit is contained in the relevant USBEPnDest register while for packets sourced from the CPU the transmit sequence bit is contained in the CPUISITxBuffCntrl register. The sequence bits for received packets are stored in ISISubldOSeq and ISISubldlSeq registers. All ISI devices will initialize their sequence bits to 0 after reset. It is the responsibility of software to ensure that the sequence bits of the transmitting and receiving ISI devices are correctly initialized each time a new source is selected for any ISIId.ISISubld channel.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
153
Sequence bits are ignored by the receiving ISI device for broadcast packets. However the broadcasting ISI device is free to toggle the sequence in the broadcast packets since they will not affect operation. The SCB will do this for all USB source data so that there is no special treatment for the sequence bit of a broadcast packet in the transmitting device. CPU sourced broadcasts will have sequence bits toggled at the discretion of the program code.
Each SoPEC may also ignore the sequence bit on either of its ISISubld channels by setting the appropriate bit in the ISISubldSeqMask register. The sequence bit should be ignored for ISISubld channels that will carry data that can originate from more than one source and is self ordering e.g. control messages.
A receiving ISI device will toggle its sequence bit addressed by the ISISubld only when the receiver is able to accept data and receives an error-free data packet addressed to it. The transmitting ISI device will toggle its sequence bit for that ISIId.ISISubld channel only when it receives a valid ACK handshake from the addressed ISI device.
Figure 36 shows the transmission of two long packets with the sequence bit in both the transmitting and receiving devices toggling from 0 to 1 and back to 0 again. The toggling operation will continue in this manner in every subsequent transmission until an error condition is encountered.
When the receiving ISI device detects an error in the transmitted long packet or is unable to accept the packet (because of full buffers for example) it will not return any packet and it will not toggle its local sequence bit. An example of this is depicted in Figure 37. The absence of any response prompts the transmitting device to retransmit the original (seq=0) packet. This time the packet is received without any errors (or buffer space may have been freed) so the receiving ISI device toggles its local sequence bit and responds with an ACK. The transmitting device then toggles its local sequence bit to a 1 upon correct receipt of the ACK.
However it is also possible for the ACK packet from the receiving ISI device to be corrupted and this scenario is shown in Figure 38. In this case the receiving device toggles its local sequence bit to 1 when the long packet is received without error and replies with an ACK to the transmitting device. The transmitting device does not receive the ACK correctly and so does not change its local sequence bit. It then retransmits the seq=0 long packet. When the receiving device finds that there is a mismatch between the transmitted sequence bit and the expected (local) sequence bit is discards the long packet and replies with an ACK. When the transmitting ISI device correctly receives the ACK it updates its local sequence bit to a 1, thus restoring synchronization. Note that when the ISISubldSeqMask bit for the addressed ISISubld is set then the retransmitted packet is not discarded and so a duplicate packet will be received. The data contained in the packet should be self-ordering and so the software handling these packets (most likely control messages) is expected to deal with this eventuality.
12.4.4.10 Flow Control
The ISI also supports flow control by treating it in exactly the same manner as an error in the received packet. Because the SCB enjoys greater guaranteed bandwidth to DRAM than both the ISI
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
154 and USB can supply flow control should not be required during normal operation. Any blockage on a DMA channel will soon result in the NumRetries value being exceeded and transmission from that SoPEC being halted. If a SoPEC NAKs a packet because its RxBuffer is full it will flag an overflow condition. This condition can potentially cause a CPU interrupt, if the corresponding interrupt is enabled. The RxOverflowSticky bit of its ISIIntStatus register reflects this condition. Because flow control is treated in the same manner as an error the transmitting ISI device will not be able to differentiate a flow control condition from an error in the transmitted packet.
12.4.4.11 Auto-ping Operation
While the CPU of the ISIMaster could send a ping packet by writing the appropriate header to the CPUISITxBuffCntrl register it is expected that all ping packets will be generated in the ISI itself. The use of automatically generated ping packets ensures that ISISIaves will be given access to the ISI bus with a programmable minimum guaranteed frequency in addition to whenever it would otherwise be idle. Five registers facilitate the automatic generation of ping messages within the ISI: PingScheduleO, PingSchedulel, PingSchedule2, ISITotalPeriod and ISILocalPeriod. Auto-pinging will be enabled if any bit of any of the PingScheduleN registers is set and disabled if all PingScheduleN registers are 0x0000.
Each bit of the 15-bit PingScheduleN register corresponds to an ISIId that is used in the Address field of the ping packet and a 1 in the bit position indicates that a ping packet is to be generated for that ISIId. A 0 in any bit position will ensure that no ping packet is generated for that ISIId. As ISISIaves may differ in their bandwidth requirement (particularly if a storage SoPEC is present) three different PingSchedule registers are used to allow an ISISIave receive up to three times the number of pings as another active ISISIave. When the ISIMaster is not sending long packets (sourced from either the CPU or USB in the case of a SoPEC ISIMaster) ISI ping packets will be transmitted according to the pattern given by the three PingScheduleN registers. The ISI will start with the Isb of PingScheduleO register and work its way from Isb through msb of each of the PingScheduleN registers. When the msb of PingSchedule2 is reached the ISI returns to the Isb of PingScheduleO and continues to cycle through each bit position of each PingScheduleN register. The ISI has more than enough time to work out the destination of the next ping packet while a ping or long packet is being transmitted.
With the addition of auto-ping operation we now have three potential sources of packets in an ISIMaster SoPEC: USB, CPU and auto-ping. Arbitration between the CPU and USB for access to the ISI is handled outside the ISI. To ensure that local packets get priority whenever possible and that ping packets can have some guaranteed access to the ISI we use two 4-bit counters whose reload value is contained in the ISITotalPeriod and ISILocalPeriod registers. As we saw in section 12.4.4.1 every ISI transaction is initiated by the ISIMaster transmitting either a long packet or a ping packet. The ISITotalPeriod counter is decremented for every ISI transaction (i.e. either long or ping) when its value is non-zero. The ISILocalPeriod counter is decremented for every local packet that is transmitted. Neither counter is decremented by a retransmitted packet. If the ISITotalPeriod counter is zero then ping packets will not change its value from zero. Both the ISITotalPeriod and
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
155
ISILocalPeriod counters are reloaded by the next local packet transmit request after the ISITotalPeriod counter has reached zero and this local packet has priority over pings.
The amount of guaranteed ISI bandwidth allocated to both local and ping packets is determined by the values of the ISITotalPeriod and ISILocalPeriod registers. Local packets will always be given priority when the ISILocalPeriod counter is non-zero. Ping packets will be given priority when the ISILocalPeriod counter is zero and the ISITotalPeriod counter is still non-zero.
Note that ping packets are very likely to get more than their guaranteed bandwidth as they will be transmitted whenever the ISI bus would otherwise be idle (i.e. no pending local packets). In particular when the ISITotalPeriod counter is zero it will not be reloaded until another local packet is pending and so ping packets transmitted when the ISITotalPeriod counter is zero will be in addition to the guaranteed bandwidth. Local packets on the other hand will never get more than their guaranteed bandwidth because each local packet transmitted decrements both counters and will cause the counters to be reloaded when the ISITotalPeriod counter is zero. The difference between the values of the ISITotalPeriod and ISILocalPeriod registers determines the number of automatically generated ping packets that are guaranteed to be transmitted every ISITotalPeriod number of ISI transactions. If the ISITotalPeriod and ISILocalPeriod values are the same then the local packets will always get priority and could totally exclude ping packets if the CPU always has packets to send.
For example if ISITotalPeriod = OxC; ISILocalPeriod = 0x8; PingScheduleO = OxOE; PingSchedulel = OxOC and PingSchedule2 = 0x08 then four ping messages are guaranteed to be sent in every 12 ISI transactions. Furthermore ISIId3 will receive 3 times the number of ping packets as ISIdl and ISIId2 will receive twice as many as ISIdl. Thus over a period of 36 contended ISI transactions (allowing for two full rotations through the three PingScheduleN registers) when local packets are always pending 24 local packets will be sent, ISIdl will receive 2 ping packets, ISId2 will receive 4 pings and ISId3 will receive 6 ping packets. If local traffic is less frequent then the ping frequency will automatically adjust upwards to consume all remaining ISI bandwidth.
12.4.5 Wake-up from Sleep Mode
Either the PrintMaster SoPEC or the external host may place any of the ISISIave SoPECs in sleep mode prior to going into sleep mode itself. The ISISIave device should then ensure that its ISIWakeupEnable bit of the WakeupEnable register (see Table 34) is set prior to entering sleep mode. In an ISISIave device the ISI block will continue to receive power and clock during sleep mode so that it may monitor the gpio_lsi_din lines for activity. When ISI activity is detected during sleep mode and the ISIWakeupEnable bit is set the ISI asserts the isi_cpr_reset_n signal. This will bring the rest of the chip out of sleep mode by means of a wakeup reset. See chapter 16 for more details of reset propagation.
12.4.6 Implementation
Although the ISI consists of either 2 or 4 ISI data lines over which a serial data stream is demultiplexed, each ISI line is treated as a separate serial link at the physical layer. This permits a certain amount of skew between the ISI lines that could not be tolerated if the lines were treated as
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
156 a parallel bus. A lower Bit Error Rate (BER) can be achieved if the serial data recovery is performed separately on each serial link. Figure 39 illustrates the ISI sub block partitioning.
12.4.6.1 ISI Sub-block Partition * Definition of I/Os.
Table 34. ISI I/O
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td> Clock and Reset</td><td></td><td></td><td></td>
<td> isi_pclk</td><td> 1</td><td> In</td><td> ISI primary clock.</td>
<td> isi_reset_n</td><td> 1</td><td> In</td><td> ISI reset. Active low. Asserting isi_reset_n will reset all ISI logic. Synchronous to isi_pclk.</td>
<td> Configuration</td><td></td><td></td><td></td>
<td> isi_go</td><td> 1</td><td> In</td><td> ISI GO. Active high. When GO is de-asserted, all ISI statemachines are reset to their idle states, all ISI output signals are deasserted, but all ISI counters retain their values. When GO is asserted, all ISI counters are reset and all ISI statemachines and output signals will return to their normal mode of operation.</td>
<td> isi_master_select</td><td> 1</td><td> In</td><td> ISI master select. Determines whether the SoPEC is an ISIMaster or not 1 = ISIMaster 0 = ISISIave</td>
<td> isi_id[3:0]</td><td> 4</td><td> In</td><td> ISI ID for this device.</td>
<td> isi_retries[3:0]</td><td> 4</td><td> In</td><td> ISI number of retries. Number of times a transmitting ISI device will attempt retransmission of a NAK’d packet before aborting the transmission and flagging an error. The value of this configuration signal should not be changed while there are valid packets in the Tx buffer.</td>
<td> isi_ping_schedule0[1 4 :0]</td><td> 15</td><td> In</td><td> ISI auto ping schedule #0. Denotes which ISIIds will be receive ping packets. Note that bitO refers to ISIldO, bit1 to ISlIdl ...bill4 to ISlIdl4. Setting a bit in this schedule will enable auto ping generation for the corresponding ISI ID. The ISI will start from the bit 0 of isi_ping_schedule0 and cycle through to bit 14, generating pings for each bit that is set. This operation will be performed in sequence from</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
157
<td></td><td></td><td></td><td> isi_ping_scheduleO through isi_ping_schedule2.</td>
<td> isi_ping_schedule1 [1 4:0]</td><td> 15</td><td> In</td><td> As per isi_ping_scheduleO.</td>
<td> isi_ping_schedule2[1 4:0]</td><td> 15</td><td> In</td><td> As per isi_ping_scheduleO.</td>
<td> isi_total_period[3:0]</td><td> 4</td><td> In</td><td> Reload value of the ISI Total Period Counter.</td>
<td> isi_local_period[3:0]</td><td> 4</td><td> In</td><td> Reload value of the ISI Local Period Counter.</td>
<td> isi_number_pins</td><td> 1</td><td> In</td><td> Number of active ISI data pins. Used to select how many serial data pins will be used to transmit and receive data. Should reflect the number of ISI device data pins that are in use. 1 = isi_data[3:0] active 0 = isi_data[1:0] active</td>
<td> isi_turn_around[3:0]</td><td> 4</td><td> In</td><td> ISI bus turn around time in ISI clock cycles (32MHz).</td>
<td> is i_short_reply_win [4: 0]</td><td> 5</td><td> In</td><td> ISI long packet reply window in ISI clock cycles (32MHz).</td>
<td> isi_long_reply_win[8: 0]</td><td> 9</td><td> In</td><td> ISI long packet reply window in ISI clock cycles (32MHz).</td>
<td> isi_tx_enable</td><td> 1</td><td> In</td><td> ISI transmit enable. Active high. Enables ISI transmission of long or ping packets. ACKs may still be transmitted when this bit is 0. The value of this configuration signal should not be changed while there are valid packets in the Tx buffer.</td>
<td> isi_rx_enable</td><td> 1</td><td> In</td><td> ISI receive enable. Active high. Enables ISI packet reception. Any activity on the ISI bus will be ignored when this signal is de-asserted. This signal should only be de-asserted if the ISI block is not required for use in the design.</td>
<td> isi_bit_stuff_rate[3:0]</td><td> 1</td><td> In</td><td> ISI bit stuffing limit. Allows the bit stuffing counter value to be programmed. Is loaded into the 4 upper bits of the 7bit wide bit stuffing counter. The lower bits are always loaded with b111, to prevent bit stuffing for less than 7 consecutive ones or zeroes. E.g. bOOO : stuff_count = b0000111 : bit stuff after 7 consecutive 0/1 b111 : stuff_count = b1111111 : bit stuff afterl 27 consecutive 0/1</td>
<td colspan="4"> Serial Link Signals</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
158
<td> isi_ser_data_in[3:0]</td><td> 4</td><td> In</td><td> ISI Serial data inputs. Each bit corresponds to a separate serial link.</td>
<td> isi_ser_data_out[3:0]</td><td> 4</td><td> Out</td><td> ISI Serial data outputs. Each bit corresponds to a separate serial link.</td>
<td> isi_ser_data_en[3:0]</td><td> 4</td><td> Out</td><td> ISI Serial data driver enables. Active high. Each bit corresponds to a separate serial link.</td>
<td colspan="4"> Tx Packet Buffer</td>
<td> isi_tx_wr_en</td><td> 1</td><td> In</td><td> ISI Tx FIFO write enable. Active high. Asserting isi_tx_wr_en will write the 64 bit data on isi_tx_wr_data to the FIFO, providing that space is available in the FIFO. If lsi_tx_wr_en remains asserted after the last entry in the current packet is written, the write operation will wrap around to the start of the next packet, providing that space is available for a second packet in the FIFO.</td>
<td> isi_tx_wr_data[63:0]</td><td> 64</td><td> In</td><td> ISI Tx FIFO write data.</td>
<td><sup>isi</sup>_tx_Ping</td><td> 1</td><td> In</td><td> ISI Tx FIFO ping packet select. Active high. Asserting isi_tx_ping will queue a ping packet for transmission, as opposed to a long packet. Although there is no data payload for a ping packet, a packet location in the FIFO is used as a ’place holder’ for the ping packet. Any data written to the associated packet location in the FIFO will be discarded when the ping packet is transmitted.</td>
<td> isi_tx_id[3:0]</td><td> 5</td><td> In</td><td> ISI Tx FIFO packet ID. ISI ID for each packet written to the FIFO. Registered when the last entry of the packet is written.</td>
<td> isi_tx_sub_id</td><td> 1</td><td> In</td><td> ISI Tx FIFO packet sub ID. ISI sub ID for each packet written to the FIFO. Registered when the last entry of the packet is written.</td>
<td> isi_tx_pkt_count[1:0]</td><td> 2</td><td> Out</td><td> ISI Tx FIFO packet count. Indicates the number of packets contained in the FIFO. The FIFO has a capacity of 2 x 256 bit packets. Range is b00->b10.</td>
<td> isi_tx_word_count[2:0 I</td><td> 3</td><td> Out</td><td> ISI Tx FIFO current packet word count. Indicates the number of words contained in the current Tx packet location of the Tx FIFO. Each packet location has a capacity of 4 x 64 bit words. Range is bOOO>b100.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
159
<td> isi_tx_empty</td><td> 1</td><td> Out</td><td> ISI Tx FIFO empty. Active high. Indicates that no packets are present in the FIFO.</td>
<td> isi_tx_full</td><td> 1</td><td> Out</td><td> ISI Tx FIFO full. Active high. Indicates that 2 packets are present in the FIFO, therefore no more packets can be transmitted.</td>
<td> isi_tx_over_flow</td><td> 1</td><td> Out</td><td> ISI Tx FIFO overflow. Active high. Indicates that a write operation was performed on a full FIFO. The write operation will have no effect on the contents of the FIFO or the write pointer.</td>
<td> isi_tx_error</td><td> 1</td><td> Out</td><td> ISI Tx FIFO error. Active high. Indicates that an error occurred while transmitting the packet currently at the head of the FIFO. This will happen if the number of transmission attempts exceeds isi_tx_retries.</td>
<td> isi_tx_desc[2:0]</td><td> 3</td><td> Out</td><td> ISI Tx packet descriptor field. ISI packet descriptor field for the packet currently at the head of the FIFO. See Table for details. Only valid when isi_tx_empty=0, i.e. when there is a valid packet in the FIFO.</td>
<td> isi_tx_addr[4:0]</td><td> 5</td><td> Out</td><td> ISI Tx packet address field. ISI address field for the packet currently at the head of the FIFO. See Table for details. Only valid when isi_tx_empty=0, i.e. when there is a valid packet in the FIFO.</td>
<td colspan="4"> Rx Packet FIFO</td>
<td> isi_rx_rd_en</td><td> 1</td><td> In</td><td> ISI Rx FIFO read enable. Active high. Asserting isi_rx_rd_en will drive isi_rx_rd_data with valid data, from the Rx packet at the head of the FIFO, providing that data is available in the FIFO. If isi_rx_rd_en remains asserted after the last entry is read from the current packet, the read operation will wrap around to the start of the next packet, providing that a second packet is available in the FIFO.</td>
<td> isi_rx_rd_data[63:0]</td><td> 64</td><td> Out</td><td> ISI Rx FIFO read data.</td>
<td> isi_rx_sub_id</td><td> 1</td><td> Out</td><td> ISI Rx packet sub ID. Indicates the ISI sub ID associated with the packet at the head of the Rx FIFO.</td>
<td> isi_rx_pkt_count[1:0]</td><td> 2</td><td> Out</td><td> ISI Rx FIFO packet count. Indicates the number of packets contained in the FIFO.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
160
<td></td><td></td><td></td><td> The FIFO has a capacity of 2 x 256 bit packets. Range is b00->b10.</td>
<td> isi_rx_word_count[2:0 I</td><td> 3</td><td> Out</td><td> ISI Rx FIFO current packet word count. Indicates the number of words contained in the Rx packet location at the head of the FIFO. Each packet location has a capacity of 4 x 64 bit words. Range is b000->b100.</td>
<td> isi_rx_empty</td><td> 1</td><td> Out</td><td> ISI Rx FIFO empty. Active high. Indicates that no packets are present in the FIFO.</td>
<td> isi_rx_full</td><td> 1</td><td> Out</td><td> ISI Rx FIFO full. Active high. Indicates that 2 packets are present in the FIFO, therefore no more packets can be received.</td>
<td> isi_rx_over_flow</td><td> 1</td><td> Out</td><td> ISI Rx FIFO overflow. Active high. Indicates that a packet was addressed to the local ISI device, but the Rx FIFO was full, resulting in a NAK.</td>
<td> isi_rx_under_run</td><td> 1</td><td> Out</td><td> ISI Rx FIFO under run. Active high. Indicates that a read operation was performed on an empty FIFO. The invalid read will return the contents of the memory location currently addressed by the FIFO read pointer and will have no effect on the read pointer.</td>
<td> isi_rx_frame_error</td><td> 1</td><td> Out</td><td> ISI Rx framing error. Active high. Asserted by the ISI when a framing error is detected in the received packet, which can be caused by an incorrect Start or Stop field or by bit stuffing errors. The associated packet will be dropped.</td>
<td> isi_rx_crc_error</td><td> 1</td><td> Out</td><td> ISI Rx CRC error. Active high. Asserted by the ISI when a CRC error is detected in an incoming packet. Other than dropping the errored packet ISI reception is unaffected by a CRC Error.</td>
12.4.6.2 ISI Serial Interface Engine (isi_sie)
There are 4 instantiations of the isi_sie sub block in the ISI, 1 per ISI serial link. The isi_sie is responsible for Rx serial data sampling, Tx serial data output and bit stuffing.
Data is sampled based on a phase detection mechanism. The incoming ISI serial data stream is over sampled 5 times per ISI bit period. The phase of the incoming data is determined by detecting transitions in the ISI serial data stream, which indicates the ISI bit boundaries. An ISI bit boundary is defined as the sample phase at which a transition was detected.
The basic functional components of the isi_sie are detailed in Figure 40. These components are simply a grouping of logical functionality and do not necessarily represent hierarchy in the design.
12.4.6.2.1 SIE Edge Detection and Data I/O
The basic structure of the data I/O and edge detection mechanism is detailed in Figure 41.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
161
NOTE: Serial data from the receiver in the pad MUST be synchronized to the isi_pclk domain with a 2 stage shift register external to the ISI, to reduce the risk of metastability. ser_data_out and ser_data_en should be registered externally to the ISI.
The Rx/Tx statemachine drives ser_data_en, stuff_1_en and stuff_0_en. The signals stuff_1_en and stuff_0_en cause a one or a zero to be driven on ser_data_out when they are asserted, otherwise fifo_rd_data is selected.
12.4.6.2.2 SIE Rx/Tx Statemachine
The Rx/Tx statemachine is responsible for the transmission of ISI Tx data and the sampling of ISI Rx data. Each ISI bit period is 5 isi_pclk cycles in duration.
The Tx cycle of the Rx/Tx statemachine is illustrated in Figure 42. It generates each ISI bit that is transmitted. States tx0->tx4 represent each of the 5 isi_pclk phases that constitute a Tx ISI bit period. ser_data_en controls the tristate enable for the ISI line driver in the bidirectional pad, as shown in Figure 41. rx_tx_cycle is asserted during both Rx and Tx states to indicate an active Rx or Tx cycle. It is primarily used to enable bit stuffing.
NOTE: All statemachine signals are assumed to be Ό’ unless otherwise stated.
The Tx cycle for Tx bit stuffing when the Rx/Tx statemachine inserts a Ό’ into the bitstream can be seen in Figure 43.
NOTE: All statemachine signals are assumed to be Ό’ unless otherwise stated
The Tx cycle for Tx bit stuffing when the RxTx statemachine inserts a T into the bitstream can be seen in Figure 44.
NOTE: All statemachine signals are assumed to be Ό’ unless otherwise stated
The fx*and stuff* states are detailed separately for clarity. They could be easily combined when coding the statemachine, however it would be better for verification and debugging if they were kept separate.
The Rx cycle of the ISI Rx/Tx statemachine is detailed in Figure 45. The Rx cycle of the Rx/Tx Statemachine, samples each ISI bit that is received. States rx0->rx4 represent each of the 5 isi_pclk phases that constitute a Rx ISI bit period.
The optimum sample position for an ideal ISI bit period is 2 isi_pclk cycles after the ISI bit boundary sample, which should result in a data sample close to the centre of the ISI bit period.
rx_sample is asserted during the rx2 state to indicate a valid ISI data sample on rx_bit, unless the bit should be stripped when flagged by the bit stuffing statemachine, in which case rx_sample is not asserted during rx2 and the bit is not written to the FIFO. When edge is asserted, it resets the Rx cycle to the rxO state, from any rx state. This is how the /si_sie tracks the phase of the incoming data. The Rx cycle will cycle through states rx0->rx4 until edge is asserted to reset the sample phase, or a tx_req is asserted indicating that the ISI needs to transmit.
Due to the 5 times oversampling a maximum phase error of 0.4 of an ISI bit period (2 isi_pclk cycles out of 5) can be tolerated.
NOTE: All statemachine signals are assumed to be Ό’ unless otherwise stated.
An example of the Tx data generation mechanism is detailed in Figure 46. tx_req and fifo_wr_tx are driven by the framer block.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
162
An example of the Rx data sampling functional timing is detailed in Figure 47. The dashed lines on the ser_datajn_ff signal indicate where the Rx/Tx statemachine perceived the bit boundary to be, based on the phase of the last ISl bit boundary. It can be seen that data is sampled during the same phase as the previous bit was, in the absence of a transition.
12.4.6.2.3 SIE Rx/Tx FIFO
The Rx/Tx FIFO is a 7 x 1 bit synchronous look-ahead FIFO that is shared for Tx and Rx operations. It is required to absorb any Rx/Tx latency caused by bit stripping/stuffing on a per ISl line basis, i.e. some ISl lines may require bit stripping/stuffing during an ISl bit period while the others may not, which would lead to a loss of synchronization between the data of the different ISl lines, if a FIFO were not present in each isi_sie.
The basic functional components of the FIFO are detailed in Figure 48. tx_ready is driven by the Rx/Tx statemachine and selects which signals control the read and write operations. tx_ready=1 during ISl transmission and selects the fifo_*tx control and data signals. tx_ready=0 during ISl reception and selects the fifo_*rx control and data signals. fifo_reset is driven by the Rx/Tx statemachine. It is active high and resets the FIFO and associated logic before/after transmitting a packet to discard any residual data.
The size of the FIFO is based on the maximum bit stuffing frequency and the size of the shift register used to segment/re-assemble the multiple serial streams in the ISl framing logic. The maximum bit stuffing frequency is every 7 consecutive ones or zeroes. The shift register used is 32 bits wide. This implies that the maximum number of stuffed bits encountered in the time it takes to fill/empty the shift register if 4. This would suggest that 4x1 bit would be the minimum ideal size of the FIFO. However it is necessary to allow for different skew and phase error between the ISl lines, hence a 7 x 1 bit FIFO.
The FIFO is controlled by the is/_sie during packet reception and is controlled by the isi_frame block during packet transmission. This is illustrated in Figure 49. The signal tx_ready selects which mode the FIFO control signals operate in. When tx_ready=0, i.e. Rx mode, the /s/_s/e control signals rx_sample, fifo_rd_rx and ser_data_jn_ff are selected. When tx_ready=1, i.e. Tx mode, the sie_frame control signals fifo_wr_tx, fifo_rd_tx and fifo_wr_data_tx are selected.
12.4.6.3 Bit Stuffing
Programmable bit stuffing is implemented in the isi_sie. This is to allow the system to determine the amount of bit stuffing necessary for a specific ISl system devices. It is unlikely that bit stuffing would be required in a system using a 100ppm rated crystal. However, a programmable bit stuffing implementation is much more versatile and robust.
The bit stuffing logic consists of a counter and a statemachine that track the number of consecutive ones or zeroes that are transmitted or received and flags the Rx/Tx statemachine when the bit stuffing limit has been reached. The counter, stuff_count, is a 7 bit counter, which decrements when rx_sample is asserted on a Rx cycle or when fifo_rd_tx is asserted on a Tx cycle. The upper 4 bits of stuff_count are loaded with isi_bit_stuff_rate. The lower 3 bits of stuff_count are always loaded with b111, i.e. for isi_bit_stuff_rate = bOOO, the counter would be loaded with b0000111. This is to
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
163 prevent bit stuffing for less than 7 consecutive ones or zeroes. This allows the bit stuffing limit to be set in the range 7->127 consecutive ones or zeroes.
NOTE: It is extremely important that a change in the bit stuffing rate, isi_bit_stuff_rate, is carefully co-ordinated between ISI devices in a system. It is obvious that ISI devices will not be able to communicate reliably with each other with different bit stuffing settings. It is recommended that all ISI devices in a system default to the safest bit stuffing rate (isi_bit_stuff_rate = bOOO) at reset. The system can then co-ordinate the change to an optimum bit stuffing rate.
The ISI bit stuffing statemachine Tx cycle is shown in Figure 50. The counter is loaded when stuff_count_load is asserted.
NOTE: All statemachine signals are assumed to be Ό’ unless otherwise stated.
The ISI bit stuffing statemachine Rx cycle is shown in Figure 51. It should be noted that the statemachine enters the strip state when stuff_count=0x2. This is because the statemachine can only transition to rxO or rx1 when rx_sample is asserted as it needs to be synchronized to changes in sampling phase introduced by the Rx/Tx statemachine. Therefore a one or a zero has already been sampled by the time it enters rxO or rx1. This is not the case for the Tx cycle, as it will always have a stable 5 isi_pclk cycles per bit period and relies purely on the data value when entering txO or tx1. The Tx cycle therefore enters stuffl or stuffO when stuff_count=0x1.
NOTE: All statemachine signals are assumed to be O’ unless otherwise stated.
12.4.6.4 ISI Framing and CRC sub-block (isi_frame)
12.4.6.4.1 CRC Generation/Checking
A Cyclic Redundancy Checksum (CRC) is calculated over all fields except the start and stop fields for each long or ping packet transmitted. The receiving ISI device will perform the same calculation on the received packet to verify the integrity of the packet. The procedure used in the CRC generation/checking is the same as the Frame Checking Sequence (FCS) procedure used in HDLC, detailed in ITU-T Recommendation T30[39].
For generation/checking of the CRC field, the shift register illustrated in Figure 52 is used to perform the modulo 2 division on the packet contents by the polynomial G(x) = x<sup>16</sup> + x<sup>12</sup> + x<sup>5</sup> +1.
To generate the CRC for a transmitted packet, where T(x) = [Packet Descriptor field, Address field, Data Payload field] (a ping packet will not contain a data payload field).
• Set the shift register to OxFFFF.
• Shift T(x) through the shift register, LSB first. This can occur in parallel with the packet transmission.
• Once the each bit of T(x) has been shifted through the register, it will contain the remainder of the modulo 2 division T(x)/G(x).
• Perform a ones complement of the register contents, giving the CRC field which is transmitted MSB first, immediately following the last bit of M(x
To check the CRC for a received packet, where R(x) = [Packet Descriptor field, Address field, Data Payload field, CRC field] (a ping packet will not contain a data payload field).
• Set the shift register to OxFFFF.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
164 • Shift R(x) through the shift register, LSB first. This can occur in parallel with the packet reception.
• Once each bit of the packet has been shifted through the register, it will contain the remainder of the modulo 2 division R(x)IG(x).
• The remainder should equal b0001110100001111, for a packet without errors.
12.5 CTRL (Control Sub-block)
12.5.1 Overview
The CTRL is responsible for high level control of the SCB sub-blocks and coordinating access between them. All control and status registers for the SCB are contained within the CTRL and are accessed via the CPU interface. The other major components of the CTRL are the SCB Map logic and the DMA Manager logic.
12.5.2 SCB Mapping
In order to support maximum flexibility when moving data through a multi-SoPEC system it is possible to map any USB endpoint onto either DMAChannel within any SoPEC in the system. The SCB map, and indeed the SCB itself is based around the concept of an ISIId and an ISISubld. Each SoPEC in the system has a unique ISIId and two ISISublds, namely ISISubldO and ISISubldl. We use the convention that ISISubldO corresponds to DMAChannelO in each SoPEC and ISISubldl corresponds to DMAChannell. The naming convention for the ISIId is shown in Table 35 below and this would correspond to a multi-SoPEC system such as that shown in Figure 27. We use the term ISIId instead of SoPECId to avoid confusion with the unique ChipID used to create the SoPECJd and SoPEC_id_key (see chapter 17 and [9] for more details).
Table 35. ISIId naming convention
<td> ISIId</td><td> SoPEC to which it refers</td>
<td> 0-14</td><td> Standard device ISIIds (0 is the power-on reset value)</td>
<td> 15</td><td> Broadcast ISIId</td>
The combined ISIId and ISISubld therefore allows the ISI to address DMAChannelO or DMAChannell on any SoPEC device in the system. The ISI, DMA manager and SCB map hardware use the ISIId and ISISubld to handle the different data streams that are active in a multiSoPEC system as does the software running on the CPU of each SoPEC. In this document we will identify DMAChannels as ISlx.y where x is the ISIId and y is the ISISubld. Thus ISI2.1 refers to DMAChannell of ISISIave2. Any data sent to a broadcast channel, i.e. ISI15.0 or ISI15.1, are received by every ISI device in the system including the ISIMaster (which may be an ISI-Bridge). The USB device controller and software stacks however have no understanding of the ISIId and ISISubld but the Silverbrook printer driver software running on the external host does make use of the ISIId and ISISubld. USB is simply used as a data transport - the mapping of USB device endpoints onto ISIId and Subld is communicated from the external host Silverbrook code to the SoPEC Silverbrook code through USB control (or possibly bulk data) messages i.e. the mapping
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
165 information is simply data payload as far as USB is concerned. The code running on SoPEC is responsible for parsing these messages and configuring the SCB accordingly.
The use of just two DMAChannels places some limitations on what can be achieved without software intervention. For every SoPEC in the system there are more potential sources of data than there are sinks. For example an ISISIave could receive both control and data messages from the ISIMaster SoPEC in addition to control and data from the external host, either specifically addressed to that particular ISISIave or over the broadcast ISI channel. However all ISISIaves only have two possible data sinks, i.e. DMAChannelO and DMAChannell. Another example is the ISIMaster in a multi-SoPEC system which may receive control messages from each SoPEC in addition to control and data information from the external host (e.g. over USB). In this case all of the control messages are in contention for access to DMAChannelO. We resolve these potential conflicts by adopting the following conventions:
1) Control messages may be interleaved in a memory buffer: The memory buffer that the DMAChannelO points to should be regarded as a central pool of control messages. Every control message must contain fields that identify the size of the message, the source and the destination of the control message. Control messages may therefore be multiplexed over a DMAChannel which allows several control message sources to address the same DMAChannel. Furthermore, if SoPEC-type control messages contain source and destination fields it is possible for the external host to send control messages to individual SoPECs over the IS115.0 broadcast channel.
2) Data messages should not be interleaved in a memory buffer: As data messages are typically part of a much larger block of data that is being transferred it is not possible to control their contents in the same manner as is possible with the control messages. Furthermore we do not want the CPU to have to perform reassembly of data blocks. Data messages from different sources cannot be interleaved over the same DMAChannel - the SCB map must be reconfigured each time a different data source is given access to the DMAChannel.
) Every reconfiguration of the SCB map requires the exchange of control messages: SoPEC’s SCB map reset state is shown in Table and any subsequent modifications to this map require the exchange of control messages between the SoPEC and the external host. As the external host is expected to control the movement of data in any SoPEC system it is anticipated that all changes to the SCB map will be performed in response to a request from the external host. While the SoPEC could autonomously reconfigure the SCB map (this is entirely up to the software running on the SoPEC) it should not do so without informing the external host in order to avoid data being misrouted.
An example of the above conventions in operation is worked through in section 12.5.2.3.
12.5.2.1 SCB map rules
The operation of the SCB map is described by these 2 rules:
Rule 1 : A packet is routed to the DMA manager if it originates from the USB device core and has an ISIId that matches the local SoPEC ISIId.
Rule 2: A packet is routed to the ISI if it originates from the CPU or has an ISIId that does not match the local SoPEC ISIId.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
166
If the CPU erroneously addresses a packet to the ISIId contained in the ISIId register (i.e. the ISIId of the local SoPEC) then that packet will be transmitted on the ISI rather than be sent to the DMA manager. While this will usually cause an error on the ISI there is one situation where it could be beneficial, namely for initial dialog in a 2 SoPEC system as both devices come out of reset with an ISIId of 0.
12.5.2.2 External host to ISIMaster SoPEC communication
Although the SCB map configuration is independent of ISIMaster status, the following discussion on SCB map configurations assumes the ISIMaster is a SoPEC device rather than an ISI bridge chip, and that only a single USB connection to the external host is present. The information should apply broadly to an ISI-Bridge but we focus here on an ISIMaster SoPEC for clarity.
As the ISIMaster SoPEC represents the printer device on the PC USB bus it is required by the USB specification to have a dedicated control endpoint, ΕΡ0. At boot time the ISIMaster SoPEC will also require a bulk data endpoint to facilitate the transfer of program code from the external host. The simplest SCB map configuration, i.e. for a single stand-alone SoPEC, is sufficient for external host to ISIMaster SoPEC communication and is shown in Table 36.
Table 36. Single SoPEC SCB map configuration
<td> Source</td><td> Sink</td>
<td> ΕΡ0</td><td> ISIO.O</td>
<td> EP1</td><td> ISI0.1</td>
<td> EP2</td><td> nc</td>
<td> EP3</td><td> nc</td>
<td> EP4</td><td> nc</td>
In this configuration all USB control information exchanged between the external host and SoPEC over ΕΡ0 (which is the only bidirectional USB endpoint). SoPEC specific control information (printer status, DNC info etc.) is also exchanged over ΕΡ0.
All packets sent to the external host from SoPEC over ΕΡ0 must be written into the DMA mapped EP buffer by the CPU (LEON-PC dataflow in Figure 29). All packets sent from the external host to SoPEC are placed in DRAM by the DMA Manager, where they can be read by the CPU (PC-DIU dataflow in Figure 29). This asymmetry is because in a multi-SoPEC environment the CPU will need to examine all incoming control messages (i.e. messages that have arrived over DMAChannelO) to ascertain their source and destination (i.e. they could be from an ISISIave and destined for the external host) and so the additional overhead in having the CPU move the short control messages to the ΕΡ0 FIFO is relatively small. Furthermore we wish to avoid making the SCB more complicated than necessary, particularly when there is no significant performance gain to be had as the control traffic will be relatively low bandwidth.
The above mechanisms are appropriate for the types of communication outlined in sections
12.1.2.1.1 through 12.1.2.1.4
12.5.2.3 Broadcast communication
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
167
The SOB configuration for broadcast communication is also the default, post power-on reset, configuration for SoPEC and is shown in Table 37.
Table 37. Default SoPEC SCB map configuration
<td> Source</td><td> Sink</td>
<td> ΕΡ0</td><td> ISIO.O</td>
<td> EP1</td><td> ISI0.1</td>
<td> EP2</td><td> ISI15.0</td>
<td> EP3</td><td> ISI15.1</td>
<td> EP4</td><td> ISI1.1</td>
USB endpoints EP2 and EP3 are mapped onto ISISublDO and ISISubldl of ISlIdl 5 (the broadcast ISIId channel). ΕΡ0 is used for control messages as before and EP1 is a bulk data endpoint for the ISIMaster SoPEC. Depending on what is convenient for the boot loader software, EP1 may or may not be used during the initial program download, but EP1 is highly likely to be used for compressed page or other program downloads later. For this reason it is part of the default configuration. In this setup the USB device configuration will take place, as it always must, by exchanging messages over the control channel (ΕΡ0).
One possible boot mechanism is where the external host sends the bootloaderl program code to all SoPECs by broadcasting it over EP3. Each SoPEC in the system then authenticates and executes the bootloaderl program. The ISIMaster SoPEC then polls each ISISIave (over the ISlx.O channel). Each ISISIave ascertains its ISIId by sampling the particular GPIO pins required by the bootloaderl and reporting its presence and status back to the ISIMaster. The ISIMaster then passes this information back to the external host over ΕΡ0. Thus both the external host and the ISIMaster have knowledge of the number of SoPECs, and their ISIIds, in the system. The external host may then reconfigure the SCB map to better optimise the SCB resources for the particular multi-SoPEC system. This could involve simplifying the default configuration to a single SoPEC system or remapping the broadcast channels onto DMAChannels in individual ISISIaves.
The following steps are required to reconfigure the SCB map from the configuration depicted in
Table to one where EP3 is mapped onto IS11.0:
1) The external host sends a control message(s) to the ISIMaster SoPEC requesting that USB EP3 be remapped to IS11.0 ) The ISIMaster SoPEC sends a control message to the external host informing it that EP3 has now been mapped to IS11.0 (and therefore the external host knows that the previous mapping of
1SI15.1 is no longer available through EP3).
) The external host may now send control messages directly to ISISIavel without requiring any CPU intervention on the ISIMaster SoPEC
12.5.2.4 External host to ISISIave SoPEC communication
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
168
If the ISIMaster is configured correctly (e.g. when the ISIMaster is a SoPEC, and that SoPEC’s SCB map is configured correctly) then data sent from the external host destined for an ISISIave will be transmitted on the ISI with the correct address. The ISI automatically forwards any data addressed to it (including broadcast data) to the DMA channel with the appropriate ISISubld. If the ISISIave has data to send to the external host it must do so by sending a control message to the ISIMaster identifying the external host as the intended recipient. It is then the ISIMaster’s responsibility to forward this message to the external host.
With this configuration the external host can communicate with the ISISIave via broadcast messages only and this is the mechanism by which the bootloaderl program is downloaded. The ISISIave is unable to communicate with the external host (or the ISIMaster) until the bootlloaderl program has successfully executed and the ISISIave has determined what its ISIId is. After the bootloaderl program (and possibly other programs) has executed the SCB map of the ISIMaster may be reconfigured to reflect the most appropriate topology for the particular multi-SoPEC system it is part of.
All communication from an ISISIave to external host is either achieved directly (if there is a direct USB connection present for example) or by sending messages via the ISIMaster. The ISISIave can never initiate communication to the external host. If an ISISIave wishes to send a message to the external host via the ISIMaster it must wait until it is pinged by the ISIMaster and then send a the message in a long packet addressed to the ISIMaster. When the ISIMaster receives the message from the ISISIave it first examines it to determine the intended destination and will then copy it into the ΕΡ0 FIFO for transmission to the external host. The software running on the ISIMaster is responsible for any arbitration between messages from different sources (including itself) that are all destined for the external host.
The above mechanisms are appropriate for the types of communication outlined in sections
12.1.2.1.5 and 12.1.2.1.6.
12.5.2.5 ISIMaster to ISISIave communication
All ISIMaster to ISISIave communication takes place over the ISI. Immediately after reset this can only be by means of broadcast messages. Once the bootloaderl program has successfully executed on all SoPECs in a multi-SoPEC system the ISIMaster can communicate with each SoPEC on an individual basis.
If an ISISIave wishes to send a message to the ISIMaster it may do so in response to a ping packet from the ISIMaster. When the ISIMaster receives the message from the ISISIave it must interpret the message to determine if the message contains information required to be sent to the external host. In the case of the ISIMaster being a SoPEC, software will transfer the appropriate information into the ΕΡ0 FIFO for transmission to the external host.
The above mechanisms are appropriate for the types of communication outlined in sections
12.1.2.3.3 and 12.1.2.3.4.
12.5.2.6 ISISIave to ISISIave communication
ISISIave to ISISIave communication is expected to be limited to two special cases: (a) when the PrintMaster is not the ISIMaster and (b) when a storage SoPEC is used. When the PrintMaster is
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
169 not the ISIMaster then it will need to send control messages (and receive responses to these messages) to other ISISIaves. When a storage SoPEC is present it may need to send data to each SoPEC in the system. All ISISIave to ISISIave communication will take place in response to ping messages from the ISIMaster.
12.5.2.7 Use of the SCB map in an ISISIave with a external host connection
After reset any SoPEC (regardless of ISIMaster/Slave status) with an active USB connection will route packets from EP0,1 to DMA channels 0,1 because the default SCB map is to map ΕΡ0 to ISIIdO.O and EP1 to ISIIdO.1 and the default ISIId is 0. At some later time the SoPEC learns its true ISIId for the system it is in and re-configures its ISIId and SCB map registers accordingly. Thus if the true ISIId is 3 the external host could reconfigure the SCB map so that ΕΡ0 and EP1 (or any other endpoints for that matter) map to ISIId3.0 and 3.1 respectively. The co-ordination of the updating of the ISIId registers and the SCB map is a matter for software to take care of. While the AutoMasterEnable bit of the ISICntrl register is set the external host must not send packets down EP2-4 of the USB connection to the device intended to be an ISISIave. When AutoMasterEnable has been cleared the external host may send data down any endpoint of the USB connection to the ISISIave.
The SCB map of an ISISIave can be configured to route packets from any EP to any ISIId.ISISubld (just as an ISIMaster can). As with an ISIMaster these packets will end up in the SCBTxBuffer but while an ISIMaster would just transmit them when it got a local access slot (from ping arbitration) the ISISIave can only transmit them in response to a ping. All this would happen without CPU intervention on the ISISIave (or ISIMaster) and as long as the ping frequency is sufficiently high it would enable maximum use of the bandwidth on both USB buses.
12.5.3 DMA Manager
The DMA manager manages the flow of data between the SCB and the embedded DRAM. Whilst the CPU could be used for the movement of data in SoPEC, a DMA manager is a more efficient solution as it will handle data in a more predictable fashion with less latency and requiring less buffering. Furthermore a DMA manager is required to support the ISI transfer speed and to ensure that the SoPEC could be used with a high speed ISI-Bridge chip in the future.
The DMA manager utilizes 2 write channels (DMAChannelO, DMAChannell) and 1 read/write channel (DMAChannel2) to provide 2 independent modes of access to DRAM via the DIU interface:
• USBD/ISI type access.
• USBH type access.
DIU read and write access is in bursts of 4x64 bit words. Byte aligned write enables are provided for write access. Data for DIU write accesses will be read directly from the buffers contained in the respective SCB sub-blocks. There is no internal SCB DMA buffer. The DMA manager handles all issues relating to byte/ word/longword address alignment, data endianness and transaction scheduling. If a DMA channel is disabled during a DMA access, the access will be completed. Arbitration will be performed between the following DIU access requests:
• USBD write request.
• ISI write request.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
170 • USBH write request.
• USBH read request.
DMAChannelO will have absolute priority over any DMA requestors. In the absence of DMAChannelO DMA requests, arbitration will be performed in a round robin manner, on a per cycle basis over the other channels.
12.5.3.1 DMA Effective Bandwidth
The DIU bandwidth available to the DMA manager must be set to ensure adequate bandwidth for all data sources, to avoid back pressure on the USB and the ISl. This is achieved by setting the output (i.e. DIU) bandwidth to be greater than the combined input bandwidths (i.e. USBD + USBH + ISl). The required bandwidth is expected to be 160 Mbits/s (1 bit/cycle @ 160MHz). The guaranteed DIU bandwidth for the SCB is programmable and may need further analysis once there is better knowledge of the data throughput from the USB IP cores.
12.5.3.2 USBD/ISI DMA access
The DMA manager uses the two independent unidirectional write channels for this type of DMA access, one for each ISISubld, to control the movement of data. Both DMAChannelO and DMAChannell only support write operation and can transfer data from any USB device DMA mapped EP buffer and from the ISl receive buffer to separate circular buffers in DRAM, corresponding to each DMA channel.
While the DMA manager performs the work of moving data the CPU controls the destination and relative timing of data flows to and from the DRAM. The management of the DRAM data buffers requires the CPU to have accurate and timely visibility of both the DMA and PEP memory usage. In other words when the PEP has completed processing of a page band the CPU needs to be aware of the fact that an area of memory has been freed up to receive incoming data. The management of these buffers may also be performed by the external host.
12.5.3.2.1 Circular buffer operation
The DMA manager supports the use of circular buffers for both DMAChannels. Each circular buffer is controlled by 5 registers: DMAnBottomAdr, DMAnTopAdr, DMAnMaxAdr, DMAnCurrWPtr and DMAnlntAdr. The operation of the circular buffers is shown in Figure 53 below.
Here we see two snapshots of the status of a circular buffer with (b) occurring sometime after (a) and some CPU writes to the registers occurring in between (a) and (b). These CPU writes are most likely to be as a result of a finished band interrupt (which frees up buffer space) but could also have occurred in a DMA interrupt service routine resulting from DMAnlntAdr being hit. The DMA manager will continue filling the free buffer space depicted in (a), advancing the DMAnCurrWPtr after each write to the DIU. Note that the DMACurrWPtr register always points to the next address the DMA manager will write to. When the DMA manager reaches the address in DMAnlntAdr (i.e. DMACurrWPtr = DMAnlntAdr) it will generate an interrupt if the DMAnlntAdrMask bit in the DMAMask register is set. The purpose of the DMAnlntAdr register is to alert the CPU that data (such as a control message or a page or band header) has arrived that it needs to process. The interrupt routine servicing the DMA interrupt will change the DMAnlntAdr value to the next location that data of interest to the CPU will have arrived by.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
171
In the scenario shown in Figure 53 the CPU has determined (most likely as a result of a finished band interrupt) that the filled buffer space in (a) has been freed up and is therefore available to receive more data. The CPU therefore moves the DMAnMaxAdr to the end of the section that has been freed up and moves the DMAnlntAdr address to an appropriate offset from the DMAnMaxAdr address. The DMA manager continues to fill the free buffer space and when it reaches the address in DMAnTopAdr it wraps around to the address in DMAnBottomAdr and continues from there. DMA transfers will continue indefinitely in this fashion until the DMA manager reaches the address in the DMAnMaxAdr register.
The circular buffer is initialized by writing the top and bottom addresses to the DMAnTopAdr and DMAnBottomAdr registers, writing the start address (which does not have to be the same as the DMAnBottomAdr even though it usually will be) to the DMAnCurrWPtr register and appropriate addresses to the DMAnlntAdr and DMAnMaxAdr registers. The DMA operation will not commence until a 1 has been written to the relevant bit of the DMAChanEn register.
While it is possible to modify the DMAnTopAdr and DMAnBottomAdr registers after the DMA has started it should be done with caution. The DMAnCurrWPtr register should not be written to while the DMAChannel is in operation. DMA operation may be stalled at any time by clearing the appropriate bit of the DMAChanEn register or by disabling an SCB mapping or ISI receive operation.
12.5.3.2.2 Non-standard buffer operation
The DMA manager was designed primarily for use with a circular buffer. However because the DMA pointers are tested for equality (i.e. interrupts generated when DMAnCurrWPtr = DMAIntAdr or DMAnCurrWPtr = DMAMaxAdr) and no bounds checking is performed on their values (i.e. neither DMAnlntAdr nor DMAnMaxAdr are checked to see if they lie between DMAnBottomAdr and DMAnTopAdr) a number of non-standard buffer arrangements are possible. These include:
• Dustbin buffer: If DMAnBottomAdr, DMAnTopAdr and DMAnCurrWPtr all point to the same location and both DMAnlntAdr and DMAnMaxAdr point to anywhere else then all data for that DMA channel will be dumped into the same location without ever generating an interrupt. This is the equivalent to writing to /dev/null on Unix systems.
• Linear buffer: If DMAnMaxAdr and DMAnTopAdr have the same value then the DMA manager will simply fill from DMAnBottomAdr to DMAnTopAdr and then stop. DMAnlntAdr should be outside this buffer or have its interrupt disabled.
12.5.3.3 USBH DMA access
The USBH requires DMA access to DRAM in to provide a communication channel between the USB HC and the USB HCD via a shared memory resource. The DMA manager uses two independent channels for this type of DMA access, one for reads and one for writes. The DRAM addresses provided to the DIU interface are generated based on addresses defined in the USB HC core operational registers, in USBH section 12.3.
12.5.3.4 Cache coherency
As the CPU will be processing some of the data transferred (particularly control messages and page/band headers) into DRAM by the DMA manager, care needs to be taken to ensure that the
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
172 data it uses is the most recently transferred data. Because the DMA manager will be updating the circular buffers in DRAM without the knowledge of the cache controller logic in the LEON CPU core the contents of the cache can become outdated. This situation can be easily handled by software, for example by flushing the relevant cache lines, and so there is no hardware support to enforce cache coherency.
12.5.4 ISI transmit buffer arbitration
The SCB control logic will arbitrate access to the ISI transmit buffer (ISITxBuffer) interface on the
ISI block. There are two sources of ISI Tx packets:
• CPUISITxBuffer, contained in the SCB control block.
• ISI mapped USB EP OUT buffers, contained in the USB device block.
This arbitration is controlled by the ISITxBuffArb register which contains a high priority bit for both the CPU and the USB. If only one of these bits is set then the corresponding source always has priority. Note that if the CPU is given absolute priority over the USB, then the software filling the ISI transmit buffer needs to ensure that sufficient USB traffic is allowed through. If both bits of the ISITxBufferArb have the same value then arbitration will take place on a round robin basis.
The control logic will use the USBEPnDest registers, as it will use the CPUISITxBuffCntrl register, to determine the destination of the packets in these buffers. When the ISITxBuffer has space for a packet, the SCB control logic will immediately seek to refill it. Data will be transferred directly from the CPUISITxBuffer and the ISI mapped USB EP OUT buffers to the ISITxBuffer without any intermediate buffering.
As the speed at which the ISITxBuffer can be emptied is at least 5 times greater than it can be filled by USB traffic, the ISI mapped USB EP OUT buffers should not overflow using the above scheme in normal operation. There are a number of scenarios which could lead to the USB EPs being temporarily blocked such as the CPU having priority, retransmissions on the ISI bus, channels being enabled (ChannelEn bit of the USBEPnDest register) with data already in their associated endpoint buffers or short packets being sent on the USB. Care should be taken to ensure that the USB bandwidth is efficiently utilised at all times.
12.5.5 Implementation
12.5.5.1 CTRL Sub-block Partition * Block Diagram * Definition of I/Os
12.5.5.2 SCB Configuration Registers
The SCB register map is listed in Table 38. Registers are grouped according to which SCB subblock their functionality is associated. All configuration registers reside in the CTRL sub-block. The Reset values in the table indicates the 32 bit hex value that will be returned when the CPU reads the associated address location after reset. All Registers pre-fixed with He refer to Host Controller Operational Registers, as defined in the OHCI Spec[19],
The SCB will only allow supervisor mode accesses to data space (i.e. cpu_acode[1:0] = b11 ). All other accesses will result in scb_cpu_berr being asserted.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
173
TDB: Is read access necessary for ISI Rx/Tx buffers? Could implement the ISI interface as simple FIFOs as opposed to a memory interface.
Table 38. SCB control block configuration registers
<td> Addre ss from SCB_</td><td> Offset .base</td><td> Register</td><td> Os</td><td> Reset</td><td> Description</td>
<td> CTRL</td><td></td><td></td><td></td><td></td><td></td>
<td> 0x000</td><td></td><td> SCBResetN</td><td> 4</td><td> 0x0000000F</td><td> SCB software reset. Allows individual sub-blocks to be reset separately or together. Once a reset for a block has been initiated, by writing a 0 to the relevant register field, it can not be suppressed. Each field will be set after reset. Writing 0x0 to the SCBReset register will have the same effect as CPR generated hardware reset.</td>
<td> 0x004</td><td></td><td> SCBGo</td><td> 2</td><td> 0x00000000</td><td> SCB Go. Allows the ISI and CTRL sub-blocks to be selected separately or together. When go is de-asserted for a particular sub-block, its statemachines are reset to their idle states and its interface signals are de-asserted. The sub-block counters and configuration registers retain their values. When go is asserted for a particular sub-block, its counters are reset. The sub-block configuration registers retain their values, i.e. they don’t get reset. The sub-block statemachines and interface signals will return to their normal mode of operation. The CTRL field should be de-asserted before disabling the clock from any part of the SCB to avoid erroneous SCB DMA requests when the clock is enabled again. NOTE: This functionality has not been provided for the USBH and USBD sub-</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
174
<td></td><td></td><td></td><td></td><td> blocks because of the USB IP cores that they contain. We do not have direct control over the IP core statemachines and counters, and it would cause unpredictable behaviour if the cores were disabled in this way during operation.</td>
<td> 0x008</td><td> SCBWakeupEn</td><td> 2</td><td> 0x00000000</td><td> USB/ISI WakeUpEnable register</td>
<td> OxOOC</td><td> SCBISITxBufferAr b</td><td> 2</td><td> 0x00000000</td><td> ISI transmit buffer access priority register.</td>
<td> 0x010</td><td> SCBDebugSel[11 : 2]</td><td> 10</td><td> 0x00000000</td><td> SOB Debug select register.</td>
<td> 0x014</td><td> USBEPODest</td><td> 7</td><td> 0x00000020</td><td> This register determines which of the data sinks the data arriving in ΕΡ0 should be routed to.</td>
<td> 0x018</td><td> USBEPIDest</td><td> 7</td><td> 0x00000021</td><td> Data sink mapping for USB EP1</td>
<td> 0x01 C</td><td> USBEP2Dest</td><td> 7</td><td> 0x0000003E</td><td> Data sink mapping for USB EP2</td>
<td> 0x020</td><td> USBEP3Dest</td><td> 7</td><td> 0x0000003F</td><td> Data sink mapping for USB EP3</td>
<td> 0x024</td><td> USBEP4Dest</td><td> 7</td><td> 0x00000023</td><td> Data sink mapping for USB EP4</td>
<td> 0x028</td><td> DMA0BottomAdr[2 1:5]</td><td> 17</td><td></td><td> DMAChannelO bottom address register.</td>
<td> 0x020</td><td> DMA0TopAdr[21:5 l</td><td> 17</td><td></td><td> DMAChannelO top address register.</td>
<td> 0x030</td><td> DMA0CurrWPtr[21 :5]</td><td> 17</td><td></td><td> DMAChannelO current write pointer.</td>
<td> 0x034</td><td> DMA0lntAdr[21:5]</td><td> 17</td><td></td><td> DMAChannelO interrupt address register.</td>
<td> 0x038</td><td> DMA0MaxAdr[21: 5]</td><td> 17</td><td></td><td> DMAChannelO max address register.</td>
<td> 0x03C</td><td> DMA1 BottomAdr[2 1:5]</td><td> 17</td><td></td><td> As per DMAOBottomAdr.</td>
<td> 0x040</td><td> DMA1TopAdr[21:5 ]</td><td> 17</td><td></td><td> As per DMAOTopAdr.</td>
<td> 0x044</td><td> DMA1CurrWPtr[21 :5]</td><td> 17</td><td></td><td> As per DMAOCurrWPtr.</td>
<td> 0x048</td><td> DMA1 lntAdr[21:5]</td><td> 17</td><td></td><td> As per DMAOIntAdr.</td>
<td> 0x040</td><td> DMA1MaxAdr[21: 5]</td><td> 17</td><td></td><td> As per DMAOMaxAdr.</td>
<td> 0x050</td><td> DMAAccessEn</td><td> 3</td><td> 0x00000003</td><td> DMA access enable.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
175
<td> 0x054</td><td> DMAStatus</td><td> 4</td><td> 0x00000000</td><td> DMA status register.</td>
<td> 0x058</td><td> DMAMask</td><td> 4</td><td> 0x00000000</td><td> DMA mask register.</td>
<td> 0x05C - 0x098</td><td> CPUISITxBuff[7:0]</td><td> 32x8</td><td> n/a</td><td> CPU ISI transmit buffer. 32-byte packet buffer, containing the payload of a CPU sourced packet destined for transmission over the ISI. The CPU has full write access to the CPUISITxBuff.~ NOTE: The CPU does not have read access to CPUISITxBuff. This is because the CPU is the source of the data and to avoid arbitrating read access between the CPU and the CTRL sub-block. Any CPU reads from this address space will return 0x00000000.</td>
<td> 0x09C</td><td> CPUISITxBuffCtrl</td><td> 9</td><td> 0x00000000</td><td> CPU ISI transmit buffer control register.</td>
<td colspan="5"> USBD</td>
<td> 0x100</td><td> USBDIntStatus</td><td> 19</td><td> 0x00000000</td><td> USBD Interrupt event status register.</td>
<td> 0x104</td><td> USBDISIFIFOStat us</td><td> 16</td><td> 0x00000000</td><td> USBD ISI mapped OUT EP packet FIFO status register.</td>
<td> 0x108</td><td> USBDDMAOFIFO Status</td><td> 8</td><td> 0x00000000</td><td> USBD DMAChannelO mapped OUT EP packet FIFO status register.</td>
<td> 0x1 OC</td><td> USBDDMA1FIFO Status</td><td> 8</td><td> 0x00000000</td><td> USBD DMAChannell mapped OUT EP packet FIFO status register.</td>
<td> 0x110</td><td> USBDResume</td><td> 1</td><td> 0x00000000</td><td> USBD core resume register.</td>
<td> 0x114</td><td> USBDSetup</td><td> 4</td><td> 0x00000000</td><td> USBD setup/configuration register.</td>
<td> 0x118 - 0x154</td><td> USBDEpOlnBuff[1 5:0]</td><td> 32x16</td><td> n/a</td><td> USBD ΕΡ0-ΙΝ buffer. 64-byte packet buffer in the, containing the payload of a USB packet destined for ΕΡ0-ΙΝ. The CPU has full write access to the USBDEpOlnBuff. NOTE: The CPU does not have read access to USBDEpOlnBuff. This is because the CPU is the source of the data and to avoid arbitrating read access between the CPU and the USB device core. Any CPU reads from this</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
176
<td></td><td></td><td></td><td></td><td> address space will return 0x00000000.</td>
<td> 0x158</td><td> USBDEpOInBuffCt rl</td><td> 1</td><td> 0x00000000</td><td> USBD EP0-IN buffer control register.</td>
<td> 0x15C- 0x198</td><td> USBDEp5lnBuff[1 5:0]</td><td> 32x16</td><td> n/a</td><td> USBD EP5-IN buffer. As per USBDEpOlnBuff.</td>
<td> 0x19C</td><td> USBDEp5lnBuffCt rl</td><td> 1</td><td> 0x00000000</td><td> USBD EP5-IN buffer control register.</td>
<td> 0x1 AO</td><td> USBDMask</td><td> 19</td><td> 0x00000000</td><td> USBD interrupt mask register.</td>
<td> 0x1 A4</td><td> USBDDebug</td><td> 30</td><td> 0x00000000</td><td> USBD debug register.</td>
<td colspan="5"> USBH</td>
<td> 0x200</td><td> HcRevision</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x204</td><td> HcControl</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x208</td><td> HcCommandStatu s</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x20C</td><td> HcInterruptStatus</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x210</td><td> HcInterruptEnable</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x214</td><td> HcInterruptDisable</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x218</td><td> HcHCCA</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x21 C</td><td> HcPeriodCurrentE D</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x220</td><td> HcControl Head ED</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x224</td><td> HcControlCurrent ED</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x228</td><td> HcBulkHeadED</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x22C</td><td> HcBulkCurrentED</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x230</td><td> HcDoneHead</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x234</td><td> HcFm Interval</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x238</td><td> HcFmRemaining</td><td></td><td></td><td> Refer to [19] for #Bits, Reset,</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
177
<td></td><td></td><td></td><td></td><td> Description.</td>
<td> 0x23C</td><td> HcFmNumber</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x240</td><td> HcPeriodicStart</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x244</td><td> HcLSTheshold</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x248</td><td> HcRhDescriptorA</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x24C</td><td> HcRhDescriptorB</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x250</td><td> HcRhStatus</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x254</td><td> HcRhPortStatus[1]</td><td></td><td></td><td> Refer to [19] for #Bits, Reset, Description.</td>
<td> 0x258</td><td> USBHStatus</td><td> 3</td><td> 0x00000000</td><td> USBH status register.</td>
<td> 0x25C</td><td> USBHMask</td><td> 2</td><td> 0x00000000</td><td> USBH interrupt mask register.</td>
<td> 0x260</td><td> USBHDebug</td><td> 2</td><td> 0x00000000</td><td> USBH debug register.</td>
<td colspan="5"> ISI</td>
<td> 0x300</td><td> ISICntrl</td><td> 4</td><td> OxOOOOOOOB</td><td> ISI Control register</td>
<td> 0x304</td><td> ISIId</td><td> 4</td><td> 0x00000000</td><td> ISIId for this SoPEC.</td>
<td> 0x308</td><td> ISINumRetries</td><td> 4</td><td> 0x00000002</td><td> Number of ISI retransmissions register.</td>
<td> 0x30C</td><td> ISIPingScheduleO</td><td> 15</td><td> 0x00000000</td><td> ISI Ping schedule 0 register.</td>
<td> 0x310</td><td> ISIPingScheduIel</td><td> 15</td><td> 0x00000000</td><td> ISI Ping schedule 1 register.</td>
<td> 0x314</td><td> ISIPingSchedule2</td><td> 15</td><td> OxOÔOOOOOO</td><td> ISI Ping schedule 2 register.</td>
<td> 0x318</td><td> ISITotalPeriod</td><td> 4</td><td> 0x0000000F</td><td> Reload value of the ISITotalPeriod counter.</td>
<td> 0x31 C</td><td> ISILocalPeriod</td><td> 4</td><td> 0x0000000F</td><td> Reload value of the ISILocalPeriod counter.</td>
<td> 0x320</td><td> ISlIntStatus</td><td> 4</td><td> 0x00000000</td><td> ISI interrupt status register.</td>
<td> 0x324</td><td> ISITxBuffStatus</td><td> 27</td><td> 0x00000000</td><td> ISI Tx buffer status register.</td>
<td> 0x328</td><td> ISIRxBuffStatus</td><td> 27</td><td> 0x00000000</td><td> ISI Rx buffer status register.</td>
<td> 0x32C</td><td> ISIMask</td><td> 4</td><td> 0x00000000</td><td> ISI Interrupt mask register.</td>
<td> 0x330 - 0x340</td><td> ISITxBuffEntryO[7: 0]</td><td> 32x8</td><td> n/a</td><td> ISI transmit Buff, packet entry #0. 32-byte packet entry in the ISITxBuff, containing the payload of an ISI Tx packet. CPU read access to ISITxBuffEntryO is provided for observability only i.e. CPU</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
178
<td></td><td></td><td></td><td></td><td> reads of the ISITxBuffEntryO do not alter the state of the buffer. The CPU does not have write access to the ISITxBuffEntryO.</td>
<td> 0x350 - 0x36C</td><td> ISITxBuffEntry1[7: 0]</td><td> 32x8</td><td> n/a</td><td> ISI transmit Buff, packet entry #1. As per ISITxBuffEntryO.</td>
<td> 0x370 - 0x38C</td><td> ISIRxBuffEntryO[7: 0]</td><td> 32x8</td><td> n/a</td><td> ISI receive Buff, packet entry #0. 32-byte packet entry in the ISIRxBuff, containing the payload of an ISI Rx packet. Note that the only error-free long packets are placed in the ISIRxBuffEntryO. Both ping and ACKs are consumed in the ISI. CPU access to ISIRxBuffEntryO is provided for observability only i.e. CPU reads of the ISIRxBuffEntryO do not alter the state of the buffer.</td>
<td> 0x390 - 0x3AC</td><td> ISIRxBuffEntry1[7: 0]</td><td> 32x8</td><td> n/a</td><td> ISI receive Buff, packet entry #1. As per ISIRxBuffEntryO.</td>
<td> 0x3B0</td><td> ISISubldOSeq</td><td> 1</td><td> 0x00000000</td><td> ISI sub ID 0 sequence bit register.</td>
<td> 0x3B4</td><td> ISISubldlSeq</td><td> 1</td><td> 0x00000000</td><td> ISI sub ID 1 sequence bit register.</td>
<td> 0x3B8</td><td> ISISubldSeqMask</td><td> 2</td><td> 0x00000000</td><td> ISI sub ID sequence bit mask register.</td>
<td> 0x3BC</td><td> ISINumPins</td><td> 1</td><td> 0x00000000</td><td> ISI number of pins register.</td>
<td> 0x3C0</td><td> ISITurnAround</td><td> 4</td><td> 0x0000000F</td><td> ISI bus turn around register.</td>
<td> 0x3C4</td><td> ISITShortReplyWi n</td><td> 5</td><td> 0x0000001F</td><td> ISI short packet reply window.</td>
<td> 0x3C8</td><td> ISITLongReplyWin</td><td> 9</td><td> 0x000001 FF</td><td> ISI long packet reply window.</td>
<td> 0x3CC</td><td> ISIDebug</td><td> 4</td><td> 0x00000000</td><td> ISI debug register.</td>
A detailed description of each register format follows. The CPU has full read access to all registers. Write access to the fields of each register is defined as:
• Full: The CPU has full write access to the field, i.e. the CPU can write a 1 or a 0 to each bit.
• Clear: The CPU can clear the field by writing a 1 to each bit. Writing a 0 to this type of field will have no effect.
• None: The CPU has no write access to the field, i.e. a CPU write will have no effect on the field.
12.5.5.2.1 SCBResetN
Table 39. SCBResetN register format
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
179
<td> Reid Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> CTRL</td><td> 0</td><td> Full</td><td> scb_ctrl sub-block reset. Setting this field will reset the SCB control sub-block logic, including all configuration registers. 0 = reset 1 = default state</td>
<td> ISI</td><td> 1</td><td> Full</td><td> scbjsi sub-block reset. Setting this field will reset the ISI sub-block logic. 0 = reset 1 = default state</td>
<td> USBH</td><td> 2</td><td> Full</td><td> scb_usbh sub-block reset. Setting this field will reset the USB host controller core and associated logic. 0 = reset 1 = default state</td>
<td> USBD</td><td> 3</td><td> Full</td><td> scb_usbd sub-block reset. Setting this field will reset the USB device controller core and associated logic. 0 = reset 1 = default state</td>
12.5.5.2.2 SCBGo
Table 40. SCBGo register format
<td> Field Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> CTRL</td><td> 0</td><td> Full</td><td> scb_ctrl sub-block go. 0 = halted 1 = running</td>
<td> ISI</td><td> 1</td><td> Full</td><td> scbjsi sub-block go. 0 = halted 1 = running</td>
12.5.5.2.3 SCBWakeUpEn
This register is used to gate the propagation of the USB and ISI reset signals to the CPR block.
Table 41. SCBWakeUpEn register format
<td> Field Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> USBWakeUpEn</td><td> 0</td><td> Full</td><td> usb_cpr_reset_n propagation enable. 1 = enable 0 = disable</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
180
<td> ISIWakeUpEn</td><td> 1</td><td> Full</td><td> isi_cpr_reset_n propagation enable. 1 = enable 0 = disable</td>
12.5.5.2.4 SCBISITxBufferArb
This register determines which source has priority at the ISITxBuffer interface on the ISI block. When a bit is set priority is given to the relevant source. When both bits have the same value, arbitration will be performed in a round-robin manner.
Table 42. SCBISITxBufferArb register format
<td> Field Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> CPUPriority</td><td> 0</td><td> Full</td><td> CPU priority 1 = high priority 0 = low priority</td>
<td> USBPriority</td><td> 1</td><td> Full</td><td> USB priority 1 = high priority D = low priority</td>
12.5.5.2.5 SCBDebugSel
Contains address of the register selected for debug observation as it would appear on cpu_adr. The contents of the selected register are output in the scb_cpu_data bus while cpu_scb_sel is low and scb_cpu_debug_valid is asserted to indicate the debug data is valid. It is expected that a number of pseudo-registers will be made available for debug observation and these will be outlined with the implementation details.
Table 43. SCBDebugSel register format
<td> Field Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> CPUAdr</td><td> 11:2</td><td> Full</td><td> cpu_adr register address.</td>
12.5.5.2.6 USBEPnDest
This register description applies to USBEPODest, USBEPIDest, USBEP2Dest, USBEP3Dest, USBEP4Dest. The SCB has two routing options for each packet received, based on the DestlSlld associated with the packets source EP:
• To the DMA Manager • To the ISI
The SCB map therefore does not need special fields to identify the DMAChannels on the ISIMaster SoPEC as this is taken care of by the SCB hardware. Thus the USBEPODest and USBEPIDest registers should be programmed with 0x20 and 0x21 (for ISIO.O and ISI0.1) respectively to ensure data arriving on these endpoints is moved directly to DRAM.
Table 44. USBEPnDest register format
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
181
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description .</td>
<td> SequenceBit</td><td> 0</td><td> Full</td><td> Sequence bit for packets going from USBEPn to DestlSlld.DestlSISubld. Every CPU write to this register initialises the value of the sequence bit and this is subsequently updated by the ISI after every successful long packet transmission.</td>
<td> DestlSlld</td><td> 4:1</td><td> Full</td><td> Destination ISI ID. Denotes the ISIId of the target SoPEC as per Table</td>
<td> DestlSISubld</td><td> 5</td><td> Full</td><td> Destination ISI sub ID. Indicates which DMAChannel of the target SoPEC the endpoint is mapped onto: 0 = DMAChannelO 1 = DMAChannell</td>
<td> ChannelEn</td><td> 6</td><td> Full</td><td> Communication channel enable bit for EPn. This enables/disables the communication channel for EPn. When disabled, the SCB will not accept USB packets addressed to EPn. 0 = Channel disabled 1 = Channel enabled</td>
If the local SoPEC is connected to an external USB host, it is recommended that the ΕΡ0 communication channel should always remain enabled and mapped to DMAChannelO on the local
SoPEC, as this is intended as the primary control communication channel between the external USB host and the local SoPEC.
A SoPEC ISIMaster should map as many USB endpoints, under the control of the external host, as are required for the multi-SoPEC system it is part of. As already mentioned this mapping may be dynamically reconfigured.
12.5.5.2.7 DMAnBottomAdr
This register description applies to DMAOBottomAdr and DMA1 BottomAdr.
Table 45. DMAnBottomAdr register format
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
182
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAnBottomAdr</td><td> 21:5</td><td> Full</td><td> The 256-bit aligned DRAM address of the bottom of the circular buffer (inclusive) serviced by DMAChanneln</td>
12.5.5.2.8 DMAnTopAdr
This register description applies to DMAOTopAdr and DMAITopAdr.
Table 46. DMAnTopAdr register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAnTopAdr</td><td> 21:5</td><td> Full</td><td> The 256-bit aligned DRAM address ot the top of the circular buffer (inclusive) serviced by DMAChanneln</td>
12.5.5.2.9 DMAnCurrWPtr
This register description applies to DMAOCurrWPtr and DMAICurrWPtr.
Table 47. DMAnCurrWptr register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAnCurrWPtr</td><td> 21:5</td><td> Full</td><td> The 256-bit aligned DRAM address of the next location DMAChannelO will write to. This register is set by the CPU at the start of a DMA operation and dynamically updated by the DMA manager during the operation.</td>
12.5.5.2.10 DMAnlntAdr
This register description applies to DMAOIntAdr and DMAIIntAdr.
Table 48. DMAnlntAdr register format
<td></td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAnlntAdr</td><td> 21:5</td><td> Full</td><td> The 256-bit aligned DRAM address of the location that will trigger an interrupt when reached by DMAChanneln buffer.</td>
12.5.5.2.11 DMAnMaxAdr
This register description applies to DMAOMaxAdr and DMAIMaxAdr.
Table 49. DMAnMaxAdr register format
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
183
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAnMaxAdr</td><td> 21:5</td><td> Full</td><td> The 256-bit aligned DRAM address of the last free location that in the DMAChanneln circular buffer. DMAChannelO transfers will stop when it reaches this address.</td>
12.5.5.2.12 DMAAccessEn
This register enables DMA access for the various requestors, on a per channel basis.
Table 50. DMAAccessEn register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAChannelOEn</td><td> 0</td><td> Full</td><td> DMA Channel #0 access enable. This uni-directional write channel is used by the USBD and the ISI. 1 = enable 0 = disable</td>
<td> DMAChanneH En</td><td> 1</td><td> Full</td><td> As per USBDISIOEn.</td>
<td> DMAChannel2En</td><td> 2</td><td> Full</td><td> DMA Channel #2 access enable. This bi-directional read/write channel is used by the USBH. 1 = enable 0 = disable</td>
12.5.5.2.13 DMAStatus
The status bits are not sticky bits i.e. they reflect the ‘live’ status of the channel.
DMAChannelNIntAdrHit and DMAChanneINMaxAdrHit status bits may only be cleared by writing to the relevant DMAnlntAdr or DMAnMaxAdr register.
Table 51. DMAStatus register format
<td> Field Name</td><td> Bit(s) t</td><td> Write access</td><td> Description</td>
<td> DMAChannelOlntAdrHit</td><td> 0</td><td> None</td><td> DMA channel #0 interrupt address hit. 1= DMAChannelO has reached the address contained in the DMAOIntAdr register. 0 = default state</td>
<td> DMAChannelOMaxAdrHit</td><td> 1</td><td> None</td><td> DMA channel #0 max address hit. 1 = DMAChannelO has reached the</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
184
<td></td><td></td><td></td><td> address contained in the DMAOMaxAdr register. 0 = default state</td>
<td> DMAChannell IntAdrHit</td><td> 3</td><td> None</td><td> As per DMAChannelOlntAdrHit.</td>
<td> DMAChannell MaxAdrHit</td><td> 4</td><td> None</td><td> As per DMAChannelOMaxAdrHit.</td>
12.5.5.2.14 DMAMask register
All bits of the DMAMask are both readable and writable by the CPU. The DMA manager cannot alter the value of this register. All interrupts are generated in an edge sensitive manner i.e. the DMA manager will generate a dma_icu_Jrq pulse each time a status bit goes high and its corresponding 5 mask bit is enabled.
Table 52. DMAMask register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> DMAChannelOlntAdrHitlntEn</td><td> 0</td><td> Full</td><td> DMAChannelOlntAdrHit status interrupt enable. 1 = enable 0 = disable</td>
<td> DMAChannelOMaxAdrHitlntEn</td><td> 1</td><td> Full</td><td> DMAChannelOMaxAdrHit status interrupt enable. 1 = enable 0 = disable</td>
<td> DMAChannell IntAdrHitlntEn</td><td> 2</td><td> Full</td><td> As per DMAChannelOlntAdrHitlntEn</td>
<td> DMAChannell MaxAdrHitlntEn</td><td> 3</td><td> Full</td><td> As per DMAChannelOMaxAdrHitlntEn</td>
12.5.5.2.15 CPUISITxBuffCtrl register
Table 53. CPUISITxBuffCtrl register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> PktValid</td><td> 0</td><td> full</td><td> This field should be set by the CPU to indicate the validity of the CPUISITxBuff contents. This field will be cleared by the SCB once the contents of the CPUISITxBuff has been copied to the ISITxBuff. NOTE: The CPU should not clear this field under normal operation. If the CPU clears this field during a packet transfer to the ISITxBuff, the transfer</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
185
<td></td><td></td><td></td><td> will be aborted - this is not recommended. 1 = valid packet. 0 = default state.</td>
<td> PktDesc</td><td> 3:1</td><td> full</td><td> PktDesc field, as per Table , of the packet contained in the CPUISITxBuff. The CPU is responsible for maintaining the correct sequence bit value for each ISIId.ISISubld channel it communicates with. Only valid when CPUISITxBuffCtrl.PktValid = 1.</td>
<td> DestlSlld</td><td> 7:4</td><td> full</td><td> Denotes the ISIId of the target SoPEC as per Table .</td>
<td> DestlSISubld</td><td> 8</td><td> full</td><td> Indicates which DMAChannel of the target SoPEC the packet in the CPUISITxBuff is destined for. 1 = DMAChannell 0 = DMAChannelO</td>
12.5.5.2.16 USBDIntStatus
The USBDIntStatus register contains status bits that are related to conditions that can cause an interrupt to the CPU, if the corresponding interrupt enable bits are set in the USBDMask register. The field name extension Sticky implies that the status condition will remain registered until cleared 5 by a CPU write of 1 to each bit of the field.
NOTE: There is no EpOlrregPktStickyf\e\d because the default control EP will frequently receive packets that are not multiples of 32 bytes during normal operation.
Table 54. USBDIntStatus register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> CoreSuspendSticky</td><td> 0</td><td> Clear</td><td> Device core USB suspend flag. Sticky. 1 = USB suspend state. Set when device core udcvci_suspend signal transitions from 1 -> 0. 0 = default value.</td>
<td> CoreUSBResetSticky</td><td> 1</td><td> Clear</td><td> Device core USB reset flag. Sticky. 1 = USB reset. Set when device core udcvci_reset signal transitions from 1 -> 0. 0 = default value.</td>
<td> CoreUSBSOFSticky</td><td> 2</td><td> Clear</td><td> Device core USB Start Of Frame (SOF) flag. Sticky.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
186
<td></td><td></td><td></td><td> 1 = USB SOF. Set when device core udcvci_sof signal transitions from 1 -> 0 0 = default value.</td>
<td> CPUISITxBuffEmptySticky</td><td> 3</td><td> Clear</td><td> CPU ISI transmit buffer empty flag. Sticky. 1 = empty. 0 = default value.</td>
<td> CPUEpOInBuffEmptySticky</td><td> 4</td><td> Clear</td><td> CPU EPO IN buffer empty flag. Sticky. 1 = empty. 0 = default value.</td>
<td> CPUEp5lnBuffEmptySticky</td><td> 5</td><td> Clear</td><td> CPU EP5 IN buffer empty flag. Sticky. 1 = empty. 0 = default value.</td>
<td> EpOlnNAKSticky</td><td> 6</td><td> clear</td><td> ΕΡ0-ΙΝ NAK flag. Sticky This flag is set if the USB device core issues a read request for EPO-IN and there is not a valid packet present in the EPO-IN buffer. The core will therefore send a NAK response to the IN token that was received from external USB host. This is an indicator of any backpressure on the USB caused by EPO-IN. 1 = NAK sent. 0 = default value</td>
<td> Ep5lnNAKSticky</td><td> 7</td><td> Clear</td><td> As per EpOInNAK.</td>
<td> EpOOutNAKSticky</td><td> 8</td><td> Clear</td><td> EPO-OUT NAK flag. Sticky This flag is set if the USB device core issues a write request for EPO-OUT and there is no space in the OUT EP buffer for a the packet. The core will therefore send a NAK response to the OUT token that was received from external USB host. This is an indicator of any back-pressure on the USB caused by EPOOUT. 1 = NAK sent. 0 = default value</td>
<td> Ep1 OutNAKSticky</td><td> 9</td><td> Clear</td><td> As per EpOOutNAK.</td>
<td> Ep20utNAKSticky</td><td> 10</td><td> Clear</td><td> As per EpOOutNAK.</td>
<td> Ep30utNAKSticky</td><td> 11</td><td> Clear</td><td> As per EpOOutNAK.</td>
<td> Ep40utNAKSticky</td><td> 12</td><td> Clear</td><td> As per EpOOutNAK.</td>
<td> Ep1 IrregPktSticky</td><td> 13</td><td> Clear</td><td> EP1-OUT irregular sized packet flag. Sticky.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
187
<td></td><td></td><td></td><td> Indicates a packet that is not a multiple of 32 bytes in size was received by EP1-OUT. 1 = irregular sized packet received. 0 = default value.</td>
<td> Ep2lrregPktSticky</td><td> 14</td><td> Clear</td><td> As per Ep1 IrregPktSticky.</td>
<td> Ep3lrregPktSticky</td><td> 15</td><td> Clear</td><td> As per Ep1 IrregPktSticky.</td>
<td> Ep4lrregPktSticky</td><td> 16</td><td> Clear</td><td> As per Ep1 IrregPktSticky.</td>
<td> OutBuffOverFlowSticky</td><td> 17</td><td> Clear</td><td> OUT EP buffer overflow flag. Sticky. This flag is set if the USB device core attempted to write a packet of more than 64 bytes to the OUT EP buffer. This is a fatal error, suggesting a problem in the USB device IP core. The SCB will take no further action. 1 = overflow condition detected. 0 = default value.</td>
<td> InBuffUnderRunSticky</td><td> 18</td><td> clear</td><td> IN EP buffer underrun flag. Sticky. This flag is set if the USB device core attempted to read more data than was present from the IN EP buffer. This is a fatal error, suggesting a problem in the USB device IP core. The SCB will take no further action. 1 = underrun condition detected. 0 = default value.</td>
12.5.5.2.17 USBDISIFIFOStatus
This register contains the status of the ISl mapped OUT EP packet FIFO. This is a secondary status register and will not cause any interrupts to the CPU.
Table 55. USBDISIFIFOStatus register format
<td> Field Name</td><td> Bit(s)</td><td> Write, access</td><td> Description</td>
<td> EntryOValid</td><td> 0</td><td> none</td><td> FIFO entry #0 valid field. This flag will be set by the USBD when the USB device core indicates the validity of packet entry #0 in the FIFO. 1 = valid USB packet in ISl OUT EP buffer 0. 0 = default value.</td>
<td> EntryOSource</td><td> 3:1</td><td> none</td><td> FIFO entry #0 source field. Contains the EP associated with packet entry #0 in the FIFO. Binary Coded Decimal. Only valid when ISIBuffOPktValid = 1.</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
188
<td> Entryl Valid</td><td> 4</td><td> none</td><td> As per EntryOValid.</td>
<td> Entryl Source</td><td> 7:5</td><td> none</td><td> As per EntryOSource.</td>
<td> Entry2Valid</td><td> 8</td><td> none</td><td> As per EntryOValid.</td>
<td> Entry2Source</td><td> 11:9</td><td> none</td><td> As per EntryOSource.</td>
<td> Entry3Valid</td><td> 12</td><td> none</td><td> As per EntryOValid.</td>
<td> Entry3Source</td><td> 15:13</td><td> none</td><td> As per EntryOSource.</td>
12.5.5.2.18 USBDDMAOFIFOStatus
This register description applies to USBDDMAOFIFOStatus and USBDDMA1 FIFOStatus.
This register contains the status of the DMAChannelN mapped OUT EP packet FIFO. This is a secondary status register and will not cause any interrupts to the CPU.
Table 56. USBDDMANFIFOStatus register format
<td> Field Name</td><td> Bit(s)</td><td> Write . access</td><td> Description</td>
<td> EntryOValid</td><td> 0</td><td> none</td><td> FIFO entry #0 valid field. This flag will be set by the USBD when the USB device core indicates the validity of packet entry #0 in the FIFO. 1 = valid USB packet in ISI OUT EP buffer 0. 0 = default value.</td>
<td> EntryOSource</td><td> 3:1</td><td> none</td><td> FIFO entry #0 source field. Contains the EP associated with packet entry #0 in the FIFO. Binary Coded Decimal. Only valid when EntryOValid = 1.</td>
<td> Entryl Valid</td><td> 4</td><td> none</td><td> As per EntryOValid.</td>
<td> Entryl Source</td><td> 7:5</td><td> none</td><td> As per EntryOSource.</td>
12.5.5.2.19 USBDResume
This register causes the USB device core to initiate resume signalling to the external USB host.
Only applicable when the device core is in the suspend state.
Table 57. USBDResume register format
<td> Field Name</td><td> Bit(s) i</td><td> Write access</td><td> Description /i</td>
<td> USBDResume</td><td> 0</td><td> full</td><td> USBD core resume register. The USBD will clear this register upon resume notification from the device core. 1 = generate resume signalling. 0 = default value.</td>
12.5.5.2.20 USBDSetup
This register controls the general setup/configuration of the USBD.
Table 58. USBDSetup register format
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
189
<td> Field Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> Ep1 IrregPktCntrl</td><td> 0</td><td> full</td><td> EP 1 OUT irregular sized packet control. An irregular sized packet is defined as a packet that is not a multiple of 32 bytes. 1 = discard irregular sized packets. 0 = read 32 bytes from buffer, regardless of packet size.</td>
<td> Ep2lrregPktCntrl</td><td> 1</td><td> full</td><td> As per Ep1 IrregPktDiscard</td>
<td> Ep3lrregPktCntrl</td><td> 2</td><td> full</td><td> As per Ep1 IrregPktDiscard</td>
<td> Ep4lrregPktCntrl</td><td> 3</td><td> full</td><td> As per Ep1 IrregPktDiscard</td>
<td colspan="2"> 12.5.5.2.21 USBDEpN</td><td> nBuffCtr</td><td> register</td>
This register description applies to USBDEpOlnBuffCtrl and USBDEp5lnBuffCtrl.
Table 59. USBDEpNInBuffCtrl register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> PktValid</td><td> 0</td><td> full</td><td> Setting this register validates the contents of USBDEpNInBuff. This field will be cleared by the SCB once the packet has been successfully transmitted to the external USB host. NOTE: The CPU should not clear this field under normal operation. If the CPU clears this field during a packet transfer to the USB, the transfer will be aborted - this is not recommended. 1 = valid packet. 0 = default state.</td>
12.5.5.2.22 USBDMask
This register serves as an interrupt mask for all USBD status conditions that can cause a CPU interrupt. Setting a field enables interrupt generation for the associated status event. Clearing a field disables interrupt generation for the associated status event. All interrupts will be generated in an edge sensitive manner, i.e. when the associated status register transitions from 0 -> 1.
Table 60. USBDMask register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> CoreSuspendStickyEn</td><td> 0</td><td> full</td><td> CoreSuspendSticky status interrupt enable.</td>
<td> CoreUSBResetStickyEn</td><td> 1</td><td> full</td><td> CoreUSBResetSticky status interrupt enable.</td>
<td> CoreUSBSOFStickyEn</td><td> 2</td><td> full</td><td> CoreUSBSOFSticky status interrupt enable.</td>
<td> CPU ISITxBuffEm ptyStickyEn</td><td> 3</td><td> full</td><td> CPUISITxBuffEmptySticky status interrupt enable.</td>
<td> CPUEpOlnBuffEmptyStickyEn</td><td> 4</td><td> full</td><td> CPUEpOlnBuffEmptySticky status interrupt enable.</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
190
<td> CPUEp5lnBuffEmptyStickyEn</td><td> 5</td><td> full</td><td> CPUEpSInBuffEmptySticky status interrupt enable.</td>
<td> EpOInNAKStickyEn</td><td> 6</td><td> full</td><td> EpOInNAKSticky status interrupt enable.</td>
<td> Ep5lnNAKStickyEn</td><td> 7</td><td> full</td><td> Ep5lnNAKSticky status interrupt enable.</td>
<td> EpOOutNAKStickyEn</td><td> 8</td><td> full</td><td> EpOOutNAKSticky status interrupt enable.</td>
<td> Ep1 OutNAKStickyEn</td><td> g</td><td> full</td><td> EplOutNAKSticky status interrupt enable.</td>
<td> Ep20utNAKStickyEn</td><td> 10</td><td> full</td><td> Ep2OutNAKSticky status interrupt enable.</td>
<td> Ep30utNAKStickyEn</td><td> 11</td><td> full</td><td> Ep3OutNAKSticky status interrupt enable.</td>
<td> Ep4OutNAKStickyEn</td><td> 12</td><td> full</td><td> Ep4OutNAKSticky status interrupt enable.</td>
<td> Ep1 IrregPktStickyEn</td><td> 13</td><td> full</td><td> Ep1 IrregPktSticky status interrupt enable.</td>
<td> Ep2lrregPktStickyEn</td><td> 14</td><td> full</td><td> Ep2lrregPktSticky status interrupt enable.</td>
<td> Ep3lrregPktStickyEn</td><td> 15</td><td> full</td><td> Ep3lrregPktSticky status interrupt enable.</td>
<td> Ep4lrregPktStickyEn</td><td> 16</td><td> full</td><td> Ep4lrregPktSticky status interrupt enable.</td>
<td> OutBuffOverFlowStickyEn</td><td> 17</td><td> full</td><td> OutBuffOverFlowSticky status interrupt enable.</td>
<td> InBuffUnderRunStickyEn</td><td> 18</td><td> full</td><td> InBuffUnderRunSticky status interrupt enable.</td>
12.5.5.2.23 USBDDebug
This register is intended for debug purposes only. Contains non-sticky versions of all interrupt capable status bits, which are referred to as dynamic in the table.
Table 61. USBDDebug register format
<td> Field Name</td><td> Bit(s)</td><td> write access</td><td> Description</td>
<td> CoreTimeStamp</td><td> 10:0</td><td> none</td><td> USB device core frame number.</td>
<td> CoreSuspend</td><td> 11</td><td> none</td><td> Dynamic version of CoreSuspendSticky.</td>
<td> CoreUSBReset</td><td> 12</td><td> none</td><td> Dynamic version of CoreUSBResetSticky.</td>
<td> CoreUSBSOF</td><td> 13</td><td> none</td><td> Dynamic version of CoreUSBSOFSticky.</td>
<td> CPUISITxBuffEmpty</td><td> 14</td><td> none</td><td> Dynamic version of CPUISITxBuffEmptySticky.</td>
<td> CPUEpOlnBuffEmpty</td><td> 15</td><td> none</td><td> Dynamic version of CPUEpOlnBuffEmptySticky.</td>
<td> CPUEp5lnBuffEmpty</td><td> 16</td><td> none</td><td> Dynamic version of CPUEp5lnBuffEmptySticky.</td>
<td> EpOInNAK</td><td> 17</td><td> none</td><td> Dynamic version of EpOInNAKSticky.</td>
<td> Ep5lnNAK</td><td> 18</td><td> none</td><td> Dynam ic version of Ep5lnNAKSticky.</td>
<td> EpOOutNAK</td><td> 19</td><td> none</td><td> Dynamic version of EpOOutNAKSticky.</td>
<td> EplOutNAK</td><td> 20</td><td> none</td><td> Dynamic version of EplOutNAKSticky.</td>
<td> Ep2OutNAK</td><td> 21</td><td> none</td><td> Dynamic version of Ep2OutNAKSticky.</td>
<td> Ep3OutNAK</td><td> 22</td><td> none</td><td> Dynamic version of Ep3OutNAKSticky.</td>
<td> Ep40utNAK</td><td> 23</td><td> none</td><td> Dynamic version of Ep4OutNAKSticky.</td>
<td> Ep1 IrregPkt</td><td> 24</td><td> none</td><td> Dynamic version of Ep1 IrregPktSticky.</td>
<td> Ep2lrregPkt</td><td> 25</td><td> none</td><td> Dynamic version of Ep2lrregPktSticky.</td>
<td> Ep3lrregPkt</td><td> 26</td><td> none</td><td> Dynamic version of Ep3lrregPktSticky.</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
191
<td> Ep4lrregPkt</td><td> 27</td><td> none</td><td> Dynamic version of Ep4lrregPktSticky.</td>
<td> OutBuffOverFlow</td><td> 28</td><td> none</td><td> Dynamic version of OutBuffOverFlowSticky.</td>
<td> InBuffUnderRun</td><td> 29</td><td> none</td><td> Dynamic version of InBuffUnderRunSticky.</td>
12.5.5.2.24 USBHStatus
This register contains all status bits associated with the USBH. The field name extension Sticky implies that the status condition will remain registered until cleared by a CPU write.
Table 62. USBHStatus register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> CoreIRQSticky</td><td> 0</td><td> clear</td><td> HC core IRQ interrupt flag. Sticky Set when HC core UHOSTCJrqN output signal transitions from 0 -> 1. Refer to OHCI spec for details on HC interrupt processing. 1 = IRQ interrupt from core. 0 = default value.</td>
<td> CoreSMISticky</td><td> 1</td><td> clear</td><td> HC core SMI interrupt flag. Sticky Set when HC core UHOSTC_SmiN output signal transitions from 0 -> 1. Refer to OHCI spec for details on HC interrupt processing. 1 = SMI interrupt from HC. 0 = default value.</td>
<td> CoreBuffAcc</td><td> 2</td><td> none</td><td> HC core buffer access flag. HC core UHOSTCJBufAcc output signal. Indicates whether the HC is accessing a descriptor or a buffer in shared system memory. 1 = buffer access 0 = descriptor access.</td>
12.5.5.2.25 USBHMask
This register serves as an interrupt mask for all USBH status conditions that can cause a CPU interrupt. All interrupts will be generated in an edge sensitive manner, i.e. when the associated status register transitions from 0 -> 1.
Table 63. USBHMask register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description ;</td>
<td> CoreIRQIntEn</td><td> 0</td><td> full</td><td> CoreIRQSticky status interrupt enable. 1 = enable. 0 = disable.</td>
<td> CoreSMIlntEn</td><td> 1</td><td> full</td><td> CoreSMISticky status interrupt enable.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
192
<td></td><td></td><td></td><td> 1 = enable. 0 = disable.</td>
12.5.5.2.26 USBHDebug
This register is intended for debug purposes only. Contains non-sticky versions of all interrupt capable status bits, which are referred to as dynamic in the table.
Table 64. USBHDebug register format
<td> Field Name</td><td></td><td> write access</td><td> Description </td>
<td> Core IRQ</td><td> 0</td><td> none</td><td> Dynamic version of CoreIRQSticky.</td>
<td> CoreSMI</td><td> 1</td><td> None</td><td> Dynamic version of CoreSMISticky.</td>
12.5.5.2.27 ISICntrl
This register controls the general setup/configuration of the ISI.
Note that the reset value of this register allows the SoPEC to automatically become an ISIMaster (AutoMasterEnable = 1) if any USB packets are received on endpoints 2-4. On becoming an 10 ISIMaster the ISIMasterSel bit is set and any USB or CPU packets destined for other ISI devices are transmitted. The CPU can override this capability at any time by clearing the AutoMasterEnable bit.
Table 65. ISICntrl register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> TxEnable</td><td> 0</td><td> Full</td><td> ISI transmit enable. Enables ISI transmission of long or ping packets. ACKs may still be transmitted when this bit is 0. This is cleared by transmit errors and needs to be restarted by the CPU. 1 = Transmission enabled 0 = Transmission disabled</td>
<td> RxEnable</td><td> 1</td><td> Full</td><td> ISI receive enable. Enables ISI reception. This is can only be cleared by the CPU and it is only anticipated that reception will be disabled when the ISI in not in use and the ISI pins are being used by the GPIO for another purpose. 1 = Reception enabled 0 = Reception disabled</td>
<td> ISIMasterSel</td><td> 2</td><td> Full</td><td> ISI master select. Determines whether the SoPEC is an ISIMaster or not 1 = ISIMaster 0 = ISISIave</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
193
<td> AutoMasterEnable</td><td> 3</td><td> Full</td><td> ISI auto master enable. Enables the device to automatically become the ISIMaster if activity is detected on USB endpoints2-4. 1 = auto-master operation enabled 0 = auto-master operation disabled</td>
12.5.5.2.28 ISIId
Table 66. ISIId register format
<td> Field Name</td><td> Bit(s)</td><td> Write acœss</td><td> Description</td>
<td> ISIId</td><td> 3:0</td><td> Full</td><td> ISIId for this SoPEC. SoPEC resets to being an ISISIave with ISIIdO. OxF (the broadcast ISIId) is an illegal value and should not be written to this register.</td>
12.5.5.2.29 ISINumRetries
Table 67. ISINumRetries register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> ISINumRetries</td><td> 3:0</td><td> Full</td><td> Number of ISI retransmissions to attempt in response to an inferred NAK before aborting a long packet transmission</td>
12.5.5.2.30 ISIPingScheduleN
This register description applies to ISIPingScheduleO, ISIPingSchedulel and ISIPingSchedule2.
Table 68. ISIPingScheduleN register format
<td> Field Name</td><td> Bit(s)</td><td> Write a&ess</td><td> Description</td>
<td> ISIPingSchedule</td><td> 14:0</td><td> Full</td><td> Denotes which ISIIds will be receive ping packets. Note that bitO refers to ISIIdO, bit1 to ISlIdl ...bit14 to ISIId14.</td>
12.5.5.2.31 ISITotalPeriod
Table 69. ISITotalPeriod register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> ISITotalPeriod</td><td> 3:0</td><td> Full</td><td> Reload value of the ISITotalPeriod counter</td>
12.5.5.2.32 ISILocalPeriod
Table 70. ISILocalPeriod register format
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
194
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> ISILocalPeriod</td><td> 3:0</td><td> Full</td><td> Reload value of the ISILocalPeriod counter</td>
12.5.5.2.33 ISIIntStatus
The ISIIntStatus register contains status bits that are related to conditions that can cause an interrupt to the CPU, if the corresponding interrupt enable bits are set in the ISIMask register.
Table 71. ISIIntStatus register
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> TxErrorSticky</td><td> 0</td><td> None</td><td> ISI transmit error flag. Sticky. Receiving ISI device would not accept the transmitted packet. Only set after NumRetries unsuccessful retransmissions, (excluding ping packets). This bit is cleared by the ISI after transmission has been re-enabled by the CPU setting the TxEnable bit of the ISICntrl register. 1 = transmit error. 0 = default state.</td>
<td> RxFrameErrorSticky</td><td> 1</td><td> Clear</td><td> ISI receive framing error flag. Sticky. This bit is set by the ISI when a framing error detected in the received packet, which can be caused by an incorrect Start or Stop field or by bit stuffing errors. 1 = framing error detected. 0 = default state.</td>
<td> RxCRCErrorSticky</td><td> 2</td><td> Clear</td><td> ISI receive CRC error flag. This bit is set by the ISI when a CRC error is detected in an incoming packet. Other than dropping the errored packet ISI reception is unaffected by a CRC Error. 1 = CRC error 0 = default state.</td>
<td> RxBuffOverFlowSticky</td><td> 3</td><td> Clear</td><td> ISI receive buffer over flow flag. Sticky. An overflow has occurred in the ISI receive buffer and a packet had to be dropped. 1 = over flow condition detected. 0 = default state.</td>
12.5.5.2.34 ISITxBuffStatus
The ISITxBuffStatus register contains status bits that are related to the ISI Tx buffer. This is a secondary status register and will not cause any interrupts to the CPU.
Table 72. ISITxBuffStatus register format
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
195
<td> Field Name</td><td> Bit(s)</td><td> Write · access</td><td> Description</td>
<td> EntryOPktValid</td><td> 0</td><td> None</td><td> ISI Tx buffer entry #0 packet valid flag. This flag will be set by the ISI when a valid ISI packet is written to entry #0 in the ISITxBuff for transmission over the ISI bus. A Tx packet is considered valid when it is 32 bytes in size and the ISI has written the packet header information to EntryOPktDesc, EntryODestlSlld and EntryODestlSISubld. 1 = packet valid. 0 = default value.</td>
<td> EntryOPktDesc</td><td> 3:1</td><td> None</td><td> ISI Tx buffer entry #0 packet descriptor. PktDesc field as per Table for the packet entry #0 in the ISITxBuff. Only valid when EntryOPktValid = 1.</td>
<td> EntryODestlSlld</td><td> 7:4</td><td> None</td><td> ISI Tx buffer entry #0 destination ISI ID. Denotes the ISIId of the target SoPEC as per Table . Only valid when EntryOPktValid = 1.</td>
<td> EntryODestlSISubld</td><td> 8</td><td> None</td><td> ISI Tx buffer entry #0 destination ISI sub ID. Indicates which DMAChannel on the target SoPEC that packet entry #0 in the ISITxBuff is destined for. Only valid when EntryOPktValid = 1. 1 = DMAChanneU 0 = DMAChannelO</td>
<td> Entryl PktValid</td><td> 9</td><td> None</td><td> As per EntryOPktValid.</td>
<td> Entryl PktDesc</td><td> 12:10</td><td> None</td><td> As per EntryOPktDesc.</td>
<td> Entryl DestlSlld</td><td> 16:13</td><td> None</td><td> As per EntryODestlSlld.</td>
<td> Entryl DestlSISubld</td><td> 17</td><td> None</td><td> As per EntryODestlSISubld.</td>
<td> 12.5.5.2.35 ISI</td><td colspan="2"> ^xBuffStatus</td><td></td>
The ISIRxBuffStatus register contains status bits that are related to the ISI Rx buffer. This is a secondary status register and will not cause any interrupts to the CPU.
Table 73. ISIRxBuffStatus register format
<td> Field Name ’</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> EntryOPktValid</td><td> 0</td><td> None</td><td> ISI Rx buffer entry #0 packet valid flag. This flag will be set by the ISI when a valid ISI packet is received and written to entry #0 of the ISIRxBuff. A Rx packet is considered valid when it is 32 bytes in size and no framing or CRC errors were detected.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
196
<td></td><td></td><td></td><td> 1 = valid packet 0 = default value</td>
<td> EntryOPktDesc</td><td> 3:1</td><td> None</td><td> ISI Rx buffer entry #0 packet descriptor. PktDesc field as per Table for packet entry #0 of the ISIRxBuff. Only valid when EntryOPktValid = 1.</td>
<td> EntryODestlSlld</td><td> 7:4</td><td> None</td><td> ISI Rx buffer 0 destination ISI ID. Denotes the ISIId of the target SoPEC as per Table . This should always correspond to the local SoPEC ISIId. Only valid when EntryOPktValid = 1.</td>
<td> EntryODestlSISubld</td><td> 8</td><td> None</td><td> ISI Rx buffer 0 destination ISI sub ID. Indicates which DMAChannel on the target SoPEC that entry #0 of the ISIRxBuff is destined for. Only valid when EntryOPktValid = 1. 1 = DMAChannell 0 = DMAChannelO</td>
<td> Entryl PktValid</td><td> 9</td><td> None</td><td> As per EntryOPktValid.</td>
<td> EntrylPktDesc</td><td> 12:10</td><td> None</td><td> As per EntryOPktDesc.</td>
<td> Entryl DestlSlld</td><td> 16:13</td><td> None</td><td> As per EntryODestlSlld.</td>
<td> Entryl DestlSISubld</td><td> 17</td><td> None</td><td> As per EntryODestlSISubld.</td>
12.5.5.2.36 ISIMask register
An interrupt will be generated in an edge sensitive manner i.e. the ISI will generate an isi_icu_irq pulse each time a status bit goes high and the corresponding bit of the ISIMask register is enabled.
Table 74. ISIMask register
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> TxErrorlntEn</td><td> 0</td><td> Full</td><td> TxErrorSticky status interrupt enable. 1 = enable. 0 = disable.</td>
<td> RxFrameErrorlntEn</td><td> 1</td><td> Full</td><td> RxFrameErrorSticky status interrupt enable. 1 = enable. 0 = disable.</td>
<td> RxCRCErrorlntEn</td><td> 2</td><td> Full</td><td> RxCRCErrorSticky status interrupt enable. 1 = enable. 0 = disable.</td>
<td> RxBuffOverFlowl ntEn</td><td> 3</td><td> Full</td><td> RxBuffOverFlowSticky status interrupt enable. 1 = enable. 0 = disable.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
197
12.5.5.2.37 ISISubldNSeq
This register description applies to ISISubldOSeq and ISISubldOSeq.
Table 75. ISISubldNSeq register format
<td rowspan="2"></td><td> Field Name</td><td> Bit(S)</td><td> Write access</td><td> Description</td>
<td> ISISubldNSeq</td><td> 0</td><td> Full</td><td> ISl sub ID channel N sequence bit. This bit may be initialised by the CPU but is updated by the ISl each time an error-free long packet is received.</td>
<td colspan="2"> 12.5.5.2.38 ISISub Table 76. ISl</td><td colspan="3"> dSeqMask SubldSeqMask register format</td>
<td colspan="2"> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td colspan="2"> ISISubldSeqOMask</td><td> 0</td><td> Full</td><td> SI sub ID channel 0 sequence bit mask. Setting this bit ensures that the sequence bit will be gnored for incoming packets for the ISISubld. = ignore sequence bit. 3 = default state.</td>
<td colspan="2"> ISISubldSeqIMask</td><td> 1</td><td> Full</td><td> \s per ISISubldSeqOMask.</td>
12.5.5.2.39 ISINumPins
Table 77. ISINumPins register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> ISINumPins</td><td> 0</td><td> Full</td><td> Select number of active ISl pins. 1=4 pins 0 = 2 pins</td>
12.5.5.2.40 ISITurnAround
The ISl bus turnaround time will reset to its maximum value of OxF to provide a safer starting mode for the ISl bus. This value should be set to a value that is suitable for the physical implementation of the ISl bus, i.e. the lowest turn around time that the physical implementation will allow without significant degradation of signal integrity.
Table 78. ISITurnAround register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> ISITurnAround</td><td> 3:0</td><td> Full</td><td> ISl bus turn around time in ISl clock cycles (32MHz).</td>
12.5.5.2.41
ISIShortReplyWin
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
198
The ISl short packet reply window time will reset to its maximum value of 0x1 F to provide a safer starting mode for the ISl bus. This value should be set to a value that will allow for expected frequency of bit stuffing and receiver response timing.
Table 79. ISIShortReplyWin register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description /</td>
<td> ISIShortReplyWin</td><td> 4:0</td><td> Full</td><td> ISl long packet reply window in ISl clock cycles (32MHz).</td>
12.5.5.2.42 ISILongReplyWin
The ISl long packet reply window time will reset to its maximum value of 0x1 FF to provide a safer starting mode for the ISl bus. This value should be set to a value that will allow for expected frequency of bit stuffing and receiver response timing.
Table 80. ISILongReplyWin register format
<td> Field Name</td><td> Bit(s)</td><td> Write <sup>f</sup> access</td><td> Description</td>
<td> ISILongReplyWin</td><td> 8:0</td><td> Full</td><td> ISl long packet reply window in ISl clock cycles (32MHz).</td>
12.5.5.2.43 ISIDebug
This register is intended for debug purposes only. Contains non-sticky versions of all interrupt capable status bits, which are referred to as dynamic in the table.
Table 81. ISIDebug register format
<td> Field Name</td><td> Bit(s)</td><td> Write access</td><td> Description</td>
<td> TxError</td><td> 0</td><td> None</td><td> Dynamic version of TxErrorSticky.</td>
<td> RxFrameError</td><td> 1</td><td> None</td><td> Dynamic version of RxFrameErrorSticky.</td>
<td> RxÇRCError</td><td> 2</td><td> None</td><td> Dynamic version of RxCRCErrorSticky.</td>
<td> RxBuffOverFlow</td><td> 3</td><td> None</td><td> Dynamic version of RxBuffOverFlowSticky.</td>
12.5.5.3 CPU Bus Interface
12.5.5.4 Control Core Logic
12.5.5.5 DIU Bus Interface
12.6 DMA REGS
All of the circular buffer registers are 256-bit word aligned as required by the DIU. The DMAnBottomAdr and DMAnTopAdr registers are inclusive i.e. the addresses contained in those registers form part of the circular buffer. The DMAnCurrWPtr always points to the next location the DMA manager will write to so interrupts are generated whenever the DMA manager reaches the address in either the DMAnlntAdr or DMAnMaxAdr registers rather than when it actually writes to these locations. It therefore can not write to the location in the DMAnMaxAdr register.
SCB Map regs
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
199
The SCB map is configured by mapping a USB endpoint on to a data sink. This is performed on a endpoint basis i.e. each endpoint has a configuration register to allow its data sink be selected. Mapping an endpoint on to a data sink does not initiate any data flow - each endpoint/data sink needs to be enabled by writing to the appropriate configuration registers for the USBD, ISI and DMA manager.
13. General Purpose IO (GPIO)
13.1 Overview
The General Purpose IO block (GPIO) is responsible for control and interfacing of GPIO pins to the rest of the SoPEC system. It provides easily programmable control logic to simplify control of GPIO functions. In all there are 32 GPIO pins of which any pin can assume any output or input function. Possible output functions are • 4 Stepper Motor control Outputs • 12 Brushless DC Motor Control Output (total of 2 different controllers each with 6 outputs) • 4 General purpose high drive pulsed outputs capable of driving LEDs.
• 4 Open drain lOs used for LSS interfaces • 4 Normal drive low impedance lOs used for the ISI interface in Multi-SoPEC mode Each of the pins can be configured in either input or output mode, each pin is independently controlled. A programmable de-glitching circuit exists for a fixed number of input pins. Each input is a schmidt trigger to increase noise immunity should the input be used without the de-glitch circuit.
The mapping of the above functions and their alternate use in a slave SoPEC to GPIO pins is shown in Table 82 below.
Table 82. GPIO pin type
<td> GPIO pin(s)</td><td> Pin IO Type</td><td> Default Function</td>
<td> gpio[3:0]</td><td> Normal drive, low impedance IO (35 Ohm), Integrated pull-up resistor</td><td> Pins 1 and 0 in ISI Mode, pins 2 and 3 in input mode</td>
<td> gpio[7:4]</td><td> High drive, normal impedance IO (65 Ohm), intended for LED drivers</td><td> Input Mode</td>
<td> gpio[31:8]</td><td> Normal drive, normal impedance IO (65 Ohm), no pull-up</td><td> Input Mode</td>
13.2 Stepper Motor control
The motor control pins can be directly controlled by the CPU or the motor control logic can be used to generate the phase pulses for the stepper motors. The controller consists of two central counters from which the control pins are derived. The central counters have several registers (see Table ) used to configure the cycle period, the phase, the duty cycle, and counter granularity.
There are two motor master counters (0 and 1) with identical features. The period of the master counters are defined by the MotorMasterClkPeriod[1:0] and MotorMasterCIkSrc registers i.e. both master counters are derived from the same MotorMasterCIkSrc. The MotorMasterCIkSrc defines
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
200 the timing pulses used by the master counters to determine the timing period. The MotorMasterCIkSrc can select clock sources of 1ps,100ps,10ms and pclk timing pulses.
The MotorMasterClkPeriod[1:0] registers are set to the number of timing pulses required before the timing period re-starts. Each master counter is set to the relevant MotorMasterCIkPeriod value and counts down a unit each time a timing pulse is received.
The master counters reset to MotorMasterCIkPeriod value and count down. Once the value hits zero a new value is reloaded from the MotorMasterClkPeriod[1:0] registers. This ensures that no master clock glitch is generated when changing the clock period.
Each of the IO pins for the motor controller are derived from the master counters. Each pin has independent configuration registers. The MotorMasterClkSelect[3:0] registers define which of the two master counters to use as the source for each motor control pin. The master counter value is compared with the configured MotorCtrILow and MotorCtrlHigh registers (bit fields of the MotorCtrlConfig register). If the count is equal to MotorCtrlHigh value the motor control is set to 1, if the count is equal to MotorCtrILow value the motor control pin is set to 0.
This allows the phase and duty cycle of the motor control pins to be varied at pclk granularity.
The motor control generators keep a working copy of the MotorCtrILow, MotorCtrlHigh values and update the configured value to the working copy when it is safe to do so. This allows the phase or duty cycle of a motor control pin to be safely adjusted by the CPU without causing a glitch on the output pin.
Note that when reprogramming the MotorCtrILow, MotorCtrlHigh registers to reorder the sequence of the transition points (e.g changing from low point less than high point to low point greater than high point and vice versa) care must still taken to avoid introducing glitching on the output pin.
13.3 LED CONTROL
LED lifetime and brightness can be improved and power consumption reduced by driving the LEDs with a pulsed rather than a DC signal. The source clock for each of the LED pins is a 7.8kHz (128ps period) clock generated from the 1ps clock pulse from the Timers block. The LEDDutySelect registers are used to create a signal with the desired waveform. Unpulsed operation of the LED pins can be achieved by using CPU IO direct control, or setting LEDDutySelect to 0. By default the LED pins are controlled by the LED control logic.
13.4 LSS INTERFACE VIA GPIO
In some SoPEC system configurations one or more of the LSS interfaces may not be used. Unused LSS interface pins can be reused as general IO pins by configuring the lOModeSelect registers. When a mode select register for a particular GPIO pin is set to 23,22,21,20 the GPIO pin is connected to LSS control lOs 3 to 0 respectively.
13.5 ISI INTERFACE VIA GPIO
In Multi-SoPEC mode the SCB block (in particular the ISI sub-block) requires direct access to and from the GPIO pins. Control of the ISI interface pins is determined by the lOModeSelect registers. When a mode select register for a particular GPIO pin is set to 27,26,25,24 the GPIO pin connected to the ISI control bits 3 to 0 respectively. By default the GPIO pins 1 to 0 are directly controlled by the ISI block.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
201
In single SoPEC systems the pins can be re-used by the GPIO.
13.6 CPU GPIO CONTROL
The CPU can assume direct control of any (or all) of the IO pins individually. On a per pin basis the CPU can turn on direct access to the pin by configuring the lOModeSelect register to CPU direct mode. Once set the IO pin assumes the direction specified by the CpulODirection register. When in output mode the value in register CpulOOut will be directly reflected to the output driver. When in input mode the status of the input pin can be read by reading CpulOln register. When writing to the CpulOOut register the value being written is XORed with the current value in CpulOOut. The CPU can also read the status of the 10 selected de-glitched inputs by reading the CpulOlnDeGlitch register.
13.7 Programmable de-glitching logic
Each IO pin can be filtered through a de-glitching logic circuit, the pin that the de-glitching logic is connected to is configured by the InputPinSelect registers. There are 10 de-glitching circuits, so a maximum of 10 input pin can be de-glitched at anytime.
The de-glitch circuit can be configured to sample the IO pin for a predetermined time before concluding that a pin is in a particular state. The exact sampling length is configurable, but each deglitch circuit must use one of two possible configured values (selected by DeGlitchSelect). The sampling length is the same for both high and low states. The DeGlitchCount is programmed to the number of system time units that a state must be valid for before the state is passed on. The time units are selected by DeGlitchClkSel and can be one of 1ps,100ps,10ms and pclk pulses.
For example if DeGlitchCount is set to 10 and DeGlitchClkSel set to 3, then the selected input pin must consistently retain its value for 10 system clock cycles (pclk) before the input state will be propagated from CpulOln to CpulOlnDeglitch.
13.8 Interrupt generation
Any of the selected input pins (selected by InputPinSelect) can generate an interrupt from the raw or deglitched version of the input pin. There are 10 possible interrupt sources from the GPIO to the interrupt controller, one interrupt per input pin. The InterruptSrcSelect register determines whether the raw input or the deglitched version is used as the interrupt source.
The interrupt type, masking and priority can be programmed in the interrupt controller.
13.9 Frequency analyser
The frequency analyser measures the duration between successive positive edges on a selected input pin (selected by InputPinSelect) and reports the last period measured (FreqAnaLastPeriod) and a running average period (FreqAna Average).
The running average is updated each time a new positive edge is detected and is calculated by FreqAnaAverage = ( FreqAnaAverage / 8 ) * 7 + FreqAnaLastPeriod 18.
The analyser can be used with any selected input pin (or its deglitched form), but only one input at a time can be selected. The input is selected by the FreqAnaPinSelect (range of 0 to 9) and its deglitched form can be selected by FreqAnaPinFormSelect.
13.10 Brushless DC (BLDG) Motor Controllers
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
202
The GPIO contains 2 brushless DC (BLDC) motor controllers. Each controller consists of 3 hall inputs, a direction input, and six possible outputs. The outputs are derived from the input state and a pulse width modulated (PWM) input from the Stepper Motor controller, and is given by the truth table in Table 83.
Table 83. Truth Table for BLDC Motor Controllers
<td> direction</td><td> he</td><td> hb</td><td> ha</td><td> q6</td><td> q5</td><td> q4</td><td> q3</td><td> q2</td><td> q1</td>
<td> 0</td><td> 0</td><td> 0</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 1</td><td> PWM</td><td> 0</td>
<td> 0</td><td> 0</td><td> 1</td><td> 1</td><td> PWM</td><td> 0</td><td> 0</td><td> 1</td><td> 0</td><td> 0</td>
<td> 0</td><td> 0</td><td> 1</td><td> 0</td><td> PWM</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 1</td>
<td> 0</td><td> 1</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> PWM</td><td> 0</td><td> 0</td><td> 1</td>
<td> 0</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 1</td><td> PWM</td><td> 0</td><td> 0</td><td> 0</td>
<td> 0</td><td> 1</td><td> 0</td><td> 1</td><td> 0</td><td> 1</td><td> 0</td><td> 0</td><td> PWM</td><td> 0</td>
<td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td>
<td> 0</td><td> 1</td><td> 1</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td>
<td></td><td></td><td></td><td colspan="7"></td>
<td> 1</td><td> 0</td><td> 0</td><td> 1</td><td> 0</td><td> 0</td><td> PWM</td><td> 0</td><td> 0</td><td> 1</td>
<td> 1</td><td> 0</td><td> 1</td><td> 1</td><td> PWM</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 1</td>
<td> 1</td><td> 0</td><td> 1</td><td> 0</td><td> PWM</td><td> 0</td><td> 0</td><td> 1</td><td> 0</td><td> 0</td>
<td> 1</td><td> 1</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 1</td><td> PWM</td><td> 0</td>
<td> 1</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 1</td><td> 0</td><td> 0</td><td> PWM</td><td> 0</td>
<td> 1</td><td> 1</td><td> 0</td><td> 1</td><td> 0</td><td> 1</td><td> PWM</td><td> 0</td><td> 0</td><td> 0</td>
<td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td>
<td> 1</td><td> 1</td><td> 1</td><td> 1</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td><td> 0</td>
All inputs to a BLDC controller must be de-glitched. Each controller has its inputs hardwired to deglitch circuits. Controller 1 hall inputs are de-glitched by circuits 2 to 0, and its direction input is deglitched by circuit 3. Controller 2 inputs are de-glitched by circuits 6 to 4 for hall inputs and 7 for direction input.
Each controller also requires a PWM input. The stepper motor controller outputs are reused, output 0 is connected to BLDC controller 1, and output 1 to BLDC controller 2.
The controllers have two modes of operation, internal and external direction control (configured by BLDCMode). If a controller is in external direction mode the direction input is taken from a deglitched circuit, if it is in internal direction mode the direction input is configured by the BLDCDirection register.
The BLDC controller outputs are connected to the GPIO output pins by configuring the lOModeSelect register for each pin. e.g Setting the mode register to 8 will connect q1 Controller 1 to drive the pin.
13.11 Implementation
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
203
13.11.1 Definitions of I/O
Table 84. I/O definition
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td colspan="4"> Clocks and Resets</td>
<td> Pclk</td><td> 1</td><td> In</td><td> System Clock</td>
<td> prst_n</td><td> 1</td><td> In</td><td> System reset, synchronous active low</td>
<td> tim_pulse[2:0]</td><td> 3</td><td> In</td><td> Timers block generated timing pulses. 0 -1 με pulse 1 -100 gs pulse 2 -10 ms pulse</td>
<td colspan="4"> CPU Interface</td>
<td> cpu_adr[8:2]</td><td> 8</td><td> In</td><td> CPU address bus. Only 7 bits are required to decode the address space for this block</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> gpio_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_gpio_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_gpio_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> gpio_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When gpio_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the GPIO block and for a read cycle this means the data on gpio_cpu_data is valid.</td>
<td> gpio_cpu_berr</td><td> 1</td><td> Out</td><td> Bus error signal to the CPU indicating an invalid access.</td>
<td> gpio_cpu_debug_valid</td><td> 1</td><td> Out</td><td> Debug Data valid on gpio_cpu_data bus. Active high</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as follows: 00 - User program access 01 - User data access 10 - Supervisor program access 11 - Supervisor data access</td>
<td colspan="4"> IO Pins</td>
<td> gpio_o[31:0]</td><td> 32</td><td> Out</td><td> General purpose 10 output to IO driver</td>
<td> gpio_i[31:0]</td><td> 32</td><td> In</td><td> General purpose IO input from IO receiver</td>
<td> gpio_e[31:0]</td><td> 32</td><td> Out</td><td> General purpose 10 output control. Active high driving</td>
<td colspan="4"> GPIO to LSS</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
204
<td> lss_gpio_dout[1:0]</td><td> 2</td><td> In</td><td> LSS bus data output Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td> gpio_lss_din[1:0]</td><td> 2</td><td> Out</td><td> LSS bus data input Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td> lss_gpio_e[1:0]</td><td> 2</td><td> In</td><td> LSS bus data output enable, active high Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td> lss_gpio_clk[1:0]</td><td> 2</td><td> In</td><td> LSS bus clock output Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td colspan="4"> GPIO to ISI</td>
<td> gpio_isi_din[1:0]</td><td> 2</td><td> Out</td><td> Input data from IO receivers to ISI.</td>
<td> isi_gpio_dout[1:0]</td><td> 2</td><td> In</td><td> Data output from ISI to IO drivers</td>
<td> isi_gpio_e[1:0]</td><td> 2</td><td> In</td><td> GPIO ISI pins output enable (active high) from ISI interface</td>
<td> usbh_gpio_power_en</td><td> 1</td><td> In</td><td> Port Power enable from the USB host core, active high</td>
<td> gpio_usbh_over_current</td><td> 1</td><td> Out</td><td> Over current detect to the USB host core, active high</td>
<td colspan="4"> Miscellaneous</td>
<td> gpio_icu_irq[9:0]</td><td> 10</td><td> Out</td><td> GPIO pin interrupts</td>
<td> gpio_cpr_wakeup</td><td> 1</td><td> Out</td><td> SoPEC wakeup to the CPR block active high.</td>
<td colspan="4"> Debug</td>
<td> debug_data_out[31:0]</td><td> 32</td><td> In</td><td> Output debug data to be muxed on to the GPIO pins</td>
<td> debug_cntrl[31:0]</td><td> 32</td><td> In</td><td> Control signal for each GPIO bound debug data line indicating whether or not the debug data should be selected by the pin mux</td>
13.11.2 Configuration registers
The configuration registers in the GPIO are programmed via the CPU interface. Refer to section
11.4.3 on page 96 for a description of the protocol and timing diagrams for reading and writing registers in the GPIO. Note that since addresses in SoPEC are byte aligned and the CPU only supports 32-bit register reads and writes, the lower 2 bits of the CPU address bus are not required to decode the address space for the GPIO. When reading a register that is less than 32 bits wide zeros should be returned on the upper unused bit(s) of gpio_cpu_data. Table 85 lists the configuration registers in the GPIO block
Table 85. GPIO Register Definition
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
205
<td> Address GPIO_base +</td><td> Register</td><td> //bits</td><td> Reset</td><td> Description</td>
<td> 0x000-0x07C</td><td> IOModeSelect[ 31:0]</td><td> 32x5</td><td> See Table for default values</td><td> Specifies the mode of operation for each GPIO pin. One 5 bit bus per pin. Possible assignment values and correspond controller outputs are as follows Value - Controlled by 3 to 0 - Output, LED controller 4 to 1 7 to 4 - Output Stepper Motor control 4-1 13 to 8 - Output BLDC 1 Motor control 6-1 19 to 14 - Output BLDC 2 Motor control 6-1 23 to 20 - LSS control 4-1 27 to 24 - ISI control 4-1 28 - CPU Direct Control 29 - USB power enable output 30 - Input Mode</td>
<td> Qx080-0xA4</td><td> InputPinSelectf 9:0]</td><td> 10x5</td><td> 0x00</td><td> Specifies which pins should be selected as inputs. Used to select the pin source to the DeGlitch Circuits.</td>
<td colspan="5"> CPU 10 Control</td>
<td> OxOBO</td><td> CpulOUserMod eMask</td><td> 32</td><td> 0x0000 _0000</td><td> User Mode Access Mask to CPU GPIO control register. When 1 user access is enabled. One bit per gpio pin. Enables access to CpulODirection, CpulOOut and CpulOln in user mode.</td>
<td> OxOB4</td><td> CpulOSuperMo deMask</td><td> 32</td><td> OxFFFF _FFFF</td><td> Supervisor Mode Access Mask to CPU GPIO control register. When 1 supervisor access is enabled. One bit per gpio pin. Enables access to CpulODirection, CpulOOut and CpulOln in supervisor mode.</td>
<td> OxOB8</td><td> CpulODirection</td><td> 32</td><td> 0x0000 _0000</td><td> Indicates the direction of each IO pin, when controlled by the CPU 0 - Indicates Input Mode 1 - Indicates Output Mode</td>
<td> OxOBC</td><td> CpulOOut</td><td> 32</td><td> 0x0000 _0000</td><td> Value used to drive output pin in CPU direct mode. bits31:0 - Value to drive on output GPIO pins When written to the register assumes the</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
206
<td></td><td></td><td></td><td></td><td> new value XORed with the current value.</td>
<td> OxOCO</td><td> CpulOln</td><td> 32</td><td> External pin value</td><td> Value received on each input pin regardless of mode. Read Only register.</td>
<td> 0x004</td><td> CpuDeGlitchUs erModeMask</td><td> 10</td><td> 0x000</td><td> User Mode Access Mask to CpulOlnDeglitch control register. When 1 user access is enabled, otherwise bit reads as zero.</td>
<td> OxOC8</td><td> CpulOInDeglitc h</td><td> 10</td><td> 0x000</td><td> Deglitched version of selected input pins. The input pins are selected by the InputPinSelect register. Note that after reset this register will reflect the external pin values 256 pclk cycles after they have stabilized. Read Only register.</td>
<td colspan="5"> Deglitch control</td>
<td> OxODO-OxOD4</td><td> DeGlitchCountf 1:0]</td><td> 2x8</td><td> OxFF</td><td> Deglitch circuit sample count in DeGlitchClkSrc selected units.</td>
<td> 0x0D8-0x0DC</td><td> DeGlitchClkSrc [1:0]</td><td> 2x2</td><td> 0x3</td><td> Specifies the unit use of the GPIO deglitch circuits: 0 -1 ps pulse 1 -100 ps pulse 2 -10 ms pulse 3 - pclk</td>
<td> OxOEO</td><td> DeGlitchSelect</td><td> 10</td><td> 0x000</td><td> Specifies which deglitch count (DeGlitchCount) and unit select (DeGlitchClkSrc) should be used with each de-glitch circuit 0 - Specifies DeGlitchCount[0] and DeGlitchClkSrtfO] 1 - Specifies DeGlitchCount[1] and DeGlitchClkSrc[1]</td>
<td colspan="5"> Motor Control</td>
<td> 0x0 E4</td><td> MotorCtrlUser ModeEnable</td><td> 1</td><td> 0x0</td><td> User Mode Access enable to Motor control configuration registers. When 1 user access is enabled. Enables user access to MotorMasterCIkPeriod, MotorMasterCIkSrc, MotorDutySelect, MotorPhaseSelect, MotorMasterClockEnable, MotorMasterCIkSelect, BLDCMode and</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
207
<td></td><td></td><td></td><td></td><td> BLDCDirection registers</td>
<td> 0x0E8-0x0EC</td><td> MotorMasterCI kPeriod[1:0]</td><td> 2x16</td><td> 0x0000</td><td> Specifies the motor controller master clock periods in MotorMasterCIkSrc selected units</td>
<td> OxOFO</td><td> MotorMasterCI kSrc</td><td> 2</td><td> 0x0</td><td> Specifies the unit use by the motor controller master clock generator: 0 -1 ps pulse 1 -100 ps pulse 2 -10 ms pulse 3 - pclk</td>
<td> 0x0F4-0x100</td><td> MotorCtrl Config [3:0]</td><td> 4x32</td><td> 0x0000 _0000</td><td> Specifies the transition points in the clock period for each motor control pin. One register per pin bits 15:0 - MotorCtrILow, high to low transition point bits 31:16 - MotorCtrlHigh, low to high transition point</td>
<td> 0x104</td><td> MotorMasterCI kSelect</td><td> 4</td><td> 0x0</td><td> Specifies which motor master clock should be used as a pin generator source 0 - Clock derived from MotorMasterClockPeriod[0] 1 -Clock derived from MotorMasterClockPeriod[1]</td>
<td> 0x108</td><td> MotorMasterCI ockEnable</td><td> 2</td><td> 0x0</td><td> Enable the motor master clock counter. When 1 count is enabled Bit 0 - Enable motor master clock 0 Bit 1 - Enable motor master clock 1</td>
<td colspan="5"> BLDC Motor Controllers</td>
<td> 0x10C</td><td> BLDCMode</td><td> 2</td><td> 0x0</td><td> Specifies the Mode of operation of the BLDC Controller. One bit per Controller. 0- External direction control 1- Interna! direction control</td>
<td> 0x110</td><td> BLDCDirection</td><td> 2</td><td> 0x0</td><td> Specifies the direction input of the BLDC controller. Only used when BLDC controller is an internal direction control mode. One bit per controller.</td>
<td colspan="5"> LED control</td>
<td> 0x114</td><td> LEDCtrIUserMo deEnable</td><td> 4</td><td> 0x0</td><td> User Mode Access enable to LED control configuration registers. When 1 user access is enabled.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
208
<td></td><td></td><td></td><td></td><td> One bit per LEDDutySelect select register.</td>
<td> 0x118-0x124</td><td> LEDDutySelect [3:0]</td><td> 4x3</td><td> 0x0</td><td> Specifies the duty cycle for each LED control output. See Figure 54 for encoding details. The LEDDutySelect[3:0] registers determine the duty cycle of the LED controller outputs</td>
<td colspan="5"> Frequency Analyser</td>
<td> 0x130</td><td> FreqAnaUserM odeEnable</td><td> 1</td><td> 0x0</td><td> User Mode Access enable to Frequency analyser configuration registers. When 1 user access is enabled. Controls access to FreqAnaPinFormSelect, FreqAnaLastPeriod, FreqAnaAverage and FreqAnaCountlnc.</td>
<td> 0x134</td><td> FreqAnaPinSel ect</td><td> 4</td><td> 0x00</td><td> Selects which selected input should be used for the frequency analyses.</td>
<td> 0x138</td><td> FreqAnaPinFor mSelect</td><td> 1</td><td> 0x0</td><td> Selects if the frequency analyser should use the raw input or the deglitched form. 0 - Deglitched form of input pin 1 - Raw form of input pin</td>
<td> 0x13C</td><td> FreqAnaLastPe riod</td><td> 16</td><td> 0x0000</td><td> Frequency Analyser last period of selected input pin.</td>
<td> 0x140</td><td> FreqAnaAverag e</td><td> 16</td><td> 0x0000</td><td> Frequency Analyser average period of selected input pin.</td>
<td> 0x144</td><td> FreqAnaCountl nc</td><td> 20</td><td> 0x0000 0</td><td> Frequency Analyser counter increment amount. For each clock cycle no edge is detected on the selected input pin the accumulator is incremented by this amount.</td>
<td> 0x148</td><td> FreqAnaCount</td><td> 32</td><td> 0x0000 _0000</td><td> Frequency Analyser running counter (Working register)</td>
<td colspan="5"> Miscellaneous</td>
<td> 0x150</td><td> InterruptSrcSel ect</td><td> 10</td><td> 0x3FF</td><td> Interrupt source select.1 bit per selected input. Determines whether the interrupt source is direct form the selected input pin or the deglitched version. Input pins are selected by the DeGlitchPinSelect register. 0 - Selected input direct 1 - Deglitched selected input</td>
<td> 0x154</td><td> DebugSelect[8: 2]</td><td> 7</td><td> 0x00</td><td> Debug address select. Indicates the address of the register to report on the</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
209
<td></td><td></td><td></td><td></td><td> gpio_cpu_data bus when it is not otherwise being used.</td>
<td> 0x158-0x150</td><td> MotorMasterCo unt[1:0]</td><td> 2x16</td><td> 0x0000</td><td> Motor master clock counter values. Bus 0 - Master clock count 0 Bus 1 - Master clock count 1 Read Only registers</td>
<td> 0x160</td><td> WakeUpInputM ask</td><td> 10</td><td> 0x000</td><td> Indicates which deglitched inputs should be considered to generate the CPR wakeup. Active high</td>
<td> 0x164</td><td> WakeUpLevel</td><td> 1</td><td> 0</td><td> Defines the level to detect on the masked GPIO inputs to generate a wakeup to the CPR 0 - Level 0 1 - Level 1</td>
<td> 0x168</td><td> USBOverCurre ntPinSelect</td><td> 4</td><td> 0x00</td><td> Selects which deglitched input should be used for the USB over current detect.</td>
13.11.2.1 Supervisor and user mode access
The configuration registers block examines the CPU access type (cpu_acode signal) and determines if the access is allowed to that particular register, based on configured user access registers. If an access is not allowed the GPIO will issue a bus error by asserting the gpio_cpu_berr signal.
All supervisor and user program mode accesses will result in a bus error.
Access to the CpulODirection, CpulOOut and CpulOln is filtered by the CpulOUserModeMask and CpulOSuperModeMask registers. Each bit masks access to the corresponding bits in the CpulO* registers for each mode, with CpulOUserModeMask filtering user data mode access and CpulOSuperModeMask tittering supervisor data mode access.
The addition of the CpulOSuperModeMask register helps prevent potential conflicts between user and supervisor code read modify write operations. For example a conflict could exist if the user code is interrupted during a read modify write operation by a supervisor ISR which also modifies the CpulO* registers.
An attempt to write to a disabled bit in user or supervisor mode will be ignored, and an attempt to read a disabled bit returns zero. If there are no user mode enabled bits then access is not allowed in user mode and a bus error will result. Similarly for supervisor mode.
When writing to the CpulOOut register, the value being written is XORed with the current value in the CpulOOut register, and the result is reflected on the GPIO pins.
The pseudocode for determining access to the CpulOOut register is shown below. Similar code could be shown for the CpulODirection and CpulOln registers. Note that when writing to CpulODirection data is deposited directly and not XORed with the existing data (as in the CpulOOut case).
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
210 if (cpu_acode == SUPERVISOR_DATA_MODE) then // supervisor mode if (CpuIOSuperModeMask[31:0] == 0 ) then // access is denied, and bus error gpio_cpu_berr = 1 elsif (cpu_rwn == 1) then // read mode (no filtering needed) gpio_cpu_data[31: 0] = CpuIOOut[31: 0] else // write mode,filtered by mask mask[31:0] = (cpu_dataout[31:0] &
CpuIOSuperModeMask[31:0])
CpuIOOut [31:0] = (cpu_dataout [31:0] <sup>A</sup> mask[31:0] ) //bitwise XOR operator elsif (cpu_acode == USER_DATA_MODE) then // user datamode if (CpuIOUserModeMask[31:0] == 0 ) then // access is denied, and bus error gpio_cpu_berr = 1 elsif (cpu_rwn == 1) then // read mode, filtered by mask gpio_cpu_data = ( CpuIOOut[31:0]&
CpuIOUserModeMask[31:0]) else // write mode,filtered by mask mask[31:0] = (cpu_dataout[31:0]&
CpuIOUserModeMask[31:0])
CpuIOOut[31:0] = (cpu_dataout[31:0] <sup>A</sup> mask[31:0]) //bitwise XOR operator else // access is denied, bus error gpio_cpu_berr = 1
Table 86 details the access modes allowed for registers in the GPIO block. In supervisor mode all registers are accessible. In user mode forbidden accesses will result in a bus error (gpio_cpu_berr asserted).
Table 86. GPIO supervisor and user access modes
<td> Register Address</td><td> Registers</td><td> Access Permitted</td>
<td> 0x000-0x070</td><td> IOModeSelect[31:0]</td><td> Supervisor data mode only</td>
CA 02508141 2005-06-01
211
WO 2004/050369
PCT/AU2003/001616
<td> 0x080-0x94</td><td> lnputPinSelect[9:0]</td><td> Supervisor data mode only</td>
<td colspan="3"> CPU 10 Control</td>
<td> OxOBO</td><td> CpulOUserModeMask</td><td> Supervisor data mode only</td>
<td> OxOB4</td><td> CpulOSuperModeMask</td><td> Supervisor data mode only</td>
<td> 0x0B8</td><td> CpulODirection</td><td> CpulOUserModeMask and CpulOSuperModeMask filtered</td>
<td> OxOBC</td><td> CpulOOut</td><td> CpulOUserModeMask and CpulOSuperModeMask filtered</td>
<td> OxOCO</td><td> CpulOln</td><td> CpulOUserModeMask and CpulOSuperModeMask filtered</td>
<td> OxOC4</td><td> CpuDeGlitchUserModeMask</td><td> Supervisor data mode only</td>
<td> 0x0C8</td><td> CpulOlnDeglitch</td><td> CpuDeGlitchUserModeMask filtered. Unrestricted Supervisor data mode access</td>
<td colspan="3"> Deglitch control</td>
<td> 0x0D0-0x0D4</td><td> DeGlitchCount[1:0]</td><td> Supervisor data mode only</td>
<td> 0x0D8-0x0DC</td><td> DeGlitchClkSrc[1:0]</td><td> Supervisor data mode only</td>
<td> OxOEO</td><td> DeGlitchSelect</td><td> Supervisor data mode only</td>
<td colspan="3"> Motor Control</td>
<td> OxOE4</td><td> MotorCtrl UserModeEnable</td><td> Supervisor data mode only</td>
<td> 0x0E8-0x0EC</td><td> MotorMasterClkPeriod[1:0]</td><td> MotorCtrlUserModeEnable enabled.</td>
<td> OxOFO</td><td> MotorMasterCIkSrc</td><td> MotorCtrlUserModeEnable enabled.</td>
<td> 0x0F4-0x100</td><td> MotorCtrlConfig[3:0]</td><td> MotorCtrlUserModeEnable enabled</td>
<td> 0x104</td><td> MotorMasterCIkSelect</td><td> MotorCtrlUserModeEnable enabled</td>
<td> 0x108</td><td> MotorMasterClockEnable</td><td> MotorCtrlUserModeEnable enabled</td>
<td colspan="3"> BLDC Motor Controllers</td>
<td> 0x1 OC</td><td> BLDCMode</td><td> MotorCtrlUserModeEnable Enabled</td>
<td> 0x110</td><td> BLDCDirection</td><td> MotorCtrlUserModeEnable Enabled</td>
<td colspan="3"> LED control</td>
<td> 0x114</td><td> LEDCtrlUserModeEnable</td><td> Supervisor data mode only</td>
<td> 0x118-0x124</td><td> LEDDutySelect[3:0]</td><td> LEDCtrlUserModeEnable[3:0] enabled</td>
<td colspan="3"> Frequency Analyser</td>
<td> 0x130</td><td> FreqAnaUserModeEnable</td><td> Supervisor data mode only</td>
<td> 0x134</td><td> FreqAnaPinSelect</td><td> FreqAnaUserModeEnable enabled</td>
<td> 0x138</td><td> FreqAnaPinFormSelect</td><td> FreqAnaUserModeEnable enabled</td>
<td> 0x13C</td><td> FreqAnaLastPeriod</td><td> FreqAnaUserModeEnable enabled</td>
<td> 0x140</td><td> FreqAnaAverage</td><td> FreqAnaUserModeEnable enabled</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
212
<td> 0x144</td><td> FreqAnaCountlnc</td><td> FreqAnallserModeEnable enabled</td>
<td> 0x148</td><td> FreqAnaCount</td><td> FreqAnaUserModeEnable enabled</td>
<td colspan="3"> Miscellaneous</td>
<td> 0x150</td><td> InterruptSrcSelect</td><td> Supervisor data mode only</td>
<td> 0x154</td><td> DebugSelect[8:2]</td><td> Supervisor data mode only</td>
<td> 0x158-0x15C</td><td> MotorMasterCount[1:0]</td><td> Supervisor data mode only</td>
<td> 0x160</td><td> WakeUpInputMask</td><td> Supervisor data mode only</td>
<td> 0x164</td><td> WakeUpLevel</td><td> Supervisor data mode only</td>
<td> 0x168</td><td> USBOverCurrentPinSelect</td><td> Supervisor data mode only</td>
13.11.3 GPIO partition
13.11.4 IO control
The IO control block connects the IO pin drivers to internal signalling based on configured setup registers and debug control signals.
/I Output Control for (i=0; i<32 ; i++) { if (debug_cntrl[i] == 1) then // debug mode gpio_e [i] = l;gpio_o[i] =debug_data_out[i] else // normal mode case io mode select[i] is
<td> 0</td><td> : gpio_e[i]</td><td> =1</td><td> ;gpio_o[i] =led_ctrl[0]</td><td></td><td></td><td> // LED</td>
<td> output</td><td> 1</td><td></td><td></td><td></td><td></td><td></td>
<td> 1</td><td> : gpio_e[i]</td><td> =1</td><td> ;gpio o[i] =led_ctrl[1]</td><td></td><td></td><td> // LED</td>
<td> output</td><td> 2</td><td></td><td></td><td></td><td></td><td></td>
<td> 2</td><td> : gpio_e[i]</td><td> = 1</td><td> ;gpio_o[i] =led_ctrl[2]</td><td></td><td></td><td> // LED</td>
<td> output</td><td> 3</td><td></td><td></td><td></td><td></td><td></td>
<td> 3</td><td> : gpio_e[i]</td><td> =1</td><td> ;gpio_o[i] =led_ctrl[3]</td><td></td><td></td><td> // LED</td>
<td> output</td><td> 4</td><td></td><td></td><td></td><td></td><td></td>
<td> 4</td><td> : gpio_e[i]</td><td> =1 ;</td><td> gpio_o[i] =motor_ctrl[0]</td><td></td><td> //</td><td> Stepper</td>
<td> Motor</td><td> Control 1</td><td></td><td></td><td></td><td></td><td></td>
<td> 5</td><td> : gpio_e[i]</td><td> =1 ;</td><td> gpio_o[i] =motor_ctrl[1]</td><td></td><td> //</td><td> Stepper</td>
<td> Motor</td><td> Control 2</td><td></td><td></td><td></td><td></td><td></td>
<td> 6</td><td> : gpio_e[i]</td><td> =i ;</td><td> gpio_o[i] =motor_ctrl[2]</td><td></td><td> //</td><td> Stepper</td>
<td> Motor</td><td> Control 3</td><td></td><td></td><td></td><td></td><td></td>
<td> 7</td><td> : gpio_e[i]</td><td> =1 ;</td><td> gpio_o[i] =motor_ctrl[3]</td><td></td><td> //</td><td> Stepper</td>
<td> Motor</td><td> Control 4</td><td></td><td></td><td></td><td></td><td></td>
<td> 8</td><td> : gpio_e[i]</td><td> = 1</td><td> ;gpio_o[i] =bldc_ctrl[0]</td><td> [0]</td><td></td><td> // BLDC</td>
<td> Motor</td><td colspan="2"> Control 1, output</td><td> 1</td><td></td><td></td><td></td>
<td> 9</td><td> : gpio_e[i]</td><td> = 1</td><td> ;gpio_o[i] =bldc_ctrl[0]</td><td> [1]</td><td></td><td> / / BLDC</td>
<td> Motor</td><td colspan="2"> Control 1, output</td><td> 2</td><td></td><td></td><td></td>
CA 02508141 2005-06-01
<td> WO 2004/050369</td><td></td><td> PCT/AU2003/001616</td>
<td></td><td> 213</td><td></td>
10: gpio_e [i] =1 ;gpio_o[i]
Motor Control 1,output 3
11: gpio_e[i] =1 ;gpio_o[i]
Motor Control 1, output 4
12: gpio_e [i] =1 ;gpio_o[i]
Motor Control 1, output 5
13: gpio_e[i] =1 ;gpio_o[i]
Motor Control 1, output 6
14: gpio_e[i] =1 ;gpio_o[i]
Motor Control 2, output 1
15: gpio_e[i] =1 ;gpio_o[i]
Motor Control 2,output 2
16: gpio_e[i] =1 ;gpio_o[i]
Motor Control 2, output 3
17: gpio_e[i] =1 ;gpio_o[i]
Motor Control 2,output 4
18: gpio_e[i] =1 ;gpio_o[i]
Motor Control 2, output 5
19: gpio_e[i] =1 ;gpio_o[i]
Motor Control 2,output 6
20: gpio_e[i] =1 ;gpio_o[i]
21: gpio_e[i] =1 ;gpio_o[i]
<td> =bldc_ctrl[0]</td><td> [2]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[0]</td><td> [3]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[0]</td><td> [4]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[0]</td><td> [5]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[1]</td><td> [0]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[1]</td><td> [1]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[1]</td><td> [2]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[1]</td><td> [3]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[1]</td><td> [4]</td><td></td><td> //</td><td> BLDC</td>
<td> =bldc_ctrl[1]</td><td> [5]</td><td></td><td> //</td><td> BLDC</td>
<td colspan="2"> lss_gpio_clk[0]</td><td> //</td><td colspan="2"> LSS Clk</td>
<td colspan="2"> lss_gpio_clk[1]</td><td> //</td><td colspan="2"> LSS Clk</td>
22: gpio_e[i] =lss_gpio_e[0] =lss_gpio_dout[0]; // LSS Data 0 gpio_lss_din[0] = gpio_i [i] 23: gpio_e[i] =lss_gpio_e[1] =lss_gpio_dout[1]; // LSS Data 1 gpio_lss_din[1] = gpio_i [i] 24: gpio_e[i] =isi_gpio_e[0] =isi_gpio_dout[0]; // ISI Control 1 gpio_isi_din[0] = gpio_i [i] 25: gpio_e[i] =isi_gpio_e[1] =isi_gpio_dout[1]; // ISI Control 2 gpio_isi_din[1] = gpio_i[i] 26: gpio_e[i] =isi_gpio_e[2] ;gpio_o [i] ;gpio_o[i] ;gpio_o[i] ;gpio_o[i] til =isi_gpio_dout[2]; // ISI Control 3 gpio_isi_din[2] = gpio_i [i]
27: gpio_e[i] =isi_gpio_e[3] ;gpio_o[i] =isi gpio dout[3J; // ISI Control 4
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
214 gpio_isi_din[3] = gpio_i[i]
28: gpio_e[i] =cpu_io_dir[i] ;gpio_o[i] =cpu_io_out [i]; // CPU Direct
29: gpio_e[i] =1 ;gpio_o[i] =usbh_gpio_power_en // USB host power enable
30: gpio_e[i] =0 ;gpio_o[i] =0 // Input only mode end case // all gpio are always readable by the CPU cpu_io_in[i] = gpio_i[i];
}
The input selection pseudocode, for determining which pin connects to which de glitch circuit.
for( i=0 ;i < 10 ; i++) { pin_num = input_pin_select [i] deglitch_input[i] = gpio_i[pin_num] }
The gpio_usbh_over_current output to the USB core is driven by a selected deglitched input (configured by the USBOverCurrentPinSelect register).
index = USBOverCurrentPinSelect gpio_usbh_over_current = cpu_io_in_deglitch[index]
13.11.5 Wakeup generator
The wakeup generator compares the deglitched inputs with the configured mask (WakeUpInputMask) and level (WakeUpLevel), and determines whether to generate a wakeup to the CPR block.
for (i =0;i<10; i++) { if (wakeup_level = 0) then // level 0 active wakeup = wakeup OR wakeup_input_mask[i] AND NOT cpu_io_in_deglitch[i] else // level 1 active wakeup = wakeup OR wakeup_input_mask[i] AND cpu_io_in_deglitch[i] }
// assign the output gpio_cpr_wakeup = wakeup
13.11.6 LED pulse generator
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
215
The pulse generator logic consists of a 7-bit counter that is incremented on a 1ps pulse from the timers block (tim_pulse[0]). The LED control signal is generated by comparing the count value with the configured duty cycle for the LED (led_duty_sel).
The logic is given by:
for (1=0 i<4 ;i++) { // for each LED pin // period divided into 8 segments period_div8 = ent[6:4];
if (period_div8 < led_duty_sel[i]) then led_ctrl[i] = 1 else led_ctrl[i] = 0 }
// update the counter every lus pulse if (tim_jpulse [0] == 1) then ent ++
13.11.7 Stepper Motor control
The motor controller consists of 2 counters, and 4 phase generator logic blocks, one per motor control pin. The counters decrement each time a timing pulse (cnt_eri) is received. The counters start at the configured clock period value (motor_mas_clk_period) and decrement to zero. If the counters are enabled (via motor_mas_clk_enable), the counters will automatically restart at the configured clock period value, otherwise they will wait until the counters are re-enabled.
The timing pulse period is one of pclk, 1ps, 100ps, 1ms depending on the motor_mas_clk_sel signal. The counters are used to derive the phase and duty cycle of each motor control pin.
// decrement logic if (cnt_en == 1) then if ((mas_cnt == 0) AND (motor_mas_clk_enable == 1)) then mas_cnt = motor_mas_clk_joeriod [15:0] elsif ((mas_cnt == 0) AND (motor_mas_clk_enable == 0)) then mas_cnt = 0 else mas_cnt -else // hold the value mas_cnt = mas_cnt
The phase generator block generates the motor control logic based on the selected clock generator (motor_mas_clk_sel) the motor control high transition point (curr_motor_ctrl_high) and the motor control low transition point (curr_motor_ctrl_Jow).
The phase generator maintains current copies of the motor_ctrl_config configuration value (motor_ctrl_config[31:16] becomes curr_motor_ctrl_high and motor_ctrl_config[15:0] becomes
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
216 curr_motor_ctrl_low). It updates these values to the current register values when it is safe to do so without causing a glitch on the output motor pin.
Note that when reprogramming the motor__ctrl_config register to reorder the sequence of the transition points (e.g changing from low point less than high point to low point greater than high point and vice versa) care must taken to avoid introducing glitching on the output pin.
There are 4 instances one per motor control pin.
The logic is given by:
// select the input counter to use if (motor_mas_clk_sel == 1) then count = mas_cnt[1] else count = mas_cnt[0]
I/ Generate the phase and duty cycle if (count == curr_motor_ctrl_low) then motor_ctrl = 0 elsif (count == curr_motor_ctrl_high) then motor_ctrl = 1 else motor_ctrl = motor_ctrl // remain the same // update the current registers at period boundary if (count == 0) then curr_motor_ctrl_high = motor_ctrl_config[31:16] // update to new high value curr_motor_ctrl_low = motor_ctrl_config[15:0] // update to new high value
13.11.8 Input deglitch
The input deglitch logic rejects input states of duration less than the configured number of time units (deglitch_cnt), input states of greater duration are reflected on the output cpu_io_in_deglitch. The time units used (either pclk, 1 ps, 1OOps, 1 ms) by the deglitch circuit is selected by the deglitch_clk_src bus.
There are 2 possible sets of deglitch_cnt and deglitch_clk_src that can be used to deglitch the input pins. The values used are selected by the deglitch_sel signal.
There are 10 deglitch circuits in the GPIO. Any GPIO pin can be connected to a deglitch circuit.
Pins are selected for deglitching by the InputPinSelect registers.
Each selected input can be used to generate an interrupt. The interrupt can be generated from the raw input signal (deglitchjnput) or a deglitched version of the input (cpu_io_in_deglitch). The interrupt source is selected by the interrupt_src_select signal.
The counter logic is given by if (deglitch_input != deglitch_input_delay) then
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
217 ent = deglitch_cnt output_en = 0 elsif (ent == 0 ) then ent = ent output_en = 1 elsif (cnt_en == 1) then ent -output_en = 0
13.11.9 Frequency Analyser
The frequency analyser block monitors a selected deglitched input (cpu_io_in_deglitch) or a direct selected input (deglitchjnpuf) and detects positive edges. The selected input is configured by FreqAnaPinSelect and FreqAnaPinFormSel registers. Between successive positive edges detected on the input it increments a counter (FreqAnaCount) by a programmed amount (FreqAnaCountlnc) on each clock cycle. When a positive edge is detected the FreqAnaLastPeriod register is updated with the top 16 bits of the counter and the counter is reset. The frequency analyser also maintains a running average of the FreqAnaLastPeriod register. Each time a positive edge is detected on the input the FreqAnaAverage register is updated with the new calculated FreqAnaLastPeriod. The average is calculated as 7/8 the current value plus 1/8 of the new value. The FreqAnaLastPeriod, FreqAnaCount and FreqAnaAverage registers can be written to by the CPU.
The pseudocode is given by if ((pin == 1) AND pin_delay ==0 ) ) then // positive edge detected freq_ana_lastperiod[15:0] = freq_ana_count[31:16] freg_ana_average[15:0] = freq_ana_average[15: 0] freq_ana_average[15:3] + freçL_ana_lastperiod [15:3] freq_ana_count[15 :0] = 0 else freq_ana_count[31:0] = freq_ana_count[31: 0] + freq_ana_count_inc[19:0] // implement the configuration register write if (wr_last_en == 1) then freq_ana_lastperiod = wr_data elsif (wr_average_en == 1 ) then freq_ana_average = wr_data elsif (wr_freqLCOunt_en == 1) then freq_ana_count = wr_data
13.11.10 BLDC Motor Controller
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
218
The BLDC controller logic is identical for both instances, only the input connections are different.
The logic implements the truth table shown in Table . The six q outputs are combinationally based on the direction, ha, hb, he and pwm inputs. The direction input has 2 possible sources selected by the mode, the pseudocode is as follows // determine if in internal or external direction mode if (mode == 1) then // internal mode direction = int_direction else // external mode direction = ext_direction
Interrupt Controller Unit (ICU)
The interrupt controller accepts up to N input interrupt sources, determines their priority, arbitrates based on the highest priority and generates an interrupt request to the CPU. The ICU complies with the interrupt acknowledge protocol of the CPU. Once the CPU accepts an interrupt (i.e. processing of its service routine begins) the interrupt controller will assert the next arbitrated interrupt if one is pending.
Each interrupt source has a fixed vector number N, and an associated configuration register, lntReg[N], The format of the lntReg[N] register is shown in Table 87 below.
Table 87. lntReg[N] register format
<td> Field</td><td> bit(s)</td><td> Description</td>
<td> Priority</td><td> 3:0</td><td> Interrupt priority</td>
<td> Type</td><td> 5:4</td><td> Determines the triggering conditions for the interrupt 00 - Positive edge 10- Negative edge 01 - Positive level 11- Negative level</td>
<td> Mask</td><td> 6</td><td> Mask bit. 1 - Interrupts from this source are enabled, 0 - Interrupts from this source are disabled. Note that there may be additional masks in operation at the source of the interrupt.</td>
<td> Reserved</td><td> 31:7</td><td> Reserved. Write as 0.</td>
Once an interrupt is received the interrupt controller determines the priority and maps the programmed priority to the appropriate CPU priority levels, and then issues an interrupt to the CPU. The programmed interrupt priority maps directly to the LEON CPU interrupt levels. Level 0 is no interrupt. Level 15 is the highest interrupt level.
14.1 Interrupt preemption
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
219
With standard LEON pre-emption an interrupt can only be pre-empted by an interrupt with a higher priority level. If an interrupt with the same priority level (1 to 14) as the interrupt being serviced becomes pending then it is not acknowledged until the current service routine has completed. Note that the level 15 interrupt is a special case, in that the LEON processor will continue to take level 15 interrupts (i.e re-enter the ISR) as long as level 15 is asserted on the icu_cpu_ilevel.
Level 0 is also a special case, in that LEON consider level 0 interrupts as no interrupt, and will not issue an acknowledge when level 0 is presented on the icu_cpu_ilevel bus.
Thus when pre-emption is required, interrupts should be programmed to different levels as interrupt priorities of the same level have no guaranteed servicing order. Should several interrupt sources be programmed with the same priority level, the lowest value interrupt source will be serviced first and so on in increasing order.
The interrupt is directly acknowledged by the CPU and the ICU automatically clears the pending bit of the lowest value pending interrupt source mapped to the acknowledged interrupt level.
All interrupt controller registers are only accessible in supervisor data mode. If the user code wishes to mask an interrupt it must request this from the supervisor and the supervisor software will resolve user access levels.
14.2 Interrupt sources
The mapping of interrupt sources to interrupt vectors (and therefore lntReg[N] registers) is shown in Table 88 below. Please refer to the appropriate section of this specification for more details of the interrupt sources.
Table 88. Interrupt sources vector table
<td> Vector</td><td> Source</td><td> Description</td>
<td> 0</td><td> Timers</td><td> WatchDog Timer Update request</td>
<td> 1</td><td> Timers</td><td> Generic Timer 1 interrupt</td>
<td> 2</td><td> Timers</td><td> Generic Timer 2 interrupt</td>
<td> 3</td><td> PCU</td><td> PEP Sub-system Interrupt- TE finished band</td>
<td> 4</td><td> PCU</td><td> PEP Sub-system Interrupt- LBD finished band</td>
<td> 5</td><td> PCU</td><td> PEP Sub-system Interrupt- CDU finished band</td>
<td> 6</td><td> PCU</td><td> PEP Sub-system Interrupt- CDU error</td>
<td> 7</td><td> PCU</td><td> PEP Sub-system Interrupt- PCU finished band</td>
<td> 8</td><td> PCU</td><td> PEP Sub-system Interrupt- PCU Invalid address interrupt</td>
<td> 9</td><td> PHI</td><td> PEP Sub-system Interrupt- PHI Line Sync Interrupt</td>
<td> 10</td><td> PHI</td><td> PEP Sub-system Interrupt- PHI Buffer underrun</td>
<td> 11</td><td> PHI</td><td> PEP Sub-system Interrupt- PHI Page finished</td>
<td> 12</td><td> PHI</td><td> PEP Sub-system Interrupt- PHI Print ready</td>
<td> 13</td><td> SCB</td><td> USB Host interrupt</td>
<td> 14</td><td> SCB</td><td> USB Device interrupt</td>
<td> 15</td><td> SCB</td><td> ISI interrupt</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
220
<td> 16</td><td> SCB</td><td> DMA interrupt</td>
<td> 17</td><td> LSS</td><td> LSS interrupt, LSS interface 0 interrupt request</td>
<td> 18</td><td> LSS</td><td> LSS interrupt, LSS interface 1 interrupt request</td>
<td> 19-28</td><td> GPIO</td><td> GPIO general purpose interrupts</td>
<td> 29</td><td> Timers</td><td> Generic Timer 3 interrupt</td>
14.3 IMPLEMENTATION
14.3.1 Definitions of I/O
Table 89. Interrupt Controller Unit I/O definition
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td> Clocks and Resets</td><td></td><td></td><td></td>
<td> Pclk</td><td> 1</td><td> In</td><td> System Clock</td>
<td> prst_n</td><td> 1</td><td> In</td><td> System reset, synchronous active low</td>
<td> CPU interface</td><td></td><td></td><td></td>
<td> cpu_adr[7:2]</td><td> 6</td><td> In</td><td> CPU address bus. Only 6 bits are required to decode the address space for the ICU block</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> icu_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_icu_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_icu_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> icu_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When icu_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the ICU block and for a read cycle this means the data on icu_cpu_data is valid.</td>
<td> icu_cpu_ilevel[3:0]</td><td> 4</td><td> Out</td><td> Indicates the priority level of the current active interrupt.</td>
<td> cpujack</td><td> 1</td><td> In</td><td> Interrupt request acknowledge from the LEON core.</td>
<td> cpu_icu_ilevel[3:0]</td><td> 4</td><td> In</td><td> Interrupt acknowledged level from the LEON core</td>
<td> icu_cpu_berr</td><td> 1</td><td> Out</td><td> Bus error signal to the CPU indicating an invalid access.</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as follows: 00 - User program access 01 - User data access 10 - Supervisor program access</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
221
<td></td><td></td><td></td><td> 11 - Supervisor data access</td>
<td> icu_cpu_debug_valid</td><td> 1</td><td> Out</td><td> Debug Data valid on icu_cpu_data bus. Active high</td>
<td colspan="4"> Interrupts</td>
<td> tim_icu_wd_irq</td><td> 1</td><td> In</td><td> Watchdog timer interrupt signal from the Timers block</td>
<td> tim Jcu_irq[2:0]</td><td> 3</td><td> In</td><td> Generic timer interrupt signals from the Timers block</td>
<td> gpio_icu_irq[9:0]</td><td> 10</td><td> In</td><td> GPIO pin interrupts</td>
<td> usb_icu_irq[1:0]</td><td> 2</td><td> In</td><td> USB host and device interrupts from the SCB Bit 0 - USB Host interrupt Bit 1 - USB Device interrupt</td>
<td> isijcujrq</td><td> 1</td><td> In</td><td> ISI interrupt from the SCB</td>
<td> dmajcujrq</td><td> 1</td><td> In</td><td> DMA interrupt from the SCB</td>
<td> Iss_icu_irq[1:0]</td><td> 2</td><td> In</td><td> LSS interface interrupt request</td>
<td> cdu_finishedband</td><td> 1</td><td> In</td><td> Finished band interrupt request from the CDU</td>
<td> cdujcujpegerror</td><td> 1</td><td> In</td><td> JPEG error interrupt from the CDU</td>
<td> lbd_finishedband</td><td> 1</td><td> In</td><td> Finished band interrupt request from the LBD</td>
<td> te_finishedband</td><td> 1</td><td> In</td><td> Finished band interrupt request from the TE</td>
<td> pcu_finishedband</td><td> 1</td><td> In</td><td> Finished band interrupt request from the PCU</td>
<td> pcu_icu_address_invalid</td><td> 1</td><td> In</td><td> Invalid address interrupt request from the PCU</td>
<td> phiJcujjnderrun</td><td> 1</td><td> In</td><td> Buffer underrun interrupt request from the PHI</td>
<td> phi_icu_page_finish</td><td> 1</td><td> In</td><td> Page finished interrupt request from the PHI</td>
<td> phi_icu_print_rdy</td><td> 1</td><td> In</td><td> Print ready interrupt request from the PHI</td>
<td> phijcujinesyncjnt</td><td> 1</td><td> In</td><td> Line sync interrupt request from the PHI</td>
14.3.2 Configuration registers
The configuration registers in the ICU are programmed via the CPU interface. Refer to section 11.4 on page 96 for a description of the protocol and timing diagrams for reading and writing registers in 5 the ICU. Note that since addresses in SoPEC are byte aligned and the CPU only supports 32-bit register reads and writes, the lower 2 bits of the CPU address bus are not required to decode the address space for the ICU. When reading a register that is less than 32 bits wide zeros should be returned on the upper unused bit(s) of icu_pcu_data. Table 90 lists the configuration registers in the ICU block.
The ICU block will only allow supervisor data mode accesses (i.e. cpu_acode[1:0] = SUPERVISOR_DATA). All other accesses will result in icu_cpu_berr being asserted.
Table 90. ICU Register Map
<td> Address</td><td> Register</td><td> f/bits</td><td> Reset</td><td> Description</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
222
<td colspan="2"> ICU_base +</td><td colspan="3"></td>
<td> 0x00 - 0x74</td><td> lntReg[29:0]</td><td> 30x7</td><td> 0x00</td><td> Interrupt vector configuration register</td>
<td> 0x88</td><td> IntClear</td><td> 30</td><td> 0x0000 _0000</td><td> Interrupt pending clear register. If written with a one it clears corresponding interrupt Bits[30:0] - Interrupts sources 30 to 0 (Reads as zero)</td>
<td> 0x90</td><td> IntPending</td><td> 30</td><td> 0x0000 _0000</td><td> Interrupt pending register. (Read Only) Bits[30:0]- Interrupts sources 30 to 0</td>
<td> OxAO</td><td> IntSource</td><td> 5</td><td> 0x1 F</td><td> Indicates the interrupt source of the last acknowledged interrupt. The NoInterrupt value is defined as all bits set to one. (Read Only)</td>
<td> OxCO</td><td> DebugSelect[7:2]</td><td> 6</td><td> 0x00</td><td> Debug address select. Indicates the address of the register to report on the icu_cpu_data bus when it is not otherwise being used.</td>
14.3.3 IOU partition
14.3.4 Interrupt detect
The ICU contains multiple instances of the interrupt detect block, one per interrupt source! The interrupt detect block examines the interrupt source signal, and determines whether it should generate request pending (int_pend) based on the configured interrupt type and the interrupt source conditions. If the interrupt is not masked the interrupt will be reflected to the interrupt arbiter via the int_active signal. Once an interrupt is pending it remains pending until the interrupt is accepted by the CPU or it is level sensitive and gets removed. Masking a pending interrupt has the effect of removing the interrupt from arbitration but the interrupt will still remain pending.
When the CPU accepts the interrupt (using the normal ISR mechanism), the interrupt controller automatically generates an interrupt clear for that interrupt source (cpu_int_clear). Alternatively if the interrupt is masked, the CPU can determine pending interrupts by polling the IntPending registers. Any active pending interrupts can be cleared by the CPU without using an ISR via the IntClear registers.
Should an interrupt clear signal (either from the interrupt clear unit or the CPU) and a new interrupt condition happen at the same time, the interrupt will remain pending. In the particular case of a level sensitive interrupt, if the level remains the interrupt will stay active regardless of the clear signal. The logic is shown below:
mask = int_config[6] type = int_config[5:4] int_pend = last_int_pend interrupt // update the pending FF // test for interrupt condition // the last pending
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
223
<td> if (type == NEGJLEVEL) then</td>
<td> int_pend = NOT(int src)</td>
<td> elsif (type == POS_LEVEL)</td>
<td> int_pend = int_src</td>
<td> elsif ( (type == POS_EDGE ) AND (int_src == 1) AND</td>
<td> (last_int_src == 0))</td>
<td> int_pend = 1</td>
<td> elsif ((type == NEG_EDGE ) AND (int_src == 0) AND</td>
(last_int_src == 1)) int __pend = 1 elsif ((int_clear == 1 )OR (cpu_int_clear==l)) then.
intjpend = 0 else int_pend = last_int_pend // stay the same as before // mask the pending bit if (mask == 1) then int_active = int_pend else int_active = 0 // assign the registers last_int_src = int_src last_int_pend = int_pend
14.3.5 Interrupt arbiter
The interrupt arbiter logic arbitrates a winning interrupt request from multiple pending requests based on configured priority. It generates the interrupt to the CPU by setting icu_cpu_ilevel to a non-zero value. The priority of the interrupt is reflected in the value assigned to icu_cpu_i!evel, the higher the value the higher the priority, 15 being the highest, and 0 considered no interrupt.
// arbitrate with the current winner int_ilevel = 0 for (i=0;i<30;i++) { if ( int_active[i] == 1) then { if (int_config[i] [3:0] > win_int_ilevel[3:0] ) then win_int_ilevel [3:0] = int_config[i] [3 : 0] } }
} // assign the CPU interrupt level int_ilevel = win_int_ilevel[3 : 0]
14.3.6 Interrupt clear unit
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
224
The interrupt clear unit is responsible for accepting an interrupt acknowledge from the CPU, determining which interrupt source generated the interrupt, clearing the pending bit for that source and updating the IntSource register.
When an interrupt acknowledge is received from the CPU, the interrupt clear unit searches through each interrupt source looking for interrupt sources that match the acknowledged interrupt level (cpu_icu_ilevel) and determines the winning interrupt (lower interrupt source numbers have higher priority). When found the interrupt source pending bit is cleared and the IntSource register is updated with the interrupt source number.
The LEON interrupt acknowledge mechanism automatically disables all other interrupts temporarily until it has correctly saved state and jumped to the ISR routine. It is the responsibility of the ISR to re-enable the interrupts. To prevent the IntSource register indicating the incorrect source for an interrupt level, the ISR must read and store the IntSource value before re-enabling the interrupts via the Enable Traps (ET) field in the Processor State Register (PSR) of the LEON.
See section 11.9 on page 132 for a complete description of the interrupt handling procedure.
After reset the state machine remains in Idle state until an interrupt acknowledge is received from the CPU (indicated by cpujack). When the acknowledge is received the state machine transitions to the Compare state, resetting the source counter (ent) to the number of interrupt sources.
While in the Compare state the state machine cycles through each possible interrupt source in decrementing order. For each active interrupt source the programmed priority (int_priority[cnt][3:0]) is compared with the acknowledged interrupt level from the CPU (cpu_icu_ilevel), if they match then the interrupt is considered the new winner. This implies the last interrupt source checked has the highest priority, e.g interrupt source zero has the highest priority and the first source checked has the lowest priority. After all interrupt sources are checked the state machine transitions to the IntClear state, and updates the int_source register on the transition.
Should there be no active interrupts for the acknowledged level (e.g. a level sensitive interrupt was removed), the IntSource register will be set to NoInterrupt. NoInterrupt is defined as the highest possible value that IntSource can be set to (in this case 0x1 F), and the state machine will return to Idle.
The exact number of compares performed per clock cycle is dependent the number of interrupts, and logic area to logic speed trade-off, and is left to the implementer to determine. A comparison of all interrupt sources must complete within 8 clock cycles (determined by the CPU acknowledge hardware).
When in the IntClear state the state machine has determined the interrupt source to clear (indicated by the int_source register). It resets the pending bit for that interrupt source, transitions back to the Idle state and waits for the next acknowledge from the CPU.
The minimum time between successive interrupt acknowledges from the CPU is 8 cycles.
Timers Block (TIM)
The Timers block contains general purpose timers, a watchdog timer and timing pulse generator for use in other sections of SoPEC.
15.1 Watchdog timer
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
225
The watchdog timer is a 32 bit counter value which counts down each time a timing pulse is received. The period of the timing pulse is selected by the WatchDogUnitSel register. The value at any time can be read from the WatchDogTimer register and the counter can be reset by writing a non-zero value to the register. When the counter transitions from 1 to 0, a system wide reset will be triggered as if the reset came from a hardware pin.
The watchdog timer can be polled by the CPU and reset each time it gets close to 1, or alternatively a threshold (WatchDoglntThres) can be set to trigger an interrupt for the watchdog timer to be serviced by the CPU. If the WatchDoglntThres is set to N, then the interrupt will be triggered on the N to N-1 transition of the WatchDogTimer. This interrupt can be effectively masked by setting the threshold to zero. The watchdog timer can be disabled, without causing a reset, by writing zero to the WatchDogTimer register.
15.2 TIMING PULSE GENERATOR
The timing block contains a timing pulse generator clocked by the system clock, used to generate timing pulses of programmable periods. The period is programmed by accessing the TimerStartValue registers. Each pulse is of one system clock duration and is active high, with the pulse period accurate to the system clock frequency. The periods after reset are set to 1 us, 100us and 100 ms.
The timing pulse generator also contains a 64-bit free running counter that can be read or reset by accessing the FreeRunCount registers. The free running counter can be used to determine elapsed time between events at system clock accuracy or could be used as an input source in low-security random number generator.
15.3 Generic timers
SoPEC contains 3 programmable generic timing counters, for use by the CPU to time the system. The timers are programmed to a particular value and count down each time a timing pulse is received. When a particular timer decrements from 1 to 0, an interrupt is generated. The counter can be programmed to automatically restart the count, or wait until re-programmed by the CPU. At any time the status of the counter can be read from GenCntValue, or can be reset by writing to GenCntValue register. The auto-restart is activated by setting the GenCntAuto register, when activated the counter restarts at GenCntStartValue. A counter can be stopped or started at any time, without affecting the contents of the GenCntValue register, by writing a 1 or 0 to the relevent GenCntEnable register.
15.4 Implementation
15.4.1 Definitions of I/O
Table 91. Timers block I/O definition
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td> Clocks and Resets</td><td colspan="3"></td>
<td> Pclk</td><td> 1</td><td> In</td><td> System Clock</td>
<td> prst_n</td><td> 1</td><td> In</td><td> System reset, synchronous active low</td>
<td> tim_pulse[2:0]</td><td> 3</td><td> Out</td><td> Timers block generated timing pulses, each one pclk</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
226
<td></td><td></td><td></td><td> wide 0- Nominal 1ps pulse 1 - Nominal 100 ps pulse 2 - Nominal 10ms pulse</td>
<td> CPU interface</td><td colspan="3"></td>
<td> cpu_adr[6:2]</td><td> 5</td><td> In</td><td> CPU address bus. Only 5 bits are required to decode the address space for the ICU block</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> tim_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_tim_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_tim_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> tim_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When tim_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the TIM block and for a read cycle this means the data on tim_cpu_data is valid.</td>
<td> tim_cpu_berr</td><td> 1</td><td> Out</td><td> Bus error signal to the CPU indicating an invalid access.</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as follows: 00 - User program access 01 - User data access 10 - Supervisor program access 11 - Supervisor data access</td>
<td> tim_cpu_debug_valid</td><td> 1</td><td> Out</td><td> Debug Data valid on tim_cpu_data bus. Active high</td>
<td> Miscellaneous</td><td colspan="3"></td>
<td> tim_icu_wd_irq</td><td> 1</td><td> Out</td><td> Watchdog timer interrupt signal to the ICU block</td>
<td> tim_icuJrq[2:0]</td><td> 3</td><td> Out</td><td> Generic timer interrupt signals to the ICU block</td>
<td> tim_cpr_reset_n</td><td> 1</td><td> Out</td><td> Watch dog timer system reset.</td>
15.4.2 Timers sub-block partition
15.4.3 Watchdog timer
The watchdog timer counts down from pre-programmed value, and generates a system wide reset when equal to one. When the counter passes a pre-programmed threshold (wdog_tim_thres) value 5 an interrupt is generated (tim_icu_wd_irq) requesting the CPU to update the counter. Setting the counter to zero disables the watchdog reset. In supervisor mode the watchdog counter can be written to or read from at any time, in user mode access is denied. Any accesses in user mode will generate a bus error.
The counter logic is given by
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
227 if (wdog_wen == 1) then wdog_tim_cnt = write_data // load new data elsif ( wdog_tim_cnt == 0) then wdog_tim_cnt = wdog_tim_cnt // count disabled elsif ( cnt_en == 1 ) then wdog_t im_cnt-else wdog_tim_cnt = wdog_tim_cnt
The timer decode logic is if (( wdog_tim_cnt == wdog_tim_thres) AND (wdog_tim_cnt 1= 0 )AND (cnt_en == 1)) then tim__icu_wd_irq = 1 else tim_icu_wd_irq = 0 // reset generator logic if (wdog_tim_cnt == 1) AND (cnt_en == 1) then tim_cpr_reset__n = 0 else tim_cpr_reset__n = 1
15.4.4 Generic timers
The generic timers block consists of 3 identical counters. A timer is set to a pre-configured value (GenCntStartValue) and counts down once per selected timing pulse (gen_unit_sel). The timer can be enabled or disabled at any time (gen_tim_eri), when disabled the counter is stopped but not cleared. The timer can be set to automatically restart (gen_tim_auto) after it generates an interrupt. In supervisor mode a timer can be written to or read from at any time, in user mode access is determined by the GenCntUserModeEnable register settings.
The counter logic is given by if (gen_wen == 1) then gen__tim_cnt = write_data elsif (( cnt_en == 1 )AND (gen_tim_en == 1 )) then if ( gen_tim_cnt == 1) OR ( gen_tim_cnt == 0) then // counter may need re-starting if (gen_tim_auto == 1) then gen_tim_cnt = gen_tim_cnt_st_value else gen_tim_cnt = 0 // hold count at zero else gen_tim_cnt-CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
228 else gen_tim_cnt = gen_tim_cnt
The decode logic is if (gen_tim_cnt == 1)AND ( cnt_en == 1 )AND (gen_tim_en == 1 ) then tim_icu_irq = 1 else tim_icu_irq = 0
15.4.5 Timing pulse generator
The timing pulse generator contains a general free running 64-bit timer and 3 timing pulse generators producing timing pulses of one cycle duration with a programmable period. The period is programmed by changed the TimerStartValue registers, but have a nominal starting period of 1ps, 100ps and 1 ms. In supervisor mode the free running timer register can be written to or read from at any time, in user mode access is denied. The status of each of the timers can be read by accessing the PulseTimerStatus registers in supervisor mode. Any accesses in user mode will result in a bus error.
15.4.5.1 Free Run Timer
The increment logic block increments the timer count on each clock cycle. The counter wraps around to zero and continues incrementing if overflow occurs. When the timing register (FreeRunCount) is written to, the configuration registers block will set the free_run_wen high for a clock cycle and the value on write_data will become the new count value. If free_run_wen[1] is 1 the higher 32 bits of the counter will be written to, otherwise if free_run_wen[0] the lower 32 bits are written to. It is the responsibility of software to handle these writes in a sensible manner.
The increment logic is given by if (free_run_wen[1] == 1) then free_run_cnt[63:32] = write_data elsif (free_run_wen[0] == 1) then free_run_cnt[31:0] = write_data else free_run_cnt ++
15.4.5.2 Pulse Timers
The pulse timer logic generates timing pulses of 1 clock cycle length and programmable period. Nominally they generate pulse periods of 1ps, 100ps and 1ms. The logic for timer 0 is given by:
// Nominal lus generator if (pulse_0_cnt == 0 ) then pulse_0_cnt = timer_start_value[0] timjpulse[0] = 1 else pulse_0_cnt -timjpulse [0] = 0
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
229
The logic for timer 1 is given by:
// lOOus generator if ((pulse_l_cnt == 0) AND (tim_j?ulse [0] == 1)) then pulse_l_cnt = timer_start_value[1] tim_pulse[1]= 1 elsif (tim_pulse[0] == 1) then pulse_l_cnt -tim_pulse[1]= 0 else pulse_l_cnt = pulse_l_cnt timjpulse[1]= 0
The logic for the timer 2 is given by:
// 10ms generator if ((pulse_2_cnt == 0 ) AND (tim_pulse[1] == 1)) then pulse_2_cnt = timer_start_value[2] timjpulse[2]= 1 elsif (tim_pulse[1] == 1) then pulse_2_cnt -tim_pulse[2]= 0 else pulse_2_cnt = pulse_2_cnt timjpulse[2]= 0
15.4.6 Configuration registers
The configuration registers in the TIM are programmed via the CPU interface. Refer to section
11.4.3 on page 96 for a description of the protocol and timing diagrams for reading and writing registers in the TIM. Note that since addresses in SoPEC are byte aligned and the CPU only supports 32-bit register reads and writes, the lower 2 bits of the CPU address bus are not required to decode the address space for the TIM. When reading a register that is less than 32 bits wide zeros should be returned on the upper unused bit(s) of tim_pcu_data. Table 92 lists the configuration registers in the TIM block .
Table 92. Timers Register Map
<td> Address TIM_base +</td><td> Register</td><td> #bits</td><td> Reset</td><td> Description /</td>
<td> 0x00</td><td> WatchDogUnitSel</td><td> 2</td><td> 0x0</td><td> Specifies the units used for the watchdog timer: 0 - Nominal 1 ps pulse 1 - Nominal 100 ps pulse</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
230
<td></td><td></td><td></td><td></td><td> 2 - Nominal 10 ms pulse 3 - pclk</td>
<td> 0x04</td><td> WatchDogTimer</td><td> 32</td><td> OxFFFF _FFFF</td><td> Specifies the number of units to count before watchdog timer triggers.</td>
<td> 0x08</td><td> WatchDoglntThres</td><td> 32</td><td> 0x0000 _0000</td><td> Specifies the threshold value below which the watchdog timer issues an interrupt</td>
<td> OxOC-Ox1O</td><td> FreeRunCount[1:0]</td><td> 2x32</td><td> 0x0000 _0000</td><td> Direct access to the free running counter register. Bus 0 - Access to bits 31-0 Bus 1 - Access to bits 63-32</td>
<td> 0x14 to 0x1 C</td><td> GenCntStartValue[ 2:0]</td><td> 3x32</td><td> 0x0000 _0000</td><td> Generic timer counter start value, number of units to count before event</td>
<td> 0x20 to 0x28</td><td> GenCntValue[2:0]</td><td> 3x32</td><td> 0x0000 _0000</td><td> Direct access to generic timer counter registers</td>
<td> 0x2C to 0x34</td><td> GenCntUnitSel[2:0 I</td><td> 3x2</td><td> 0x0</td><td> Generic counter unit select. Selects the timing units used with corresponding counter: 0 - Nominall ps pulse 1 - Nominall 00 ps pulse 2 - Nominal 10 ms pulse 3 - pclk</td>
<td> 0x38 to 0x40</td><td> GenCntAuto[2:0]</td><td> 3x1</td><td> 0x0</td><td> Generic counter auto re-start select. When high timer automatically restarts, otherwise timer stops.</td>
<td> 0x44 to 0x4C</td><td> GenCntEnable[2:0]</td><td> 3x1</td><td> 0x0</td><td> Generic counter enable. 0 - Counter disabled 1 - Counter enabled</td>
<td> 0x50</td><td> GenCntUserMode Enable</td><td> 3</td><td> 0x0</td><td> User Mode Access enable to generic timer configuration register. When 1 user access is enabled. Bit 0 - Generic timer 0 Bit 1 - Generic timer 1 Bit 2 - Generic timer 2</td>
<td> 0x54 to 0x5C</td><td> TimerStartValue[2: 0]</td><td> 3x8</td><td> 0x7F, 0x63, 0x63</td><td> Timing pulse generator start value. Indicates the start value for each timing pulse timers. For timer 0 the start value specifies the timer period in pclk cycles -1.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
231
<td></td><td></td><td></td><td></td><td> For timer 1 the start value specifies the timer period in timer 0 intervals -1 For timer 2 the start value specifies the timer period in timer 1 intervals 1. Nominally the timers generate pulses at 1us,100us and 10ms intervals respecitively.</td>
<td> 0x60</td><td> DebugSelect[6:2]</td><td> 5</td><td> 0x00</td><td> Debug address select. Indicates the address of the register to report on the tim_cpu_data bus when it is not otherwise being used.</td>
<td> Read Only Registers</td><td colspan="4"></td>
<td> 0x64</td><td> PulseTimerStatus</td><td> 24</td><td> 0x00</td><td> Current pulse timer values, and pulses 7:0 - Timer 0 count 15:8 - Timer 1 count 23:16-Timer 2 count 24 - Timer 0 pulse 25 - Timer 1 pulse 26 -Timer2 pulse</td>
15.4.6.1 Supervisor and user mode access
The configuration registers block examines the CPU access type (cpujacode signal) and determines if the access is allowed to that particular register, based on configured user access registers. If an access is not allowed the block will issue a bus error by asserting the tim_cpu_berr 5 signal.
The timers block is fully accessible in supervisor data mode, all registers can written to and read from. In user mode access is denied to all registers in the block except for the generic timer configuration registers that are granted user data access. User data access for a generic timer is granted by setting corresponding bit in the GenCntUserModeEnabie register. This can only be 10 changed in supervisor data mode. If a particular timer is granted user data access then all registers for configuring that timer will be accessible. For example if timer 0 is granted user data access the GenCntStartValue[0], GenCntUnitSel[0], GenCntAuto[0], GenCntEnable[0] and GenCntValue[0] registers can all be written to and read from without any restriction.
Attempts to access a user data mode disabled timer configuration register will result in a bus error. 15 Table 93 details the access modes allowed for registers in the TIM block. In supervisor data mode all registers are accessable. All forbidden accesses will result in a bus error (tim_cpu_berr asserted).
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
232
Table 93. TIM supervisor and user access modes
<td> Register Address</td><td> Registers</td><td> Access Permission</td>
<td> 0x00</td><td> WatchDogUnitSel</td><td> Supervisor data mode only</td>
<td> 0x04</td><td> WatchDogTimer</td><td> Supervisor data mode only</td>
<td> 0x08</td><td> WatchDoglntThres</td><td> Supervisor data mode only</td>
<td> 0x0C-0x10</td><td> FreeRunCount</td><td> Supervisor data mode only</td>
<td> 0x14</td><td> GenCntStartValuefO]</td><td> GenCntUserModeEnable[0]</td>
<td> 0x18</td><td> GenCntStartValue[1 ]</td><td> GenCntUserModeEnable[1 ]</td>
<td> 0x1 C</td><td> GenCntStartV alue[2]</td><td> GenCntUserModeEnable[2]</td>
<td> 0x20</td><td> GenCntValue[0]</td><td> GenCntUserModeEnable[0]</td>
<td> 0x24</td><td> GenCntValue[1]</td><td> GenCntUserModeEnable[1 ]</td>
<td> 0x28</td><td> GenCntValue[2]</td><td> GenCntUserModeEnable[2]</td>
<td> 0x2C</td><td> GenCntUnitSel[0]</td><td> GenCntUserModeEnable[0]</td>
<td> 0x30</td><td> GenCntUnitSel[1]</td><td> GenCntUserModeEnable[1 ]</td>
<td> 0x34</td><td> GenCntUnitSel[2]</td><td> GenCntUserModeEnable[2]</td>
<td> 0x38</td><td> GenCntAuto[0]</td><td> GenCntUserModeEnable[0]</td>
<td> 0x3C</td><td> GenCntAuto[1]</td><td> GenCntUserModeEnable[1 ]</td>
<td> 0x40</td><td> GenCntAuto[2]</td><td> GenCntUserModeEnable[2]</td>
<td> 0x44</td><td> GenCntEnable[0]</td><td> GenCntUserModeEnable[0]</td>
<td> 0x48</td><td> GenCntEnable[1]</td><td> GenCntUserModeEnable[1 ]</td>
<td> 0x4C</td><td> GenCntEnable[2]</td><td> GenCntUserModeEnable[2]</td>
<td> 0x50</td><td> GenCntUserModeEnable</td><td> Supervisor data mode only</td>
<td> 0x54-0x5C</td><td> TimerStartValue[2:0]</td><td> Supervisor data mode only</td>
<td> 0x60</td><td> DebugSelect</td><td> Supervisor data mode only</td>
<td> 0x64</td><td> PulseTimerStatus</td><td> Supervisor data mode only</td>
Clocking, Power and Reset (CPR)
The CPR block provides all of the clock, power enable and reset signals to the SoPEC device.
16.1 Powerdown modes
The CPR block is capable of powering down certain sections of the SoPEC device. When a section is powered down (i.e. put in sleep mode) no state is retained(except the PSS storage), the CPU must re-initialize the section before it can be used again.
For the purpose of powerdown the SoPEC device is divided into sections:
Table 94. Powerdown sectioning
<td> Section</td><td> Block</td>
<td> Print Engine Pipeline SubSystem (Section 0)</td><td> PCU</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
233
<td rowspan="11"></td><td> CDU</td>
<td> CFU</td>
<td> LBD</td>
<td> SFU</td>
<td> TE</td>
<td> TFU</td>
<td> HCU</td>
<td> DNC</td>
<td> DWU</td>
<td> LLU</td>
<td> PHI</td>
<td> CPU-DRAM (Section 1)</td><td> DRAM</td>
<td rowspan="7"></td><td> CPU/MMU</td>
<td> DIU</td>
<td> TIM</td>
<td> ROM</td>
<td> LSS</td>
<td> PSS</td>
<td> ICU</td>
<td> ISI Subsystem (Section 2)</td><td> ISI (SCB)</td>
<td rowspan="2"></td><td> DMA Ctrl (SCB)</td>
<td> GPIO</td>
<td> USB Subsystem (Section 3)</td><td> USB (SCB)</td>
Note that the CPR block is not located in any section. All configuration registers in the CPR block are clocked by an ungateable clock and have special reset conditions.
16.1.1 Sleep mode
Each section can be put into sleep mode by setting the corresponding bit in the SleepModeEnable register. To re-enable the section the sleep mode bit needs to be cleared and then the section should be reset by writing to the relevant bit in the ResetSection register. Each block within the section should then be re-configured by the CPU.
If the CPU system (section 1 ) is put into sleep mode, the SoPEC device will remain in sleep mode until a system level reset is initiated from the reset pin, or a wakeup reset by the SCB block as a result of activity on either the USB or ISI bus. The watchdog timer cannot reset the device as it is in section 1 also, and will be in sleep mode.
If the CPU and ISI subsystem are in sleep mode only a reset from the USB or a hardware reset will re-activate the SoPEC device.
If all sections are put into sleep mode, then only a system level reset initiated by the reset pin will re-activate the SoPEC device.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
234
Like all software resets in SoPEC the ResetSection register is active-low i.e. a 0 should be written to each bit position requiring a reset. The ResetSection register is self-reseting.
16.1.2 Sleep Mode powerdown procedure
When powering down a section, the section may retain it’s current state (although not gauranteed to). It is possible when powering back up a section that inconsistancies between interface state machines could cause incorrect operation. In order to prevent such condition from happening, all blocks in a section must be disabled before powering down. This will ensure that blocks are restored in a benign state when powered back up.
In the case of PEP section units setting the Go bit to zero will disable the block. The DRAM subsystem can be effectively disabled by setting the RotationSync bit to zero, and the SCB system disabled by setting the DMAAccessEn bits to zero turning off the DMA access to DRAM. Other CPU subsystem blocks without any DRAM access do not need to be disabled.
16.2 Reset source
The SoPEC device can be reset by a number of sources. When a reset from an internal source is initiated the reset source register (ResetSrc) stores the reset source value. This register can then be used by the CPU to determine the type of boot sequence required.
16.3 Clock relationship
The crystal oscillator excites a 32MHz crystal through the xtalin and xtalout pins. The 32MHz output is used by the PLL to derive the master VCO frequency of 960MHz. The master clock is then divided to produce 320MHz clock (clk320), 160MHz clock (clk160) and 48MHz (c/k48) clock sources.
The phase relationship of each clock from the PLL will be defined. The relationship of internal clocks clk320, cik48 and clk160 to xtalin will be undefined.
At the output of the clock block, the skew between each pclk domain (pclk_section[2:0] and jclk) should be within skew tolerances of their respective domains (defined as less than the hold time of a D-type flip flop).
The skew between doclk and pclk should also be less than the skew tolerances of their respective domains.
The usbclk is derived from the PLL output and has no relationship with the other clocks in the system and is considered asynchronous.
16.4 PLL Control
The PLL in SoPEC can be adjusted by programming the PLLRangeA, PLLRangeB, PLLTunebits and PLLMult registers. If these registers are changed by the CPU the values are not updated until the PLLUpdate register is written to. Writing to the PLLUpdate register triggers the PLL control state machine to update the PLL configuration in a safe way. When an update is active (as indicated by PLLUpdate register) the CPU must not change any of the configuration registers, doing so could cause the PLL to lose lock indefintely, requiring a hardware reset to recover. Configuring the PLL registers in an inconsistent way can also cause the PLL to lose lock, care must taken to keep the PLL configuration within specified parameters.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
235
The VCO frequency of the PLL is calculated by the number of divider in the feedback path. PLL output A is used as the feedback source.
VCOfreq = REFCLK x PLLMult x PLLRangeA x External divider
VCOfreq = 32 x 3 x 10 x 1 = 960 Mhz.
In the default PLL setup, PLLMult is set to 3, PLLRangeA is set to 3 which corresponds to a divide by 10, PLLRangeB is set to 5 which corresponds to a divide by 3.
PLLouta = VCOfreq / PLLRangeA = 960Mhz /10 = 96 Mhz
PLLoutb = VCOfreq / PLLRangeB = 960Mhz / 3 = 320 Mhz
See [16] for complete PLL setup parameters.
16.5 Implementation
16.5.1 Definitions of I/O
Table 95. CPR I/O definition
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td colspan="4"> Clocks and Resets</td>
<td> Xtalin</td><td> 1</td><td> In</td><td> Crystal input, direct from IO pin.</td>
<td> Xtalout</td><td> 1</td><td> Inout</td><td> Crystal output, direct to IO pin.</td>
<td> pclk_section[3:0]</td><td> 4</td><td> Out</td><td> System clocks for each section</td>
<td> Doclk</td><td> 1</td><td> Out</td><td> Data out clock (2x pclk) for the PHI block</td>
<td> Jclk</td><td> 1</td><td> Out</td><td> Gated version of system clock used to clock the JPEG decoder core in the CDU</td>
<td> Usbclk</td><td> 1</td><td> Out</td><td> USB clock, nominally at 48 Mhz</td>
<td> jclk_enable</td><td> 1</td><td> In</td><td> Gating signal for Jclk. When 1 jclk is enabled</td>
<td> reset_n</td><td> 1</td><td> In</td><td> Reset signal from the reset_n pin</td>
<td> usb_cpr_reset_n</td><td> 1</td><td> In</td><td> Reset signal from the USB block</td>
<td> isi_cpr_reset_n</td><td> 1</td><td> In</td><td> Reset signal from the ISI block</td>
<td> tim_cpr_reset_n</td><td> 1</td><td> In</td><td> Reset signal from watch dog timer.</td>
<td> gpio_cpr_wakeup</td><td> 1</td><td> In</td><td> SoPEC wake up from the GPIO, active high.</td>
<td> prst_n_section[3:0]</td><td> 4</td><td> Out</td><td> System resets for each section, synchronous active low</td>
<td> dorst_n</td><td> 1</td><td> Out</td><td> Reset for PHI block, synchronous to doclk</td>
<td> jrst_n</td><td> 1</td><td> Out</td><td> Reset for JPEG decoder core in CDU block, synchronous to jclk</td>
<td> usbrst_n</td><td> 1</td><td> Out</td><td> Reset for the USB block, synchronous to usbclk</td>
<td colspan="4"> CPU interface</td>
<td> cpu_adr[5:2]</td><td> 3</td><td> In</td><td> CPU address bus. Only 4 bits are required to decode the address space for the CPR block</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> cpr_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
236
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_cpr_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_cpr_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> cpr_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When cpr_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the block and for a read cycle this means the data on cpr_cpu_data is valid.</td>
<td> cpr_cpu_berr</td><td> 1</td><td> Out</td><td> Bus error signal to the CPU indicating an invalid access.</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as follows: 00 - User program access 01 - User data access 10 - Supervisor program access 11 - Supervisor data access</td>
<td> cpr_cpu_debug_valid</td><td> 1</td><td> Out</td><td> Debug Data valid on cpr_cpu_data bus. Active high</td>
16.5.2 Configuration registers
The configuration registers in the CPR are programmed via the CPU interface. Refer to section 11.4 on page 96 for a description of the protocol and timing diagrams for reading and writing registers in the CPR. Note that since addresses in SoPEC are byte aligned and the CPU only supports 32-bit 5 register reads and writes, the lower 2 bits of the CPU address bus are not required to decode the address space for the CPR. When reading a register that is less than 32 bits wide zeros should be returned on the upper unused bit(s) of cpr_pcu_data. Table 96 lists the configuration registers in the CPR block.
The CPR block will only allow supervisor data mode accesses (i.e. cpu_acode[1:0] =
SUPERVISOR_DATA ). All other accesses will result in cpr_cpu_berr being asserted .
Table 96. CPR Register Map
<td> Address CPR_base *' </td><td> Register</td><td> ffbits</td><td> Reset,</td><td> Description'</td>
<td> 0x00</td><td> SleepModeEnable</td><td> 4</td><td> 0x0<sup>a</sup></td><td> Sleep Mode enable, when high a section of logic is put into powerdown. Bit 0 - Controls section 0 Bit 1 - Controls section 1 Bit 2 - Controls section 2 Bit 3 - Controls section 3 Note that the SleepModeEnable register</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
237
<td></td><td></td><td></td><td></td><td colspan="2"> has special reset conditions. See Section 16.5.6 for details</td>
<td> 0x04</td><td> ResetSrc</td><td> 5</td><td> 0x1<sup>a</sup></td><td colspan="2"> Reset Source register, indicating the source of the last reset (or wake-up) Bit 0 - External Reset Bit 1 - USB wakeup reset Bit 2 - ISI wakeup reset Bit 3 - Watchdog timer reset Bit 4 - GPIO wake-up (Read Only Register)</td>
<td> 0x08</td><td> ResetSectïon</td><td> 4</td><td> OxF</td><td colspan="2"> Active-low synchronous reset for each section, self-resetting. Bit 0 - Controls section 0 Bit 1 - Controls section 1 Bit 2 - Controls section 2 Bit 3 - Controls section 3</td>
<td> OxOC</td><td> DebugSelect[5:2]</td><td> 4</td><td> 0x0</td><td colspan="2"> Debug address select. Indicates the address of the register to report on the cpr_cpu_data bus when it is not otherwise being used.</td>
<td colspan="6"> PLL Control</td>
<td> 0x10</td><td> PLLTuneBits</td><td> 10</td><td colspan="2"> 0x3BC</td><td> PLL tuning bits</td>
<td> 0x14</td><td> PLLRangeA</td><td> 4</td><td colspan="2"> 0x3</td><td> PLLOUT A frequency selector (defaults to 60Mhz to 125Mhz)</td>
<td> 0x18</td><td> PLLRangeB</td><td> 3</td><td colspan="2"> 0x5</td><td> PLLOUT B frequency selector (defaults to 200Mhz to 400Mhz)</td>
<td> 0x1 C</td><td> PLLMultiplier</td><td> 5</td><td colspan="2"> 0x03</td><td> PLL multiplier selector, defaults to refclk x 3</td>
<td> 0x20</td><td> PLLUpdate</td><td> 1</td><td colspan="2"> 0x0</td><td> PLL update control. A write (of any value) to this register will cause the PLL to lose lock for ~100us. Reading the register indicates the status of the update. 0 - PLL update complete 1 - PLL update active No writes to PLL Tune Bits, PLLRangeA .PLLRangeB,PLLMultiplier or PLLUpdate are allowed while the PLL update is</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
238
<td></td><td></td><td></td><td></td><td> active.</td>
a. Reset value depends on reset source. External reset shown.
16.5.3 CPR Sub-block partition
16.5.4 reset_n deglitch
The external reset_n signal is deglitched for about 1 ps. reset_n must maintain a state for 1 us second before the state is passed into the rest of the device. All deglitch logic is clocked on bufrefclk.
16.5.5 Sync reset
The reset synchronizer retimes an asynchronous reset signal to the clock domain that it resets. The circuit prevents the inactive edge of reset occurring when the clock is rising
16.5.6 Reset generator logic
The reset generator logic is used to determine which clock domains should be reset, based on configured reset values (reset_section_n), the external reset (reset_ri), watchdog timer reset (tim_cpr_reset_n), the USB reset (usb_cpr_reset_ri), the GPIO wakeup control (gpio_cpr_wakeup) and the ISI reset (jsi_cpr_reset_n). The reset direct from the IO pin (reset_n) is synchronized and de-glitched before feeding the reset logic.
All resets are lengthened to at least 16 pclk cycles, regardless of the duration of the input reset. The clock for a particular section must be running for the reset to have an effect. The clocks to each section can be enabled/disabled using the SleepModeEnable register.
Resets from the ISI or USB block reset everything except its own section (section 2 or 3).
Table 97. Reset domains
<td> Reset signal</td><td> Domain</td>
<td> reset_dom[0]</td><td> Section 0 pclk domain (PEP)</td>
<td> reset_dom[1]</td><td> Section 1 pclk domain (CPU)</td>
<td> reset_dom[2]</td><td> Section 2 pclk domain (ISI)</td>
<td> reset_dom[3]</td><td> Section 3 usbclk/pclk domain (USB)</td>
<td> reset_dom[4]</td><td> doclk domain</td>
<td> reset_dom[5]</td><td> jclk domain</td>
The logic is given by
<td> if (reset_dg__n == 0)</td><td> then</td><td></td>
<td> reset_dom [5:0]</td><td> = 0x00</td><td> // reset everything</td>
<td> reset_src [4:0]</td><td> = 0x01</td><td></td>
<td> cfg_reset_n</td><td> = 0</td><td></td>
<td> sleep_mode_en[3:0]</td><td> = 0x0</td><td> // re-awaken all sections</td>
<td> elsif (tim_cpr_reset</td><td> _n == 0) then</td><td></td>
<td> reset_dom[5:0]</td><td> = 0x0 0</td><td> // reset everything except</td>
CPR config
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
239 reset_src[4:0] = 0x08 cfg_reset_n
Il CPR config stays the same sleep_mode_en[1] = 0 // re-awaken section 1 only (awake already) elsif (usb_cpr_reset_n == 0) then reset_dom[5:0] = 0x08 // all except USB domain +
CPR config reset_src[4:0] = 0x02 cfg_reset_n = 1 // CPR config stays the same sleep_mode_en[1] = 0 // re-awaken section 1 only, section 3 is awake elsif (isi_cpr_reset_n == 0) then reset_dom[5: 0] = 0x04
CPR config reset_src[4 : 0] =0x04 cfg_reset_n =1 sleep_mode_en[1] =0 section 2 is awake elsif (gpio_cpr_wakeup = 1) then reset_dom[5 : 0] =0x3C reset_src[4:0] =0x10 cfg_reset_n =1 sleep_mode_en[1] =0 section 2 is awake else // propagate resets from reset reset_dom[5 : 0] = 0x3F cfg_reset_n = 1 registers are not in any section // all except ISI domain + // CPR config stays the same // re-awaken section 1 only, // PEP and CPU sections only // CPR config stays the same // re-awaken section 1 only, section register // default to on // CPR cfg
<td> sleep_mode en[3:0] =</td><td> sleep</td><td colspan="2"> _mode_en[3:0] // stay</td><td> the same</td>
<td> by default</td><td></td><td></td><td></td><td></td>
<td> if (reset_section_n[0]</td><td> == 0)</td><td> then</td><td></td><td></td>
<td> reset_dom[5] = 0</td><td></td><td> //</td><td> jclk domain</td><td></td>
<td> reset_dom[4] = 0</td><td></td><td> //</td><td> doclk domain</td><td></td>
<td> reset_dom[0] = 0</td><td></td><td> //</td><td> pclk section 0</td><td> domain</td>
<td> if (reset_section_n[l]</td><td> == 0)</td><td> then</td><td></td><td></td>
<td> reset_dom[l] = 0</td><td></td><td> //</td><td> pclk section 1</td><td> domain</td>
<td> if (reset_section_n[2]</td><td> == 0)</td><td> then</td><td></td><td></td>
<td> reset_dom[2] = 0</td><td></td><td colspan="2"> // pclk section</td><td> 2 domain</td>
(ISI) if (reset_section_n[3] == 0) then
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
240 reset_dom[3] = ο // ÜSB domain
16.5.7 Sleep logic
The sleep logic is used to generate gating signals for each of SoPECs clock domains. The gate enable (gate_dom) is generated based on the configured sleep_mode_en and the internally generated Jclk_enable signal.
The logic is given by // clock gating for sleep modes
<td> gate_dom[5:0]</td><td> = 0x0</td><td></td><td></td><td> // default to all clocks</td>
<td> if (sleep_mode_</td><td> _en [0]</td><td> == 1)</td><td> then</td><td> // section 0 sleep</td>
<td> gate_dom[0]</td><td> = 1</td><td></td><td></td><td> // pclk section 0</td>
<td> gate_dom[4]</td><td> = 1</td><td></td><td></td><td> // doclk domain</td>
<td> gate_dom[5]</td><td> = 1</td><td></td><td></td><td> // jclk domain</td>
<td> if (sieep_mode</td><td> _en[1]</td><td> == 1)</td><td> then</td><td> // section 1 sleep</td>
<td> gate_dom[1]</td><td> = 1</td><td></td><td></td><td> // pclk section 1</td>
<td> if (sleep_mode_</td><td> _en [2]</td><td> == 1)</td><td> then</td><td> // section 2 sleep</td>
<td> gate_dom[2]</td><td> = 1</td><td></td><td></td><td> // pclk section 2</td>
<td> if (sleep_mode_</td><td> _en[3]</td><td> == 1)</td><td> then</td><td> // section 3 sleep</td>
<td> gate_dom[3]</td><td> = 1</td><td></td><td></td><td> // usb section 3</td>
<td colspan="3"> // the jclk can be turned</td><td> off by</td><td> CDU signal</td>
<td colspan="2"> if (jclk_enable == 0)</td><td> then</td><td></td><td></td>
<td> gate_dom[51</td><td> = 1</td><td></td><td></td><td></td>
The clock gating and sleep logic is clocked with the master_pdk clock which is not gated by this logic, but is synchronous to other pclk_section and jclk domains.
Once a section is in sleep mode it cannot generate a reset to restart the device. For example if section 1 is in sleep mode then the watchdog timer is effectively disabled and cannot trigger a reset.
16.5.8 Clock gate logic
The clock gate logic is used to safely gate clocks without generating any glitches on the gated clock. When the enable is high the clock is active otherwise the clock is gated.
16.5.9 Clock generator Logic
The clock generator block contains the PLL, crystal oscillator, clock dividers and associated control logic. The PLL VCO frequency is at 960MHz locked to a 32 MHz refclk generated by the crystal oscillator. In test mode the xtalin signal can be driven directly by the test clock generator, the test clock will be reflected on the refclk signal to the PLL.
16.5.9.1 Clock divider A
The clock divider A block generates the 48MHz clock from the input 96MHz clock (pllouta) generated by the PLL. The divider is enabled only when the PLL has acquired lock.
16.5.9.2 Clock divider B
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
241
The clock divider B block generates the 160MHz clocks from the input 320MHz clock (plloutb) generated by the PLL. The divider is enabled only when the PLL has acquired lock.
16.5.9.3 PLL control state machine
The PLL will go out of lock whenever pll_reset goes high (the PLL reset is the only active high reset in the device) or if the configuration bits pll_rangea, pll_rangeb, plljnult, pll_tune are changed. The PLL control state machine ensures that the rest of the device is protected from glitching clocks while the PLL is being reset or it’s configuration is being changed.
In the case of a hardware reset (the reset is deglitched), the state machine first disables the output clocks (via the clk_gate signal), it then holds the PLL in reset while its configuration bits are reset to default values. The state machine then releases the PLL reset and waits approx. 100us to allow the PLL to regain lock. Once the lock time has elapsed the state machine re-enables the output clocks and resets the remainder of the device via the reset_dg_n signal.
When the CPU changes any of the configuration registers it must write to the PLLupdate register to allow the state machine to update the PLL to the new configuration setup. If a PLLUpdate is detected the state machine first gates the output clocks. It then holds the PLL in reset while the PLL configuration registers are updated. Once updated the PLL reset is released and the state machine waits approx 100us for the PLL to regain lock before re-enabling the output clocks. Any write to the PLLUpdate register will cause the state machine to perform the update operation regardless of whether the configuration values changed or not.
All logic in the clock generator is clocked on bufrefclk which is always an active clock regardless of the state of the PLL.
ROM Block
17.1 Overview
The ROM block interfaces to the CPU bus and contains the SoPEC boot code. The ROM block consists of the CPU bus interface, the ROM macro and the ChipID macro. The current ROM size is 16 KBytes implemented as a 4096 x32 macro. Access to the ROM is not cached because the CPU enjoys fast (no more than one cycle slower than a cache access), unarbitrated access to the ROM. Each SoPEC device is required to have a unique ChipID which is set by blowing fuses at manufacture. IBM’s 300mm ECID macro and a custom 112-bit ECID macro are used to implement the ChipID offering 224-bits of laser fuses. The exact number of fuse bits to be used for the ChipID will be determined later but all bits are made available to the CPU. The ECID macros allows all 224 bits to be read out in parallel and the ROM block will make all 224 bits available in the FuseChiplD[N] registers which are readable by the CPU in supervisor mode only.
17.2 Boot operation
The are two boot scenarios for the SoPEC device namely after power-on and after being awoken from sleep mode. When the device is in sleep mode it is hoped that power will actually be removed from the DRAM, CPU and most other peripherals and so the program code will need to be freshly downloaded each time the device wakes up from sleep mode. In order to reduce the wakeup boot time (and hence the perceived print latency) certain data items are stored in the PSS block (see section 18). These data items include the SHA-1 hash digest expected for the program(s) to be
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
242 downloaded, the master/slave SoPEC id and some configuration parameters. All of these data items are stored in the PSS by the CPU prior to entering sleep mode. The SHA-1 value stored in the PSS is calculated by the CPU by decrypting the signature of the downloaded program using the appropriate public key stored in ROM. This compute intensive decryption only needs to take place once as part of the power-on boot sequence - subsequent wakeup boot sequences will simply use the resulting SHA-1 digest stored in the PSS. Note that the digest only needs to be stored in the PSS before entering sleep mode and the PSS can be used for temporary storage of any data at all other times.
The CPU is expected to be in supervisor mode for the entire boot sequence described by the pseudocode below. Note that the boot sequence has not been finalised but is expected to be close to the following:
if (ResetSrc == 1) then // Reset was a power-on reset configure_sopec // need to configure peris (USB, ISI, DMA, ICU etc.) // Otherwise reset was a wakeup reset so peris etc. were already configured
PAUSE: wait until IrqSemaphore != 0 // i.e. wait until an interrupt has been serviced if (IrqSemaphore == DMAChanOMsg) then parse_msg(DMAChanOMsgPtr) // this routine will parse the message and take any // necessary action e.g. programming the DMAChannell registers elsif (IrqSemaphore == DMAChanlMsg) then // program has been downloaded
CalculatedHash = gen_shal(ProgramLocn, Programsize) if (ResetSrc == 1) then
ExpectedHash = sig_decrypt(ProgramSig,public_key) else
ExpectedHash = PSSHash if (ExpectedHash == CalculatedHash) then jmp(PrgramLocn) // transfer control to the downloaded program else send_host_msg(Program Authentication Failed) goto PAUSE:
elsif (IrqSemaphore == timeout) then // nothing has happened if (ResetSrc == 1) then
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
243 sleep_mode() // put SoPEC into sleep mode to be woken up by USB/ISI activity else // we were woken up but nothing happened reset_sopec(PowerOnReset) else goto PAUSE
The boot code places no restrictions on the activity of any programs downloaded and authenticated by it other than those imposed by the configuration of the MMU i.e. the principal function of the boot 10 code is to authenticate that any programs downloaded by it are from a trusted source. It is the responsibility of the downloaded program to ensure that any code it downloads is also authenticated and that the system remains secure. The downloaded program code is also responsible for setting the SoPEC ISIId (see section 12.5 for a description of the ISIId) in a multi -SoPEC system. See the SoPEC Security Overview document [9] for more details of the SoPEC security features.
17.3 Implementation
17.3.1 Definitions of I/O
Table 98. ROM Block I/O
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td colspan="4"> Clocks and Resets</td>
<td> prst_n</td><td> 1</td><td> In</td><td> Global reset. Synchronous to pclk, active low.</td>
<td> Pclk</td><td> 1</td><td> In</td><td> Global clock</td>
<td colspan="4"> CPU Interface</td>
<td> cpu_adr[14:2]</td><td> 13</td><td> In</td><td> CPU address bus. Only 13 bits are required to decode the address space for this block.</td>
<td> rom_cpu_data[31 : 0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as follows: 00 - User program access 01 - User data access 10 - Supervisor program access 11 - Supervisor data access</td>
<td> cpu_rom_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_rom_sel is high cpu_adr is valid</td>
<td> rom_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When rom_cpu_rdy is high it indicates the last cycle of the access. For a read cycle this means the data on</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
244
<td></td><td></td><td></td><td> rom_cpu_data is valid.</td>
<td> rom_cpu_berr</td><td> 1</td><td> Out</td><td> ROM bus error signal to the CPU indicating an invalid access.</td>
17.3.2 Configuration registers
The ROM block will only allow read accesses to the FuseChipID registers and the ROM with supervisor data space permissions (i.e. cpu_acode[1:0] = 11 ). Write accesses with supervisor data space permissions will have no effect. All other accesses with will result in rom_cpu_berr being asserted. The CPU subsystem bus slave interface is described in more detail in section 9.4.3.
Table 99. ROM Block Register Map
<td> Address ROM_base +</td><td> Register</td><td> //bits</td><td> Reset</td><td> Description</td>
<td> 0x4000</td><td> FuseChipIDO</td><td> 32</td><td> n/a</td><td> Value of corresponding fuse bits 31 to 0 of the IBM 112-bit ECID macro. (Read only)</td>
<td> 0x4004</td><td> FuseChipIDI</td><td> 32</td><td> n/a</td><td> Value of corresponding fuse bits 63 to 32 of the IBM 112-bit ECID macro. (Read only)</td>
<td> 0x4008</td><td> FuseChiplD2</td><td> 32</td><td> n/a</td><td> Value of corresponding fuse bits 95 to 64 of the IBM 112-bit ECID macro. (Read only)</td>
<td> Ox400C</td><td> FuseChiplD3</td><td> 16</td><td> n/a</td><td> Value of corresponding fuse bits 111 to 96 of the IBM 112-bit ECID macro. (Read only)</td>
<td> 0x4010</td><td> FuseChiplD4</td><td> 32</td><td> n/a</td><td> Value of corresponding fuse bits 31 to 0 of the Custom 112-bit ECID macro. (Read only)</td>
<td> 0x4014</td><td> FuseChiplD5</td><td> 32</td><td> n/a</td><td> Value of corresponding fuse bits 63 to 32 of the Custom 112-bit ECID macro. (Read only)</td>
<td> 0x4018</td><td> FuseChiplD6</td><td> 32</td><td> n/a</td><td> Value of corresponding fuse bits 95 to 64 of the Custom 112-bit ECID macro. (Read only)</td>
<td> 0x401C</td><td> FuseChiplD7</td><td> 16</td><td> n/a</td><td> Value of corresponding fuse bits 111 to 96 of the Custom 112-bit ECID macro. (Read only)</td>
17.3.3 Sub-Block Partition
IBM offer two variants of their ROM macros; A high performance version (ROMHD) and a low power version (ROMLD). It is likely that the low power version will be used unless some implementation issue requires the high performance version. Both versions offer the same bit
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
245 density. The sub-block partition diagram below does not include the clocking and test signals for the ROM or ECID macros. The CPU subsystem bus interface is described in more detail in section 11.4.3.
17.3.4 Table 100. ROM Block internal signals
<td> Port name</td><td> Width</td><td> Description</td>
<td colspan="3"> Clocks and Resets</td>
<td> prst_n</td><td> 1</td><td> Global reset. Synchronous to pclk, active low.</td>
<td> Pclk</td><td> 1</td><td> Global clock</td>
<td colspan="3"> Internal Signals</td>
<td> rom_adr[11:0]</td><td> 12</td><td> ROM address bus</td>
<td> rom_sel</td><td> 1</td><td> Select signal to the ROM macro instructing it to access the location at rom_adr</td>
<td> rom_oe</td><td> 1</td><td> Output enable signa) to the ROM block</td>
<td> rom_data[31:0]</td><td> 32</td><td> Data bus from the ROM macro to the CPU bus interface</td>
<td> rom_dvaiid</td><td> 1</td><td> Signal from the ROM macro indicating that the data on rom_data is valid for the address on rom_adr</td>
<td> fuse_data[31:0]</td><td> 32</td><td> Data from the FuseChiplD[N] register addressed by fuse_reg_adr</td>
<td> fuse_reg_adr[2:0]</td><td> 3</td><td> Indicates which of the FuseChipID registers is being addressed</td>
Sub-block signal definition
Power Safe Storage (PSS) Block
18.1 Overview
The PSS block provides 128 bytes of storage space that will maintain its state when the rest of the SoPEC device is in sleep mode. The PSS is expected to be used primarily for the storage of decrypted signatures associated with downloaded programmed code but it can also be used to store any information that needs to survive sleep mode (e.g. configuration details). Note that the signature digest only needs to be stored in the PSS before entering sleep mode and the PSS can be used for temporary storage of any data at all other times.
Prior to entering sleep mode the CPU should store all of the information it will need on exiting sleep mode in the PSS. On emerging from sleep mode the boot code in ROM will read the ResetSrc register in the CPR block to determine which reset source caused the wakeup. The reset source information indicates whether or not the PSS contains valid stored data, and the PSS data determines the type of boot sequence to execute. If for any reason a full power-on boot sequence should be performed (e.g. the printer driver has been updated) then this is simply achieved by initiating a full software reset.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
246
Note that a reset or a powerdown (powerdown is implemented by clock gating) of the PSS block will not clear the contents of the 128 bytes of storage. If clearing of the PSS storage is required, then the CPU must write to each location individually.
18.2 Implementation
The storage area of the PSS block will be implemented as a 128-byte register array. The array is located from PSS_base through to PSS_base+0x7F in the address map. The PSS block will only allow read or write accesses with supervisor data space permissions (i.e. cpu_acode[1:0] = 11 ). All other accesses will result in pss_cpu_berr being asserted. The CPU subsystem bus slave interface is described in more detail in section 11.4.3.
18.2.1 Definitions of I/O
Table 101. PSS Block I/O
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
<td colspan="4"> Clocks and Resets</td>
<td> prst_n</td><td> 1</td><td> In</td><td> Global reset. Synchronous to pclk, active low.</td>
<td> Pclk</td><td> 1</td><td> In</td><td> Global clock</td>
<td colspan="4"> CPU Interface</td>
<td> cpu_adr[6:2]</td><td> 5</td><td> In</td><td> CPU address bus. Only 5 bits are required to decode the address space for this block.</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> pss_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> cpus_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU Access Code signals. These decode as follows: 00 - User program access 01 - User data access 10 - Supervisor program access 11 - Supervisor data access</td>
<td> cpu_pss_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_pss_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> pss_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When pss_cpu_rdy is high it indicates the last cycle of the access. For a read cycle this means the data on pss_cpu_data is valid.</td>
<td> pss_cpu_berr</td><td> 1</td><td> Out</td><td> PSS bus error signal to the CPU indicating an invalid access.</td>
Low Speed Serial Interface (LSS)
19.1 Overview
The Low Speed Serial Interface (LSS) provides a mechanism for the internal SoPEC CPU to communicate with external QA chips via two independent LSS buses. The LSS communicates through the GPIO block to the QA chips. This allows the QA chip pins to be reused in multiCA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
247
SoPEG environments. The LSS Master system-level interface is illustrated in Figure 75. Note that multiple QA chips are allowed on each LSS bus.
19.2 QA COMMUNICATION
The SoPEC data interface to the QA Chips is a low speed, 2 pin, synchronous serial bus. Data is transferred to the QA chips via the lss_data pin synchronously with the lss_clk pin. When the lss_clk is high the data on lss_data is deemed to be valid. Only the LSS master in SoPEC can drive the lss_clk pin, this pin is an input only to the QA chips. The LSS block must be able to interface with an open-collector pull-up bus. This means that when the LSS block should transmit a logical zero it will drive 0 on the bus, but when it should transmit a logical 1 it will leave highimpedance on the bus (i.e. it doesn’t drive the bus). If all the agents on the LSS bus adhere to this protocol then there will be no issues with bus contention.
The LSS block controls all communication to and from the QA chips. The LSS block is the bus master in all cases. The LSS block interprets a command register set by the SoPEC CPU, initiates transactions to the QA chip in question and optionally accepts return data. Any return information is presented through the configuration registers to the SoPEC CPU. The LSS block indicates to the CPU the completion of a command or the occurrence of an error via an interrupt. The LSS protocol can be used to communicate with other LSS slave devices (other than QA chips). However should a LSS slave device hold the clock low (for whatever reason), it will be in violation of the LSS protocol and is not supported. The LSS clock is only ever driven by the LSS master.
19.2.1 Start and stop conditions
All transmissions on the LSS bus are initiated by the LSS master issuing a START condition and terminated by the LSS master issuing a STOP condition. START and STOP conditions are always generated by the LSS master. As illustrated in Figure 76, a START condition corresponds to a high to low transition on lss_data while lss_clk is high. A STOP condition corresponds to a low to high transition on lss_data while /ss_c/k is high.
19.2.2 Data transfer
Data is transferred on the LSS bus via a byte orientated protocol. Bytes are transmitted serially. Each byte is sent most significant bit (MSB) first through to least significant bit (LSB) last. One clock pulse is generated for each data bit transferred. Each byte must be followed by an acknowledge bit.
The data on the lss_data must be stable during the HIGH period of the lss_clk clock. Data may only change when lss_clk is low. A transmitter outputs data after the falling edge of lss_clk and a receiver inputs the data at the rising edge of lss_clk. This data is only considered as a valid data bit at the next lss_clk falling edge provided a START or STOP is not detected in the period before the next lss_clk falling edge. All clock pulses are generated by the LSS block. The transmitter releases the lss_data line (high) during the acknowledge clock pulse (ninth clock pulse). The receiver must pull down the lss_data line during the acknowledge clock pulse so that it remains stable low during the HIGH period of this clock pulse.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
248
Data transfers follow the format shown in Figure 77. The first byte sent by the LSS master after a START condition is a primary id byte, where bits 7-2 form a 6-bit primary id (0 is a global id and will address all QA Chips on a particular LSS bus), bit 1 is an even parity bit for the primary id, and bit 0 forms the read/ write sense. Bit 0 is high if the following command is a read to the primary id given or low for a write command to that id. An acknowledge is generated by the QA chip(s) corresponding to the given id (if such a chip exists) by driving the lss_data line low synchronous with the LSS master generated ninth lss_clk.
19.2.3 Write procedure
The protocol for a write access to a QA Chip over the LSS bus is illustrated in Figure 79 below. The LSS master in SoPEC initiates the transaction by generating a START condition on the LSS bus. It then transmits the primary id byte with a 0 in bit 0 to indicate that the following command is a write to the primary id. An acknowledge is generated by the QA chip corresponding to the given primary id. The LSS master will clock out M data bytes with the slave QA Chip acknowledging each successful byte written. Once the slave QA chip has acknowledged the M<sup>th</sup> data byte the LSS master issues a STOP condition to complete the transfer. The QA chip gathers the M data bytes together and interprets them as a command. See QA Chip Interface Specification for more details on the format of the commands used to communicate with the QA chip[8]. Note that the QA chip is free to not acknowledge any byte transmitted. The LSS master should respond by issuing an interrupt to the CPU to indicate this error. The CPU should then generate a STOP condition on the LSS bus to gracefully complete the transaction on the LSS bus.
19.2.4 Read procedure
The LSS master in SoPEC initiates the transaction by generating a START condition on the LSS bus. It then transmits the primary id byte with a 1 in bit 0 to indicate that the following command is a read to the primary id. An acknowledge is generated by the QA chip corresponding to the given primary id. The LSS master releases the lss_data bus and proceeds to clock the expected number of bytes from the QA chip with the LSS master acknowledging each successful byte read. The last expected byte is not acknowledged by the LSS master. It then completes the transaction by generating a STOP condition on the LSS bus. See QA Chip Interface Specification for more details on the format of the commands used to communicate with the QA chip[8].
19.3 Implementation
A block diagram of the LSS master is given in Figure 80. It consists of a block of configuration registers that are programmed by the CPU and two identical LSS master units that generate the signalling protocols on the two LSS buses as well as interrupts to the CPU. The CPU initiates and terminates transactions on the LSS buses by writing an appropriate command to the command register, writes bytes to be transmitted to a buffer and reads bytes received from a buffer, and checks the sources of interrupts by reading status registers.
19.3.1 Definitions of IO
Table 102. LSS IO pins definitions
<td> Port name</td><td> Pins</td><td> I/O</td><td> Description</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
249
<td colspan="4"> Clocks and Resets</td>
<td> Pclk</td><td> 1</td><td> In</td><td> System Clock</td>
<td> prst_n</td><td> 1</td><td> In</td><td> System reset, synchronous active low</td>
<td colspan="4"> CPU Interface</td>
<td> cpu_rwn</td><td> 1</td><td> In</td><td> Common read/not-write signal from the CPU</td>
<td> cpu_adr[6:2]</td><td> 5</td><td> In</td><td> CPU address bus. Only 5 bits are required to decode the address space for this block</td>
<td> cpu_dataout[31:0]</td><td> 32</td><td> In</td><td> Shared write data bus from the CPU</td>
<td> cpu_acode[1:0]</td><td> 2</td><td> In</td><td> CPU access code signals. cpu_acode[0] - Program (0) / Data (1 ) access cpu_acode[1] - User (0) / Supervisor (1) access</td>
<td> cpu_lss_sel</td><td> 1</td><td> In</td><td> Block select from the CPU. When cpu_lss_sel is high both cpu_adr and cpu_dataout are valid</td>
<td> lss_cpu_rdy</td><td> 1</td><td> Out</td><td> Ready signal to the CPU. When lss_cpu_rdy is high it indicates the last cycle of the access. For a write cycle this means cpu_dataout has been registered by the LSS block and for a read cycle this means the data on lss_cpu_data is valid.</td>
<td> lss_cpu__berr</td><td> 1</td><td> Out</td><td> LSS bus error signal to the CPU.</td>
<td> lss_cpu_data[31:0]</td><td> 32</td><td> Out</td><td> Read data bus to the CPU</td>
<td> lss_cpu_debug_valid</td><td> 1</td><td> Out</td><td> Active high. Indicates the presence of valid debug data on lss_cpu_data.</td>
<td colspan="4"> GPIO for LSS buses</td>
<td> lss_gpio_dout[1:0]</td><td> 2</td><td> Out</td><td> LSS bus data output Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td> gpio_lss_din[1:0]</td><td> 2</td><td> In</td><td> LSS bus data input Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td> lss_gpio_e[1:0]</td><td> 2</td><td> Out</td><td> LSS bus data output enable, active high Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td> lss_gpio_clk[1:0]</td><td> 2</td><td> Out</td><td> LSS bus clock output Bit 0 - LSS bus 0 Bit 1 - LSS bus 1</td>
<td colspan="4"> ICU interface</td>
<td> lss_icu_irq[1:0]</td><td> 2</td><td> Out</td><td> LSS interrupt requests Bit 0 - interrupt associated with LSS bus 0 Bit 1 - interrupt associated with LSS bus 1</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
250
19.3.2 Configuration registers
The configuration registers in the LSS block are programmed via the CPU interface. Refer to section 11.4 on page 96 for the description of the protocol and timing diagrams for reading and writing registers in the LSS block. Note that since addresses in SoPEC are byte aligned and the 5 CPU only supports 32-bit register reads and writes, the lower 2 bits of the CPU address bus are not required to decode the address space for the LSS block. Table 103 lists the configuration registers in the LSS block. When reading a register that is less than 32 bits wide zeros should be returned on the upper unused bit(s) of lss_cpu_data.
The input cpu_acode signal indicates whether the current CPU access is supervisor, user, program or data. The configuration registers in the LSS block can only be read or written by a supervisor data access, i.e. when cpu_acode equals b11. If the current access is a supervisor data access then the LSS responds by asserting lss_cpu_rdy for a single clock cycle.
If the current access is anything other than a supervisor data access, then the LSS generates a bus error by asserting lss_cpu_berr for a single clock cycle instead of lss_cpu_rdy as shown in section 11.4 on page 96. A write access will be ignored, and a read access will return zero.
Table 103. LSS Control Registers
<td> Address - (LSS_base +)</td><td> Register</td><td> #bits</td><td> Reset</td><td> Description</td>
<td colspan="5"> Control registers</td>
<td> 0x00</td><td> Reset</td><td> 1</td><td> 0x1</td><td> A write to this register causes a reset of the LSS.</td>
<td> 0x04</td><td> LssClockHighLow- Duration</td><td> 16</td><td> 0x00C8</td><td> Lss_clk has a 50:50 duty cycle, this register defines the period of lss_clk by means of specifying the duration (in pclk cycles) that lss_clk is low (or high). The reset value specifies transmission over the LSS bus at a nominal rate of 400kHz, corresponding to a low (or high) duration of 200 pclk (160Mhz) cycles. Register should not be set to values less than 8.</td>
<td> 0x08</td><td> LssClocktoDataHo Id</td><td> 6</td><td> 0x3</td><td> Specifies the number of pclk cycles that Data must remain valid for after the falling edge of lss_clk. Minimum value is 3 cycles, and must to programmed to be less than LssClockHighLowDuration.</td>
<td colspan="5"> LSS bus 0 registers</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
251
<td> 0x10</td><td> LssOIntStatus</td><td> 3</td><td> 0x0</td><td> LSS bus 0 interrupt status registers Bit 0 - command completed successfully Bit 1 - error during processing of command, not -acknowledge received after transmission of primary id byte on LSS bus 0 Bit 2 - error during processing of command, not -acknowledge received after transmission of data byte on LSS bus 0 All the bits in LssOlntStatus are cleared when the LssOCmd register gets written to. (Read only register)</td>
<td> 0x14</td><td> LssOCurrentState</td><td> 4</td><td> 0x0</td><td> Gives the current state of the LSS bus 0 state machine. (Read only register). (Encoding will be specified upon state machine implementation)</td>
<td> 0x18</td><td> LssOCmd</td><td> 21</td><td> 0x00 _0000</td><td> Command register defining sequence of events to perform on LSS bus 0 before interrupting CPU. A write to this register causes all the bits in the LssOIntStatus register to be cleared as well as generating a lss0_new_cmd pulse.</td>
<td> 0x1C-0x2C</td><td> Lss0Buffer[4:0]</td><td> 5x32</td><td> 0x0000 _0000</td><td> LSS Data buffer. Should be filled with transmit data before transmit command, or read data bytes received after a valid read command.</td>
<td colspan="5"> LSS bus 1 registers</td>
<td> 0x30</td><td> Lss1 IntStatus</td><td> 3</td><td> 0x0</td><td> LSS bus 1 interrupt status registers Bit 0 - command completed successfully Bit 1 - error during processing of command, not -acknowledge received after transmission of primary id byte on LSS bus 1 Bit 2 - error during processing of command, not -acknowledge received after transmission of data byte on LSS bus 1 All the bits in Lss1 IntStatus are cleared when</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
252
<td></td><td></td><td></td><td></td><td> the LssICmd register gets written to. (Read only register)</td>
<td> 0x34</td><td> Lss1 Currentstate</td><td> 4</td><td> 0x0</td><td> Gives the current state of the LSS bus 1 state machine. (Read only register) (Encoding will be specified upon state machine implementation)</td>
<td> 0x38</td><td> LssICmd</td><td> 21</td><td> 0x00_ 0000</td><td> Command register defining sequence of events to perform on LSS bus 1 before interrupting CPU. A write to this register causes all the bits in the Lss1 IntStatus register to be cleared as well as generating a Iss1_new_cmd pulse.</td>
<td> 0x3C-0x4C</td><td> Lss1 Buffer[4:0]</td><td> 5x32</td><td> 0x0000 _0000</td><td> LSS Data buffer. Should be filled with transmit data before transmit command, or read data bytes received after a valid read command.</td>
<td colspan="5"> Debug registers</td>
<td> 0x50</td><td> LssDebugSel[6:2]</td><td> 5</td><td> 0x00</td><td> Selects register for debug output. This value is used as the input to the register decode logic instead of cpu_adr[6:2] when the LSS block is not being accessed by the CPU, i.e. when cpu_lss_sel is 0. The output lss_cpu_debug_valid is asserted to indicate that the data on lss_cpu_data is valid debug data. This data can be mutliplexed onto chip pins during debug mode.</td>
19.3.2.1 LSS command registers
The LSS command registers define a sequence of events to perform on the respective LSS bus before issuing an interrupt to the CPU. There is a separate command register and interrupt for each LSS bus. The format of the command is given in Table 104. The CPU writes to the command register to initiate a sequence of events on an LSS bus. Once the sequence of events has completed or an error has occurred, an interrupt is sent back to the CPU.
Some example commands are:
• a single START condition (Start = 1, IdByteEnable = 0, RdWrEnable = 0, Stop = 0) • a single STOP condition (Start = 0, IdByteEnable = 0, RdWrEnable = 0, Stop = 1 ) · a START condition followed by transmission of the id byte (Start = 1, IdByteEnable = 1,
RdWrEnable = 0, Stop = 0, IdByte contains primary id byte) • a write transfer of 20 bytes from the data buffer (Start = 0, IdByteEnable = 0, RdWrEnable = 1, RdWrSense = 0, Stop = 0, TxRxByteCount = 20)
CA 02508141 2005-06-01
WO 2004/050369
253
PCT/AU2003/001616 • a read transfer of 8 bytes into the data buffer (Start = 0, IdByteEnable = 0, RdWrEnable =
1, RdWrSense = 1, ReadNack = 0, Stop = 0, TxRxByteCount = 8) • a complete read transaction of 16 bytes (Start = 1, IdByteEnable = 1, RdWrEnable = 1, RdWrSense = 1, ReadNack = 1, Stop = 1, IdByte contains primary id byte, TxRxByteCount = 16), etc.
The CPU can thus program the number of bytes to be transmitted or received (up to a maximum of 20) on the LSS bus before it gets interrupted. This allows it to insert arbitrary delays in a transfer at a byte boundary. For example the CPU may want to transmit 30 bytes to a QA chip but insert a delay between the 20<sup>th</sup> and 21<sup>st</sup> bytes sent. It does this by first writing 20 bytes to the data buffer. It then writes a command to generate a START condition, send the primary id byte and then transmit the 20 bytes from the data buffer. When interrupted by the LSS block to indicate successful completion of the command the CPU can then write the remaining 10 bytes to the data buffer. It can then wait for a defined period of time before writing a command to transmit the 10 bytes from the data buffer and generate a STOP condition to terminate the transaction over the LSS bus.
An interrupt to the CPU is generated for one cycle when any bit in LssNIntStatus is set. The CPU can read LssNIntStatus to discover the source of the interrupt. The LssNIntStatus registers are cleared when the CPU writes to the LssNCmd register. A null command write to the LssNCmd register will cause the LssNIntStatus registers to clear and no new command to start. A null command is defined as Start, IdbyteEnable, RdWrEnable and Stop all set to zero.
Table 104. LSS command register description
<td> bit(s)</td><td> name</td><td> Description</td>
<td> 0</td><td> Start</td><td> When 1, issue a START condition on the LSS bus.</td>
<td> 1</td><td> IdByteEnable</td><td> ID byte transmit enable: 1 - transmit byte in IdByte field 0 - ignore byte in IdByte field</td>
<td> 2</td><td> RdWrEnable</td><td> Read/write transfer enable: 0 - ignore settings of RdWrSense, ReadNack and TxRxByteCount 1 - if RdWrSense is 0, then perform a write transfer of TxRxByteCount bytes from the data buffer. if RdWrSense is 1, then perform a read transfer of TxRxByteCount bytes into the data buffer. Each byte should be acknowledged and the last byte received is acknowledged/not-acknowledged according to the setting of ReadNack.</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
254
<td> 3</td><td> RdWrSense</td><td> Read/write sense indicator: 0 - write 1 - read</td>
<td> 4</td><td> ReadNack</td><td> Indicates, for a read transfer, whether to issue an acknowledge or a not-acknowledge after the last byte received (indicated by TxRxByteCount). 0 - issue acknowledge after last byte received 1 - issue not-acknowledge after last byte received.</td>
<td> 5</td><td> Stop</td><td> When 1, issue a STOP condition on the LSS bus.</td>
<td> 7:6</td><td> reserved</td><td> Must be 0</td>
<td> 15:8</td><td> IdByte</td><td> Byte to be transmitted if IdByteEnable is 1. Bit 8 corresponds to the LSB.</td>
<td> 20:16</td><td> TxRxByteCount</td><td> Number of bytes to be transmitted from the data buffer or the number of bytes to be received into the data buffer. The maximum value that should be programmed is 20, as the size of the data buffer is 20 bytes. Valid values are 1 to 20, 0 is valid when RdWrEnable = 0, other cases are invalid andundefined.</td>
The data buffer is implemented in the LSS master block. When the CPU writes to the LssNBuffer registers the data written is presented to the LSS master block via the lssN_buffer_wrdata bus and configuration registers block pulses the lssN_buffer_wen bit corresponding to the register written. For example if LssNBuffer[2] is written to lssN_buffer_wen[2] will be pulsed. When the CPU reads the LssNBuffer registers the configuration registers block reflect the lssN_buffer__rdata bus back to the CPU.
19.3.3 LSS master unit
The LSS master unit is instantiated for both LSS bus 0 and LSS bus 1. It controls transactions on the LSS bus by means of the state machine shown in Figure 83, which interprets the commands that are written by the CPU. It also contains a single 20 byte data buffer used for transmitting and receiving data.
The CPU can write data to be transmitted on the LSS bus by writing to the LssNBuffer registers. It can also read data that the LSS master unit receives on the LSS bus by reading the same registers. The LSS master always transmits or receives bytes to or from the data buffer in the same order.
For a transmit command, LssNBuffer[0][7:0] gets transmitted first, then LssNBuffer[0][15:8], LssNBuffer[0][23:16], LssNBuffer[0][31:24], LssNBuffer[1][7:0] and so on until TxRxByteCount number of bytes are transmitted. A receive command fills data to the buffer in the same order. Each new command the buffer start point is reset.
All state machine outputs, flags and counters are cleared on reset. After a reset the state machine goes to the Reset state and initialises the LSS pins (Jss_clk is set to 1, lss_data is tristated and
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
255 allowed to be pulled up to 1). When the reset condition is removed the state machine transitions to the Wait state.
It remains in the Wait state until lss_new_cmd equals 1. If the Start bit of the command is 0 the state machine proceeds directly to the CheckldByteEnable state. If the Start bit is 1 it proceeds to the GenerateStart state and issues a START condition on the LSS bus.
In the CheckldByteEnable state, if the IdByteEnable bit of the command is 0 the state machine proceeds directly to the CheckRdWrEnable state. If the IdByteEnable bit is 1 the state machine enters the SendldByte state and the byte in the IdByte field of the command is transmitted on the LSS. The WaitForldAck state is then entered. If the byte is acknowledged, the state machine proceeds to the CheckRdWrEnable state. If the byte is not-acknowledged, the state machine proceeds to the Generateinterrupt state and issues an interrupt to indicate a not-acknowledge was received after transmission of the primary id byte.
In the CheckRdWrEnable state, if the RdWrEnable bit of the command is 0 the state machine proceeds directly to the Checkstop state. If the RdWrEnable bit is 1, count is loaded with the value of the TxRxByteCount field of the command and the state machine enters either the ReceiveByte state if the RdWrSense bit of the command is 1 or the TransmitByte state if the RdWrSense bit is 0.
For a write transaction, the state machine keeps transmitting bytes from the data buffer, decrementing count after each byte transmitted, until count is 1. If all the bytes are successfully transmitted the state machine proceeds to the Checkstop state. If the slave QA chip notacknowledges a transmitted byte, the state machine indicates this error by issuing an interrupt to the CPU and then entering the Generateinterrupt state.
For a read transaction, the state machine keeps receiving bytes into the data buffer, decrementing count after each byte transmitted, until count is 1. After each byte received the LSS master must issue an acknowledge. After the last expected byte (i.e. when count is 1 ) the state machine checks the ReadNack bit of the command to see whether it must issue an acknowledge or notacknowledge for that byte. The Checkstop state is then entered.
In the Checkstop state, if the Stop bit of the command is 0 the state machine proceeds directly to the Generateinterrupt state. If the Stop bit is 1 it proceeds to the GenerateStop state and issues a STOP condition on the LSS bus before proceeding to the Generateinterrupt state. In both cases an interrupt is issued to indicate successful completion of the command.
The state machine then enters the Wait state to await the next command. When the state machine reenters the Wait state the output pins (lss_data and lss_clk) are not changed, they retain the state of the last command. This allows the possibility of multi-command transactions. The CPU may abort the current transfer at any time by performing a write to the Reset register of the LSS block.
19.3.3.1 START and STOP generation
START and STOP conditions, which signal the beginning and end of data transmission, occur when the LSS master generates a falling and rising edge respectively on the data while the clock is high.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
256
In the GenerateStart state, lss_gpio_clk is held high with lss_gpio_e remaining deasserted (so the data line is pulled high externally) for LssClockHighLowDuration pclk cycles. Then lss_gpio_e is asserted and lss_gpio_dout is pulled low (to drive a 0 on the data line, creating a falling edge) with lss_gpio_clk remaining high for another LssClockHighLowDuration pclk cycles.
In the GenerateStop state, both lss_gpio_clk and lss_gpio_dout are pulled low followed by the assertion of lss_gpio_e to drive a 0 while the clock is low. After LssClockHighLowDuration pclk cycles, lss_gpio_clk is set high. After a further LssClockHighLowDuration pclk cycles, lss_gpio_e is deasserted to release the data bus and create a rising edge on the data bus during the high period of the clock.
If the bus is not in the required state for start and stop generation (/ss_c/k=1, lss_data=1 for start, and lss_clk=1, lss_data=0), the state machine moves the bus to the correct state and proceeds as described above. Figure 82 shows the transition timing from any bus state to start and stop generation
19.3.3.2 Clock pulse generation
The LSS master holds lss_gpio_clk high while the LSS bus is inactive. A clock pulse is generated for each bit transmitted or received over the LSS bus. It is generated by first holding lss_gpio_clk low for LssClockHighLowDuration pclk cycles, and then high for LssClockHighLowDuration pclk cycles.
19.3.3.3 Data De-glitching
When data is received in the LSS block it is passed to a de-glitching circuit. The de-glitch circuit samples the data 3 times on pclk and compares the samples. If all 3 samples are the same then the data is passed, otherwise the data is ignored.
Note that the LSS data input on SoPEC is double registered in the GPIO block before being passed to the LSS.
19.3.3.4 Data reception
The input data, gpio_lss_di, is first synchronised to the pclk domain by means of two flip-flops clocked by pclk (the double register resides in the GPIO block). The LSS master generates a clock pulse for each bit received. The output lss_gpio_e is deasserted LssClockToDataHold pclk cycles after the falling edge of lss_gpio_clk to release the data bus. The value on the synchronised gpio_lss_di is sampled Tstrobe number of clock cycles after the rising edge of lss_gpio_clk (the data is de-glitched over a further 3 stage register to avoid possible glitch detection). See Figure 84 for further timing information.
In the ReceiveByte state, the state machine generates 8 clock pulses. At each Tstrobe time after the rising edge of lss_gpio_clk the synchronised gpio_lss_di is sampled. The first bit sampled is LssNBuffer[0][7], the second LssNBuffer[0][6], etc to LssNBuffer[0][0]. For each byte received the state machine either sends an NAK or an ACK depending on the command configuration and the number of bytes received.
In the SendNack state the state machine generates a single clock pulse. Iss_gpio_e is deasserted and the LSS data line is pulled high externally to issue a not-acknowledge.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
257
In the SendAck state the state machine generates a single clock pulse. Iss_gpio_e is asserted and a 0 driven on lss_gpio_dout after lss_gpio_clk falling edge to issue an acknowledge.
79.3.3.5 Data transmission
The LSS master generates a clock pulse for each bit transmitted. Data is output on the LSS bus on the falling edge of lss_gpio_clk.
When the LSS master drives a logical zero on the bus it will assert lss_gpio_e and drive a 0 on lss_gpio_dout after lss_gpio_clk falling edge. Iss_gpio_e will remain asserted and lss_gpio_dout will remain low until the next lss_clk falling edge.
When the LSS master drives a logical one lss_gpio_e should be deasserted at lss_gpio_clk falling edge and remain deasserted at least until the next lss_gpio_clk falling edge. This is because the LSS bus will be externally pulled up to logical one via a pull-up resistor.
In the Sendld byte state, the state machine generates 8 clock pulses to transmit the byte in the IdByte field of the current valid command. On each falling edge of lss_gpio_clk a bit is driven on the data bus as outlined above. On the first falling edge idByte[7] is driven on the data bus, on the second falling edge ldByte[6] is driven out, etc.
In the TransmitByte state, the state machine generates 8 clock pulses to transmit the byte at the output of the transmit FIFO. On each falling edge of lss_gpio_clk a bit is driven on the data bus as outlined above. On the first falling edge LssNBuffer[0][7] is driven on the data bus, on the second falling edge LssNBuffer[0][6] is driven out, etc on to LssNBuffer[0][7] bits.
In the WaitForAck state, the state machine generates a single clock pulse. At Tstrobe time after the rising edge of lss_gpio_clkthe synchronized gpio_lss_diis sampled. A 0 indicates an acknowledge and ack_detect is pulsed, a 1 indicates a not-acknowledge and nack_detect is pulsed.
19.3.3.6 Data rate control
The CPU can control the data rate by setting the clock period of the LSS bus clock by programming appropriate value in LssClockHighLowDuration. The default setting for the register is 200 (pclk cycles) which corresponds to transmission rate of 400kHz on the LSS bus (the lss_clk is high for LssClockHighLowDuration cycles then low for LssClockHighLowDuration cycles/ The lss_clk will always have a 50:50 duty cycle. The LssClockHighLowDuration register should not be set to values less than 8.
The hold time of lss_data after the falling edge of lss_clk is programmable by the LssClocktoDataHold register. This register should not be programmed to less than 2 or greater than the LssClockHighLowDuration value.
19.3.3.7 LSS master timing parameters
The LSS master timing parameters are shown in Figure 84 and the associated values are shown in Table 105 .
Table 105. LSS master timing parameters
<td> Parameter</td><td> Description</td><td> min</td><td> nom</td><td> max</td><td> unit</td>
<td colspan="6"> LSS Master Driving</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
258
<td> Tp</td><td> LSS clock period divided by 2</td><td> 8</td><td> 200</td><td> FFFF</td><td> pclk cycles</td>
<td> Tstart_delay</td><td> Time to start data edge from rising clock edge</td><td colspan="3"> Tp <sup>+</sup> LssClocktoDataHold</td><td> pclk cycles</td>
<td> Tstop_delay</td><td> Time to stop data edge from rising clock edge</td><td colspan="3"> Tp + LssClocktoDataHold</td><td> pclk cycles</td>
<td> Tdata_setup</td><td> Time from data setup to rising clock edge</td><td colspan="3"> Tp - 2 LssClocktoDataHold</td><td> pclk cycles</td>
<td> Tdata_hold</td><td> Time from falling clock edge to data hold</td><td colspan="3"> LssClocktoDataHold</td><td> pclk cycles</td>
<td> Tack_setup</td><td> Time that outgoing (N)Ack is setup before lss_clk rising edge</td><td colspan="3"> Tp - 2 LssClocktoDataHold</td><td> pclk cycles</td>
<td> Tack_hold</td><td> Time that outgoing (N)Ack is held after lss_clk falling edge</td><td colspan="3"> LssClocktoDataHold</td><td> pclk cycles</td>
<td colspan="6"> LSS Master Sampling</td>
<td> Tstrobe</td><td> LSS master strobe point for incoming data and (N)Ack values</td><td> Tp -2</td><td></td><td> Tp-2</td><td> pclk cycles</td>
DRAM Subsystem
DRAM Interface Unit (DIU)
20.1 Overview
Figure 85 shows how the DIU provides the interface between the on-chip 20 Mbit embedded DRAM and the rest of SoPEC. In addition to outlining the functionality of the DIU, this chapter provides a top-level overview of the memory storage and access patterns of SoPEC and the buffering required in the various SoPEC blocks to support those access requirements.
The main functionality of the DIU is to arbitrate between requests for access to the embedded DRAM and provide read or write accesses to the requesters. The DIU must also implement the initialisation sequence and refresh logic for the embedded DRAM.
The arbitration scheme uses a fully programmable timeslot mechanism for non-CPU requesters to meet the bandwidth and latency requirements for each unit, with unused slots re-allocated to provide best effort accesses. The CPU is allowed high priority access, giving it minimum latency, but allowing bounds to be placed on its bandwidth consumption.
The interface between the DIU and the SoPEC requesters is similar to the interface on PEC1 i.e. separate control, read data and write data busses.
The embedded DRAM is used principally to store:
• CPU program code and data.
• PEP (re)programming commands.
• Compressed pages containing contone, bi-level and raw tag data and header information.
• Decompressed contone and bi-level data.
• Dotline store during a print.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
259 • Print setup information such as tag format structures, dither matrices and dead nozzle information.
20.2 IBM Cu-11 Embedded DRAM
20.2.1 Single bank
SoPEC will use the 1.5 V core voltage option in IBM’s 0.13 pm class Cu-11 process.
The random read/write cycle time and the refresh cycle time is 3 cycles at 160 MHz [16]. An open page access will complete in 1 cycle if the page mode select signal is clocked at 320 MHz or 2 cycles if the page mode select signal is clocked every 160 MHz cycle. The page mode select signal will be clocked at 160 MHz in SoPEC in order to simplify timing closure. The DRAM word size is 256 bits.
Most SoPEC requesters will make single 256 bit DRAM accesses (see Section 20.4). These accesses will take 3 cycles as they are random accesses i.e. they will most likely be to a different memory row than the previous access.
The entire 20 Mbit DRAM will be implemented as a single memory bank. In Cu-11, the maximum single instance size is 16 Mbit. The first 1 Mbit tile of each instance contains an area overhead so the cheapest solution in terms of area is to have only 2 instances. 16 Mbit and 4Mbit instances would together consume an area of 14.63 mm<sup>2</sup> as would 2 times 10 Mbit instances. 4 times 5 Mbit instances would require 17.2 mm<sup>2</sup>.
The instance size will determine the frequency of refresh. Each refresh requires 3 clock cycles. In Cu-11 each row consists of 8 columns of 256-bit words. This means that 10 Mbit requires 5120 rows. A complete DRAM refresh is required every 3.2 ms. Two times 10 Mbit instances would require a refresh every 100 clock cycles, if the instances are refreshed in parallel.
The SoPEC DRAM will be constructed as two 10 Mbit instances implemented as a single memory bank.
20.3 SoPEC Memory Usage Requirements
The memory usage requirements for the embedded DRAM are shown in Table 106 .
Table 106. Memory Usage Requirements
<td> Block</td><td> Size</td><td> Description</td>
<td> Compressed page store</td><td> 2048 Kbytes</td><td> Compressed data page store for Bilevel and contone data</td>
<td> Decompressed Contone Store</td><td> 108 Kbyte</td><td> 13824 lines with scale factor 6 = 2304 pixels, store 12 lines, 4 colors = 108 kB 13824 lines with scale factor 5 = 2765 pixels, store 12 lines, 4 colors = 130 kB</td>
<td> Spot line store</td><td> 5.1 Kbyte</td><td> 13824 dots/line so 3 lines is 5.1 kB</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
260
<td> Tag Format Structure</td><td> Typically 12 Kbyte (2.5 mm tags @ 800 dpi)</td><td> 55 kB in for 384 dot line tags 2.5 mm tags (1/1 Oth inch) @ 1600 dpi require 160 dot lines = 160/384 x55 or 23 kB 2.5 mm tags (1/1 Oth inch) @ 800 dpi require 80/384 x55 = 12 kB</td>
<td> Dither Matrix store</td><td> 4 Kbytes</td><td> 64x64 dither matrix is 4 kB 128x128 dither matrix is 16 kB 256x256 dither matrix is 64 kB</td>
<td> DNC Dead Nozzle Table</td><td> 1.4 Kbytes</td><td> Delta encoded, (10 bit delta position + 6 dead nozzle mask) x% Dnozzle 5% dead nozzles requires (10+6)x 692 Dnoz zles = 1.4 Kbytes</td>
<td> Dot-line store</td><td> 369.6 Kbytes</td><td> Assume each color row is separated by 5 dot lines on the print head The dot line store will be 0+5+10...50+55 = 330 half dot lines + 48 extra half dot lines (4 per dot row) + 60 extra half dot lines estimated to account for printhead misalignment = 438 half dot lines. 438 half dot lines of 6912 dots = 369.6Kbytes</td>
<td> PCU Program code</td><td> 8 Kbytes</td><td> 1024 commands of 64 bits = 8 kB</td>
<td> CPU</td><td> 64 Kbytes</td><td> Program code and data</td>
<td> TOTAL</td><td> 2620 Kbytes (12 Kbyte TFS storage)</td><td></td>
Note:
• Total storage is fixed to 2560 Kbytes to align to 20 Mbit DRAM. This will mean that less space than noted in Table may be available for the compressed band store.
20.4 SoPEC Memory Access Patterns
Table 107 shows a summary of the blocks on SoPEC requiring access to the embedded DRAM and their individual memory access patterns. Most blocks will access the DRAM in single 256-bit accesses. All accesses must be padded to 256-bits except for 64-bit CDU write accesses and CPU write accesses. Bits which should not be written are masked using the individual DRAM bit 10 write inputs or byte write inputs, depending on the foundry. Using single 256-bit accesses means that the buffering required in the SoPEC DRAM requesters will be minimized.
Table 107. Memory access patterns of SoPEC DRAM Requesters
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
261
<td> DRAM requester</td><td> Direction</td><td> Memory access pattern</td>
<td> CPU</td><td> R</td><td> Single 256-bit reads.</td>
<td></td><td> W</td><td> Single 32-bit, 16-bit or 8-bit writes.</td>
<td> SCB</td><td> R</td><td> Single 256-bit reads.</td>
<td></td><td> W</td><td> Single 256-bit writes, with byte enables.</td>
<td> CDU</td><td> R</td><td> Single 256-bit reads of the compressed contone data.</td>
<td></td><td> W</td><td> Each CDU access is a write to 4 consecutive DRAM words in the same row but only 64 bits of each word are written with the remaining bits write masked. The access time for this 4 word page mode burst is 3 + 2 + 2+2 = 9 cycles if the page mode select signal is clocked at 160 MHz.</td>
<td> CFU</td><td> R</td><td> Single 256 bit reads.</td>
<td> LBD</td><td> R</td><td> Single 256 bit reads.</td>
<td> SFU</td><td> R</td><td> Separate single 256 bit reads for previous and current line but sharing the same DIU interface</td>
<td></td><td> W</td><td> Single 256 bit writes.</td>
<td> TE(TD)</td><td> R</td><td> Single 256 bit reads. Each read returns 2 times 128 bit tags.</td>
<td> TE(TFS)</td><td> R</td><td> Single 256 bit reads. TFS is 136 bytes. This means there is unused data in the fifth 256 bit read. A total of 5 reads is required.</td>
<td> HCU</td><td> R</td><td> Single 256 bit reads. 128 x 128 dither matrix requires 4 reads per line with double buffering. 256 x 256 dither matrix requires 8 reads at the end of the line with single buffering.</td>
<td> DNC</td><td> R</td><td> Single 256 bit dead nozzle table reads. Each dead nozzle table read con tains 16 dead-nozzle tables entries each of 10 delta bits plus 6 dead nozzle mask bits.</td>
<td> DWU</td><td> W</td><td> Single 256 bit writes since enable/disable DRAM access per color plane.</td>
<td> LLU</td><td> R</td><td> Single 256 bit reads since enable/disable DRAM access per color plane.</td>
<td> PCU</td><td> R</td><td> Single 256 bit reads. Each PCU command is 64 bits so each 256 bit word can contain 4 PCU commands. PCU reads from DRAM used for reprogramming PEP should be executed with minimum latency. If this occurs between pages then there will be free bandwidth as most of the other SoPEC Units will not be requesting from DRAM. If this occurs between bands then the LDB, CDU and TE bandwidth will be free. So the PCU should have a high priority to access to any spare bandwidth.</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
262
<td> Refresh</td><td></td><td> Single refresh.</td>
20.5 Buffering Required in SoPEC DRAM Requesters
If each DIU access is a single 256-bit access then we need to provide a 256-bit double buffer in the DRAM requester. If the DRAM requester has a 64-bit interface then this can be implemented as an 8 x 64-bit FIFO.
Table 108. Buffer sizes in SoPEC DRAM requesters
<td> DRAM Requester</td><td> Direction</td><td> Access patterns</td><td> Buffering required in block</td>
<td> CPU</td><td> R</td><td> Single 256-bit reads.</td><td> Cache.</td>
<td></td><td> W</td><td> Single 32-bit writes but allowing 16-bit or byte addressable writes.</td><td> None.</td>
<td> SCB</td><td> R</td><td> Single 256-bit reads.</td><td> Double 256-bit buffer.</td>
<td></td><td> W</td><td> Single 256-bit writes, with byte enables.</td><td> Double 256-bit buffer.</td>
<td> CDU</td><td> R</td><td> Single 256-bit reads of the compressed contone data.</td><td> Double 256-bit buffer.</td>
<td></td><td> W</td><td> Each CDU access is a write to 4 consecutive DRAM words in the same row but only 64 bits of each word are written with the remaining bits write masked.</td><td> Double half JPEG block buffer.</td>
<td> CFU</td><td> R</td><td> Single 256 bit reads.</td><td> Triple 256-bit buffer.</td>
<td> LBD</td><td> R</td><td> Single 256 bit reads.</td><td> Double 256-bit buffer.</td>
<td> SFU</td><td> R</td><td> Separate single 256 bit reads for previous and cur rent line but sharing the same DIU interface</td><td> Double 256-bit buffer for each read channel.</td>
<td></td><td> W</td><td> Single 256 bit writes.</td><td> Double 256-bit buffer.</td>
<td> TE(TD)</td><td> R</td><td> Single 256 bit reads.</td><td> Double 256-bit buffer.</td>
<td> TE(TFS)</td><td> R</td><td> Single 256 bit reads. TFS is 136 bytes. This means there is unused data in the fifth 256 bit read. A total of 5 reads is required.</td><td> Double line-buffer for 136 bytes implemented in TE.</td>
<td> HCU</td><td> R</td><td> Single 256 bit reads. 128 x 128 dither matrix requires 4 reads per line with double buffering. 256 x 256 dither matrix requires 8 reads at the end of the line with single buffering.</td><td> Configurable between dou ble 128 byte buffer and single 256 byte buffer.</td>
<td> DNC</td><td> R</td><td> Single 256 bit reads</td><td> Double 256-bit buffer. Deeper buffering could</td>
CA 02508141 2005-06-01
WO 2004/050369
263
PCT/AU2003/001616
<td></td><td></td><td></td><td> be specified to cope with local clusters of dead nozzles.</td>
<td> DWU</td><td> W</td><td> Single 256 bit writes per enabled odd/even color plane.</td><td> Double 256-bit buffer per color plane.</td>
<td> LLU</td><td> R</td><td> Single 256 bit reads per enabled odd/even color plane.</td><td> Double 256-bit buffer per color plane.</td>
<td> PCU</td><td> R</td><td> Single 256 bit reads. Each PCU command is 64 bits so each 256 bit DRAM read can contain 4 PCU com mands. Requested command is read from DRAM together with the next 3 contiguous 64-bits which are cached to avoid unnecessary DRAM reads.</td><td> Single 256-bit buffer.</td>
<td> Refresh</td><td></td><td> Single refresh.</td><td> None.</td>
20.6 SOPEC DIU BANDWIDTH REQUIREMENTS
Table 109. SoPEC DIU Bandwidth Requirements
<td> Block Name</td><td> Direction</td><td> Number of cycles between each 256-bit DRAM access to meet peak bandwidth</td><td> Peak Bandwidth which must be supplied (bits/cycle)</td><td> Average Bandwidth (bits/cycle)</td><td> Example number of allocated timeslots<sup>1</sup></td>
<td> CPU</td><td> R</td><td></td><td></td><td></td><td></td>
<td></td><td> W</td><td></td><td></td><td></td><td></td>
<td> SCB</td><td> R</td><td></td><td></td><td></td><td></td>
<td></td><td> W</td><td> 3482</td><td> 0.734</td><td> 0.3933</td><td> 1</td>
<td> CDU</td><td> R</td><td> 128 (SF = 4), 288 (SF = 6), 1:1 compression4</td><td> 64/n2 (SF=n), 1.8 (SF = 6), 4 (SF = 4) (1:1 compression)</td><td> 32/10*n2 (SF=n), 0.09 (SF = 6), 0.2 (SF = 4) (10:1 compression^</td><td> 1 (SF=6) 2 (SF=4)</td>
<td></td><td> W</td><td> For individual accesses: 16 cycles (SF = 4), 36 cycles (SF = 6), n2 cycles (SF=n). Will be</td><td> 64/n2 (SF=n), 1.8 (SF = 6), 4 (SF = 4)</td><td> 32/n2 (SF=n)7, 0.9 (SF = 6), 2 (SF = 4)</td><td> 2 (SF=6)8 4 (SF=4)</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
264
<td></td><td></td><td> implemented as a page mode burst of 4 accesses every 64 cycles (SF = 4), 144 (SF =6), 4*n2 (SF =n) cycles6</td><td></td><td></td><td></td>
<td> CFU</td><td> R</td><td> 32 (SF = 4), 48 (SF = 6)9</td><td> 32/n (SF=n), 5.4 (SF = 6), 8 (SF = 4)</td><td> 32/n (SF=n), 5.4 (SF = 6), 8 (SF = 4)</td><td> 6 (SF=6) 8 (SF=4)</td>
<td> LBD</td><td> R</td><td> 256 (1:1 compression^ 0</td><td> 1 (1:1 compression)</td><td> 0.1 (10:1 compression^ 1</td><td> 1</td>
<td> SFU</td><td> R</td><td> 12812</td><td> 2</td><td> 2</td><td> 2</td>
<td></td><td> W</td><td> 25613</td><td> 1</td><td> 1</td><td> 1</td>
<td> TE(TD)</td><td> R</td><td> 25214</td><td> 1.02</td><td> 1.02</td><td> 1</td>
<td> TE(TFS)</td><td> R</td><td> 5 reads per Iine15</td><td> 0.093</td><td> 0.093</td><td> 0</td>
<td> HCU</td><td> R</td><td> 4 reads per line for 128 x 128 dither matrix16</td><td> 0.074</td><td> 0.074</td><td> 0</td>
<td> DNC</td><td> R</td><td> 106 (5% dead- nozzles 10-bit delta encoded)17</td><td> 2.4 (clump of dead nozzles)</td><td> 0.8 (equally spaced dead nozzles)</td><td> 3</td>
<td> DWU</td><td> W</td><td> 6 writes every 25618</td><td> 6</td><td> 6</td><td> 6</td>
<td> LLU</td><td> R</td><td> 8 reads every 25619</td><td> 8</td><td> 6</td><td> 8</td>
<td> PCU</td><td> R</td><td> 25620</td><td> 1</td><td> 1</td><td> 1</td>
<td> Refresh</td><td></td><td> 10021</td><td> 2.56</td><td> 2.56</td><td> 3 (effective)</td>
<td> TOTAL</td><td></td><td></td><td> SF = 6: 34.9 SF = 4: 41.9 excluding CPU</td><td> SF = 6: 27.5 SF = 4: 31.2 excluding CPU</td><td> SF = 6: 36 excluding CPU. SF= 4: 41 excluding CPU</td>
Notes:
: The number of allocated timeslots is based on 64 timeslots each of 1 bit/cycle but broken down to a granularity of 0.25 bit/cycle. Bandwidth is allocated based on peak bandwidth.
2: Wire-speed bandwidth for a 4 wire SCB configuration is 32 Mbits/s for each wire plus 12 Mbit/s for USB. This is a maximum of 138 Mbit/s. The maximum effective data rate is 26 Mbits/s for each wire plus 8 Mbit/s for USB. This is 112 Mbit/s. 112 Mbit/s is 0.734 bits/cycle or 256 bits every 348 cycles.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
265
3: Wire-speed bandwidth for a 2 wire SCB configuration is 32 Mbits/s for each wire plus 12 Mbit/s for USB. This is a maximum of 74 Mbit/s. The maximum effective data rate is 26 Mbits/s for each wire plus 8 Mbit/s for USB. This is 60 Mbit/s. 60 Mbit/s is 0.393 bits/cycle or 256 bits every 650 cycles.
4: At 1:1 compression CDU must read a 4 color pixel (32 bits) every SF<sup>2</sup> cycles.
5: At 10:1 average compression CDU must read a 4 color pixel (32 bits) every 10*SF<sup>2</sup> cycles.
6: 4 color pixel (32 bits) is required, on average, by the CFU every SF<sup>2</sup> (scale factor) cycles.
The time available to write the data is a function of the size of the buffer in DRAM. 1.5 buffering means 4 color pixel (32 bits) must be written every SF<sup>2</sup> / 2 (scale factor) cycles. Therefore, at a scale factor of SF, 64 bits are required every SF<sup>2</sup> cycles.
Since 64 valid bits are written per 256-bit write (Figure n page379 on page Error! Bookmark not defined.) then the DRAM is accessed every SF<sup>2</sup> cycles i.e. at SF4 an access every 16 cycles, at SF6 an access every 36 cycles.
If a page mode burst of 4 accesses is used then each access takes (3 + 2 + 2+2) equals 9 cycles. This means at SF, a set of 4 back-to-back accesses must occur every 4*SF<sup>2</sup> cycles. This assumes the page mode select signal is clocked at 160 MHz. CDU timeslots therefore take 9 cycles.
For scale factors lower than 4 double buffering will be used.
7: The peak bandwidth is twice the average bandwidth in the case of 1.5 buffering.
8: Each CDU(W) burst takes 9 cycles instead of 4 cycles for other accesses so CDU timeslots are longer.
9: 4 color pixel (32 bits) read by CFU every SF cycles. At SF4, 32 bits is required every 4 cycles or 256 bits every 32 cycles. At SF6, 32bits every 6 cycles or 256 bits every 48 cycles.
10: At 1:1 compression require 1 bit/cycle or 256 bits every 256 cycles.
11: The average bandwidth required at 10:1 compression is 0.1 bits/cycle.
12: Two separate reads of 1 bit/cycle.
13: Write at 1 bit/cycle.
14: Each tag can be consumed in at most 126 dot cycles and requires 128 bits. This is a maximum rate of 256 bits every 252 cycles.
15:17 x 64 bit reads per line in PEC1 is 5 x 256 bit reads per line in SoPEC. Double-line buffered storage.
16:128 bytes read per line is 4 x 256 bit reads per line. Double-line buffered storage.
17: 5% dead nozzles 10-bit delta encoded stored with 6-bit dead nozzle mask requires 0.8 bits/cycle read access or a 256-bit access every 320 cycles. This assumes the dead nozzles are evenly spaced out. In practice dead nozzles are likely to be clumped. Peak bandwidth is estimated as 3 times average bandwidth.
18: 6 bits/cycle requires 6 x 256 bit writes every 256 cycles.
19: 6 bits/160 MHz SoPEC cycle average but will peak at 2 x 6 bits per 106 MHz print head cycle or 8 bits/ SoPEC cycle. The PHI can equalise the DRAM access rate over the line so that the
CA 02508141 2005-06-01
WO 2004/050369
266
PCT/AU2003/001616 peak rate equals the average rate of 6 bits/ cycle. The print head is clocked at an effective speed of 106 MHz.
20: Assume one 256 read per 256 cycles is sufficient i.e. maximum latency of 256 cycles per access is allowable.
: Refresh must occur every 3.2 ms. Refresh occurs row at a time over 5120 rows of 2 parallel 10 Mbit instances. Refresh must occur every 100 cycles. Each refresh takes 3 cycles.
20.7 DIU BUS TOPOLOGY
20.7.1 Basic topology
Table 110. SoPEC DIU Requesters
<td> Read</td><td> Write</td><td> Other</td>
<td> CPU</td><td> CPU</td><td> Refresh</td>
<td> SCB</td><td> SCB</td><td></td>
<td> CDU</td><td> CDU</td><td></td>
<td> CFU</td><td> SFU</td><td></td>
<td> LBD</td><td> DWU</td><td></td>
<td> SFU</td><td></td><td></td>
<td> TE(TD)</td><td></td><td></td>
<td> TE(TFS)</td><td></td><td></td>
<td> HCU</td><td></td><td></td>
<td> DNC</td><td></td><td></td>
<td> LLU</td><td></td><td></td>
<td> PCU</td><td></td><td></td>
Table 110 shows the DIU requesters in SoPEC. There are 12 read requesters and 5 write requesters in SoPEC as compared with 8 read requesters and 4 write requesters in PEC1. Refresh is an additional requester.
In PEC1, the interface between the DIU and the DIU requesters had the following main features:
• separate control and address signals per DIU requester multiplexed in the DIU according to the arbitration scheme, • separate 64-bit write data bus for each DRAM write requester multiplexed in the DIU, • common 64-bit read bus from the DIU with separate enables to each DIU read requester. Timing closure for this bussing scheme was straight-forward in PEC1. This suggests that a similar scheme will also achieve timing closure in SoPEC. SoPEC has 5 more DRAM requesters but it will be in a 0.13 urn process with more metal layers and SoPEC will run at approximately the same speed as PEC1.
Using 256-bit busses would match the data width of the embedded DRAM but such large busses may result in an increase in size of the DIU and the entire SoPEC chip. The SoPEC requestors would require double 256-bit wide buffers to match the 256-bit busses. These buffers, which must
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
267 be implemented in flip-flops, are less area efficient than 8-deep 64-bit wide register arrays which can be used with 64-bit busses. SoPEC will therefore use 64-bit data busses. Use of 256-bit busses would however simplify the DIU implementation as local buffering of 256-bit DRAM data would not be required within the DIU.
20.7.1.1 CPU DRAM access
The CPU is the only DIU requestor for which access latency is critical. All DIU write requesters transfer write data to the DIU using separate point-to-point busses. The CPU will use the cpu_dataout[31:0] bus. CPU reads will not be over the shared 64-bit read bus. Instead, CPU reads will use a separate 256-bit read bus.
20.7.2 Making more efficient use of DRAM bandwidth
The embedded DRAM is 256-bits wide. The 4 cycles it takes to transfer the 256-bits over the 64bit data busses of SoPEC means that effectively each access will be at least 4 cycles long. It takes only 3 cycles to actually do a 256-bit random DRAM access in the case of IBM DRAM.
20.7.2.1 Common read bus
If we have a common read data bus, as in PEC1, then if we are doing back to back read accesses the next DRAM read cannot start until the read data bus is free. So each DRAM read access can occur only every 4 cycles. This is shown in Figure 86 with the actual DRAM access taking 3 cycles leaving 1 unused cycle per access.
20.7.2.2 Interleaving CPU and non-CPU read accesses
The CPU has a separate 256-bit read bus. All other read accesses are 256-bit accesses are over a shared 64-bit read bus. Interleaving CPU and non-CPU read accesses means the effective duration of an interleaved access timeslot is the DRAM access time (3 cycles) rather than 4 cycles.
Figure 87 shows interleaved CPU and non-CPU read accesses.
20.7.2.3 Interleaving read and write accesses
Having separate write data busses means write accesses can be interleaved with each other and with read accesses. So now the effective duration of an interleaved access timeslot is the DRAM access time (3 cycles) rather than 4 cycles. Interleaving is achieved by ordering the DIU arbitration slot allocation appropriately.
Figure 88 shows interleaved read and write accesses. Figure 89 shows interleaved write accesses.
256-bit write data takes 4 cycles to transmit over 64-bit busses so a 256-bit buffer is required in the DIU to gather the write data from the write requester. The exception is CPU write data which is transferred in a single cycle.
Figure 89 shows multiple write accesses being interleaved to obtain 3 cycle DRAM access.
Since two write accesses can overlap two sets of 256-bit write buffers and multiplexors to connect two write requestors simultaneously to the DIU are required.
Write requestors only require approximately one third of the total non-CPU bandwidth. This means that a rule can be introduced such that non-CPU write requestors are not allocated
CA 02508141 2005-06-01
WO 2004/050369
268
PCT/AU2003/001616 adjacent timeslots. This means that a single 256-bit write buffer and multiplexor to connect the one write requestor at a time to the DIU is all that is required.
Note that if the rule prohibiting back-to-back non-CPU writes is not adhered to, then the second write slot of any attempted such pair will be disregarded and re-allocated under the unused read round-robin scheme.
20.7.3 Bus widths summary
Table 111. SoPEC DIU Requesters Data Bus Width
<td> Read</td><td> Bus access width</td><td> Write</td><td> Bus access width</td>
<td> CPU</td><td> 256 (separate)</td><td> CPU</td><td> 32</td>
<td> SCB</td><td> 64 (shared)</td><td> SCB</td><td> 64</td>
<td> CDU</td><td> 64 (shared)</td><td> CDU</td><td> 64</td>
<td> CFU</td><td> 64 (shared)</td><td> SFU</td><td> 64</td>
<td> LBD</td><td> 64 (shared)</td><td> DWU</td><td> 64</td>
<td> SFU</td><td> 64 (shared)</td><td></td><td></td>
<td> TE(TD)</td><td> 64 (shared)</td><td></td><td></td>
<td> TE(TFS)</td><td> 64 (shared)</td><td></td><td></td>
<td> HCU</td><td> 64 (shared)</td><td></td><td></td>
<td> DNC</td><td> 64 (shared)</td><td></td><td></td>
<td> LLU</td><td> 64 (shared)</td><td></td><td></td>
<td> PCU</td><td> 64 (shared)</td><td></td><td></td>
20.7.4 Conclusions
Timeslots should be programmed to maximise interleaving of shared read bus accesses with other accesses for 3 cycle DRAM access. The interleaving is achieved by ordering the DIU arbitration slot allocation appropriately. CPU arbitration has been designed to maximise interleaving with non-CPU requesters
20.8 SOPEC DRAM ADDRESSING SCHEME
The embedded DRAM is composed of 256-bit words. However the CPU-subsystem may need to write individual bytes of DRAM. Therefore it was decided to make the DIU byte addressable. 22 bits are required to byte address 20 Mbit of DRAM.
Most blocks read or write 256 bit words of DRAM. Therefore only the top 17 bits i.e. bits 21 to 5 are required to address 256-bit word aligned locations.
The exceptions are • CDU which can write 64-bits so only the top 19 address bits i.e. bits 21 -3 are required.
• CPU writes can be 8, 16 or 32-bits. The cpu_diu_wmask[1:0] pins indicate whether to write 8,16 or 32 bits.
All DIU accesses must be within the same 256-bit aligned DRAM word. The exception is the CDU write access which is a write of 64-bits to each of 4 contiguous 256-bit DRAM words.
CA 02508141 2005-06-01
WO 2004/050369
269
PCT/AU2003/001616
20.8.1 Write Address Constaints Specific to the CDU
Note the following conditions which apply to the CDU write address, due to the four masked pagemode writes which occur whenever a CDU write slot is arbitrated.
• The CDU address presented to the DIU is cdu_diu_wadr[21:3].
• Bits [4:3] indicate which 64-bit segment out of 256 bits should be written in 4 successive masked page-mode writes.
• Each 10-Mbit DRAM macro has an input address port of width [15:0]. Of these bits, [2:0] are the page address. Page-mode writes, where you just vary these LSBs (i.e. the page or column address), but keep the rest of the address constant, are faster than random writes. This is taken advantage of for CDU writes.
• To guarantee against trying to span a page boundary, the DIU treats cdu_diu_wadr[6:5] as being fixed at 00.
• From cdu_diu_wadr[21:3], a initial address of cdu_diu_wadr[21:7], concatenated with 00, is used as the starting location for the first CDU write. This address is then autoincremented a further three times.
20.9 DIU Protocols
The DIU protocols are • Pipelined i.e. the following transaction is initiated while the previous transfer is in progress.
• Split transaction i.e. the transaction is split into independent address and data transfers.
20.9.1 Read Protocol except CPU
The SoPEC read requestors, except for the CPU, perform single 256-bit read accesses with the read data being transferred from the DIU in 4 consecutive cycles over a shared 64-bit read bus, diu_data[63:0]. The read address <unit>_diu_radr[21:5] is 256-bit aligned.
The read protocol is:
• <unit>_diu_rreq is asserted along with a valid <unit>_diu_radr[21:5].
• The DIU acknowledges the request with diu_<unit>_rack. The request should be deasserted. The minimum number of cycles between <unit>_diu_rreq being asserted and the DIU generating an diu_<unit>_rack strobe is 2 cycles (1 cycle to register the request, 1 cycle to perform the arbitration - see Section 20.14.10).
• The read data is returned on diu_data[63:0] and its validity is indicated by diu_<unit>_rvalid. The overall 256 bits of data are transferred over four cycles in the order : [63:0] -> [127:64] -> [191:128] -> [255:192].
• When four diu_<unit>_rvalid pulses have been received then if there is a further request <unit>_diu_rreq should be asserted again. diu_<unit>_rvalid will be always be asserted by the DIU for four consecutive cycles. There is a fixed gap of 2 cycles between diu_<unit>_rack and the first diu_<unit>_rvalid pulse. For more detail on the timing of such reads and the implications for back-to-back sequences, see Section 20.14.10.
20.9.2 Read Protocol for CPU
CA 02508141 2005-06-01
WO 2004/050369
270
PCT/AU2003/001616
The CPU performs single 256-bit read accesses with the read data being transferred from the DIU over a dedicated 256-bit read bus for DRAM data, dram_cpu_data[255:0]. The read address cpu_adr[21:5] is 256-bit aligned.
The CPU DIU read protocol is:
• cpu_diu_rreq is asserted along with a valid cpu_adr[21:5].
• The DIU acknowledges the request with diu_cpu_rack. The request should be deasserted. The minimum number of cycles between cpu_diu_rreq being asserted and the DIU generating a cpu_diu_rack strobe is 1 cycle (1 cycle to perform the arbitration - see Section 20.14.10).
• The read data is returned on dram_cpu_data[255:0] and its validity is indicated by diu_cpu_rvalid.
• When the diu_cpu_rvalid pulse has been received then if there is a further request cpu_diu_rreq should be asserted again. The diu_cpu_rvalid pulse with a gap of 1 cycle after rack (1 cycle for the read data to be returned from the DRAM - see Section 20.14.10).
20.9.3 Write Protocol except CPU and CDU
The SoPEC write requestors, except for the CPU and CDU, perform single 256-bit write accesses with the write data being transferred to the DIU in 4 consecutive cycles over dedicated point-topoint 64-bit write data busses. The write address <unit>_diu_wadr[21:5] is 256-bit aligned.
The write protocol is:
• <unit>_diu_wreq is asserted along with a valid <unit>_diu_wadr[21:5].
• The DIU acknowledges the request with diu_<unit>_wack. The request should be deasserted. The minimum number of cycles between <unit>_diu_wreq being asserted and the DIU generating an diu_<unit>_wack strobe is 2 cycles (1 cycle to register the request, 1 cycle to perform the arbitration - see Section 20.14.10).
• In the clock cycles following diu_<unit>_wack the SoPEC Unit outputs the <unit>_diu_data[63:0], asserting <unit>_diu_wvalid. The first <unit>_diu_wvalid pulse can occur the clock cycle after diu_<unit>_wack. <unit>_diu_wvalid remains asserted for the following 3 clock cycles. This allows for reading from an SRAM where new data is available in the clock cycle after the address has changed e.g. the address for the second 64-bits of write data is available the cycle after diu_<unit>_wack meaning the second 64-bits of write data is a further cycle later. The overall 256 bits of data is transferred over four cycles in the order : [63:0] -> [127:64] -> [191:128] -> [255:192], • Note that for SCB writes, each 64-bit quarter-word has an 8-bit byte enable mask associated with it. A different mask is used with each quarter-word. The 4 mask values are transferred along with their associated data, as shown in Figure 92.
• If four consecutive <unit>_diu_wvalid pulses are not provided by the requester, then the arbitration logic will disregard the write and re-allocate the slot under the unused read round-robin scheme.
Once all the write data has been output then if there is a further request <unit>_diu_wreq should be asserted again.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
271
20.9.4 CPU Write Protocol
The CPU performs single 128-bit writes to the DIU on a dedicated write bus, cpu_diu_wdata[127:0], There is an accompanying write mask, cpu_diu_wmask[15:0], consisting of 16 byte enables and the CPU also supplies a 128-bit aligned write address on cpu_diu_wadr[21:4]. Note that writes are posted by the CPU to the DIU and stored in a 1-deep buffer. When the DAU subsequently arbitrates in favour of the CPU, the contents of the buffer are written to DRAM.
The CPU write protocol, illustrated in Figure 93., is as follows :- • The DIU signals to the CPU via diu_cpu_write_rdy that its write buffer is empty and that the CPU may post a write whenever it wishes.
• The CPU asserts cpu_diu_wdatavalid to enable a write into the buffer and to confirm the validity of the write address, data and mask.
• The DIU de-asserts diu_cpu_write_rdy in the following cycle to indicate that its buffer is full and that the posted write is pending execution.
• When the CPU is next awarded a DRAM access by the DAU, the buffer's contents are written to memory. The DIU re-asserts diu_cpu_write_rdy once the write data has been captured by DRAM, namely in the MSN1 DCU state.
• The CPU can then, if it wishes, asynchronously use the new value of .diu_cpu_write_rdy to enable a new posted write in the same MSN1 cycle.
20.9.5 CDU Write Protocol
The CDU performs four 64-bit word writes to 4 contiguous 256-bit DRAM addresses with the first address specified by cdu_diu_wadr[21:3]. The write address cdu_diu_wadr[21:5] is 256-bit aligned with bits cdu_diu_wadr[4:3] allowing the 64-bit word to be selected.
The write protocol is:
• cdu_diu_wdata is asserted along with a valid cdu_diu_wadr[21:3].
• The DIU acknowledges the request with diu_cdu_wack. The request should be deasserted. The minimum number of cycles between cdu_diu_wreq being asserted and the DIU generating an diu_cdu_wack strobe is 2 cycles (1 cycle to register the request, 1 cycle to perform the arbitration - see Section 20.14.10).
• In the clock cycles following diu_cdu_wack the CDU outputs the cdu_diu_data[63:0], together with asserted cdu_diu_wvalid. The first cdu_diu_wvalid pulse can occur the clock cycle after diu_cdu_wack. cdu_diu_wvalid remains asserted for the following 3 clock cycles. This allows for reading from an SRAM where new data is available in the clock cycle after the address has changed e.g. the address for the second 64-bits of write data is available the cycle after diu_cdu_wack meaning the second 64-bits of write data is a further cycle later. Data is transferred over the 4-cycle window in an order, such that each successive 64 bits will be written to a monotonically increasing (by 1 location) 256-bit DRAM word.
• If four consecutive cdu_diu_wvalid pulses are not provided with the data, then the arbitration logic will disregard the write and re-allocate the slot under the unused read round-robin scheme.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
272 • Once all the write data has been output then if there is a further request cdu_diu_wreq should be asserted again.
20.10 DIU ARBITRATION MECHANISM
The DIU will arbitrate access to the embedded DRAM. The arbitration scheme is outlined in the next sections.
20.10.1 Timeslot based arbitration scheme
Table summarised the bandwidth requirements of the SoPEC requestors to DRAM. If we allocate the DIU requestors in terms of peak bandwidth then we require 35.25 bits/cycle (at SF =6) and 40.75 bits/ cycle (at SF = 4) for all the requestors except the CPU.
A timeslot scheme is defined with 64 main timeslots. The number of used main timeslots is programmable between 1 and 64.
Since DRAM read requestors, except for the CPU, are connected to the DIU via a 64-bit data bus each 256-bit DRAM access requires 4 pclk cycles to transfer the read data over the shared read bus. The timeslot rotation period for 64 timeslots each of 4 pclk cycles is 256 pclk cycles or 1.6 ps, assuming pclk is 160 MHz. Each timeslot represents a 256-bit access every 256 pclk cycles or 1 bit/cycle. This is the granularity of the majority of DIU requestors bandwidth requirements in Table .
The SoPEC DIU requesters can be represented using 4 bits (Table n page288 on page 298). Using 64 timeslots means that to allocate each timeslot to a requester, a total of 64 x 5-bit configuration registers are required for the 64 main timeslots.
Timeslot based arbitration works by having a pointer point to the current timeslot. When rearbitration is signaled the arbitration winner is the current timeslot and the pointer advances to the next timeslot. Each timeslot denotes a single access. The duration of the timeslot depends on the access.
Note that advancement through the timeslot rotation is dependent on an enable bit, RotationSync, being set. The consequences of clearing and setting this bit are described in section 20.14.12.2.1 on page 325.
If the SoPEC Unit assigned to the current timeslot is not requesting then the unused timeslot arbitration mechanism outlined in Section 20.10.6 is used to select the arbitration winner.
Note that there is always an arbitration winner for every slot. This is because the unused read reallocation scheme includes refresh in its round-robin protocol. If all other blocks are not requesting, an early refresh will act as fall-back for the slot.
20.10.2 Separate read and write arbitration windows
For write accesses, except the CPU, 256-bits of write data are transferred from the SoPEC DIU write requestors over 64-bit write busses in 4 clock cycles. This write data transfer latency means that writes accesses, except for CPU writes and also the CDU, must be arbitrated 4 cycles in advance. (The CDU is an exception because CDU writes can start once the first 64-bits of write data have been transferred since each 64-bits is associated with a write to a different 256-bit word).
CA 02508141 2005-06-01
WO 2004/050369
273
PCT/AU2003/001616
Since write arbitration must occur 4 cycles in advance, and the minimum duration of a timeslot duration is 3 cycles, the arbitration rules must be modified to initiate write accesses in advance. Accordingly, there is a write timeslot lookahead pointer shown in Figure 96 two timeslots in advance of the current timeslot pointer.
The following examples illustrate separate read and write timeslot arbitration with no adjacent write timeslots. (Recall rule on adjacent write timeslots introduced in Section 20.7.2.3 on page 267.)
In Figure 97 writes are arbitrated two timeslots in advance. Reads are arbitrated in the same timeslot as they are issued. Writes can be arbitrated in the same timeslot as a read. During arbitration the command address of the arbitrated SoPEC Unit is captured.
Other examples are shown in Figure 98 and Figure 99. The actual timeslot order is always the same as the programmed timeslot order i.e. out of order accesses do not occur and data coherency is never an issue.
Each write must always incur a latency of two timeslots.
Startup latency may vary depending on the position of the first write timeslot. This startup latency is not important.
Table 112 shows the 4 scenarios depending on whether the current timeslot and write timeslot lookahead pointers point to read or write accesses.
Table 112. Arbitration with separate windows for read and write accesses
<td> current timeslot pointer</td><td> write timeslot lookahead pointer</td><td> actions</td>
<td> Read</td><td> write</td><td> Initiate DRAM read, Initiate write arbitration</td>
<td> Readl</td><td> read2</td><td> Initiate DRAM readl.</td>
<td> Writel</td><td> write2</td><td> Initiate write2 arbitration. Execute DRAM writel.</td>
<td></td><td></td><td></td>
<td> Write</td><td> read</td><td> Execute DRAM write.</td>
If the current timeslot pointer points to a read access then this will be initiated immediately.
If the write timeslot lookahead pointer points to a write access then this access is arbitrated immediately, or immediately after the read access associated with the current timeslot pointer is initiated.
When a write access is arbitrated the DIU will capture the write address. When the current timeslot pointer advances to the write timeslot then the actual DRAM access will be initiated. Writes will therefore be arbitrated 2 timeslots in advance of the DRAM write occurring.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
274
At initialisation, the write lookahead pointer points to the first timeslot. The current timeslot pointer is invalid until the write lookahead pointer advances to the third timeslot when the current timeslot pointer will point to the first timeslot. Then both pointers advance in tandem.
CPU write accesses are excepted from the lookahead mechanism.
If the selected SoPEC Unit is not requesting then there will be separate read and write selection for unused timeslots. This is described in Section 20.10.6.
20.10.3 Arbitration of CPU accesses
What distinguishes the CPU from other SoPEC requestors, is that the CPU requires minimum latency DRAM access i.e. preferably the CPU should get the next available timeslot whenever it requests.
The minimum CPU read access latency is estimated in Table 113. This is the time between the CPU making a request to the DIU and receiving the read data back from the DIU.
Table 113. Estimated CPU read access latency ignoring caching
<td> CPU read access latency</td><td> Duration</td>
<td> CPU cache miss</td><td> 1 cycle</td>
<td> CPU MMU logic issues request and DIU arbitration completes</td><td> 1 cycle</td>
<td> Transfer the read address to the DRAM</td><td> 1 cycle</td>
<td> DRAM read latency</td><td> 1 cycle</td>
<td> Register the read data in CPU bridge</td><td> 1 cycle</td>
<td> Register the read data in CPU</td><td> 1 cycle</td>
<td> CPU cache miss</td><td> 1 cycle</td>
<td> CPU MMU logic issues request and DIU arbitration completes</td><td> 1 cycle</td>
<td> TOTAL gap between requests</td><td> 6 cycles</td>
If the CPU, as is likely, requests DRAM access again immediately after receiving data from the DIU then the CPU could access every second timeslot if the access latency is 6 cycles. This assumes that interleaving is employed so that timeslots last 3 cycles. If the CPU access latency were 7 cycles, then the CPU would only be able to access every third timeslot.
If a cache hit occurs the CPU does not require DRAM access. For its next DIU access it will have to wait for its next assigned DIU slot. Cache hits therefore will reduce the number of DRAM accesses but not speed up any of those accesses.
To avoid the CPU having to wait for its next timeslot it is desirable to have a mechanism for ensuring that the CPU always gets the next available timeslot without incurring any latency on the non-CPU timeslots.
This can be done by defining each timeslot as consisting of a CPU access preceding a non-CPU access. Each timeslot will last 6 cycles i.e. a CPU access of 3 cycles and a non-CPU access of 3 cycles. This is exactly the interleaving behaviour outlined in Section 20.7.2.2. If the CPU does not
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
275 require an access, the timeslot will take 3 or 4 and the timeslot rotation will go faster. A summary is given in Table 114.
Table 114. Timeslot access times.
<td> Access</td><td> Duration</td><td> Explanation</td>
<td> CPU access + non-CPU access</td><td> 3 + 3 = 6 cycles</td><td> Interleaved access</td>
<td> non-CPU access</td><td> 4 cycles</td><td> Access and preceding access both to shared read bus</td>
<td> non-CPU access</td><td> 3 cycles</td><td> Access and preceding access not both to shared read bus</td>
<td> CDU write access</td><td> 3+2+2+2 = 9 cycles</td><td> Page mode select signal is clocked at 160 MHz</td>
CDU write accesses require 9 cycles. CDU write accesses preceded by a CPU access require 12 cycles. CDU timeslots therefore take longer than all other DIU requestors timeslots.
With a 256 cycle rotation there can be 42 accesses of 6 cycles.
For low scale factor applications, it is desirable to have more timeslots available in the same 256 cycle rotation. So two counters of 4-bits each are defined allowing the CPU to get a maximum of (CPUPreAccessTimeslots + 1 ) pre-accesses for every (CPUTotalTimeslots + 1 ) main slots. A timeslot counter starts at CPUTotalTimeslots and decrements every timeslot, while another counter starts at CPUPreAccessTimeslots and decrements every timeslot in which the CPU uses its access. When the CPU pre-access counter goes to zero before CPUTotalTimeslots, no further CPU accesses are allowed. When the CPUTotalTimeslots counter reaches zero both counters are reset to their respective initial values.
The CPU is not included in the list of SoPEC DIU requesters, Table , for the main timeslot allocations. The CPU cannot therefore be allocated main timeslots. It relies on pre-accesses in advance of such slots as the sole method for DRAM transfers.
CPU access to DRAM can never be fully disabled, since to do so would render SoPEC inoperable. Therefore the CPUPreAccessTimeslots and CPUTotalTimeslots register values are interpreted as follows : In each succeeding window of (CPUTotalTimeslots+ 1) slots, the maximum quota of CPU pre-accesses allowed is (CPUPreAccessTimeslots + 1). The + 1 implementations mean that the CPU quota cannot be made zero.
The various modes of operation are summarised in Table 115 with a nominal rotation period of 256 cycles.
Table 115. CPU timeslot allocation modes with nominal rotation period of 256 cycles
<td> Access Type</td><td> Nominal Timeslot duration</td><td> Number of timeslots</td><td> Notes</td>
<td> CPU Pre-access i.e.</td><td> 6 cycles</td><td> 42 timeslots</td><td> Each access is CPU + non-CPU. If CPU does not use a timeslot then</td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
276
<td> CPUPreAccessTimeslo ts = CPUTotalTimeslots</td><td></td><td></td><td> rotation is faster.</td>
<td> Fractional CPU Preaccess i.e. CPUPreAccessTimeslo ts < CPUTotalTimeslots</td><td> 4 or 6 cycles</td><td> 42-64 timeslots</td><td> Each CPU + non-CPU access requires a 6 cycle timeslot.</td>
<td rowspan="2"></td><td rowspan="2"></td><td rowspan="2"></td><td> Individual non-CPU timeslots take 4 cycles if current access and preceding access are both to shared read bus.</td>
<td> Individual non-CPU timeslots take 3 cycles if current access and preceding access are not both to shared read bus.</td>
20.10.4 CDU accesses
As indicated in Section 20.10.3, CDU write accesses require 9 cycles. CDU write accesses preceded by a CPU access require 12 cycles. CDU timeslots therefore take longer than all other DIU requestors timeslots. This means that when a write timeslot is unused it cannot be reallocated to a CDU write as CDU accesses take 9 cycles. The write accesses which the CDU write could otherwise replace require only 3 or 4 cycles.
Unused CDU write accesses can be replaced by any other write access according to 20.10.6.1 Unused write timeslots allocation on page 277.
20.10.5 Refresh controller
Refresh is not included in the list of SoPEC DIU requesters, Table , for the main timeslot allocations. Timeslots cannot therefore be allocated to refresh.
The DRAM must be refreshed every 3.2 ms. Refresh occurs row at a time over 5120 rows of 2 parallel 10 Mbit instances. A refresh operation must therefore occur every 100 cycles. The refresh_period register has a default value of 99. Each refresh takes 3 cycles.
A refresh counter will count down the number of cycles between each refresh. When the downcounter reaches 0, the refresh controller will issue a refresh request and the down-counter is reloaded with the value in refresh_period and the count-down resumes immediately. Allocation of main slots must take into account that a refresh is required at least once every 100 cycles. Refresh is included in the unused read and write timeslot allocation. If unused timeslot allocation results in refresh occurring early by N cycles, then the refresh counter will have counted down to N. In this case, the refresh counter is reset to refresh_period and the count-down recommences.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
277
Refresh can be preceded by a CPU access in the same way as any other access. This is controlled by the CPUPreAccessTimeslots and CPUTotalTimeslots configuration registers. Refresh will therefore not affect CPU performance. A sequence of accesses including refresh might therefore be CPU, refresh, CPU, actual timeslot.
20.10.6 Allocating unused timeslots
Unused slots are re-allocated separately depending on whether the unused access was a read access or a write access. This is best-effort traffic. Only unused non-CPU accesses are reallocated.
20.10.6.1 Unused write timeslots allocation
Unused write timeslots are re-allocated according to a fixed priority order shown in Table 116 .
Table 116. Unused write timeslot priority order
<td> Name</td><td> Priority Order</td>
<td> SCB(W)</td><td> 1</td>
<td> SFU(W)</td><td> 2</td>
<td> DWU</td><td> 3</td>
<td> Unused read timeslot allocation</td><td> 4</td>
CDU write accesses cannot be included in the unused timeslot a location for write as CDU accesses take 9 cycles. The write accesses which the CDU write could otherwise replace require only 3 or 4 cycles.
Unused write timeslot allocation occurs two timeslots in advance as noted in Section 20.10.2. If the units at priorities 1-3 are not requesting then the timeslot is re-allocated according to the unused read timeslot allocation scheme described in Section 20.10.6.2. However, the unused read timeslot allocation will occur when the current timeslot pointer of Figure 96 reaches the timeslot i.e. it will not occur in advance.
20.10.6.2 Unused read timeslots allocation
Unused read timeslots are re-allocated according to a two level round-robin scheme. The SoPEC Units included in read timeslot re-allocation is shown in Table 117.
Table 117. Unused read timeslot allocation
<img file="CA2508141C_D0001.tif" />
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
278
<img file="CA2508141C_D0002.tif" />
Each SoPEC requestor has an associated bit, ReadRoundRobinLevel, which indicates whether it is in level 1 or level 2 round-robin.
Table 118. Read round-robin level selection
<td> Level</td><td> Action</td>
<td> ReadRoundRobinLevel = 0</td><td> Level 1</td>
<td></td><td></td>
<td> ReadRoundRobinLevel = 1</td><td> Level 2</td>
<td></td><td></td>
A pointer points to the most recent winner on each of the round-robin levels. Re-allocation is carried out by traversing level 1 requesters, starting with the one immediately succeeding the last level 1 winner. If a requesting unit is found, then it wins arbitration and the level 1 pointer is shifted to its position. If no level 1 unit wants the slot, then level 2 is similarly examined and its pointer adjusted.
Since refresh occupies a (shared) position on one of the two levels and continually requests access, there will always be some round-robin winner for any unused slot.
20.10.6.2.1 Shared CPU I Refresh Round-Robin Position
Note that the CPU can conditionally be allowed to take part in the unused read round-robin scheme. Its participation is controlled via the configuration bit EnableCPURoundRobin. When this bit is set, the CPU and refresh share a joint position in the round-robin order, shown in Table . When cleared, the position is occupied by refresh alone.
If the shared position is next in line to be awarded an unused non-CPU read/write slot, then the CPU will have first option on the slot. Only if the CPU doesn’t want the access, will it be granted to refresh. If the CPU is excluded from the round robin, then any awards to the position benefit refresh.
20.11 Guidelines for programming the DIU
Some guidelines for programming the DIU arbitration scheme are given in this section together with an example.
20.11.1 Circuit Latency
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
279
Circuit latency is a fixed service delay which is incurred, as and from the acceptance by the DIU arbitration logic of a block’s pending read/write request. It is due to the processing time of the request, readying the data, plus the DRAM access time. Latencies differ for read and write requests. See Tables 79 and 80 for respective breakdowns.
If a requesting block is currently stalled, then the longest time it will have to wait between issuing a new request for data and actually receiving it would be its timeslot period, plus the circuit latency overhead, along with any intervening non-standard slot durations, such as refresh and CDU(W). In any case, a stalled block will always incur this latency as an additional overhead, when coming outof a stall.
In the case where a block starts up or unstalls, it will start processing newly-received data at a time beyond its serviced timeslot equivalent to the circuit latency. If the block’s timeslots are evenly spaced apart in time to match its processing rate, (in the hope of minimising stalls,) then the earliest that the block could restall, if not re-serviced by the DIU, would be the same latency delay beyond its next timeslot occurrence. Put another way, the latency incurred at start-up pushes the potential DIU-induced stall point out by the same fixed delta beyond each successive timeslot allocated to the block. This assumes that a block re-requests access well in advance of its upcoming timeslots. Thus, for a given stall-free run of operation, the circuit latency overhead is only incurred inititially when unstalling.
While a block can be stalled as a result of how quickly the DIU services its DRAM requests, it is also prone to stalls caused by its upstream or downstream neighbours being able to supply or consume data which is transferred between the blocks directly, (as opposed to via the DIU). Such neighbour-induced stalls, often occurring at events like end of line, will have the effect that a block’s DIU read buffer will tend to fill, as the block stops processing read data. Its DIU write buffer will also tend to fill, unable to despatch to DRAM until the downstream block frees up shared-access DRAM locations. This scenario is beneficial, in that when a block unstalls as a result of its neighbour releasing it, then that block’s read/write DIU buffers will have a fill state less likely to stall it a second time, as a result of DIU service delays.
A block’s slots should be scheduled with a service guarantee in mind. This is dictated by the block’s processing rate and hence, required access to the DRAM. The rate is expressed in terms of bits per cycle across a processing window, which is typically (though not always) 256 cycles. Slots should be evenly interspersed in this window (or rotation) so that the DIU can fulfill the block’s service needs.
The following ground rules apply in calculating the distribution of slots for a given non-CPU block:• The block can, at maximum, suffer a stall once in the rotation, (i.e. unstall and restall) and hence incur the circuit latency described above.
This rule is, by definition, always fulfilled by those blocks which have a service requirement of only 1 bit/cycle (equivalent to 1 slot/rotation) or fewer. It can be shown that the rule is also satisfied by those blocks requiring more than 1 bit/cycle. See Section 20.12.1 Slot Distributions and Stall Calculations for Individual Blocks, on page 285.
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
280 • Within the rotation, certain slots will be unavailable, due to their being used for refresh. (See Section 20.11.2 Refresh latencies) • In programming the rotation, account must be taken of the fact that any CDU(W) accesses will consume an extra 6 cycles/access, over and above the norm, in CPU pre-access mode, or 5 cycles/access without pre-access.
• The total delay overhead due to latency, refreshes and CDU(W) can be factored into the service guarantee for all blocks in the rotation by deleting once, (i.e. reducing the rotation window,) that number of slots which equates to the cumulative duration of these various anomalies.
• The use of lower scale factors will imply a more frequent demand for slots by non-CPU blocks. The percentage of slots in the overall rotation which can therefore be designated as CPU pre-access ones should be calculated last, based on what can be accommodated in the light of the non-CPU slot need.
Read latency is summarised below in Table 119 .
Table 119. Read latency
<td> Non-CPU read access latency</td><td> Duration</td>
<td> non-CPU read requestor internally generates DIU request</td><td> 1 cycle</td>
<td> register the non- CPU read request</td><td> 1 cycle</td>
<td> complete the arbitration of the request</td><td> 1 cycle</td>
<td> transfer the read address to the DRAM</td><td> 1 cycle</td>
<td> DRAM read latency</td><td> 1 cycle</td>
<td> register the DRAM read data in DIU</td><td> 1 cycle</td>
<td> register the 1st 64-bits of read data in requester</td><td> 1 cycle</td>
<td> register the 2nd 64-bits of read data in requester</td><td> 1 cycle</td>
<td> register the 3rd 64-bits of read data in requester</td><td> 1 cycle</td>
<td> register the 4th 64-bits of read data in requester</td><td> 1 cycle</td>
<td> TOTAL</td><td> 10 cycles</td>
Write latency is summarised in Table 120.
Table 120. Write latency
<td> Non-CPU write access latency</td><td> Duration</td>
<td> non-CPU write requestor internally generates DIU request</td><td> 1 cycle</td>
CA 02508141 2005-06-01
WO 2004/050369 PCT/AU2003/001616
281
<td></td><td></td>
<td> register the non-CPU write request</td><td> 1 cycle</td>
<td> complete the arbitration of the request</td><td> 1 cycle</td>
<td> transfer the acknowledge to the write requester</td><td> 1 cycle</td>
<td> transfer the 1st 64 bits of write data to the DIU</td><td> 1 cycle</td>
<td> transfer the 2nd 64 bits of write data to the DIU</td><td> 1 cycle</td>
<td> transfer the 3rd 64 bits of write data to the DIU</td><td> 1 cycle</td>
<td> transfer the 4th 64 bits of write data to the DIU</td><td> 1 cycle</td>
<td> Write to DRAM with locally registered write data</td><td> 1 cycle</td>
<td> TOTAL</td><td> 9 cycles</td>
Timeslots removed to allow for read latency will also cover write latency, since the former is the larger of the two.
20.11.2 Refresh latencies
The number of allocated timeslots for each requester needs to take into account that a refresh must occur every 100 cycles. This can be achieved by deleting timeslots from the rotation since the number of timeslots is made programmable.
Refresh is preceded by a CPU access in the same way as any other access. This is controlled by the CPUPreAccessTimeslots and CPUTotalTimeslots configuration registers. Refresh will therefore not affect CPU performance.
As an example, in CPU pre-access mode each timeslot will last 6 cycles. If the timeslot rotation has 50 timeslots then the rotation will last 300 cycles. The refresh controller will trigger a refresh every 100 cycles. Up to 47 timeslots can be allocated to the rotation ignoring refresh. Three timeslots deleted from the 50 timeslot rotation will allow for the latency of a refresh every 100 cycles.
20.11.3 Ensuring sufficient DNC and PCU access
PCU command reads from DRAM are exceptional events and should complete in as short a time as possible. Similarly, we must ensure there is sufficient free bandwidth for DNC accesses e.g. when clusters of dead nozzles occur. In Table DNC is allocated 3 times average bandwidth. PCU and DNC can also be allocated to the level 1 round-robin allocation for unused timeslots so that unused timeslot bandwidth is preferentially available to them.
20.11.4 Basing timeslot allocation on peak bandwidths
Since the embedded DRAM provides sufficient bandwidth to use 1:1 compression rates for the CDU and LBD, it is possible to simplify the main timeslot allocation by basing the allocation on peak bandwidths. As combined bi-level and tag bandwidth at 1:1 scaling is only 5 bits/cycle, we will usually only consider the contone scale factor as the variable in determining timeslot allocations.
If slot allocation is based on peak bandwidth requirements then DRAM access will be guaranteed to all SoPEC requesters. If we do not allocate slots for peak bandwidth requirements then we can also allow for the peaks deterministically by adding some cycles to the print line time.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
282
20.11.5 Adjacent timeslot restrictions
20.11.5.1 Non-CPU write adjacent timeslot restrictions
Non-CPU write requestors should not be assigned adjacent timeslots as described in Section 20.7.2.3. This is because adjacent timeslots assigned to non-CPU requestors would require two sets of 256-bit write buffers and multiplexors to connect two write requestors simultaneously to the DIU. Only one 256-bit write buffer and multiplexor is implemented. Recall from section 20.7.2.3 on page 267 that if adjacent non-CPU writes are attempted, that the second write of any such pair will be disregarded and re-allocated under the unused read scheme..
20.11.5.2 Same DIU requestor adjacent timeslot restrictions
All DIU requesters have state-machines which request and transfer the read or write data before requesting again. From Figure 90 read requests have a minimum separation of 9 cycles. From Figure 92 write requests have a minimum separation of 7 cycles. Therefore adjacent timeslots should not be assigned to a particular DIU requester because the requester will not be able to make use of all these slots.
In the case that a CPU access precedes a non-CPU access timeslots last 6 cycles so write and read requesters can only make use of every second timeslot. In the case that timeslots are not preceded by CPU accesses timeslots last 4 cycles so the same write requester can use every second timeslot but the same read requestor can use only every third timeslot. Some DIU requestors may introduce additional pipeline delays before they can request again. Therefore timeslots should be separated by more than the minimum to allow a margin.
20.11.6 Line margin
The SFU must output 1 bit/cycle to the HCU. Since HCUNumDots may not be a multiple of 256 bits the last 256-bit DRAM word on the line can contain extra zeros. In this case, the SFU may not be able to provide 1 bit/cycle to the HCU. This could lead to a stall by the SFU. This stall could then propagate if the margins being used by the HCU are not sufficient to hide it. The maximum stall can be estimated by the calculation: DRAM service period - X scale factor * dots used from last DRAM read for HCU line.
Similarly, if the line length is not a multiple of 256-bits then e.g. the LLU could read data from DRAM which contains padded zeros. This could lead to a stall. This stall could then propagate if the page margins cannot hide it.
A single addition of 256 cycles to the line time will suffice for all DIU requesters to mask these stalls.
20.12 Example outline DIU programming
Table 121. Timeslot allocation based on peak bandwidth
<td> Block Name</td><td> Direction</td><td> Peak Bandwidth which must be supplied (bits/cycle)</td><td> MainTimeslots allocated</td>
<td> SCB</td><td> R</td><td></td><td></td>
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
283
<td></td><td> W</td><td> 0.734'</td><td> 1</td>
<td> CDU</td><td> R</td><td> 0.9 (SF = 6), 2 (SF = 4)</td><td> 1 (SF = 6) 2 (SF = 4)</td>
<td></td><td> W</td><td> 1.8 (SF = 6),<sup>B</sup> 4 (SF = 4)</td><td> 2 (SF = 6) 4 (SF = 4)</td>
<td> CFU</td><td> R</td><td> 5.4 (SF = 6), 8 (SF = 4)</td><td> 6 (SF = 6) 8 (SF = 4)</td>
<td> LBD</td><td> R</td><td> 1</td><td> 1</td>
<td> SFU</td><td> R</td><td> 2</td><td> 2</td>
<td></td><td> W</td><td> 1</td><td> 1</td>
<td> TE(TD)</td><td> R</td><td> 1.02</td><td> 1</td>
<td> TE(TFS)</td><td> R</td><td> 0.093</td><td> 0</td>
<td> HCU</td><td> R</td><td> 0.074</td><td> 0</td>
<td> DNC</td><td> R</td><td> 2.4</td><td> 3</td>
<td> DWU</td><td> W</td><td> 6</td><td> 6</td>
<td> LLU</td><td> R</td><td> 8</td><td> 8</td>
<td> PCU</td><td> R</td><td> 1</td><td> 1</td>
<td> TOTAL</td><td></td><td></td><td> 33 (SF=6) 38 (SF=4)</td>
Table 121 shows an allocation of main timeslots based on the peak bandwidths of Table .
The bandwidth required for each unit is calculated allowing extra cycles for read and write circuit latency for each access requiring a bandwidth of more than 1 bit/cycle. Fractional bandwidth is supplied via unused read slots.
The timeslot rotation is 256 cycles. Timeslots are deleted from the rotation to allow for circuit latencies for accesses of up to 1 bit per cycle i.e. 1 timeslot per rotation.
Example 1 : Scale-factor = 6
Program the MainTimeslot configuration register (Table ) for peak required bandwidths of SoPEC Units according to the scale factor.
Program the read round-robin allocation to share unused read slots. Allocate PCU, DNC, HCU and TFS to level 1 read round-robin.
• Assume scale-factor of 6 and peak bandwidths from Table .
• Assign all DIU requestors except TE(TFS) and HCU to multiples of 1 timeslot, as indicated in Table , where each timeslot is 1 bit/cycle. This requires 33 timeslots.
· No timeslots are explicitly allocated for the fractional bandwidth requirements of TE(TFS) and HCU accesses. Instead, these units are serviced via unused read slots.
<sup>7</sup> The SCB figure of 0.734 bits/cycle applies to mu/f/-SoPEC systems. For s/ng/e-SoPEC systems, the figure is 0.050 bits/cycle.
θ
Bandwidth for CDU(W) is peak value. Because of 1.5 buffering in DRAM, peak CDU(W) b/w equals 2 x average CDU(W) b/w. For CDU(R), peak b/w = average CDU(R) b/w.
CA 02508141 2005-06-01
WO 2004/050369
PCT/AU2003/001616
284 • Allow 3 timeslots to allow for 3 refreshes in the rotation.
• Therefore, 36 scheduled slots are used in the rotation for main timeslots and refreshes, some or all of which may be able to have a CPU pre-access, provided they fit in the rotation window.
• Each of the 2 CDU(W) accesses requires 9 cycles. Per access, this implies an overhead of 1 slot (12 cycles instead of 6) in pre-access mode, or 1.25 slots (9 cycles instead of 4) for no pre-access. The cumulative overhead of the two accesses is either 2 slots (pre-access) or 3 slots (no pre-access).
• Assuming all blocks require a service guarantee of no more than a single stall across 256 bits, allow 10 cycles for read latency, which also takes care of 9-cycle write latency. This can be accounted for by reserving 2 six-cycle slots (CPU pre-access) or 3 four-cycle slots (no pre-access).
• Assume a 256 cycle timeslot rotation.
• CDU(W) and read latency reduce the number of available cycles in a rotation to: 256 - 2x6 2x6 = 232 cycles (CPU pre-access) or 256 - 3x4 - 3x4 = 232 cycles (no pre-access).
• As a result, 232 cycles available for 36 accesses implies each access can take 232 / 36 = 6.44 cycles maximum. So, all accesses can have a pre-access.
• Therefore the CPU achieves a pre-access ratio of 36 / 36 = 100% of slots in the rotation. Example 2: Scale-factor = 4
Program the MainTimeslot configuration register (Table ) for peak required bandwidths of SoPEC Units according to the scale factor. Program the read round-robin allocation to share unused read slots. Allocate PCU, DNC, HCU and TFS to level 1 read round-robin.
• Assume scale-factor of 4 and peak bandwidths from Table .
• Assign all DIU requestors except TE(TFS) and HCU multiples of 1 timeslot, as indicated in Table , where each timeslot is 1 bit/cycle. This requires 38 timeslots.
• No timeslots are explicitly allocated for the fractional bandwidth requirements of TE(TFS) and HCU accesses. Instead, these units are serviced via unused read slots.
• Allow 3 timeslots to allow for 3 refreshes in the rotation.
• Therefore, 41 scheduled slots are used in the rotation for main timeslots and refreshes, some or all of which can have a CPU pre-access, provided they fit in the rotation window.
• Each of the 4 CDU(W) accesses requires 9 cycles. Per access, this implies an overhead of 1 slot (12 cycles instead of 6) for pre-access mode, or 1.25 slots (9 cycles instead of 4) for no pre-access. The cumulative overhead of the four accesses is either 4 slots (pre-access) or 5 slots (no pre-access).
• Assuming all blocks require a service guarantee of no more than a single stall across 256 bits, allow 10 cycles for read latency, which also takes care of 9-cycle write latency. This can be accounted for by reserving 2 six-cycle slots (CPU pre-access) or 3 four-cycle slots (no pre-access).
DEMANDE OU BREVET VOLUMINEUX
LA PRÉSENTE PARTIE DE CETTE DEMANDE OU CE BREVET COMPREND PLUS D’UN TOME.
CECI EST LE TOME 1 DE 4
CONTENANT LES PAGES 1 À 284
NOTE : Pour les tomes additionels, veuillez contacter le Bureau canadien des brevets
JUMBO APPLICATIONS/PATENTS
THIS SECTION OF THE APPLICATION/PATENT CONTAINS MORE THAN ONE VOLUME
THIS IS VOLUME 1 OF 4
CONTAINING PAGES 1 TO 284
NOTE: For additional volumes, please contact the Canadian Patent Office
NOM DU FICHIER / FILE NAME :
NOTE POUR LE TOME / VOLUME NOTE:
Contents737
335 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23 Sheet 24 Sheet 25 Sheet 26 Sheet 27 Sheet 28 Sheet 29 Sheet 30 Sheet 31 Sheet 32 Sheet 33 Sheet 34 Sheet 35 Sheet 36 Sheet 37 Sheet 38 Sheet 39 Sheet 40 Sheet 41 Sheet 42 Sheet 43 Sheet 44 Sheet 45 Sheet 46 Sheet 47 Sheet 48 Sheet 49 Sheet 50 Sheet 51 Sheet 52 Sheet 53 Sheet 54 Sheet 55 Sheet 56 Sheet 57 Sheet 58 Sheet 59 Sheet 60 Sheet 61 Sheet 62 Sheet 63 Sheet 64 Sheet 65 Sheet 66 Sheet 67 Sheet 68 Sheet 69 Sheet 70 Sheet 71 Sheet 72 Sheet 73 Sheet 74 Sheet 75 Sheet 76 Sheet 77 Sheet 78 Sheet 79 Sheet 80 Sheet 81 Sheet 82 Sheet 83 Sheet 84 Sheet 85 Sheet 86 Sheet 87 Sheet 88 Sheet 89 Sheet 90 Sheet 91 Sheet 92 Sheet 93 Sheet 94 Sheet 95 Sheet 96 Sheet 97 Sheet 98 Sheet 99 Sheet 100 Sheet 101 Sheet 102 Sheet 103 Sheet 104 Sheet 105 Sheet 106 Sheet 107 Sheet 108 Sheet 109 Sheet 110 Sheet 111 Sheet 112 Sheet 113 Sheet 114 Sheet 115 Sheet 116 Sheet 117 Sheet 118 Sheet 119 Sheet 120 Sheet 121 Sheet 122 Sheet 123 Sheet 124 Sheet 125 Sheet 126 Sheet 127 Sheet 128 Sheet 129 Sheet 130 Sheet 131 Sheet 132 Sheet 133 Sheet 134 Sheet 135 Sheet 136 Sheet 137 Sheet 138 Sheet 139 Sheet 140 Sheet 141 Sheet 142 Sheet 143 Sheet 144 Sheet 145 Sheet 146 Sheet 147 Sheet 148 Sheet 149 Sheet 150 Sheet 151 Sheet 152 Sheet 153 Sheet 154 Sheet 155 Sheet 156 Sheet 157 Sheet 158 Sheet 159 Sheet 160 Sheet 161 Sheet 162 Sheet 163 Sheet 164 Sheet 165 Sheet 166 Sheet 167 Sheet 168 Sheet 169 Sheet 170 Sheet 171 Sheet 172 Sheet 173 Sheet 174 Sheet 175 Sheet 176 Sheet 177 Sheet 178 Sheet 179 Sheet 180 Sheet 181 Sheet 182 Sheet 183 Sheet 184 Sheet 185 Sheet 186 Sheet 187 Sheet 188 Sheet 189 Sheet 190 Sheet 191 Sheet 192 Sheet 193 Sheet 194 Sheet 195 Sheet 196 Sheet 197 Sheet 198 Sheet 199 Sheet 200 Sheet 201 Sheet 202 Sheet 203 Sheet 204 Sheet 205 Sheet 206 Sheet 207 Sheet 208 Sheet 209 Sheet 210 Sheet 211 Sheet 212 Sheet 213 Sheet 214 Sheet 215 Sheet 216 Sheet 217 Sheet 218 Sheet 219 Sheet 220 Sheet 221 Sheet 222 Sheet 223 Sheet 224 Sheet 225 Sheet 226 Sheet 227 Sheet 228 Sheet 229 Sheet 230 Sheet 231 Sheet 232 Sheet 233 Sheet 234 Sheet 235 Sheet 236 Sheet 237 Sheet 238 Sheet 239 Sheet 240 Sheet 241 Sheet 242 Sheet 243 Sheet 244 Sheet 245 Sheet 246 Sheet 247 Sheet 248 Sheet 249 Sheet 250 Sheet 251 Sheet 252 Sheet 253 Sheet 254 Sheet 255 Sheet 256 Sheet 257 Sheet 258 Sheet 259 Sheet 260 Sheet 261 Sheet 262 Sheet 263 Sheet 264 Sheet 265 Sheet 266 Sheet 267 Sheet 268 Sheet 269 Sheet 270 Sheet 271 Sheet 272 Sheet 273 Sheet 274 Sheet 275 Sheet 276 Sheet 277 Sheet 278 Sheet 279 Sheet 280 Sheet 281 Sheet 282 Sheet 283 Sheet 284 Sheet 285 Sheet 286 Sheet 287 Sheet 288 Sheet 289 Sheet 290 Sheet 291 Sheet 292 Sheet 293 Sheet 294 Sheet 295 Sheet 296 Sheet 297 Sheet 298 Sheet 299 Sheet 300 Sheet 301 Sheet 302 Sheet 303 Sheet 304 Sheet 305 Sheet 306 Sheet 307 Sheet 308 Sheet 309 Sheet 310 Sheet 311 Sheet 312 Sheet 313 Sheet 314 Sheet 315 Sheet 316 Sheet 317 Sheet 318 Sheet 319 Sheet 320 Sheet 321 Sheet 322 Sheet 323 Sheet 324 Sheet 325 Sheet 326 Sheet 327 Sheet 328 Sheet 329 Sheet 330 Sheet 331 Sheet 332 Sheet 333 Sheet 334 Sheet 335
112 members in 8 offices
Priority claims14
| Document | Office | Kind | Date |
|---|---|---|---|
| 2002953134 | Australia | A | |
| 2002953134 | Australia | A | |
| 2002953134 | Australia | – | |
| 2002953135 | Australia | A | |
| 2002953135 | Australia | A | |
| 2002953135 | Australia | – | |
| 0301616 | Australia | W | |
| 0301616 | Australia | W | |
| 2002953134 | – | – | – |
| 2002953135 | – | – | – |
| AU20020953134 | – | – | – |
| AU20020953135 | – | – | – |
| PCTAU03001616 | – | – | – |
| WO2003AU01616 | – | – | – |
Members112
| Document | Office | Kind | |
|---|---|---|---|
| CA2508141A1 | Canada | A1 | |
| WO2004050369A1 | World Intellectual Property Organization (WIPO) | A1 | |
| AU2003302611A1 | Australia | A1 | |
| US2004143710A1 | United States of America | A1 | |
| US2004174570A1 | United States of America | A1 | |
| US2004181303A1 | United States of America | A1 | |
| US2004183843A1 | United States of America | A1 | |
| US2004189355A1 | United States of America | A1 | |
| US2004189731A1 | United States of America | A1 | |
| US2004193880A1 | United States of America | A1 | |
| US2004196320A1 | United States of America | A1 | |
| US2004199786A1 | United States of America | A1 | |
| US2004201647A1 | United States of America | A1 | |
| US2004201939A1 | United States of America | A1 | |
| US2004221287A1 | United States of America | A1 | |
| US2004223010A1 | United States of America | A1 | |
| US2004225881A1 | United States of America | A1 | |
| US2004227205A1 | United States of America | A1 | |
| US2004243978A1 | United States of America | A1 | |
| US2004249757A1 | United States of America | A1 | |
| WO2004050369A9 | World Intellectual Property Organization (WIPO) | A9 | |
| US2005152596A1 | United States of America | A1 | |
| US2005160316A1 | United States of America | A1 | |
| US2005166040A1 | United States of America | A1 | |
| US2005177633A1 | United States of America | A1 | |
| US2005182985A1 | United States of America | A1 | |
| US2005188218A1 | United States of America | A1 | |
| US2005197159A1 | United States of America | A1 | |
| EP1572463A1 | European Patent Office (EPO) | A1 | |
| US2005200688A1 | United States of America | A1 | |
| US2005206944A1 | United States of America | A1 | |
| US2005213761A1 | United States of America | A1 | |
| US2006052962A1 | United States of America | A1 | |
| US2006071951A1 | United States of America | A1 | |
| US2006071981A1 | United States of America | A1 | |
| US2006082609A1 | United States of America | A1 | |
| US7096137B2 | United States of America | B2 | |
| US2006214977A1 | United States of America | A1 | |
| US7121639B2 | United States of America | B2 | |
| US2006242496A1 | United States of America | A1 | |
| US2006259258A1 | United States of America | A1 | |
| US2006259706A1 | United States of America | A1 | |
| US7152942B2 | United States of America | B2 | |
| US2007006150A9 | United States of America | A9 | |
| US7165824B2 | United States of America | B2 | |
| US7171323B2 | United States of America | B2 | |
| US7181572B2 | United States of America | B2 | |
| US7188282B2 | United States of America | B2 | |
| AU2003302611B2 | Australia | B2 | |
| US2007211285A1 | United States of America | A1 | |
| US7278034B2 | United States of America | B2 | |
| US7278697B2 | United States of America | B2 | |
| US7302592B2 | United States of America | B2 | |
| US7328115B2 | United States of America | B2 | |
| US2008086655A1 | United States of America | A1 | |
| US7360131B2 | United States of America | B2 | |
| US2008117243A1 | United States of America | A1 | |
| US7377608B2 | United States of America | B2 | |
| US2008150997A1 | United States of America | A1 | |
| EP1572463A4 | European Patent Office (EPO) | A4 | |
| US2008155826A1 | United States of America | A1 | |
| US7399043B2 | United States of America | B2 | |
| US2008170093A1 | United States of America | A1 | |
| US7404616B2 | United States of America | B2 | |
| US2008259711A1 | United States of America | A1 | |
| US7465005B2 | United States of America | B2 | |
| US7467839B2 | United States of America | B2 | |
| US2009058903A1 | United States of America | A1 | |
| US2009073196A1 | United States of America | A1 | |
| US7519772B2 | United States of America | B2 | |
| US7523111B2 | United States of America | B2 | |
| US2009125720A1 | United States of America | A1 | |
| US7540579B2 | United States of America | B2 | |
| US2009198894A1 | United States of America | A1 | |
| US7573301B2 | United States of America | B2 | |
| US7592829B2 | United States of America | B2 | |
| US2009251502A1 | United States of America | A1 | |
| US7610163B2 | United States of America | B2 | |
| CA2508141CThis record | Canada | C | |
| US7611215B2 | United States of America | B2 | |
| US2009273389A1 | United States of America | A1 | |
| US2009284279A1 | United States of America | A1 | |
| US2009319802A1 | United States of America | A1 | |
| US2010010767A1 | United States of America | A1 | |
| US7660998B2 | United States of America | B2 | |
| US2010039467A1 | United States of America | A1 | |
| US7707621B2 | United States of America | B2 | |
| US7722146B2 | United States of America | B2 | |
| US2010134541A1 | United States of America | A1 | |
| US7740347B2 | United States of America | B2 | |
| US7747646B2 | United States of America | B2 | |
| US7747887B2 | United States of America | B2 | |
| US7770008B2 | United States of America | B2 | |
| US7783886B2 | United States of America | B2 | |
| US2010223453A1 | United States of America | A1 | |
| US7800410B2 | United States of America | B2 | |
| US2010238213A1 | United States of America | A1 | |
| US7805626B2 | United States of America | B2 | |
| US2010245505A1 | United States of America | A1 | |
| US7818519B2 | United States of America | B2 |
2 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| LapsedLapsedMKLA | MKLA | |
| Examination requestEEER | EEER |
Numbers
- Publication
- 2508141
- Publication, DOCDB
- 2508141
- Publication, EPODOC
- CA2508141
- Application
- 2508141
- Application, DOCDB
- 2508141
- Application, EPODOC
- CA20032508141
Titles2
- English
- DEAD NOZZLE COMPENSATION
- French
- COMPENSATION D'UNE BUSE HORS ETAT DE FONCTIONNEMENT
Classification
- CPC, 24
- G06F21/73
- B41J2/04505
- B41J2/04508
- B41J2/0451
- B41J2/04528
- B41J2/04541
- B41J2/04543
- B41J2/04563
- B41J2/04573
- B41J2/04586
- B41J2202/20
- G06F21/554
- G06F21/57
- G06F21/575
- G06F21/64
- G06F21/71
- G06F21/74
- G06F21/75
- G06F21/78
- H03K5/1252
- H04N1/405
- Y10S707/99933
- Y10T29/49401
- Y10S707/99939
- IPC, 7
- B41J2 01
- B41J2 135
- B41J29 393
- B41J2 05
- G06F21 00
- H04L9 00
- H04N1 405