Apparatus for serial port with pattern generation using state machine for controlling the removing of start and stop bits from serial bit data stream
AssigneeInternational Business Machines Corporation
InventorsDonna Wiltsey Aebli, James Norris Dieffenderfer
Life of this patent
Estimating the term…
Abstract
A serial port having a pattern generation mode and a microprocessor using same. The serial port uses a transmit circuit controlled by a state machine which determines whether start and stop bits are transmitted by a computer implemented method. In pattern generation mode, start and stop bits are not transmitted, and the serial port lends itself to transmitting pulse width modulation data. In one embodiment, the serial port is used in a microprocessor which includes a central processing unit (CPU) and a bus interface unit.
Claims11
A transmit circuit for a serial port with a pattern generation mode, the transmit circuit comprising:
- an enable terminal;
- a frame control terminal;
- an output terminal;
- a transmit buffer for storing un-framed data to be transmitted;
- frame determination logic connected to the frame control terminal and the transmit buffer, the frame determination logic for determining a data frame to be transmitted;
- a transmit shift register for storing a frame to be transmitted;
- a transmit multiplexer disposed between the frame determination logic and the transmit shift register, the transmit multiplexer receiving as inputs an output from the shift register and an output from the frame determination logic;
- bit determination logic disposed between the shift register and a latch, the bit determination logic for determining a next bit to be transmitted;
- and
- a state machine connected to the transmit multiplexer, the frame determination logic, the transmit shift register and the bit determination logic, the state machine controlling the data flow from the transmit buffer to the latch so that start and stop bits can be removed from the data and the beginning and ending of frames can be monitored in a pattern generation mode.
A microprocessor having a serial port with pattern generation mode, the microprocessor comprising:
- bus interfaces;
- a serial interface;
- a central processing unit (CPU) for performing computations and controlling data flow;
- a bus interface unit disposed between the CPU and the bus interfaces;
- and
- a serial port disposed between the bus interface unit and the serial interface, the serial port having a transmit circuit further including:
- an enable terminal;
- a frame control terminal;
- an output terminal;
- a transmit buffer for storing un-framed data to be transmitted;
- frame determination logic connected to the frame control terminal and the transmit buffer, the frame determination logic for determining a data frame to be transmitted;
- a transmit shift register for storing a frame to be transmitted;
- a transmit multiplexer disposed between the frame determination logic and the transmit shift register, the transmit multiplexer receiving as inputs an output from the shift register and an output from the frame determination logic;
- bit determination logic disposed between the shift register and a latch, the bit determination logic for determining a next bit to be transmitted;
- and
- a state machine connected to the transmit multiplexer, the frame determination logic, the transmit shift register and the bit determination logic, the state machine controlling the data flow from the transmit buffer to the latch so that start and stop bits can be removed from the data and the beginning and ending of frames can be monitored in a pattern generation mode.
A computer implemented method of operating a serial port with a pattern generation mode, the method comprising the steps of:
- initializing the serial port;
- waiting for data to be written to a transmit buffer;
- loading data from the transmit buffer to a shift register;
- determining if the pattern generation mode of the serial port is enabled;
- if the pattern generation mode of the serial port is enabled, setting a first bit to transmit to be a bit after a start bit;
- if the pattern generation mode of the serial port is enabled, loading a count into a transmit counter, so that the transmit counter does not count a stop bit;
- transmitting a bit;
- decrementing the transmit counter;
- shifting the shift register;
- determining if a transmit count is equal to zero;
- and
- if the transmit count is not equal to zero, transmitting a bit.
Dependencies are inferred from the claim text.