用CY7C63723設計的鼠標固件程序
chip.c - include file that defines CY7C63723 constants
- combi.c - main source file
- combi.hex - Intel hex file for programming a CY7C63723 microcontroller
- combi.lst - output listing from c-compiler for use with the CYDB debugger
- macros.h - defines macros used in combi.c
- ps2defs.h - defines PS/2 interface constants
- usb_desc.h - defines the USB descriptors
- usbdefs.h - defines USB interface constants
Project file for MS Visual C++ 6.0.
Requires GLUT DLL (www.opengl.org)
Adjust program constants in Landscape.h and Utility.cpp.
MAPS:
Default map is read from HeghtXXX.raw where XXX is the MAP_SIZE
(as defined in Landscape.h). If this map is not found, the program
attempts to open "Map.ved", a Tread Marks map file. Tread Marks maps
will only work for MAP_SIZE == 1024. Also, the MULT_SCALE to view
Tread Marks maps correctly is "0.25f". (www.TreadMarks.com)
* CONSTRAINTS
* This module does not handle data which is considered out of range by the
* application(i.e. fixed constants which represent error condition)
*
* Maximum weight value must be limited to 128 to prevent an overflow
* condition during the calculation.
*
* The internal data type must be large enough to handle the calculations.
* The maximum possible internal value
* = Max Input Value * (weight - 1) + Max Input Value
* If a maximum weight of 128 is used, the internal data type should be 2
* times the size of the input data type.
This design package includes reference materials for creating a
USB - PS/2 combination mouse that auto-detects the interface and
configures itself to operate on the appropriate bus.
Documentation
docs - Designing a low cost CY7C63723 combination mouse.pdf - application note for this design
- schematic.pdf - mouse schematic
Firmware Source Files
src - chip.c - include file that defines CY7C63723 constants
- combi.c - main source file
- combi.hex - Intel hex file for programming a CY7C63723 microcontroller
- combi.lst - output listing from c-compiler for use with the CYDB debugger
- macros.h - defines macros used in combi.c
- ps2defs.h - defines PS/2 interface constants
- usb_desc.h - defines the USB descriptors
- usbdefs.h - defines USB interface constants
Verilog HDL: Magnitude
For a vector (a,b), the magnitude representation is the following:
A common approach to implementing these arithmetic functions is to use the Coordinate Rotation Digital Computer (CORDIC) algorithm. The CORDIC algorithm calculates the trigonometric functions of sine, cosine, magnitude, and phase using an iterative process. It is made up of a series of micro-rotations of the vector by a set of predetermined constants, which are powers of two. Using binary arithmetic, this algorithm essentially replaces multipliers with shift and add operations. In a Stratix™ device, it is possible to calculate some of these arithmetic functions directly, without having to implement the CORDIC algorithm.
To increase simulation speed, ModelSim® can apply a variety of optimizations to your design. These include, but are not limited to, mergingprocesses, pulling constants out of loops, clock suppression, and signal collapsing. You control the level of optimization by specifying certain switches when you invoke the compiler.
Swarm intelligence algorithms are based on natural
behaviors. Particle swarm optimization (PSO) is a
stochastic search and optimization tool. Changes in the
PSO parameters, namely the inertia weight and the
cognitive and social acceleration constants, affect the
performance of the search process. This paper presents a
novel method to dynamically change the values of these
parameters during the search. Adaptive critic design
(ACD) has been applied for dynamically changing the
values of the PSO parameters.