Home
Patent Search
IMT Blog
REGISTER
|
SIGN IN
United States Patent
5524244
Robinson , ; et al.
June 4, 1996
Title
System for dividing processing tasks into signal processor and decision-making microprocessor interfacing therewith
Abstract
Architectures and methods are provided for efficiently dividing a processing task into tasks for a programmable real time signal processor (SPROC) and tasks for a decision-making microprocessor. The SPROC is provided with a non-interrupt structure where data flow is through a multiported central memory. The SPROC is also programmed in an environment which requires nothing more than graphic entry of a block diagram of the user's design. In automatically implementing the block diagram into silicon, the SPROC programming/development environment accounts for and provides software connection and interfaces with a host microprocessor. The programming environment preferably includes: a high-level computer screen entry system which permits choosing, entry, parameterization, and connection of a plurality of functional blocks; a functional block cell library which provides source code representing the functional blocks; and a signal processor scheduler/compiler which uses the functional block cell library and the information entered into the high-level entry system to compile a program and to output source program code for a program memory and source data code for the data memory of the (SPROC), as well as a symbol table which provides a memory map which maps SPROC addresses to variable names which the microprocessor will refer to in separately compiling its program.
Inventors:
Robinson; Jeffrey I.
(New Fairfield,
CT
)
, Rouse; Keith
(New Milford,
CT
)
, Krassowski; Andrew J.
(San Jose,
CA
)
, Montlick; Terry F.
(Bethlehem,
CT
)
Assignee:
Logic Devices, Inc.
(Sunnyvale,
CA
)
Appl. No.:
196389
Filed:
February 15, 1994
Current U.S. Class:
717/140
Field of Search:
395/700,650 364/DIG.1,280.4
U.S. Patent Documents
4724521
February 1988
Carron et al.
4750116
June 1988
Pham et al.
4972314
November 1990
Getzinger et al.
5151984
September 1992
Newman et al.
5287511
February 1994
Robinson et al.
Primary Examiner:
Kriess; Kevin A.
Attorney, Agent or Firm:
Gordon; David P.
Parent Case Text
RELATED PATENT APPLICATIONS
This application is a continuation of application Ser. No. 07/776,161 filed on Oct. 15, 1991, and issued as U.S. Pat. No. 5,287,511 on Feb. 15, 1994, the complete disclosure of which is incorporated herein by reference.
This is a continuation-in-part of Ser. No. 07/217,616 filed Jul. 11, 1988 which is hereby incorporated by reference in its entirety herein.
This is a continuation-in-part of Ser. No. 07/474,742 (also PCT/US89/02986) filed Jul. 10, 1989 which is hereby incorporated by reference in its entirety herein.
This is a continuation-in-part of Ser. No. 07/525,977 filed May 18, 1990 which is hereby incorporated by reference in its entirety herein.
This is a continuation-in-part of Ser. No. 07/583,508 filed Sep. 17, 1990 which is hereby incorporated by reference in its entirety herein.
This is a continuation-in-part of Ser. No. 07/663,395 filed Mar. 1, 1991 which is hereby incorporated by reference in its entirety herein.
Claims
We claim:
1. Apparatus for use in linking the object code of a host processor with memory locations in a memory of a programmable signal processor to permit the host processor to partially control the programmable signal processor, where the object codes of the host processor and the signal processor are produced by separate compilation, said apparatus comprising:
a) means for symbolically describing a processing task for said signal processor including means for symbolically indicating input to said processing task by said host processor; and
b) means for producing by compilation signal processor object code representing said processing task for said signal processor, said means for producing by compilation being coupled to said means for symbolically describing and including means for producing a correspondence table in a format usable by a host processor code compiler, said correspondence table including a list of memory addresses in said programmable signal processor memory to be written to by said host processor in order to partially control said programmable signal processor.
2. Apparatus according to claim 1, wherein:
said means for symbolically describing includes a plurality of symbolic objects representing steps in said processing task and means for defining connections between symbolic objects, at least one of said symbolic objects indicating input by said host processor.
3. Apparatus according to claim 2, wherein:
said means for producing by compilation signal processor object code includes means for translating said symbolic objects and said connections between symbolic objects into object code for said signal processor, said object code being loaded into said signal processor memory, a portion of said code representing input by said host processor.
4. Apparatus according to claim 1, wherein:
said means for symbolically describing further includes means for indicating output from said processing task to said host processor; and
said correspondence table further includes a list of memory addresses in said programmable signal processor memory to be read by said host processor in order to partially control said programmable signal processor.
5. Apparatus according to claim 1, wherein:
said processing task includes at least one function having a parameter and said input by said host processor supplies a value for said parameter.
6. Apparatus for defining host processor access to tasks of a programmable signal processor, signal processor having a memory, wherein programs for said signal processor and said host processor are separately compiled, said apparatus comprising:
a) high level programming means for defining said tasks for said signal processor as a plurality of functional blocks, each said functional block comprising at least one aspect selected from the group of aspects consisting of a parameter, a function, an input, and an output, said high level programming means including means for identifying at least one of said functional block aspects of at least one of said functional blocks to be accessed by said host processor;
b) signal processor program compiler means coupled to said high level programming means for generating program code implementing said tasks, and for generating a list of memory locations of said code implementing said functional block aspects identified as accessible by said host processor.
7. Apparatus according to claim 6, wherein:
access by said host processor is selected from the group consisting of reading a parameter value, writing a parameter value, reading a function definition, writing a function definition, reading an output value, reading an input value, writing an output value and writing an input value.
8. Apparatus according to claim 7, wherein:
one of said functional block aspects is read by said host processor and another one of said functional block aspects is written by said host processor.
Description
Index of Contents
Related Patent Applications
Background of the Invention
1. Field of the Invention
2. State of the Art
Summary of the Invention
Brief Description of the Drawings
Detailed Description of the Preferred Embodiments
A. The Signal Processor (SPROC)
A.1 Functional description of The Parallel Port
A.2 Master SPROC Chip Read from Slave SPROC Chip or Peripheral
A.3 Master SPROC Chip Write to Slave SPROC Chip or Peripheral
A.4 Read from Slave SPROC Chip by an External Controller
A.5 Write to Slave SPROC Chip by an External Controller
A.6 Data Transfer Modes
A.7 Boot Mode
A.8 Watchdog Timer
A.9 Multiple I/O Lockout
A.10 Input/Output Flags and Lines
A.11 Parallel Port Registers
B. SPROC Development and Software
B.1 Overview
B.1.1 The SPROCcells Function Library
B.2 Entering a Diagram
B.3 Defining a Filter
B.4 Defining a Transfer Function
B.5 Convening a Block Diagram
B.6 The MakeSDL Module
B.7 The Schedule Module
B.8 The MakeLoad Module
B.9 Loading and Running a Design
B.10 Using the Micro Keyword
B.11 Using a Listing File
B.12 Using Subroutines
B.13 Using Time Zones
B.14 Summary
C. SPROC Description Language
C.1 Overview of SDL
C.2 Compiling SDL Files
C.3 Concepts and Definitions
C.4 Rules for Creating Asmblocks
C.5 Asmblock Structure
C.6 SPROC Chip Architecture, Instructions and Registers
D. The SPROC Compiler
E. The Microprocessor
E.1 SPROClink Microprocessor Interface
E.2 SMI Components
E.3 The Development Process
E.4 Input Requirements
E.5 Signal Processing Design Considerations
E.6 Embedded System Development Considerations
E.7 Using the SPROC Configuration File
E.8 Using the Symbol Translator
E.9 Using the SPROC C Function Library
E.10 Accessing SPROC Chip Memory Values
F. Low Frequency Impedance Analyzer Example
Claims
Abstract of the Disclosure
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention generally relates to programmable real time signal processor devices and methods utilizing such devices. More particularly, the present invention relates to architectures and methods for efficiently dividing a processing task into tasks for a real time signal processor and tasks for a decision-making microprocessor, wherein the real time signal processor is programmable in an environment which accounts for and provides software connection and interfaces with a host microprocessor.
2. State of the Art
Digital signal processing has evolved from being an expensive, esoteric science used primarily in military applications such as radar systems, image recognition, and the like, to a high growth technology which is used in consumer products such as digital audio and the compact disk. Single chip digital signal processors (SCDSPs) were introduced in the early 1980's to specifically address these markets. However, SCDSPs are complex to design and use, and have significant performance limitations. In particular, SCDSPs are limited to a frequency spectrum from DC to the low tens of KHz. Moreover, most SCDSPs have other development environment and hardware performance problems which stem from their Von Neuman, microprocessor origins. In an attempt to overcome these limitations, attempts have been made to use parallel processors and math coprocessors. However, these "solutions" have required considerable expertise on the part of the software engineer and have typically yielded minimal gain; particularly in the real-time environment.
Generic signal processing based products can be segmented as shown in FIG. 1 and described as follows: analog input/output (I/O), and A/D and/or D/A conversion; signal conditioning and processing; sample rate decision processing; and logic, decision, and control processing. The analog interface (I/O) typically performs preamplification and anti-alias filtering prior to A/D conversion in the input direction, as well as D/A conversion, reconstitution filtering, and power amplification in the output direction. The signal conditioning and processing circuitry conducts precision signal processing functions such as filtering, amplification, rectification, etc., as well as fast Fourier transforms and the like. The sample rate decision circuitry includes window comparators, quantizers, companders, expanders, etc. which make simple logic decisions on each and every sample forwarded to it. Finally, the logic, decision, and control processing circuitry in the incoming direction uses the signals emerging from the signal conditioning and processing and the sample rate decision processing circuitry, and makes decisions to control external equipment in some useful manner. In order to control the external equipment, in the outgoing direction, the logic, decision, and control processing circuitry generates signals which require further signal processing to drive or interact with some analog device or equipment. In making decisions, the logic, decision, and control processing circuitry typically utilizes highly data dependent code which runs asynchronously from the signals it utilizes. Examples of such circuitry include speech and image recognition algorithms, disk drive controllers, speech generation algorithms, numerically controlled machine tool controllers, etc.
Based on the above break-down of tasks it can be seen that SCDSPs are called upon to do both of what may be termed "signal processing" and "logic processing". Signal processing is typically computationally intensive, requires low latency and low parasitic overhead for real time I/O, must efficiently execute multiple asynchronous deterministic processes, and be controllable. Real time signal processors are typically controllable processors which have very large I/O bandwidths, are required to conduct many millions of computations per second, and can conduct several processing functions in parallel. In contrast to signal processing, logic processing is usually memory intensive (as opposed to computationally intensive), must efficiently handle multiple interrupts (particularly in a multiprocessor system), and acts as a controller (as opposed to being controllable). A common type of logic processor is the microprocessor which relies on extensive decision oriented software to conduct its processes. This software is typically written in a high level language such as "C". The code often contains numerous "if . . . then . . . else" like constructs which can result in highly variable execution times which are readily dealt with in non-real time applications, but present highly problematical scheduling problems for efficient real time systems.
Comparing the signal and logic processing requirements, it is seen that they are far from similar. Nevertheless, depending upon the circumstances, it is common for logic processors to be called upon to do signal processing, and vice versa. Since the microprocessor an is the older and more developed art, it is not surprising that the architectures of many DSPs have broadly borrowed from the architectures of the microprocessors. Thus, DSPs are often constructed as controllers having an interrupt structure. This type of architecture, however, is not properly suited for the primary functions of digital signal processing.
SUMMARY OF THE INVENTION
It is therefore the primary object of the invention to provide architectures and methods for efficiently dividing a processing task into tasks for a real time signal processor and tasks for a decision-making host microprocessor, wherein the real time signal processor is programmable in an environment which accounts for and provides connection and interfaces with the host microprocessor.
It is another object of the invention to provide a programmable, configurable, real time signal processor which is particularly suited to the requirements of signal processing and which conducts deterministic real time signal processing and interfaces with a microprocessor which conducts logic processing.
It is a further object of the invention to provide a graphic user interface system for a real time signal processor interfacing with a host microprocessor where the real time signal processor program is compiled separately from the program of the microprocessor but, as part of the compiling procedure provides a microprocessor-related file to the microprocessor which then translates the file and incorporates the translated file into its compilation, and thereby automatically provides for the signal processor--microprocessor interface.
Yet another object of the invention is to provide a user interface system incorporating a real time signal processor and a microprocessor which automatically share processing tasks in an efficient manner and which automatically compile and interface to accomplish the desired processing task.
In accord with the objects of the invention a development system for the microprocessor-interfacing signal processor is provided. For purposes of clarity and simplicity, the signal processor which interfaces with the microprocessor is referred to hereinafter as a SPROC (a trademark of the assignee hereof). Details of the SPROC are set forth in parent application 07/525,977. The development system (hereinafter referred to as SPROClab--a trademark of the assignee hereof) which is provided to permit a user to simply program and use the SPROC generally includes:
a high-level computer screen entry system (graphic user interface) which permits choosing, entry, parameterization, and connection of a plurality of functional blocks;
a functional block library which provides source code representing the functional blocks; and
a signal processor compiler for incorporating the parameters of the functional blocks as variables into the functional block library code and for compiling the library code as well as other code which accounts for scheduling and functional block connection matters, etc., whereby the signal processor compiler outputs source program code for a program memory of the signal processor (SPROC), source data code for the data memory of the SPROC, and a symbol table which provides a memory map which maps variable names which the microprocessor will refer to in separately compiling its program to SPROC addresses.
Besides the symbol table which is used by the microprocessor for interfacing with the SPROC, the SPROClab preferably provides means for generating a boot file which is compatible for storage in the microprocessor and which is provided by the microprocessor to the SPROC in order to boot up the SPROC. In this manner, the microprocessor can act as the host for the SPROC.
With the signal processing and logic processing aspects of tasks being divided (with the SPROC handling the signal processing, and the microprocessor handling the logic processing), the compiling of the SPROC and the microprocessor are handled separately. In order to accomplish the separate handling while still providing the graphic entry system, at least two schemes are provided. A first scheme effectively provides graphic entry for the signal processing circuit only. If desired, in the first scheme limited graphic entry for the microprocessor can be used to provide SPROC interfaces with the microprocessor (as shown in FIG. 10). With the first scheme, the user must provide suitable code for the microprocessor separately, and the symbol table generated by the SPROClab compiler is provided together with the code hand-generated by the user for microprocessor compiling. A second scheme permits graphic entry for both the signal processing and logic processing (microprocessor) circuits, and uses any of several methods for distinguishing between the two. Among the methods for distinguishing between which portion of the circuit is intended for signal processing and which for logic processing are: user entry (e.g., defining a block as block.spr or block.mic); hierarchical block entry which is programmed to allow entry of both logic processing and signal processing blocks; and the sample rate of the block (with slow sampling rates being handled by the microprocessor). Of course, if all blocks are predefined (i.e., are contained in a library), the precoded library code divides the code into code intended for the SPROC and code intended for the microprocessor. Regardless, where graphic entry for both signal processing and logic processing is permitted, the graphic entry eventually results in separate automatic compilation for both the SPROC and the microprocessor, with the SPROClab compiler again providing the necessary symbol table for incorporation during compilation of the microprocessor code.
Additional objects and advantages of the invention will become apparent to those skilled in the art upon reference to the detailed description taken in conjunction with the provided figures.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a high level block diagram of the SPROC device of the invention, and its connection to an external host or memory;
FIG. 2 is a timing diagram of the access of the various components and ports of the SPROC to the data RAM of the SPROC;
FIGS. 3a and 3b together comprise a block diagram of the internal processors of the SPROC device of the invention;
FIGS. 4a and 4b are block diagrams of the input and output sides of the data flow manager of the invention;
FIG. 4c is a representation of a FIFO which is implemented in the multiported data RAM, and which is utilized by the data flow manager of the invention;
FIGS. 5a and 5b are block diagrams of the serial input and serial output ports of the invention;
FIG. 6 is a simplified block diagram of the host port of the invention;
FIG. 7 is a block diagram of the access port of the invention;
FIG. 8 is a block diagram of the probe of the invention;
FIG. 9 is a simplified diagram illustrating the coupling of a plurality of SPROC devices of the invention into a system acting as the front end to a logic processor;
FIG. 10 is a flow diagram of the development system of the invention where the SPROC code and microprocessor code are compiled separately.
FIG. 11 is a block diagram of a low frequency impedance analyzer example entered into a graphic user entry system and programmed onto a SPROC for use in conjunction with a microprocessor; and
FIG. 12 is a high level flow chart of the compiler utilized in the development system of the invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
A. The Signal Processor (SPROC)
A high level block diagram of the preferred SPROC subsystem 10 of the invention is seen in FIG. 1. The preferred SPROC 10 preferably includes: a central "multiported" (as broadly understood) data RAM 100 accessed via data RAM bus 125; a multiported program RAM 150 accessed via program RAM bus 155; a plurality of internal processors (GSP) 400 coupled to the data RAM bus 125 and the program RAM bus 155 and which perform general processing functions; a data flow manager (DFM) 600 which is coupled to the data RAM bus 125 and which generally controls the flow of data into and out of the SPROC and relieves the GSPs from dealing with that data flow; a plurality of serial data ports 700 coupled to the DFM 600; a host port 800 coupled to both the data RAM bus 125 and the program RAM bus 155, the host port serving to couple the SPROC via the host bus 165 to either an EPROM 170 in stand-alone mode or to a host processor 180 in host mode; an access port 900 coupled to both the data RAM bus 125
and the program RAM bus 155; a probe 1000 coupled to the data RAM bus 125; and an internal boot ROM 190 with boot ROM bus 157 coupled via switch 192 to a GSP 400, the boot ROM 190 being used to control a master SPROC 10 in start-up mode, as well as to control the GSPs 400 of a SPROC 10 when the GSPs are in break mode; and a flag generating decoder 196 coupled via flag bus 198 to the DFM 600 and the GSPs 400 for flagging the DFM and GSPs when particular addresses of the data RAM 100 are being addressed (as determined by values on the data RAM bus 125).
The SPROC 10 of the invention can function in several different modes, some of which are determined by externally set pins (not shown). In particular, the SPROC 10 has a boot mode, an operational mode, and a development mode which includes a "break" mode. In addition, the SPROC may be a master SPROC or a slave SPROC which is either coupled to a master SPROC (see FIG. 9) or a host 180 such as a microprocessor. In the boot mode (powering up), where the SPROC 10 is a master, the SPROC 10 is required to program both itself and any other slave SPROCs which might be part of the system. To do that, upon power up, switches 192 and 194 are toggled to connect to the B (boot) nodes. With switches 192 and 194 so set, the boot ROM is coupled to a GSP 400 such as GSP 400a, and the program RAM 150 is coupled to the data RAM bus 125. As boot ROM 190 is coupled to the GSP 400a, the GSP 400a is able to read the boot code in boot ROM 190. The code is arranged to cause the GSP to seize control of the host port 800 and to load information into the SPROC from EPROM 170 via the host port 800. The information contained in EPROM 170 includes the program code for the program RAM 150 (which is sent via data RAM bus 125), configuration information for the DFM 600 and the serial, host, and access ports 700, 800, 900, and parameter information including initialization information for the data RAM 100. This information, which was compiled by the development system of the invention (as discussed in more detail hereinafter) and stored in the EPROM, causes the SPROC to perform the desired functions on data typically received via serial ports 700.
In boot mode, after the master SPROC is programmed, the remaining (slave) SPROCs of the system (see FIG. 9) are programmed by having the master SPROC 10 read the EPROM 170 and forward the information via the common host bus 165 to the other SPROCs which reside in different address spaces. The slave SPROCs do not require a boot ROM for boot mode purposes, although the boot ROM 190 is also used to control the break mode operation of the SPROC (as described with reference to FIG. 4).
After initialization is completed, boot mode is exited by the writing of a predetermined value (f0H) to a predetermined memory address (0401H) which causes switch 192 to toggle to node O (operation), and switch 194 to toggle to an open position. Then the SPROC is ready to operate for its intended signal processing purposes.
Although slave SPROCs may be programmed in boot mode by a master SPROC, a slave SPROC may also be programmed by a microprocessor host such as host 180 of FIG. 1. In slave mode where a host such as host 180 is coupled to the host bus 165, the internal boot ROM 190 is not active. In fact, switches 192 and 194 are set in the operating mode position. In order to program the SPROC, the host 180 preferably utilizes the host bus 165 and sends program data via host port 800, and program RAM bus
155 to the program RAM, and data RAM data via host port 800 and the data RAM bus 125 to the data RAM. Configuration information for the serial ports 700 and data flow manager 600, is sent by the host 180 via host port 800 and the data RAM bus 125 as hereinafter described. As will be described hereinafter with reference to the development system (SPROClab), where a microprocessor is the host for a SPROC, the program, data, and configuration information is typically generated by SPROClab in a microprocessor readable and storable format.
In operational mode, serial data flow into and out of the SPROC 10 is primarily through the serial ports 700, while parallel data flows through the host port 800. Serial data which is to be processed is sent into an input port 700 which is coupled to the data flow manager 600, which in turn forwards the data to appropriate locations (buffers) in the data RAM 100. In certain circumstances, described below, the DFM 600 will also write additional information to particular data RAM locations which are monitored by flag generating decoder 196. Decoder 196, in turn, causes the flags to be triggered over trigger or flag bus 198 as described in detail in previously incorporated U.S. Ser. No. 07/583,508. Other flags are triggered by pulsing hardware pins (not shown) via lines called "compute lines". The hardware pins are particularly useful in providing external timing information to the GSPs 400 and the DFM 600 of the SPROC.
Once the data has been sent to the data RAM 100, and typically after the GSPs 400 have been apprised via the flag bus 198 of the arrival of the information, the GSPs 400 can process the data. The processing of the data is conducted in accord with one or more programs stored in the multiported program RAM 150 which in turn represents the functions, topology, and parameters of a schematic diagram generated by the user of the development system. In processing the data, the GSPs 400 can read from and write to the data RAM 100. However, in order to shield the GSPs from I/O functions which would interrupt and burden the GSPs, the GSPs do not address each other directly, and do not read from or write to the DFM 600 or the input or output serial ports 700. Similarly, the GSPs do not have direct access to the host port 800 or the access port 900. Thus, in order for the processed data to be output from the SPROC 10, the processed data must be sent by the GSP 400 to the data RAM 100. The data in the data RAM is then either read by the DFM 600 and sent out serially via an output port 700, or is sent out over the host bus 165 in a parallel form via the host port 800.
The development mode of the SPROC device (which will be discussed in more detail hereinafter with reference to the development system) is used prior to the final programming of the EPROM 170 and is basically utilized in conjunction with a host
180. The development mode permits a user to easily and advantageously develop an integrated circuit signal processor by permitting the user access to the internals of the SPROC device. For example, if during a test operational mode it is desirable to obtain a data "dump" of the registers of the GSPs, the GSPs 400 can be put into break mode by causing a GSP to write to memory address 406H. As a result of writing to that address, a decoder (not shown) causes switch 192 to toggle, and instructions from the break section of the boot ROM 190 are used by the GSP 400 via bus 157. While boot ROM 190 is coupled to the GSP 400 in this manner, the GSP runs a routine which causes each register of the GSP to dump its contents to predetermined locations in the data RAM 100. That data may then be accessed by the user and changed if desired via the access port 900 or host port 800. Then, the break section of boot ROM 190 reloads the data into the GSP, writes to memory address 407H, and another decoder (not shown) causes switch 192 to toggle again such that the program RAM 150 is coupled to GSP 400, and the program continues.
Other tools useful in the development mode of the SPROC device are the access port 900 and the probe 1000. The access port permits the user to make changes to the program held in program RAM 150, and/or changes to parameters stored in the program RAM 150 or the data RAM 100 while the SPROC is operating. The probe 1000, which is described in greater detail in previously incorporated U.S. Ser. No. 07/663,395 permits the user to see internal signals generated by the SPROC in analog or digital form by monitoring the values of data written to any particular data RAM location. By using the access port 900 and the probe 1000 together, the effect of a change of a parameter value entered via the access port 900 may be immediately monitored by probe 1000.
Before turning to the details of each of the blocks which comprise FIG. 1, it should be appreciated that central to functioning of the SPROC is a multiported data RAM 100 and a multiported program RAM 150. As aforementioned, the RAMs may either be multiported by time division multiplexing a single access to the RAMs (as seen by the solid lines of FIG. 1) or by providing true multiported RAMs (as suggested by the dashed lines of FIG. 1). As indicated in FIG. 2, in the preferred embodiment hereof, access to the program RAM 150 by the GSPs 400 and the host port 800 and access port 900 is via time division multiplexing of a single input. Similarly, access to the data RAM 100 by the GSPs 400, the DFM 600, the host port 800, the access port
900, and the probe 1000 is also via time division multiplexing of a single input.
As seen in FIG. 2, in the preferred embodiment of the invention, there are five principle time slots of the basic 50 MHz SPROC clock 147 (shown in FIG. 1): one for each GSP; and one shared by all of the other blocks of the SPROC. Each GSP 400 is able to read from the program RAM (p-rd) once over five clock cycles, effectively providing each GSP with a 10 MHz access to the program RAM 150. In the fifth clock cycle, the host is given preferred access to either read from or write to the program RAM. If the host does not need to read or write to the program RAM, the access port is given access. Alternatively, the host and access ports can be given 50/50 access to the fifth time slot by additional time division multiplexing.
In the boot mode, only one GSP of the SPROC (e.g. GSP 400a) accesses the boot ROM 190. Because boot mode is used to program the program RAM 150 with program data from EPROM 170, the program RAM bus 155 must be used by the GSP 400a for writing to the program RAM 150 (via data RAM bus 125 and switch 194). Thus, a program RAM write (p-wr) is provided as shown in FIG. 2 to allow for this situation (as previously discussed with reference to FIG. 1).
The data RAM 100 is similarly multiported via time division multiplexing. As indicated in FIG. 2, each GSP 400 is given a single time slot to either read or write from the data RAM 100. The fifth time slot (time slot 2) is subdivided in time as follows: 50% for the host interface; and the remaining fifty percent equally divided among the access port 900, each of eight sections of the DFM 600 relating to eight serial ports 700, and the probe 1000.
The RAMs 100 and 150 of the invention are preferably separate RAM devices and do not share memory space. For example, the program RAM 150 is preferably a 1K by 24 bit RAM which is assigned address locations 0000 to 03ff Hex. The data RAM 100, on the other hand is preferably a 3K by 24 bit data RAM with primary data RAM space of 2K assigned address 0800 to 0fff Hex, and auxiliary register based space of 1K assigned addresses 0400 to 07ff Hex. Of the primary data RAM addresses, addresses 0800
through 0813 Hex relate to the trigger bus flags as is discussed hereinafter, while addresses 0814 through 0fff are used as data buffers, scratch pad locations, etc. Of the auxiliary space, certain addresses are used as follows:
______________________________________ 0401H Exit boot mode (write f0H) (generate GSP hard reset) 0405H Serial port reset (write) 0406H Global break entry (write) (generate GSP soft reset) 0407H Global break exit (write) (generate GSP soft reset) 0408H GSP1 break entry (write) (generate GSP soft reset) 0409H GSP2 break entry (write) (generate GSP soft reset) 040aH GSP3 break entry (write) (generate GSP soft reset) 040bH GSP4 break entry (write) (generate GSP soft reset) 040cH GSP1
break exit (write) (generate GSP soft reset) 040dH GSP2 break exit (write) (generate GSP soft reset) 040eH GSP3 break exit (write) (generate GSP soft reset) 040fH GSP4 break exit (write) (generate GSP soft reset) 0410H Serial Port 1 internal clock rate select (write 00 = CK/2048) (write 01 = CK/1024) (write 02 = CK/512) (write 03 = CK/256) (write 04 = CK/128) (write 05 = CK/64) (write 06 = CK/32) (write 07 = CK/16) where CK is the SPROC clock (50 MHz) 0411H Serial Port 2 internal clock rate select 0412H Serial Port 3 internal clock rate select 0413H Serial Port 4 internal clock rate select 0414H Serial Port 5 internal clock rate select 0415H Serial Port 6 internal clock rate select 0416H Serial Port 7 internal clock rate select
0417H Serial Port 8 internal clock rate select 0440H to Serial Port 1 (pradd = 0800H) 0447H 0448H to Serial Port 2 (pradd = 0801H) 044fH 0450H to Serial Port 3 (pradd = 0802H) 0457H 0458H to Serial Port 4 (pradd = 0803H) 045fH 0460H to Serial Port 5 (pradd = 0804H) 0467H 0468H to Serial Port 6 (pradd = 0805H) 046fH 0470H to Serial Port 7 (pradd = 0806H) 0477H 0478H to Serial Port 8 (pradd = 0807H) 047fH 0480H to DAC (probe) input port (pradd = 0808H) 0487H 0488H to DAC (probe) serial output port 048fH 04fcH to Host interface registers 04ffH ______________________________________
Memory locations 1000 to ffff Hex refers to external address space (e.g. slave SPROCs, other devices, or memory).
Of the auxiliary memory locations in the data RAM 100, it should be noted that each GSP is given a break entry and break exit data address. While the embodiment of FIG. 1 causes bus 155 to be connected to the boot/break ROM 190 when a break is implemented such that all GSPs must break together, different circuitry would allow for individual GSP breaks.
The eight twenty-four bit locations provided for each serial port are used to configure the serial ports as well as the DFM section associated with each serial port as hereinafter described. Similarly, the eight words of memory assigned the input and output ports of the probe are used to configure the probe, while the eight words of memory assigned the host port are used to configure the host port as described hereinafter.
Further, with regard to the memory locations, it is noted that when information is written to any of the serial port locations indicated, another address (pradd), which turns out to be a trigger flag address is generated by the DFM 600 (as discussed in more detail hereinafter) and written to the data RAM bus 125. The writing of particular addresses to the data RAM bus 125 is monitored by decoder 196 which is discussed in more detail in Ser. No. 07/583,508.
Turning to FIGS. 3a and 3b, a block diagram of the preferred general signal processor (GSP) 400 of the invention is seen. The GSP is coupled to a program RAM 150 via program RAM bus 155. Because the program RAM 150 is preferably shared by a plurality of GSPs 400, access to the program RAM bus is time division multiplexed as indicated in FIG. 2. The program RAM bus 155 is comprised of a data bus of width twenty-four bits, and an address bus of ten bit width where a 1K program RAM is utilized. Of course, if a larger program RAM is desired, additional bits are required to address the same, and the program RAM bus would be wider. As indicated in FIGS. 3a and 3b, the GSP 400 writes to the address section of the program RAM bus to indicate which instruction (RAM location) is desired. However, under ordinary operating conditions the GSP 400 is not capable of writing data to the program RAM 150. Under ordinary operating conditions, data is written into the program RAM 150 only via the host or access ports shown in FIG. 1 which are also coupled to the program RAM bus 155 in a time division multiplexed manner.
The GSP 400 is also coupled to the multiported data RAM 100 via a data RAM bus 125. Because the data RAM 100 is central to the processor architecture, and because non-arbitrated access to the data RAM 100 is desired, the data RAM 100 must either be a true multiported data RAM, or access to the data RAM 100 via the data RAM bus 125 must be time division multiplexed so as to effectively create a multiported RAM. The data RAM bus preferably comprises a data RAM address bus of sixteen bit width, an a data RAM data bus of twenty-four bit width. As indicated in FIGS. 3a, 3b and 4, the GSP may write to the address section of the program RAM 100. Also, the GSP may both read and write to the data section of the data RAM bus.
The GSP is substantially described by the details and functioning of six sections: a block controller 410; a program control logic block 420; a multiplier block 430; an ALU block 450; a flag block 460; and a data RAM address generator block 470. Coupling all six sections, as well as a break register 492, a data access register 494, and a temporary register 496 is an internal twenty-four bit bus 490. All access from any of the sections or from the registers 492, 494, or 496 onto the internal bus
490 is via tristate drivers 429, 449a, 449b, 459, 469, 489, and 499.
Block controller 410 is comprised of instruction decoder 412, and sequencer 414. The instruction decoder 412, when enabled, takes fourteen bits (nine bits of opcode, and five bits of operand) off of the data portion of the program RAM bus. Six of the nine opcode bits are used to indicate the operation (instruction) which the GSP is to perform (e.g. add, shift, jump, etc.), with up to sixty-four instructions being accommodated. In the preferred embodiment an additional three bits of opcode are utilized to specify the addressing mode the GSP is to use. In particular, in the "absolute" mode (code 000), the fifteen bits in the O register 472 of the address generator block 470 are used to select an address in the data RAM 100, and the data in that address of data RAM is used for the operation. In the "register" mode (code 001), the five operand bits obtained by the instruction decoder 412 are used to specify which register of the numerous registers of the GSP is to place its contents onto the internal bus 490. In the "immediate left" mode (code 010), the fifteen bits of data in the O register are to be put into the fifteen msb slots of the internal bus 490, while in the "immediate fight" mode (code 011), the fifteen bits are put into the fifteen lsb slots of the internal bus. In the remaining four modes, "BL indexed" (code 100), "B indexed" (code 101), "FL indexed" (code 110), and "F indexed" (code 111), as described in more detail hereinafter, values in base registers B or F are added to the value of the fifteen bit operand stored in the O register and, where appropriate, to the value in the L (loop) register, and are output onto the data RAM bus 125.
Instruction decoder 412 is not only coupled to the program RAM bus, but to the numerous multiplexers, tristate drivers, registers, etc. of the GSP via lines 416. Based on the instruction which is decoded by instruction decoder 412, various of those lines 416 are enabled in a sequence as determined by the sequencer 414. In effect, instruction decoder 412, and sequencer 414 are simply look-up charts, with instruction decoder 412 looking up which lines 416 must be enabled based on the code found in the nine bits of opcode, and sequencer 414 looking up the sequence to which the enabled lines must subscribe.
While instruction decoder 412 decodes whatever instruction is on the program RAM bus 155 when the GSP 400 is granted access to that bus, the instruction which is on the bus is generated and dictated by the program logic block 420. Program control logic block 420 is comprised of a tristate driver 422, a program address value register 424 (also called the "P" register), an incrementer 425, an increment (I) register 426, a jump (J) register 428, a multiplexer 430, and a branch logic block
432. The P register 424 contains the location of the program RAM 150 which contains the microinstructions which are to be used by the GSP 400. P register 424 writes that address onto the program RAM bus 155 by sending it to tristate driver 422 which acts as the bus interface.
Updating of the P register 424 is accomplished via muxP 430 which chooses one of the twelve bit addresses stored in the I register 426 or the J register 428 based on information from branch logic block 432. The address stored in the I register is simply the next numerical address after the address stored in the P register, as a value of one is added at incrementer 425 to the value stored in P register 424. In most situations, muxP 430 will permit the P register 424 to be updated by the I register, and the sequential addressing of the program RAM will continue. However, in some situations, such as where a jump in the routine is desired, the multiplexer 430 will permit the address in the J register 428 to be loaded into the P register
424. The decision to jump is made by the branch logic block 432 which reads the status of a plurality of status flags as is hereinafter discussed. The address to which the jump is made is obtained by the J reg 428 from the internal bus 490, which may obtain the address from any of the sections of the GSP 400 (or from the data RAM 100).
Coupled to the program control logic block 420 is a break register 492 in which upon the execution of a break instruction is loaded status flag information as well as the value of the P register plus one. The status flag and P register information is stored in the break register 492 which is coupled to internal bus 490 via tristate driver 429 because it is otherwise not available for placement on to the internal bus 490. A program break is typically executed when an information dump is desired by the system user, and is accomplished by putting an instruction in the program RAM 150 which causes the GSP 400 to write to a certain address (e.g. 0406H) of the data RAM 100. A decoder (not shown) on the data RAM bus 125 is used to determine that the program break is to be executed (based on the location to be written to), and a control signal is provided by the decoder to the break register 492. The program break instruction in the program RAM 150 causes instructions in a boot/break ROM 190 (shown in FIG. 1 ) which is coupled to the program RAM bus 155 to be accessed by the program control logic block 420. The instruction code in the boot/break ROM 190 in turn causes the values of each of the registers in the GSP 400 to be written into desired locations in the data RAM 100. Then the GSP 400 is kept waiting until the wait flag stored in its wait flag register (discussed below) is cleared. During the wait period, if desired, the user can change the values of data in the data RAM as described in more detail below with reference to the access port 900. Then, when the wait cycle is terminated, the instructions in the boot/break ROM 190 causes the values in the data RAM, including any new values, to be written back to their appropriate registers in the GSP. The location of the next desired microinstruction contained in a program RAM 150 location is loaded into the P register, so that the GSP can continue in its normal fashion.
The multiplier block 430 and the ALU block 450 of the GSP perform the numerical computations for the GSP. The multiplier block 430 is comprised of two input registers Xreg 432 and Yreg 434, a multiplexer 436 which is coupled to the internal bus
490 via tristate driver 449a, a multiplier 438 with a post Xreg 439, and a multiplier control 441, a summer 442, an output register Mreg 444, and a second multiplexer 446 which selects which of six words is to be output onto internal bus 490 via tristate driver 449b. Typically, the multiplicand is loaded into Xreg 432. Then the multiplier is loaded into Yreg 434 while the multiplicand is loaded into post Xreg 439. The multiplier control 441 permits the multiplier 438 to function over several machine clock cycles (e.g. three clock cycles totaling 300 nanoseconds=fifteen internal GSP cycles). If in multiplying, the multiplier overflows, a status flag M is set, and this information is conveyed to the branch logic block 432 of the program logic section
420. Regardless, the product of the multiplier and multipicand is forwarded to summer 442 which, in a multiply with accumulate mode, adds the new product to the sum of previous products and forwards the sum to the multiply register M 444. In a pure multiply mode, the contents of the summer are cleared so that the product is forwarded through the summer which adds zero and send the product to the M register.
The contents of the M register 444 are available to the internal bus 490. However, because the M register can accommodate a fifty-six bit word, and the internal bus 490 is a twenty-four bit bus, only a portion of the M register word may be placed on the bus at one time. Thus, multiplexer 446 is provided to either select the twenty-four least significant bits (lsb's) in the M register, the twenty-four next lsb's in the M register, or the eight most significant bits (msb's) in the M register. If the eight msb's are chosen, the eight msb's are placed in the eight lsb slots of the internal bus 490, and the msb of the eight bits is extended through to the msb slot on the bus (e.g. if the msb is a "1", the first seventeen msb's on the bus will be "1"). The multiplexer 446 is also capable of selecting a left shifted by two (zero filling the right) twenty-four or eight bit word. Thus, in all, multiplexer 446 can provide six different outputs based on the product in the M register 444.
The ALU block 450 of the processor is basically a standard ALU, having an arithmetic-logic unit 452 with input register 454, and an output accumulator register 456. The arithmetic-logic unit 452 is capable of the standard functions of similar units, such as adding, subtracting, etc., and produces values for Areg 456, as well as status flags including carry (C), overflow (O), sign bit (S), and zero (Z). The status flags are used by the branch logic block 432 of the program logic block 420 to determine whether a conditional jump in the microcode program should be executed. The Areg contents are output onto internal bus 490 via tristate driver 459.
Wait flag block 460 is comprised of two wait flag registers WFreg 462 and DFreg 464, a multiplexer 466, and OR gate 468. The bits of the wait flag registers may be set (i.e. written to) by data sent over the internal bus 490. Also, registers WFreg 462 and DFreg 464 are coupled to a flag bus 198 which is written to each time predetermined locations in the data RAM 125 are addressed as hereinbefore described with reference to FIGS. 2 and 13. In this manner, each bit of the wait flag registers
462 and 464 may be selectively cleared. When all of the bits in register WFreg 462 have been cleared due to the occurrences of specified events (e.g. the data RAM has received all the information which is required for another computation), OR gate 468
is used to provide a status flag W which indicates the same. Status flag W is read by the branch logic block 432. In this manner, "jump on wait flag" commands may be executed.
The DFreg 464 of the wait flag block 460 functions similarly to the the WFreg 462, except that no signals indicating the presence of all zeros (or ones) are output by the DFreg. In order to check the contents of the DFreg (or the WFreg, if all values in the WFreg are not zero), the register must be selected to put its contents on the internal bus 490. The selection of one of the registers is made by the instruction decode 412 and sequencer 414, and the contents are forwarded via multiplexer
466 and the tristate driver 469. An easy manner of determining whether the DFreg 464 has all zeros is to forward the contents of the DFreg 464 to the ALU 452, which will provide a status flag Z if the contents are zero.
The final large block of the general signal processor is the data RAM address generator block 470 which includes bus wide OR gate 471, registers Oreg 472, Dreg 473, Lreg 474, Breg 476, Freg 477, adders 481, 482, and 483, multiplexers muxBFL 484, muxL 485, muxA 486, muxBF 487, muxO 488, and an address access block 489. As previously indicated, the Oreg 472 obtains the fifteen least significant bits of the instruction on the program RAM bus. If "absolute" addressing is desired, i.e. the address to be written onto the data RAM bus is included in the program RAM microinstruction itself, the address is written into the Oreg 472, and then forwarded to the data RAM bus (a sixteenth bit having been added by a zero extender, not shown) via muxA 486
and the address access block 489. The sixteen bit address is then placed on the data RAM bus at the appropriate time. All other situations constitute "indexed" addressing, where the address to be put out on the data RAM bus is generated internally by the data RAM address generator block 470.
Addresses are generated by adding the values in the various registers. In particular, and as indicated in FIG. 4, the Oreg 472 is the offset register, the Dreg 473 is a decrement register, the Lreg 474 is a loop register which sets the length of a loop, the Breg 476 is a base address register, and the Freg 477 is a frame address register which acts as a second base address register. The O register obtains its data off of the program RAM bus, while registers D, L, B and F obtain their data from the internal bus 490. If it is desired to add some offset value to the value in the base or frame register (i.e. the "B indexed mode" or "F indexed mode") in order to generate an address, muxBF 487 selects appropriately the Breg 476 or the Freg 477, muxBFL 484 selects the value coming from muxBF 487, and the Breg or Freg value is added to the offset value of the Oreg by the adder 483. That value is then selected by muxA 486 for output over the data RAM bus via the address access block 489. Similarly, if it is desired to add some offset value and some loop value to the value in the base or frame register (i.e. the "BL indexed mode" or the "FL indexed mode "), the value in the L register is added to the value in the B or F registers at adder
482, and the sum is passed via muxBFL 484 to adder 483 which adds the value to the value in the O register.
By providing adder 481, and by coupling the decrement register Dreg and the loop register Lreg to the adder 481, registers an address loop is effectuated. In particular, the Lreg sets the length of the loop, while the Dreg sets the value by which the loop is decremented. Each time the Dreg is subtracted from the Lreg 475 at adder 481, the new value is fed back into the Lreg 475 via muxL 485. Thus, each time a DJNE instruction is executed (as discussed below), the resulting value in the Lreg is decreased by the value of the Dreg. If added to the Breg or Freg, by adder 482, the address generated is a sequentially decrementing address where the value in the Dreg is positive, and a sequentially incrementing address where the value in the Dreg is negative.
The ability to loop is utilized not only to provide a decrementing (or incrementing) address for the data RAM bus, but is also utilized to effect changes in the program RAM address generation by providing a "decrement and jump on not equal" (DJNE) ability. The output from the adder 481 is read by OR gate 471 which provides a status flag L (loop) to branch logic block 432. The status flag L maintains its value until the L register has looped around enough times to be decremented to the value zero. Before that point, when the Lreg is not zero, the next instruction of the GSP is dictated by the instruction indicated by the Jreg 428. In other words, the program jumps to the location of the Jreg instruction instead of continuing with the next instruction located in the I register. However, when the Lreg does decrement to the value zero, the OR gate 471 goes low and toggles flag L. On the next DJNE instruction, since the "not equal" state does not exist (i.e. the Lreg is zero), branch logic 432 causes muxP 430 of the program logic block 420 to return to obtaining values from the Ireg 426 instead of from the Jreg 428, and the program continues.
The values of any of the O, D, L, B, or F registers may be placed on the internal bus 490, by having muxO 488 (and where appropriate mux BF 487) select the appropriate register and forward its contents via tristate driver 489 to the internal bus.
Coupled to the internal bus 490, and interfacing the internal bus 490 with the data slots on the data RAM bus is the data access port 494. The data access port 494 is capable of reading data from and writing data to the data RAM and is given access to the data RAM in a time division multiplexed manner as previously described. In writing to the data RAM, the data access port 494 and the address access port 489 are activated simultaneously. In reading data from the RAM, the address access port 489 first places on the data RAM bus the data RAM address in which the desired data is stored. The data is then placed on the data RAM bus by the data RAM, and the data access port 494 which is essentially a dual tri-state driver, receives the data and passes it onto the internal bus 490 for storage in the desired GSP register.
If desired, additional registers such as Z register 496 may also be coupled to the internal bus 490, and may be used as temporary storage. The contents of Zreg 496 are output onto the internal bus 490 via tristate driver 499.
Details of the functioning of the GSP as well as example microcode may be seen with reference to previously incorporated U.S. Ser. No. 07/525,977.
Turning to FIGS. 4a, 4b, and 4c, block diagrams of the input and output circuitry of the data flow manager (DFM) 600 of the invention, and an example FIFO related to the DFM are seen. As previously described, the DFM serves the important function of handling the flow of data into and out of the processor apparatus so that GSPs of the processor apparatus need not be interrupted in their processing tasks. In accomplishing this function, the DFM takes data received by the serial port from the "world" outside of the particular processor apparatus and organizes it inside a FIFO such as the FIFO of FIG. 4c which is implemented in desired locations of the data RAM 100 of the SPROC apparatus 10. Also, the DFM 600 takes data in a FIFO, and organizes it for output to a serial output port of the SPROC apparatus. The DFM is also capable of directing data into a FIFO and drawing data from a FIFO at desired speeds so as to accommodate a decimation operation performed by the SPROC. Further, the DFM causes decoder 196 to write flags to the flag bus 198 (and hence to the GSPs 400) of the SPROC apparatus 10 regarding the status of the buffers.
The DFM 600 of the SPROC apparatus may either be central to the apparatus, or distributed among the serial input and output ports 700 of the apparatus, with a single DFM serving each port 700. Where distributed, the circuitry seen in block diagram form in FIGS. 4a and 4b is duplicated for each serial input and output port 700 of the SPROC apparatus, although certain circuitry could be common if desired.
The circuitry for receiving data from a serial port and organizing it for storage in a FIFO of the data RAM 100 is seen in FIG. 4a. The data flow itself is simple, with the data being sent from the serial port 700, via multiplexer 611 and tri-state driver 613 to the data slots of the data RAM bus 125. Multiplexer 611 permits either data coming from serial port 700a or data generated as hereinafter described to be forwarded to driver 613. Driver 613 is controlled as indicated such that data is only output on the data RAM bus 125 when the DFM 600 is enabled by the system-wide multiplexer clock scheme. The organization of the data for output onto the data RAM bus as a twenty-four bit word is conducted by the serial port 700, as hereinafter described.
Besides the data flow circuitry, each DFM is arranged with buffers, counters, gates, etc. to generate data RAM FIFO addresses for the incoming data. As shown in FIG. 4a, the DFM 600 has three registers 620, 622, 624, three counters 630, 632, and
634 associated with the three registers, an adder 636, a divide by two block 637, a multiplexer 638, seven logic gates 641, 642, 643, 644, 645, 646, and 647 (gates 642, 643, 645, and 647 being bus wide gates), and two delay blocks 648 and 649. The three registers are respectively: the start of FIFO register 620 which stores the start location in the data RAM for the FIFO to be addressed by the particular serial port coupled to the particular part of the DFM; the index length register 622 which stores the number of buffers which comprise the FIFO (for the FIFO of FIG. 4c, the index length register would be set at four), and the buffer length register 624 which stores the length of each buffer, i.e. the number of words that may be stored in each buffer (for the FIFO of FIG. 4c, the buffer length register would be set at eight). When a data word (twenty-four bits) is ready for sending to the data RAM for storage in a FIFO, the serial port 700a provides a ready signal which is used as a first input to AND gate 641. The second input to AND gate 641 is a data enable signal which is the time division multiplexed signal which permits the DFM to place a word on the data RAM bus. With the data enable and ready signals high, a high signal is output from the AND gate which causes driver 613 to output the data on the data RAM bus along with an address. The address is that which is computed by the twelve bit adder 636, or a prewired address, as will be described hereinafter.
When AND gate 641 provides a high output, the high output is delayed by delay blocks 648 and 649 before being input into clock counters 630 and 634. As a result, counters 630 and 634 increase their counts after an address has been output on the data RAM bus. When counter 630 increases its count, its count is added by the twelve bit adder 636 to the FIFO start location stored in register 620. If selected by multiplexer 638, the generated address will be the next address output in the address slots of the data RAM bus in conjunction with the data provided by driver 613. Thus, as data words continue to be sent by the serial port for storing in the data RAM FIFO, they are sent to incremental addresses of the data RAM, as the counter 630
increasingly sends a higher value which is being added to the FIFO start location. As is hereinafter discussed, the counter 630 continues to increase its count until a clear counter signal is received from circuitry associated with the index length register 622. When the clear counter signal is received, the counter starts counting again from zero.
As aforementioned, each time the AND gate 641 provides a high output, the counter 634 associated with the buffer length register 624 is also incremented (after delay). The outputs of the buffer length register 624 and its associated counter 634
are provided to bus wide XNOR gate 643 which compares the values. When the counter 634 reaches the value stored in the buffer length register 624, a buffer in the data RAM FIFO has been filed. As a result, the output of XNOR gate 643 goes high, causing three input OR gate 644 to pass a high signal to the reset of counter 634. The high signal from bus wide XNOR gate 643 is also fed to the counter 632 associated with the index length register 622, to the multiplexer 638, and to the multiplexer 611. As a result of the buffer being filled, multiplexer 638 enables the prewired address to be placed in the address slots of the data RAM bus 125, along with one of two predetermined (or generated) data words which are generated as discussed below. The placement of the prewired address and a data word on the bus at the end of buffer signal occurs upon the next data enable signal received by the DFM, which is before another word is assembled by the serial port 700a for sending to the data RAM 100. Also, the placement of the prewired address and data word is used for signalling purposes, as a decoder 196 (seen in FIG. 1) monitors the data RAM bus 125 for the particular prewired addresses of the DFMs; the triggering of these addresses occurring because of conditions in the DFM, i.e. the filling of buffers. The decoder 196 in turn, can set a flag (the setting of the flag can be dependent on the value of the data accompanying the prewired address) on the trigger bus 198 which signals the GSPs
400 of the SPROC of the occurrence. In this manner, the GSPs 400 can determine that the data required to conduct an operation is available to the GSP, thereby causing the GSP to exit a wait loop.
The predetermined or generated data word placed on the bus after a FIFO buffer has been filled preferably uses a "1" as the msb of the data word if the FIFO buffer that has been filled causes the FIFO to be half filled (as described hereinafter), or a "0" as the msb otherwise. The remainder of the data word may be null information. Or, if desired, the data word may include the next location to which the DFM will write (i.e. the location computed by the twelve bit adder 636) which is inserted in appropriate locations of the data word. This predetermined or generated data word is then passed via multiplier 611 to driver 613 which places the data word on the bus at the same time the prewired address is placed on the data RAM bus 125.
As aforementioned, when an indication of a full buffer is output by bus wide XNOR gate 643, counter 632 is incremented. Counter 632 therefore tracks the number of the buffer in the FIFO that is being falled. When the number of the FIFO buffer being addressed (as determined by counter 632) is half of the FIFO length (as determined by the length stored in register 622, divided by divide by two block 637), a flag is raised by the DFM via the bus wide XNOR gate 647. The "mid buffer" flag indicates that the buffer in the FIFO being written to is halfway through the FIFO. Hence, if all previous buffers in the FIFO are still full with data, the FIFO is half full. In addition, the mid buffer flag causes the generated data input to multiplexer 611 to be changed, such that the msb of the data is a "1" instead of a zero. Thus, upon filling the buffer which causes the FIFO to be half filled, a slightly differently coded data word is placed in the data slots of the data RAM bus.
When the value of counter 632 is incremented to the value stored in the index length register 622, the last location in the FIFO has been addressed. Accordingly, it is desirable to recirculate; i.e. to continue by addressing the first location in the FIFO. With the value of counter 632 equal to the value of register 622, bus wide XNOR gate 645 provides a high signal which is passed through three input OR gate 646. As a result, counters 630, 632, and 634 are reset. As indicated in FIG. 4a, a "clear counter" signal may also be generated by a power up reset (PUR) signal which is generated by applying a signal to a predetermined pin (not shown) of the SPROC, and by a SYNC signal which is generated by writing to address 0405H of the data RAM
100. The SYNC signal permits different DFMs to be synchronized to each other.
If desired, the input section of one DFM can be synchronized to the output section of the same or another DFM. This synchronization is accomplished via a pin (not shown) on the SPROC which generates the "en buf" input into OR gate 644. In turn, OR gate 644 provides a high signal which resets counter 634 in synchronization with the resetting of a similar counter in a DFM output section such as described with reference to FIG. 4b.
Turning to FIG. 4b, the serial output section of the DFM 600 is seen. The function of the output section of the DFM is to take data in the FIFO, and organize it for output to a serial output port 700b of the SPROC apparatus.
The output section of the DFM is preferably comprised of several registers and counters, logic elements including AND gates, comparators, and inverters, divide and add blocks, flip-flops, a buffer and a parallel to serial converter. Basically, the data flow through the serial output section of the DFM is simple. An address generated by the the start address register 652 is added by adder 654 to the value in the offset counter 656, and that address is output onto the address section of the data RAM bus. The data RAM receives the address information and then places the data located at that data RAM address on the data RAM bus. That data is received by the DFM and latched and stored in buffer 694 prior to being forwarded to the serial output port 700b.
The remaining circuitry of FIG. 4b serves the functions of not permitting the data to be forwarded to the serial output port 700b unless certain conditions (i.e. triggers) are met, as well as generating synch pulses and error flags depending on internal logic and received signals. In particular, each DFM has a wait register 660 which holds flag information which must be cleared in the wait flag register 662 before a signal will be generated. The bits in the wait flag register are only cleared upon receipt of appropriate trigger bits received from the trigger bus 198. When the appropriate flags are cleared, bus wide NOR gate 664 resets the wait flag register 662 by permitting it to be reloaded from wait register 660. The NOR gate 664 also passes the signal on to divide by N (N=0, 1, . . . , n) block. Upon the divide by N block 666 receiving N pulses from NOR gate 664, it outputs a pulse to AND gate 668. If N is one, no clock decimation occurs. However, if N is greater than one, decimation is effected; i.e. the clock is reduced to match the decimation of data which occurred in the GSP. If the other input to AND gate 668, is also high (which occurs when the DFM is running as hereinafter described), a pulse is sent to offset counter 656 which increases its count. In this manner the address output by adder 654 is changed to the next address. Likewise, when the output of AND gate 668 is high, a pulse is sent to the serial output port 700b which outputs a data signal from the DFM, and to the sample counter 684 which increases its count.
The DFM also includes a IE (initiation/error) register 661 which supplies the flag data which must be cleared by the trigger bits to the LF flag register 663. The outputs from IE flag register 663 are fed to bus wide NOR gate 665 which is used in a feedback manner to reset the IE flag register 663 so that it can be reloaded by IE register 661. The output from bus wide NOR gate 665 is also sent as the clock input into a D type flip-flop 667. The data (D) input into the D type flip-flop 667
should be the msb (bit twenty-three) of the data word being input into the DFM's data RAM buffer by the input side of the DFM, which is arranged to be a value "1" only when the word is being taken from the half-full location of the data RAM buffer. The value of the msb input to the D input, is then clocked over to the Q output of the flip-flop which is forwarded as the first of two inputs to each of two AND gates 670 and 672. As will be discussed hereinafter, AND gate 670 is used to set an error flag. AND gate 672, on the other hand, is used to set block 675 which is used to indicate the state of the DFM (i.e. is it presently running). If the DFM is presently causing data to be read from the data RAM and output via the DFM to a serial port, the DFM is in the running mode, and the output from block 675 is already high. As a result, inverter 676 provides a low signal to AND gate 672 which is not affected by the output from flip-flop 667. On the other hand, if the DFM is not running, the output from block 675 is low, and inverter 676 provides a high value to AND gate 672. Thus, if flip-flop 667 provides a low signal (which will happen until the buffer in the data RAM for the DFM has received enough data to be half full), the DFM will not start running. On the other hand, if flip-flop 667 provides a high signal indicating that the data RAM has now been filled halfway, block 675 changes its output and the DFM starts running.
It should be noted that when the DFM is not running, the high output from inverter 676 is forwarded via OR gate 677 to the clearing input of offset counter 656, thereby causing the address count to be generated by adder 654 to be initialized upon start-up of the DFM.
As aforementioned, AND gate 670 is used to set an error flag. Thus, if D type flip-flop 667 provides a high output while the DFM is running (as indicated by the output from block 675), AND gate 670 passes a high value to AND gate 698, which in turn will generate an error flag if other criteria are met, as hereinafter described.
The remaining blocks of the DFM output section include a FIFO length register 680, a buffer length register 682, a sample counter 684, a divide by two block 685, comparators 686 and 687, a bus wide OR gate 689, and a set/reset block 690. The FIFO length register 682 stores the full length of the FIFO. When the value of the offset counter 656 is equal to the FIFO length stored in buffer 680, a sync pulse is generated by bus wide XNOR gate 686 which is used to synchronize the incoming data signal into an input section of a DFM with the outgoing data signal from the described output DFM. The sync pulse generated is received by the input section of the DFM (seen in FIG. 4a) as the signal enbuf1, previously described. In addition the sync pulse may be used to reinitialize the DFM by clearing the offset counter 656 and reloading the registers. When the value in the offset counter 656 is equal to one-half the value of the FIFO length register 680 (as determined by divide by two block 685), comparator 687 provides a pulse to set/reset block 690 which is indicative of the fact that the address placed on the data RAM bus is the address half-way through the data RAM buffer associated with the particular DFM. When the data RAM address is the half-full address, the data being written into the data RAM buffer should not be written into the half-full address (i.e. there should never exist a situation where the address is being written to and read from at the same time). Thus, if D type flip-flop 667 provides a high signal to AND gate 670 while the DFM is running, and the output from set/reset block 690 is also, high, AND gate 698 provides a high output which sets an error flag for the DFM.
Finally, with respect to the output side of the DFM, the buffer length register 682 stores a value equal to the length of each buffer in the data RAM FIFO associated with the DFM. The sample counter 684 is a down counter which is preloaded with the buffer length stored in register 682. When a high pulse is received from XNOR gate 687 (i.e. the offset counter is half of the FIFO length), RS flip-flop 690 is set and the down counter of sample counter 684 is enabled. Each time sample counter 684
receives a pulse from AND gate 668, the count is decremented. When the sample count goes to zero, the RS flip-flop 690 is reset. However, while the RS flip-flop 690 is set and outputs a high pulse to AND gate 698, the DFM is looking for an error. If before being reset a high msb value is seen by flip-flop 667, the DFM is apparently attempting to read and write to the same buffer location at the same time. As a result, AND gate 698 provides a high signal which sets an error flag for the DFM.
Turning to FIG. 4c, an example of a FIFO associated with the DFM is seen. The FIFOs associated with DFMs are contained in a preferably predetermined portion of the data RAM of the processor apparatus. The FIFO of FIG. 4c, as shown contains four buffers. Also as shown, each buffer contains storage for eight data samples. Thus, as shown, the FIFO of FIG. 4c has storage for thirty-two data samples. Of course, a FIFO can contain a different number of buffers, and the buffers can store different numbers of data samples. The size of the each FIFO associated with a DFM and the size of its buffers is either set automatically by intelligent software which calculates the requirements of the particular DFM, or by the user of the processor system during initial programming of the processor system.
Turning to FIG. 5a, a block diagram of the serial input port 700a of the invention is seen. The basic function of the serial input port is to receive any of many forms of serial data and to convert the received serial data into parallel data synchronous with the internals of the SPROC and suitable for receipt by the DFM 600 and for transfer onto the data RAM bus 125. To accomplish the basic function, the serial input port has a logic block 710, a data accumulation register 720, and a latched buffer 730. The logic block 710 and the data register 720 are governed by seven bits of information programmed into the serial input port 700a upon configuration during boot-up of the SPROC 10. The seven bits are defined as follows:
______________________________________ dw1 dw0 ______________________________________ 0 dw0 0 0 24 bits data width 1 dw1 0 1 16 bits data width 1 0 12 bits data width 1 1 8 bits data width 2 High: msb first Low: lsb first 3 High: short strobe Low: long strobe 4 High: gated clock Low: continuous clock 5 High: internal clock Low: external clock 6 High: output port Low: input port ______________________________________
Bits 0, 1, and 2 are used to govern the logic block 710. If the incoming data is a twenty-four bit word, the logic block takes the bits in a bit by bit fashion and forwards them to the data accumulation register 720. If the incoming data is a sixteen bit, twelve bit, or eight bit word, the logic block takes the bits of the word in a bit by bit fashion and zero fills them to extend them into a twenty-four bit word. Which bit of the received serial data is forwarded into the msb slot of the register 720 is governed by control bit 2.
Once the data is properly accumulated in register 720, it is latched into buffer 730 where it is held until it can be forwarded through the input section of the DFM 600 for storage in the multiported RAM 100. The holding of the data in the buffer 730 until the appropriate signal is received effectively causes data which is asynchronous with the SPROC 10 to become synchronized within the SPROC system.
Bits 3, 4, and 5 governing logic block 710 are respectively used to control the type of strobe, the type of clock, and the location of clock control for the input port 700, all of which are necessary for the proper communication between the SPROC and an external device. Because port 700 preferably includes the circuitry of both an input port 700a and an output port 700b (described in more detail hereinafter), an extra bit (bit 6) is used to control the functioning of port 700 as one or the other.
The serial data output port 700b seen in FIG. 5b is similar to the data input port 700a in many ways, except that its function is the converse. The serial output port 700b includes a buffer 740, an parallel load shift register 750, and controlled multiplexers 760 and 770. The data to be written from the SPROC via the output port 700b is received by the buffer 740 from buffer 694 of the DFM 600. The twenty-four bits received are then loaded in parallel into the parallel load shift register 750 which functions as a parallel to serial converter. The twenty-four bits are then forwarded in a bit serial fashion via multiplexer 760 which receives the control signals dw0 and dw1, and via multiplexer 770 which receives the msb control signal to the transmit data line. Multiplexers 760 and 770 effectively transform the twenty-four bit word received by the parallel load shift register into the desired format for communication with a desired device external the SPROC. The twenty-four bits may be transformed into an eight bit word (e.g. the eight msb's), a twelve bit word, or a sixteen bit word (the eight lsb's being truncated), with either the lsb or the msb being transmitted first. A twenty-four bit word may similarly be sent lsb or msb first. Where the SPROC is communicating with another SPROC (i.e. output port 700b of one SPROC is communicating with the input port 700a of another SPROC), multiplexers 760 and 770 are preferably controlled to send a twenty-four bit word, msb first.
Turning to FIG. 6, details of the host port 800 are seen. Under most circumstances the host port 800 serves to interface the SPROC 10 with a host 180 (see FIG. 2), although where the SPROC 10 is a master SPROC which is in boot mode, host port
800 serves to interface the SPROC 10 with an EPROM and with any slave SPROCs which are part of the system. As indicated in FIG. 8, the host port 800 is coupled to the data RAM bus 125 as well as to the program RAM bus 155 on the SPROC side, while on the host side, the host port 800 is coupled to the host bus. The host bus includes three data sections D0-D7, D8-D15, and D16-D23, and three address sections A0-A11, S0-S3, and EA0-EA1. The remaining interfaces shown on the host side are pins (e.g. master/slave, reset, mode) which control the functioning of the SPROC 10 and the host port 800, and the read/write strobes for the host bus 165.
In slave mode (master/slave pin 801 set to slave mode), the SPROC 10 appears to other apparatus, including host microprocessors or DSPs as a RAM. Because it is desirable that the SPROC interface with as many different types processors as possible, the host port 800 is a bit parallel port and is arranged to interface with eight, sixteen, twenty-four, and thirty-two bit microprocessors and DSPs. The mode pins 802, 804, and 806 are used to inform the host port 800 as to whether the host processor is an eight, sixteen, twenty-four bit, or thirty-two bit processor, and whether the word being sent first is the most or least significant word.
For sending data from the host processor to the SPROC in slave mode, a data multiplexer 810, a data input register 812, and two drivers 815 and 817 are provided. The data multiplexer 810 receives three eight bit data inputs (D0-D7, D8-D15, and D16-D23) from the data bus section of host bus 165 and causes the data to be properly arranged in the data input register 812 according to the control of mode pins 802, 804, and 806. If the host processor is a thirty-two bit processor, the host port 800
of the SPROC takes two sixteen bit words and processes them in a manner described below with reference to a sixteen bit processor. Where the host processor is a twenty-four bit processor as indicated by mode pins 802 and 804, data is passed directly to the data input register 812 without adding bits or dividing bytes into segments. Where the host processor is a sixteen bit processor as indicated by mode pins 802 and 804, the host port takes sequentially takes two sixteen bits from two of the three eight bit data input lines (D0-D7, D8-D15, D16-D23), discards the eight lsb's of the least significant word, and uses the remaining bits to provide a twenty-four bit word to the data RAM bus 125 or the program RAM bus 155 of the SPROC. Where the host processor is an eight bit processor as indicated by mode pins 802 and 804, three eight bit bytes are received over the D0-D7 data input line and are concatenated in the data input register 812 in order to provide the SPROC with a twenty-four bit signal.
Regardless of how the data input register 812 is filled, after the data is assembled, the host port 800 awaits an enabling signal from the SPROC timing so that it can write its twenty-four bit word to the data RAM bus 125 via driver 817 or the program RAM bus 155 via driver 815. In this manner, the host port 800 synchronizes data to the SPROC 10 which was received in a manner asynchronous to the SPROC 10. The address to which the data is written is obtained from the twelve bit address section A0-A11 of the host bus 165. The twelve bit address is forwarded from host bus 165 to the address input register 820. When the host port 800 is enabled, if the address contained in the address input register 820 is indicative of a data RAM location, the address is placed via driver 822 on the sixteen bit address section of the data RAM bus 125. Because the address bus is a sixteen bit bus, while the address in address input register 820 is a twelve bit address, four zeros are added as the msbs of the address via driver 824 when the address and data are put on the data RAM bus. If the address contained in the address input register 820 is indicative of a program RAM location (address location 1K and below), the address is placed via driver 826 on the twelve bit address section of the program RAM bus 155.
In the slave mode, when the host processor wishes to read information from the SPROC, the host processor causes the read strobe to go low. The address received by the host port over address lines A0-A11 is read by the host port 800 and latched into the address input register 820. When the host port 800 is allowed access to the data or program RAM buses, the address is placed on the appropriate bus, and the twenty-four bit data word located at the data or program RAM address which was placed on the appropriate bus is read and latched either into the program data output register 832 or the output data register 834. That information is then forwarded via multiplexer 836 to data demultiplexer 840 arranges the twenty-four bits of information onto locations D0-D23 of the host bus 165. Demultiplexer 840 serves the opposite function of multiplexer 810. When sending data to the twenty-four bit host processor, the demultiplexer 840 simply takes its twenty-four bits and passes them unchanged. When sending data to a sixteen bit host processor, the SPROC 10 divides its twenty-four bit word into two sixteen bit words (with zero filling as appropriate). Similarly, when sending data to an eight bit host processor, the SPROC 10 divides its twenty-four bit word into three eight bit bytes.
In the master mode, on the "host" side of the host port 800 is located either an EPROM or one or more slave SPROCs. In the boot mode of master mode, data from the internal boot ROM 190 of the SPROC is written into the sixteen bit mode register
850 which is used to configure the internals of the host port 800. Then the GSP of the SPROC, which executes the program in the internal boot ROM, writes the sixteen bit addresses of the EPROM it wants to read in order to initialize the SPROC. Each address is received by the address output register 855 of the host port. The host port then sends a read strobe onto the host bus 165 and places via drivers 856 and 858 the address of the EPROM address it wishes to read. If the EPROM is an eight bit EPROM, the desired address is extended by extended address generator 860, and three read strobes are generated by the strobe generator 865 so that three eight bit bytes of the EPROM can be accessed. When the EPROM places its data onto the data locations of the host bus 165, that data is forwarded through data multiplexer 810, and is placed in a master mode receive register 867. The assembled twenty-four bit data word may then be read by the controlling GSP of the SPROC. After the word is read, the entire sequence repeats until all of the desired information stored in the EPROM is read into the SPROC.
Where the master SPROC is acting to boot up slave SPROCs as well as itself, the master SPROC follows the same boot-up procedure just described. However, upon the host port 800 receiving information in the master mode receive register 867 which is bound for a slave SPROC as determined from information previously obtained from the EPROM, the master SPROC causes that data to be written to the host bus 165 (via bus 125, GSP 400, bus 125 again, register 834 . . . as previously described) along with a sixteen bit address generated by the GSP 400 and sent to address output register 855 and then onto lines A0-A11, and S0-S3. In this manner, the data is forwarded to the appropriate SPROC so that it may be booted in a slave mode. It will be appreciated by those skilled in the art, that if the EPROM is wide enough to contain data and address information, that information can be written to host bus 165 and read directly by a slave SPROC or other device outside the memory space of the master SPROC.
Because external memories vary in speed, the host port 800 is provided with a wait state generator 870 which can lengthen the read or write strobe generated by strobe generator 865. The host port 800 is also provided with a host interface controller 880 which is essentially distributed circuitry which controls the internal timing of the host port 800.
A.1 Functional description of The Parallel Port
The parallel port (PPORT0) is a 24-bit asynchronous, bidirectional port with a 16-bit (64K) address bus. The port allows for 8-, 16-, or 24-bit parallel data transfers between the SPROC chip and an external controller, memory-mapped peripheral, or external memory. The port has programmable WAIT states to allow for slow memory access. A data acknowledge signal is also generated for this interface.
Two operating modes--master and slave--allow the SPROC chip to operate either as a system controller (master mode), or as a memory-mapped peripheral to an external controller (slave mode). An input pin, MASTER, is dedicated to setting master or slave mode operation. In master mode, the SPROC chip automatically up-loads its configuration program from an external 8-bit PROM into internal RAM, at the initiation of boot. In slave mode, the chip relies on an external controller for its configuration.
A system using multiple SPROC chips should have a single bus controller. This may be an external controller or a master SPROC chip. All other SPROC chips in the system should be configured in slave mode. The bus controller should individually enable the chip select input, CS, of each slave SPROC chip while the slave chip is being configured.
The 16-bit address field (ADDRESS[15:0]) supports up to 16 SPROC chips interconnected in the same system.
The external controller, memory-mapped peripheral, or memory may communicate with a SPROC chip in 8-, 16-, or 24-bit format. Format selection is accomplished with the MODE[2:0] pins. In 8- or 16-bit formats, the data may be most significant (msb) or least significant (lsb) byte or word first. In 16- and 24-bit modes, data is preferably always msb-justified within the word being transferred, and the lsb byte is zero-filled for 32-bit data transfer (i.e., in the second 16-bit word). To accommodate 8- and 16-bit modes, two extended address bits are included. These bits (EADDRESS[1:0]) are located at the lsb-end of the address bus. In master mode, these are driven output lines. In slave mode, they are configured as inputs and are driven by the external controller.
The following subsections describe data transfers via the parallel port for different sources and destinations. In all types of parallel port data transfers, signal values at the slave SPROC chip's mode (MODE[2:0]) and address (ADDRESS[15:0]) inputs must be stable before the chip select (CS) and read (RD), or chip select and write (WR) request goes LOW. At that time, the address is latched into the slave SPROC chip. Subsequently, after values on the data bus (DATA[23:0]) become valid, data is latched at the destination on the rising edge of the request.
To allow asynchronous communication with slow peripherals in master mode, the parallel port supports programmable WAIT states. In a preferred embodiment, a maximum of seven WAIT states are possible, where each state corresponds to one SPROC chip machine cycle, or five master clock pulses.
The parallel port also generates a handshaking signal, DTACK (data transfer acknowledge) in slave mode. This normally-HIGH signal goes LOW when the SPROC chip presents valid data in a read operation, or is ready to accept data in a write operation. DTACK is cleared when the external RD or WR strobe goes HIGH.
If enabled, a watchdog timer monitors all data transfers, and resets the parallel port if the transaction time is greater than 256 machine cycles.
A.2 Master SPROC Chip Read from Slave SPROC Chip or Peripheral
A master SPROC chip initiates a read operation from a memory-mapped peripheral or external memory by reading an off-chip memory location. Prior to initiating the READ, the master SPROC chip should set up the communication mode. This includes
8-, 16-, or 24-bit data select, msb/lsb byte order, and number of WAIT states required for the peripheral. The master's internal parallel port mode register controls these options, and therefore should have been previously written to. In master mode, three bits of the parallel port mode register determine number and order of bytes transferred and are output at pins MODE[2:0]. These pins should be connected to the corresponding slave SPROC chip pins, which function as inputs in slave mode, to ensure the slave's communication mode matches the master's.
After a read cycle is initiated by the master SPROC chip, no further read or write requests to the parallel port are possible until the current read cycle has been completed. The parallel port will set up a stable address and then drive the RD strobe LOW. The strobe will remain LOW for the number of WAIT states configured in the master's parallel port mode register, and will then be driven HIGH. The data resident on the data bus will be latched into the master SPROC chip on the rising edge of the RD strobe.
If the transmission mode is 8- or 16-bit format, the read cycle will be repeated with the next extended address output, as determined by the state of EADDRESS[1:0], until 24 bits of data have been received. The master's parallel port input register is then updated, and the read cycle is complete. The GSP in the master that initiated the read operation must then read the contents of the parallel port input register. With the read cycle completed, the data bus I/O drivers will be reconfigured as output drivers to prevent the data bus from floating. The address bus will be driven with the last address.
A.3 Master SPROC Chip Write to Slave SPROC Chip or Peripheral
A master SPROC chip initiates a write operation to a memory-mapped peripheral or external memory by writing to an off-chip memory location. Prior to initiating the WRITE, the master SPROC chip should set up the communication mode. This includes
8-, 16-, or 24-bit data select, msb/lsb byte order, and number of WAIT states required for the peripheral. The master's internal parallel port mode register controls these options, and therefore should have been previously written to. In master mode, three bits of the parallel port mode register determine number and order of bytes transferred and are output at pins MODE[2:0]. These pins should be connected to the corresponding slave SPROC chip pins, which function as inputs in this mode, to make the slave's communication mode match the master's.
After a write cycle is initiated by the master SPROC chip, in the preferred embodiment no further read or write requests to the parallel port are possible until the current write cycle is complete. The parallel port will output a stable address and then drive the WR strobe LOW. The strobe will remain LOW for the number of WAIT states configured in the master's parallel port mode register. Valid data will be setup on the data bus, and the WR strobe will be driven HIGH after the WAIT interval, latching the data into the slave SPROC chip or peripheral. If the interface is configured in 8- or 16-bit mode, the cycle will be repeated until all bytes have been output. After transmission of the last byte or word, the address bus and data bus will remain driven.
A.4 Read from Slave SPROC Chip by an External Controller
The external controller will set up address, extended address, and mode inputs, and drive the SPROC chip's chip select input LOW. (If the communication mode will never change, the SPROC chip's MODE[2:0] inputs could be tied to the appropriate logic levels.) The external controller will then drive RD LOW, which will latch the address, extended address (EADDRESS[1:0]), and mode inputs into the slave SPROC chip. The SPROC chip will asynchronously fetch data from the requested internal RAM location. Data will be latched into the external controller when it drives the RD line HIGH again. The controller must ensure that enough time has been given to the slave SPROC chip to fetch the data, given the asynchronous nature of the interface. Alternatively, the SPROC chip drives its normally-high DTACK (data transfer acknowledge) LOW after it has completed the READ, and the controller need only wait for this event before raising X XTO(RD). At that time, the SPROC chip would correspondingly raise DTACK.
If the interface is configured for 8- or 16-bit communication, the external controller must set up multiple extended addresses and RD strobes.
A.5 Write to Slave SPROC Chip by an External Controller
The external controller will set up address, extended address, and mode inputs, and drive the SPROC chip's chip select input LOW. (If the communication mode will never change, the SPROC chip's MODE[2:0] inputs could be tied to the appropriate logic levels.) The external controller will then drive WR LOW, which will latch the address, extended address, and mode inputs into the slave SPROC chip. When the controller returns WR to HIGH, the data present on the data bus will be latched into the SPROC chip.
If the interface is configured for 8- or 16-bit communication, the external controller must set up multiple extended addresses and WR strobes.
After the final byte or word has been transferred, the data will be asynchronously written to the requested address in SPROC chip RAM.
A.6 Data Transfer Modes
MODE[0] and MODE[1] determine the number of bytes transferred per RD/WR strobe. MODE[0] distinguishes between a partial word of 8- or 16-bits, and a full 24-bit word. MODE[1] distinguishes between the partial transfers of 8- and 16-bits. All data transfers are aligned with the least significant byte of the data bus. For 16- and 24-bit modes, the most significant byte is left-justified within the data word, with descending order of significance in lower order data bus bytes.
______________________________________ MODE[1] MODE[0] DATA ______________________________________ 0 0 8-bit 1 0 16-bit X 1 24-bit ______________________________________
______________________________________ MODE[2] BYTE/WORD ORDER ______________________________________ 0 msb first 1 lsb first ______________________________________
EADDRESS[1,0], the extended address, specifies which portion of the full 24-bit word is currently being output on the data bus for 8- and 16-bit modes:
______________________________________ EADDRESS[1] EADDRESS[0] BYTE ______________________________________ 8-BIT MODE, MODE[2]=0 0 0 msb 0 1 mid 1 0 lsb 1 1 unused (write) O byte (read) 8 BIT MODE, MODE[2]=1 0 O unused (write) 0
byte(read) 0 1 lsb 1 0 mid 1 1 msb ______________________________________
In receive data mode, the lower byte of the lsb 16-bit word is unused by the SPROC chip. Similarly, in transmit mode, the lower byte of the lsb 16-bit word is filled with zeros. All data is msb-justified. The word ordering for 16-bit data is determined by EADDRESS[1]:
______________________________________ EADDRESS[1] EADDRESS[0] WORD ______________________________________ 16 BIT MODE, MODE[2]=0 0 X msb 1 X lsb 16 BIT MODE, MODE[21]=1 0 X lsb 1 X msb ______________________________________
Data transfer in 8- and 16-bit modes is completed when the EADDRESS lines designate the final byte or word, namely, the lsb when MODE[2] is LOW, or the msb when MODE[2] is HIGH.
A.7 Boot Mode
A SPROC chip enters boot mode when it is configured as a master SPROC chip (its MASTER input is HIGH) and the reset input (RESET) executes a LOW to HIGH transition. During boot, the parallel port is set for 8-bit mode with the maximum number of WAIT states (seven). The master SPROC chip runs an internal program, stored in its control ROM, to upload its configuration from an external 8-bit EPROM into internal RAM. The master SPROC chip will then configure any slave SPROC chips present in the system. The EPROM will be selected by a HIGH on the master SPROC chip's chip select (CS) pin, which is an output in master mode. Slave SPROC chips or memory-mapped peripherals will be selected by a LOW at this signal. In master mode, the value of the CS output is controlled by a bit set in the transmit mode register, which is the second byte of the parallel port mode register.
A.8 Watchdog Timer
The parallel port incorporates a simple watchdog timer circuit to prevent any undesirable lockup states in the interface. In both master and slave modes, a read or a write flag is set (in the parallel port status register) on the initiation of a read or write operation. This flag is reset on a successful completion of the operation. If, for some reason, the host controller hangs-up in slave mode, or an invalid condition occurs in master mode, the watchdog timer will detect the situation and clear the interface flags, allowing the next operation to be accepted and executed. The watchdog timer is fixed at 256 machine cycles (1280 master clock cycles).
The watchdog timer is enabled by setting bit 16 of the parallel port mode register. SPROC reset will disable the watchdog timer. If the watchdog timer is triggered, a flag is set in the parallel port status register.
A.9 Multiple I/O Lockout
If the parallel port is performing a read or write operation in master mode, and a second write or read operation is initiated before the first I/O operation is completed, the second I/O request is locked out. A lockout flag is set in the parallel port status register.
A.10 Input/Output Flags and Lines
The RTS and GPIO signals can be used for communication protocols between master and slave SPROC chips. These signals could be used as data-ready signals, requests for data, or microprocessor interrupt requests.
RTS[3:0] (request to send) are four pins that function as inputs for a master SPROC chip and as outputs for a slave SPROC chip. The RTS signals of a slave SPROC can be individually set or cleared via the parallel port, as described below.
GP[3:0] are four general purpose pins that are individually configurable as either inputs or outputs. During reset, when RESET is LOW, all GPIO signals are set up as inputs. In addition to being subject to internal program control, the configuration of each GP pin, and the value of each GPIO signal configured as an output, are also individually controllable via the parallel pore
A.11 Parallel Port Registers
The parallel port utilizes five memory-mapped registers for status and control functions. The tables below list the registers and their bit definitions.
______________________________________ Parallel Port Registers REGISTER ADDRESS REGISTER NAME READ/WRITE ______________________________________ 4FB Lockout and watchdog flag write clear 4FC Parallel port status register read 4FD Parallel port input register read 4FE Parallel port GPIO/RTS write control register 4FF Parallel port mode register write ______________________________________ Parallel Port Register Bit Definitions BIT REGISTER 4FC REGISTER 4FE REGISTER 4FF ______________________________________ 0 GP[0] INPUT SETRTS[0]; RX MODE[0] 1 GP[1] INPUT SET RTS[1] RX MODE[1] 2 GP[2] INPUT SET RTS[2] RX MODE[2] 3 GP[3] INPUT SET RTS[3] RX WAIT STATES [0] 4 MODE[0] CLEAR RTS [0] RX WAIT STATES [1] 5 MODE[1] CLEAR RTS [1] RX WAIT STATES [2] 6 MODE[2] CLEAR RTS [2] RX STROBE DELAY 7 PARALLEL CLEAR RTS[3] PARALLEL PORT BUSY PORT SOFT FLAG RESET 8 LOCK OUT SET GPIO[0] CS (master mode FLAG only) 9 WATCHDOG SET GPIO[1] TX MODE[0] FLAG 10 READ FLAG SET GPIO[2] TX MODE[1] 11 WRITE FLAG SET GPIO[3] TX MODE[2] 12 RTS[0] INPUT CLEAR GPIO[0] TX WAIT STATES [0] 13 RTS[1] INPUT CLEAR GPIO[1] TX WAIT STATES [1] 14 RTS[2] INPUT CLEAR GPIO[2] TX WAIT STATES [2] 15 RTS[3] INPUT CLEAR GPIO[3] TX STROBE DELAY 16 N/A OUTPUT GPIO[0] WATCHDOG ENABLE 17 N/A OUTPUT GPIO[1] N/A 18 N/A OUTPUT GPIO[2] N/A 19 N/A OUTPUT GPIO[3] N/A 20 NA/ INPUT GPIO[0] N/A 21 N/A INPUT GPIO[1] N/A 22 N/A INPUT GPIO[2] N/A 23 N/A INPUT GPIO[3] N/A ______________________________________
The parallel port status register, a 16-bit register, contains signal values of selected SPROC chip pins and I/O status flags. This register is updated every machine cycle (5 master clock cycles). Bits 0 through 3 contain the current signal values at the GP pins, which could individually be configured either as inputs or outputs. Similarly, bits 12 through 15 contain the current values at the RTS pins, which are inputs for a master SPROC chip and outputs for a slave. Bits 4 through 6
contain the current value of the MODE configuration.
Parallel port status register bit 10 contains the read flag, which is set while the parallel port is performing a read operation. Similarly, bit 11 contains the write flag, which is set during a write operation. (For 8- and 16-bit modes, these flags remain set until the entire 24-bit data word has been transferred.)
Bit 7 is set while the parallel port is busy servicing an I/O transaction. Bit 8 is set if the parallel port is busy in master mode and another read or write request is received. The second request will be locked out and the lockout flag set. Bit 9 is set if the watchdog timer is enabled and it detects a timeout out condition. Bits 8 and 9 can only be cleared by a SPROC reset or any write to the lockout and watchdog flag clear register.
Any write to the Watchdog/Lockout Flag Clear Register clears watchdog and/or lockout flags set in the parallel port status register.
The parallel port input register, a 24-bit register, holds the data word received during a read operation for subsequent storage at the destination address. This register also buffers and assembles the incoming data for 8- and 16-bit modes. This register must be read by a GSP or the access port.
The parallel port GPIO/RTS Control register, a 24-bit register, is used to independently configure each GP pin as either an input or an output. It is also used to individually set and clear GP pins that are outputs, and slave SPROC chip RTS pins.
Each RTS or GPIO signal has a dedicated 15air of SET and CLEAR bits in the parallel port GPIO/RTS control register. SET and CLEAR bits for RTS signals are in the low byte; SET and CLEAR bits for GPIO signals are in the mid byte. LOW values written to both SET and CLEAR bits results in no change to the associated signal. A HIGH value at the SET bit sets the associated signal HIGH. A HIGH value at the CLEAR bit sets the associated signal LOW. If a HIGH value is written to both SET and CLEAR bits, the CLEAR dominates.
Each GPIO signal additionally has a dedicated pair of OUTPUT and INPUT bits in the high byte of the parallel port GPIO/RTS control register to configure the signal as either an output or an input. LOW values written to both OUTPUT and INPUT bits results in no change to the associated signal. A HIGH value at the OUTPUT bit configures the associated GPIO signal as an output. A HIGH value at the INPUT bit configures the associated GPIO signal as an input. If a HIGH value is written to both OUTPUT and INPUT bits, the INPUT dominates.
The master SPROC chip's parallel port mode register, a 16-bit register, controls the parallel port mode and timing.
When the master SPROC chip is reading from a slave SPROC chip or peripheral, bits 0 through 2 of the parallel port mode register (the RX MODE bits) are output at the master SPROC chip's MODE pins. Register bits 3 through 5 contain the number of WAIT states programmed for the read operation (i.e., they determine the duration of the read strobe LOW level generated by the master SPROC chip). The HIGH level between read strobes is 2 master clock cycles; this duration can be stretched to 5 master clock cycles for slower peripherals by setting bit 6 of the mode register (the RX strobe delay bit).
Similarly, when the master SPROC chip is writing to a slave SPROC chip or peripheral, bits 9 through 11 of the parallel port mode register (the TX MODE bits) are output at the master SPROC chip's MODE pins. Register bits 12 through 14 contain the number of WAIT states programmed for the write operation. The HIGH level between write strobes can be stretched for slower peripherals by setting bit 15 of the mode register (the TX strobe delay bit).
Bit 8 of the mode register is output at the master SPROC chip's CS pin. A soft reset of the parallel port, which resets the interface flags and RTS lines (but not the GPIO or MODE signals), can be initiated by setting bit 7 of this register.
__________________________________________________________________________ Parallel Port Signal Definitions SIGNAL TYPE* DESCRIPTION __________________________________________________________________________ ADDRESS[15:0] O(M) I(S) ADDRESS BUS BUSGRANT I BUS GRANT causes the SPROC chip to three-state the address and data buses, and MODE pins, when LOW. BUSY O PARALLEL PORT BUSY is set LOW when an I/O operation is occurring, set HIGH when completed. Also reset HIGH by watchdog timer if a timeout occurs. CRESET Tied LOW. CS O(M) I(S) CHIP SELECT signal. A slave SPROC chip is selected by setting its CS input LOW. A master SPROC chip generates this signal as an output, expecting to select a slave SPROC chip by setting CS LOW, and an external ROM (containing every slave SPROC chip's configuration) by setting it HIGH. DATA[23:0] I/O PARALLEL PORT DATA BUS--24-bit input/output/three-statable bidirectional bus. DTACK O DATA TRANSFER ACKNOWLEDGE. In slave mode, set LOW by SPROC chip after RD or WR has gone LOW and the SPROC chip has completed the data transfer, set HIGH after RD or WR line goes HIGH. This output is always HIGH for a master SPROC chip. EADDRESS[1:0] O(M) I(S) EXTENDED ADDRESS specifies which portion of the full 24-bit word is currently being transferred in 8- and 16-bit modes. GP[3:0] I/O GENERAL PURPOSE I/O lines, individually configurable as either input or output. Can be used to interface SPROC chips with each other or with an external controller as data-ready, microprocessor interrupt requests, etc. Controlled and configured by a write to parallel port GPIO/RTS control register. MASTER I MASTER causes SPROC chip to operate in master mode when HIGH, and in slave mode when LOW. MODE[2:0] O(M) I(S) MODE[0] differentiates between full 24-bit mode (HIGH) and partial (8- or 16-bit) modes (LOW). MODE[1] differentiates between 8-bit mode (HIGH) and 16-bit mode (LOW) for partial data transfers. MODE[2] specifies whether the first 8- or
16-bit transmission contains the lsb (HIGH) or the msb (LOW). RED Tied LOW. RD O(M) I(S) READ strobe generated by master SPROC chip or external controller. A LOW value on RD initiates a READ operation. RD must remain LOW long enough to successfully complete the READ; programmed WAIT states or DTACK handshaking may be utilized for this purpose. Data latches at the destination when RD returns HIGH. RESET I RESET must be held LOW for a minimum of 25 master clock cycles. after power and clock have stabilized. This input is a Schmitt trigger type which is suitable for use with an RC time constant to provide power-on reset. While RESET is LOW, a master mode SPROC chip will force address, extended address, and SPROC select address LOW, while driving CS, RD, and WR HIGH. Slave SPROC chips connected to the bus will then be deselected and have driven inputs. MODE[2:0] will be configured for 8-bit boot mode with msb byte first and zero WAIT states. The data bus will be driven. RTS[3:0] I(M) O(S) REQUEST TO SEND flags. These pins are outputs for slave SPROC chips and inputs for master SPROC chips. Can be used to interface slave with master or external controller as data-ready, microprocessor interrupt requests, etc. Controlled and configured by write to parallel port GPIO/RTS control register. WR O(M) I(S) WRITE strobe generated by master SPROC chip or external controller. A LOW value on WR initiates a WRITE operation. WR must remain LOW long enough to successfully complete the WRITE; programmed WAIT states or DTACK handshaking may be utilized for this purpose. Data latches at the destination when WR returns HIGH. __________________________________________________________________________ *(M) = master mode, (S) = slave mode, I = input, O = output
While the SPROC 10 aforedescribed with a data RAM 100, a program RAM 150, a boot ROM 190, GSPs 400, DFMs 600, serial ports 700, and a host port 800, is a powerful programmable signal processor in its own right, it is preferable that the SPROC be able to be programmed in a "user friendly" manner. Toward that end, a compiler system which permits a sketch and realize function is provided, as described more particularly with reference to FIG. 12. In addition, an access port 900 and a probe 1000
are provided as tools useful in the development mode of the SPROC device.
As aforementioned, the access port 900 permits the user to make changes to the program data stored in RAM 150, and/or changes to other data stored in data RAM 100 while the SPROC is operating. In other words, the access port 900 permits memory contents to be modified while the SPROC is running. In its preferred form, and as seen in FIG. 9, the access port 900 is comprised of a shift register 910, a buffer 920, a decoder 925, and a switch 930 on its input side, and a multiplexer 940 and a parallel load shift register 950 on its output side. On its input side, the access port 900 receives serial data as well as a clock and strobe signal from the development host computer. The data is arranged by the shift register 910 and stored in buffer 920 until the access port is granted time division access to the data RAM bus 125 or the program RAM bus 155. A determination as to which bus the data is to be written is made by decode block 925 which decodes the msbs of the address data stored in buffer 920. The decode block 925 in turn controls switch 930 which connects the buffer 920 to the appropriate bus. The msbs of the address data in the buffer 920 are indicative of which RAM for which the data is destined, as the data RAM and program RAM are given distinct address spaces, as previously described.
On the output side, data received via the program RAM bus 155 or the data RAM bus 125 is forwarded via demultiplexer 940 to a shift register 950. The shift register 950 effects a parallel to serial conversion of the data so that serial data may be output together with an appropriate strobe and according to an external clock to a development host computer or the like.
By providing the ability to write and read data to the program and data RAMs, the access port 900 has several uses. First, by writing to a particular location (e.g. 406, or 408-40b Hex) in the data RAM, a program break can be initiated. The contents of the various registers of the GSPs which are written into data RAM as a result of the break can than be read. This information is particularly important in the debugging process. Second, if desired, the contents of the registers of the GSPs (as store