Component - Digital Comparator V1.0

®
PSoC Creator™ Component Datasheet
Digital Comparator
1.0
Features
 1 to 32 bit Configurable Digital Comparator.
 Six selectable comparison operators.
General Description
The Digital Comparator component provides a selectable-width, selectable-type comparator,
implemented in PLD macrocells.
When to Use a Digital Comparator
Use the Digital Comparator when the digital values of two signals need to be compared.
Input/Output Connections
This section describes the various input and output connections for the Digital Comparator.
a – Input
The a input is the first operand of the comparison.
b – Input
The b input is the second operand of the comparison.
cmp – Output
The result of the comparison.
Cypress Semiconductor Corporation • 198 Champion Court • San Jose, CA 95134-1709 • 408-943-2600
Document Number: 001-84891 Rev. **
Revised November 28, 2012
Digital Comparator
®
PSoC Creator™ Component Datasheet
Component Parameters
Drag a Digital Comparator onto your design and double-click it to open the Configure dialog.
The Digital Comparator provides the following parameters.
CmpType
This parameter determines the type of comparison to perform. The value must be one of [=, ¹, <,
£, >, ³]. The default is =.
Width
This parameter defines the width of the a and b terminals. The value must be between 1 and 32.
The default is 8.
Functional Description
The Digital Comparator performs the selected comparison on the a and b input. If the
comparison evaluates to true, the cmp output goes high, otherwise it goes low. Figure 1 shows
the truth table for a Digital Comparator of width=2, configured with different comparison types.
Page 2 of 4
Document Number: 001-84891 Rev. **
®
PSoC Creator™ Component Datasheet
Digital Comparator
Figure 1: 2-bit Digital Comparator Truth Table
Input
CmpType
a1
a0
b1
b0
=
¹
<
£
>
³
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
0
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
1
1
1
1
0
1
1
1
0
0
1
1
0
1
1
1
0
0
0
0
1
0
0
0
1
1
0
0
1
0
0
0
1
0
0
0
1
1
0
0
1
1
1
0
1
1
1
1
Resources
The Digital Comparator is implemented with logic expressions and synthesized to macrocells in
the UDB array. Macrocell usage is dependent on optimizations performed during synthesis.
Table 1 provides an estimate of the resource usage for different sizes and different
configurations of the Digital Comparator. Resource usage for “¹” should be comparable to the
estimates provided for the “=” cmpType, and resource usage for “³”, “<”, and “£” should be
comparable to the estimates provided for the “<” cmpType.
Table 1. Resource Usage
Resource Type
Configuration
Datapath
Cells
Macrocells
Status
Cells
Control
Cells
DMA
Channels
Interrupts
4-bit, cmpType:“=”
–
1
–
–
–
–
4-bit, cmpType:“<”
–
2
–
–
–
–
8-bit, cmpType:“=”
–
3
–
–
–
–
8-bit, cmpType:“<”
–
6
–
–
–
–
16-bit, cmpType:“=”
–
7
–
–
–
–
16-bit, cmpType:“<”
–
12
–
–
–
–
24-bit, cmpType:“=”
–
10
–
–
–
–
24-bit, cmpType:“<”
–
17
–
–
–
–
Document Number: 001-84891 Rev. **
Page 3 of 4
®
Digital Comparator
PSoC Creator™ Component Datasheet
Resource Type
Configuration
Datapath
Cells
Macrocells
Status
Cells
Control
Cells
DMA
Channels
Interrupts
32-bit, cmpType:“=”
–
13
–
–
–
–
32-bit, cmpType:“<”
–
24
–
–
–
–
MISRA Compliance
This section describes the MISRA-C:2004 compliance and deviations for the component. There
are two types of deviations defined: project deviations – deviations that are applicable for all
PSoC Creator components and specific deviations – deviations that are applicable only for this
component. This section provides information on component specific deviations. The project
deviations are described in the MISRA Compliance section of the System Reference Guide
along with information on the MISRA compliance verification environment.
The Digital Comparator component does not have any C source code APIs.
Component Changes
Version 1.0 is the first release of the Digital Comparator Component.
© Cypress Semiconductor Corporation, 2010-2012. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the
use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to
be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its
products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress
products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
PSoC® Creator™, Programmable System-on-Chip™, and PSoC Express™ are trademarks and PSoC® is a registered trademark of Cypress Semiconductor Corp. All other trademarks or
registered trademarks referenced herein are property of the respective corporations.
Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and
foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in
conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as
specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein.
Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in lifesupport systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application
implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
Page 4 of 4
Document Number: 001-84891 Rev. **
Similar pages