Friday, May 18, 2012

Getting started FPGA board design

This summer i am working with Dr Kota Solomon Raju, Senior Scientist at CEERI, Pilani and my classmate Kunal Kedar on FPGA board design. The aim would be develop a complete understanding of what is required to make a stand alone FPGA system , which can be further used to some application which needs custom peripherals to be interfaced.

We are going to design it for Virtex 5 series . We are currently looking at only 2 packages FF1136 and FF1760. We will be using a Virtex 5 AFX FF1136 Proto board to test the design .

The first task was to understand the pins of the FPGA. Unlike other Integrated circuits , all the data about the FPGA cannot be put into one document . So Xilinx provide different documents addressing different users and aspects . The pin information document is what we are looking at. First we have created a simplified layout of pins considering the similarities of the io banks. It cannot be understood in a single , one needs to do two to three iteration to draw a optimal and meaningful pinout .

Tuesday, April 3, 2012

Need to Standardize Simulation Reference Manual



In this age of information, we lack what i call it as 'common interface' to the knowledge and knowledge about the developed tools.

My idea is why don't we have a Standardized way simulators are documented .

Out of many such great tools made by humans one is simulation by computer programs . they help us study without breaking our heads setting up for experiments .Being an electronics engineering student , I understand the necessity as they might cost you billions :P.

Most of the research , I feel first goes into modelling a system/material/whatever . This opens up the scope for all the other people with brilliant ideas to come in. And this new things (invention/discovery) catches fire .. all the researchers around the world come up with possible applications in their respective domains. Hence , the world progresses much faster.

[This blog is mainly inspired from Professor N.N.Sharma , his lecture on simulation and modelling behavior of materials/physics in micro-domain ]

If one looks at the history , the universities/research groups would publish a model. And these publications can only be understood by researchers who were working in that field.

If somebody wonders how these models look like ? Then they are not beautiful at all, like our (super)models :P . In fact ,they might be some long differential equations of some 8-9 order . Too complicated for anyone to solve these models on paper.

With the increase in production of computers , these things became a bit easier . But still ,some one had to teach (program) those stupid computer :P.

Now we have fast but still stupid computers . In the mean time we have developed some good platforms (Java,.NET,) and graphics etc.. . We were all equipped to make simulators , which did all the number crunching without users knowledge. Doors were open for guys from other disciplines to try-out somethings that their techniques. Still, most of the simulators would return some numbers , hence required some knowledge of programming was essential to use it efficiently.

Approaching this age of interdisciplinary research , mostly due to saturation in the core disciplines . Simulators have played a very important role in pacing up the research.

As industries saw potential and took interest in simulation softwares . We have landed into a world where we have 3D graphics , animation , math solvers ,etc .. all integrated into simulators. Now , people think simulators are the only ones which can show some graphical output , which includes some of out faculty members .

This is not it . We have 3D graphics , fine . Good interface , fine . We have all the features can be simulated , great . But , I have worked so hard to understand the previous simulator why would I switch to something else , and why is it necessarily so different ? I look at the getting started tutorials trying to relate what my old simulator had ? When i go through the Help and documentation , the layout seems to be completely different, takes a whole lot of time to figure out where to look for ?

My idea is why don't we have a Standardized way simulators are documented .

There are lot of open source groups who have standardized their documentation , so that they could increase readability , as they get contribution for lot of people around the world and any body should understand it . If a person understands the basic way how to look up a reference maual / user-manual , he should be able to switch to the new ones faster .

Attempts are being made by companies to provide special manuals for smooth transition from others products to theirs , but all these can be saved, if this happens .

Thursday, December 8, 2011

Change Gmail back to old look

I lost few of my hairs looking for the ' revert to old look temporarily ' button. So I thought this would help people get back their lives (old Gmail).

Its basically confusing which gear (setting) to choose. If you choose the usual top-right , then you are on the wrong way. This page has 2 settings button. One on the corner of the page and one just beside the mail navigation keys. The latter is the one you are looking for.



Saturday, November 12, 2011

Time taken to execute the c program

I was executing a C code which was a loop of 65535. It was basically , a program which was testing the outputs for all possible values and hence can say, testing the algorithm.

I used the gcc compiler to compile the c code. When i executed the code it took a good 5-6 secs to complete the execution. But now we all know the command prompt window could display only a few hundred recent lines . So i decided to print the output to a text document using the
a.exe > sample.txt
command. To my astonishment , the code was executed in less than a sec. All this could only inspire me to check out ' how could i know the clock cycles required to execute the program.

it took some google searches to know that clock() is the function i was looking for which is in the header file time.h .

here is the glimpse of the program.

#include
main()
{
long int i;
clock_t clk;
// write your code here
for (i=0;i<10000;i++)
{
printf("%ld",i);
}
//say your code ends here

clk = clock(); // clock fuction give the clock cycles elapsed since the start of the program
printf("the no of clock cycles required to execute the is %ld",clk );

}

clock_t is long integer type of data type defined in sys/types.h
the function clock() returns a value of type clock_t so we need to declare a variable of this type .


P.S. : the clock cycles taken by the program would differ based on the other processes running on your system. one should keep in mind that , it does not give the time taken by your code to execute if it is the only process running. But it gives the time taken in the current complexity of the processing environment.

Thursday, September 8, 2011

15 min Alarm part3

This is the 'relative time' based reminder. it will play a song every 5 mins , one can always change the time . The time specified is in seconds and cannot exceed 999 secs.

REM File name: Reminder.bat
REM Description: this is a Batch file that plays a song every 5 mins.
REM one can change the time by changing the number of secs which is here as '300' in the CHOICE statement.
REM The song can be specified in place of "D:\dwnlds\AIRTEL.wav"
:again
echo off
CHOICE /n /C 12 /d 1 /t 300
if errorlevel == 1 goto sing
if errorlevel == 2 goto sing

:sing
start "C:\Program Files\Windows Media Player\wmplayer.exe" "D:\dwnlds\AIRTEL.wav"

15 min Alarm part2

So , here i am with the code. Rather i have two. I have one which is based in 'absolute times' using the system clock and the other is based on 'relative time'.

This is the code for the 'absolute time' based reminder. Reminds at 10,20,30,40,50 and 00 minutes on the clock.

REM File name: Reminder.bat
REM Description: this is a Batch file that plays a song every 10 mins.
REM The song can be specified in place of "D:\dwnlds\AIRTEL.wav"
:again
@echo off
REM Takes the system time
set t=%time%
REM t2 = seconds
set t2=%t:~6,2%
REM t1 = minutes
set t1=%t:~3,2%
REM One can specify at what minutes do you want a reminder
if %t1%==00 goto alarm
if %t1%==10 goto alarm
if %t1%==20 goto alarm
if %t1%==30 goto alarm
if %t1%==40 goto alarm
if %t1%==50 goto alarm

REM provides a delay of 1 sec.
CHOICE /n /C 12 /d 1 /t 1
cls
if errorlevel == 1 goto again
if errorlevel == 2 goto again


:alarm
if %t2%==30 goto sing
cls
goto again


:sing
REM can provide the link to the desired media player like VLC,etc.
REM provide the link to the compatible audio file .
start "C:\Program Files\Windows Media Player\wmplayer.exe" "D:\dwnlds\AIRTEL.wav"

REM provides a delay of 1 minute.
CHOICE /n /C 12 /d 1 /t 60
cls
if errorlevel == 1 goto again
if errorlevel == 2 goto again
goto again

Wednesday, August 24, 2011

15 min Alarm part1

Inspiration:
When i set myself up for surfing on internet, i usually tend to sway away form what i originally intended. Moreover, i exceed the time limit i had decided upon. One of my friends, made a periodic alarm for himself to get more focused on his job. I really don't know weather it is available already or not. But the happiness of running your own code is definitely more satisfying than anything else.

the reason to choose to make a batch file is that
- i wanted it to be in an un-compiled form so that one can adjust it as and when required .
- one can open on a double click.
- it should not be very complicated.

I will put up the code in my next blog..