Monday, August 31, 2009

PSoC a new way to design

Cypress's PSoC® Programmable System-on-Chip is the most complete solution for embedded systems, combining an 8-bit microcontroller, flash memory, and SRAM with customizable analog and digital blocks.

PSoC is a software configured, mixed-signal array with a built-in Microcontroller unit core. The core is a Cypress proprietary, 8bit harward design called the M8C. PSoC has three separate memory spaces: paged SRAM for data, flash memory for instructions and fixed data, and I/O Registers for controlling and accessing the configurable logic blocks and functions.
Here is a comparison table showing the major differences between PSoC ASIC and FPGA



PSoC ASIC
FPGA
Time to Market hours
years
hours
Design Complexity Very less
More
less compared to ASIC
Configuration can be changed during run time cannot be changed can be changed to some extend
Freq of operation Very less More Less comp to ASIC


The configuration is obtained by loading instructions from the built-in Flash memory in a PSoC whereas in an FPGA the configuration is loaded at the begining from an EEPROM into SRAM distributed memory as well as block memory.Also the FPGA uses some configurable logic blocks(CLBs).

PSoC most closely resembles a MCU in usage, where code is executed to interact with the user-specified peripheral functions (called "User Modules"), using automatically generated APIs and interrupt routines. The PSoC Designer IDE generates the startup configuration code and peripheral APIs automatically based upon the users selections in a visual-studio-like GUI.Cypress offers a visual, code-free embedded design tool for PSoC called PSoC Express. Using PSoC Express, most features of the PSoC can be accessed with drag and drop icons and logical expressions. The vishual design is compiled to executable code without exposing the user to the underlying converted code, though a visual design can be converted and used as a basis of a traditional code-based design in PSoC Designer. Visual design elements cover features such as temperature sensors, fan control, accelerometers, I2C master and slave protocols, USB virtual serial ports, capacitive sensors, and wireless 2.4 GHz radio communications.PSoC programmer is another software that is available in cypress.com that can be used to program the bitstream into the PSoC devices.
PSoC Designer
PSoC programmer
You have to register for getting the softwares and u can create cases for queries in cypress.com.

In a PSoC device the user defines What functions appears,When they appear and how !!!!!

Four Levels of Documentation
1)Technical ref manuals
2)User module datasheets (available with PSoC designer software)
3)Device datasheets
4)Project Config datasheets generated by the tool at the end of the design

Dynamic Reconfiguration
Dynamic reconfiguration is a similar kind of a thing like polymorphism in C++. One device performing different functions at different times. Multiple function sets operate on same hardware at different times in the same application. In this case we dynamically load the configuration at run time.
PSoC Applications
Voltage Monitoring,Airflow Sensing, Humidity Sensing, I2C, SPI, UART, CPU Reset, Temp Sensing, Pressure Sensing, Current Sensing, Accelerometers, Fan Control, USB devices etc are the typical applications where the PSoC can be used.

Sunday, August 23, 2009

What is rpm?Why rpm?How rpm ?and When rpm ?

What is rpm ?
It is a package file format or a software packaged in that format such as [softwarename.version.release.architechture].rpm. Originally developed by the Red Hat and it is used by most of the Red Hat based platforms like fedora.
Why rpm ?
-rpm repos contains thousands of free softwares [repos are places in web where the packages are stored and made available to public ]
-easy to install [rpm -i filename.rpm]
-easy to transport [easy to copy the single file instead of the scattered source ]
-easy to check integrity [we can easily check the integrity using the md5 ]
-a new version of the rpm file format drpm(Delta rpm) saves a lot of bandwidth while updating the system.
The major disadvantage is that the package cannot perform automatic dependency check.For that we have to use the package managers such as yum.
How rpm ?
Rpm files can be installed in a supporting platform by simply typing 2 commands in the shell.
take a shell
become the super user
$ su
goto the directory containing the rpm file
# rpm -ivh filename.rpm
for fresh installation of a package
# rpm -Uvh filename.rpm
for Updating a package
Done !!!!!
So this is how it looks simple other than compiling the whole code once.
When rpm ?
U may wonder why we need these thing if we have a yum package manager or yumex (gui for yum). Those are only useful when we have an high speed internet connection. Imagine a situation where we need 100 systems to be installed with a same set of packages and we have a damn slow net connection. One thing we can do is that , we can make the connection a high speed one. But imagine a situation where u can install the whole set of packages with in adownload time of one package. Will that make a difference ?
Yea it will
The solution is that download the packages using a yum package manager, which will automatically download the depedencies. What this yum does is that after installation this manager deletes the whole packages downloaded from the repos. So u cannot use it to install the software in another system. Copy the rpm files before it deletes ,thats the solution.
The downloaded rpm files are stored in the folder /var/cache/yum/
there will be two directories, in case of fedora it will be fedora and update
either copy these folders after the downloading of packes by the yum is complete.
Or kill the yum process by Ctrl -C or kill using kill -9 pid of yum ,then copy the files
Next step is that we can use the yum to install the packages or we can use the rpm command to install the files
Installation using the yum in another machine.
Copy the files to the same /var/cache/yum/ directory using the cp -rfu command which will update copy the files
then give the command yum -y install package names given in the system where u have downloaded the packages
Installation using the rpm command in another machine
Copy the files to any directory . Go to that directory in shell then
goto the updates/packages directory
give command
# rpm -Uvh *
then goto the fedora/packages directory
give the command
#rpm -ivh *

Done !!!!!!!!!!!!!
In case it is showing any dependency problem u have to download the corresponding package.
If dependencies are more go with the first method.