Saturday, November 29, 2008

Synchronous Counter Code for Xilinx FPGA

Verilog Code

module countersync(reset, Q, clock);
input reset;
input clock;
output [3:0]Q;
reg[3:0]Q;

always @ (posedge clock)
if(!rst)Q<=0; else Q<=Q+1; endmodule


Testbench Code

module testbench;
reg reset,clock;
wire [7:0]Q;
parameter STEP=60;


// Instantiate the module
countersync instance_name (
.reset(reset),
.Q(Q),
.clock(clock)
);

always#(STEP/2)clk=~clk;
initial begin
clock=1;reset=0;#(STEP-10);
reset=1;#(STEP*20);
$stop;
end
endmodule

Run Commands

We can run any program by typing code in Run window. To go to Run window Start > Run or (Ctrl+R) then type your code for desired program.

Accessibility controls - access.cpl
Accessibility wizard - accwiz
Add Hardware wizard - hdwwiz.cpl
Add/Remove programs - appwiz.cpl
Administrative Tools - control admintools
Automatic Update - wuaucpl.cpl
BlueTooth File Transfer wizard - fsquirt
Calculator - calc
Certificate - certmgr.msc
Character Map - charmap
Check Disk - chkdsk
Clipboard Viewer - clipbrd
Command Promt - cmd
Componant Service - dcomcnfg
Computer Management - compmgmt.msc
Control Panel - control
User Accounts - control userpasswords2
Date and Times - timedate.cpl
D.D.E shares - ddeshare
Device Manager - devmgmt.msc
DirectX - dxdiag
Disk Clean up - cleanmgr
Disk Defragment - dfrg.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart
Display Properties - control desktop
Display propertied - desk.cpl
Dr. Wattson for Windows - drwtsn32
Driver Verification Manager - verifier
Event Viewer - eventvwr.msc
File and Settings transfer tool - migwiz
File signeture verification tool - sigverif
Find fast - findfast.cpl
Folder properties - control folders
Fonts - control fonts
Fonts - fonts
Game controlls - joy.cpl
Group Policy - gpedit.msc
Help and Support - helpctr
HyperTerminal - hypertrm
I.Express wizard - iexpress
Indexing Service - ciadv.msc
Internet Connection wizard - icwconn1
Internet Explorer - iexplorer
Internet Property - inetcpl.cpl
keyboard - controls keyboard
Local security settings - secpol.msc
Local Users And group - lusrmgr.msc
Logoff - logoff
Microsoft chat - winchart
Microsoft Movie maker - moviemk
Paint - mspaint
Microsoft Sincronization tool - mobsync

(will be finish soon)

FSM Code for Xilinx FPGA

Verilog Code (for sequence 0010)

module sequence(x, clock, reset, y, Q);
input x;
input clock;
input reset;
output y;
reg y;
output [2:0]Q;

parameter start=3'b000;
parameter got0=3'b001, got00=3'b010, got001=3'b011, got0010=3'b101;
reg[2:0]Q; //state variable
reg[2:0]D;

//next state logic
always @(x or Q)
begin
case (Q)
start: D=x ? start:got0;
got0: D=x ? start:got00;
got00: D=x ? got001:got0;
got001: D=x ? start:got0010;
got0010: D=x ? start:got00;
default: D=3'bxxx;
endcase
end

always @ (posedge clock)
begin
if(reset)
Q=D;
else
Q=0;
end

//output logic
always @ (Q)
y=Q[2];
endmodule


Testbench Code

module testbench;
reg x;
reg clock;
reg reset;
wire y;
wire [2:0]Q;

// Instantiate the module
sequence instance_name (
.x(x),
.clock(clock),
.reset(reset),
.y(y),
.Q(Q)
);

always #100
clock=~clock;

//input data bit
initial begin
clock=1; x=0; reset=0; #200
x=0; reset=0; #200
x=0; reset=0; #200
x=1; reset=0; #200
x=0; #200
x=0; #200
x=1; #200
x=0; #200
x=0; #200
x=1; #200
x=0; #200
$stop;
end
endmodule

8-bit Shift Register Code for Xilinx FPGA

Verilog Code

module shiftres(w, clock, Q);

input w;
input clock;
output [1:8]Q;
reg [1:8]Q;

always @(posedge clock) //Shift Resistor logic start
begin
Q[8]<=w; // Value of w count as Q[8]
Q[7]<=Q[8]; //Value shifted from Q[8] to Q[7]
Q[6]<=Q[7]; //Value shifted from Q[7] to Q[6]
Q[5]<=Q[6]; //Value shifted from Q[6] to Q[5]
Q[4]<=Q[5]; //Value shifted from Q[5] to Q[4]
Q[3]<=Q[4]; //Value shifted from Q[4] to Q[3]
Q[2]<=Q[3]; //Value shifted from Q[3] to Q[2]
Q[1]<=Q[2]; //Value shifted from Q[2] to Q[1]
end
endmodule


Testbench Code


module testbench;
reg w, clock;
wire [1:8]Q;

// Instantiate the module
shiftres instance_name (
.w(w),
.clock(clock),
.Q(Q)
);

always#100
clock=~clock;
initial begin
clock=1; w=1; #200
w=0; #200
w=1; #200
w=0; #200
w=0; #200
w=1; #200
w=1; #200
w=0; #200
$stop;
end
endmodule

4-bit Parallel Full Adder Code for Xilinx FPGA

Verilog code

module fulladder(x0, x1, x2, x3,cin,c, y0, y1, y2, y3, s0, s1, s2, s3);
input x0, x1, x2, x3; //Four bit input X
input y0, y1, y2, y3; //Four bit input Y
input cin; //Carry input
output c; //Carry output
output s0,s1,s2,s3; //Sum output

wire s10,s20,s30,s40,c10,c11,c0,c20,c21,c1,c30,c31,c2,c40,c41; //Intermediate nodes

xor V1(s10,x0,y0); // x0 xor y0 = s10
xor V2(s0,s10,cin); // s10 xor cin = s0
and V3(c10,x0,y0); // x0 and y0 = c10
and V4(c11,s10,cin); // s10 and cin = c11
or V5(c0,c10,c11); // c10 or c11 = c0

xor V6(s20,x1,y1);
xor V7(s1,s20,c0);
and V8(c20,x1,y1);
and V9(c21,s20,c0);
or V10(c1,c20,c21);

xor V11(s30,x2,y2);
xor V12(s2,s30,c1);
and V13(c30,x2,y2);
and V14(c31,s30,c1);
or V15(c2,c30,c31);

xor V16(s40,x3,y3);
xor V17(s3,s40,c2);
and V18(c40,x3,y3);
and V19(c41,s40,c2);
or V20(c,c40,c41);

endmodule


Testbench code

`timescale 1ns/1ns
module testbench;
reg x0, x1, x2, x3, x0, x1, x2, x3, cin; // Inputs
wire c,s0,s1,s2,s3; // Outputs


// Instantiate the module
fulladder instance_name (
.x0(x0),
.x1(x1),
.x2(x2),
.x3(x3),
.y0(y0),
.y1(y1),
.y2(y2),
.y3(y3),
.cin(cin),
.c(c),
.s0(s0),
.s1(s1),
.s2(s2),
.s3(s3)
);

initial begin

x0=0; x1=0; x2=1; x3=1; y0=1; y1=1; y2=0; y3=0; cin=0; #250;
x0=1; x1=0; x2=0; x3=0; y0=0; y1=0; y2=1; y3=0; cin=1; #250;
x0=1; x1=1; x2=1; x3=1; y0=1; y1=0; y2=1; y3=1; cin=1; #250;
x0=1; x1=0; x2=0; x3=1; y0=0; y1=1; y2=0; y3=0; cin=1; #250;
$stop;
end
endmodule

Monday, November 17, 2008

Samsung Code


  1. *2767*JAVA# Java Reset and (Deletes all Java Midlets) For example : *2767*JAVA# would be keyed in as *2767*5282#
  2. *2767*MEDIA# Reset Media (Deletes All Sounds and Pics)
  3. *2767*WAP# Wap Reset
  4. *2767*CUST# Reset Custom EEPR0M
  5. *2767*FULL# Reset Full EEPR0M (Caution)
  6. *#06# IMEI code
  7. *#9998*4357# Help Menu
  8. *#9998*5282# Java menu (GRPS/CSD settings for JAVA server)
  9. *#9999#0# Monitor Mode
  10. *#9999# or *#9998*9999# Software Version
  11. *#8888# or *#9998*8888# Hardware Version
  12. *#9998*746# or *#9998*0746# or *#0746# Sim Infos
  13. *#9998*523# or *#9998*0523# or *#0523# Display Contrast
  14. *#9998*842# or *#9998*0842# or *#0842# Vibration On (until you push OK)
  15. *#9998*289# or *#9998*0289# or *#0289# Buzzer On (until you push OK)
  16. *#9998*288# or *#9998*0288# or *#0288# Battery & Field Infos
  17. *#9998*377# or *#9998*0377# Error log
  18. *#9998*778# or *#9998*0778# or *#0778# Sim Service table
  19. *#9998*782# show date and alarm clock
  20. *#8999*638# show network information
  21. *#9998*5646# change operator logo at startup
  22. *#9998*76# production number
  23. *#9998*968# view melody for alarm
  24. *#9998*585# Non-Volatile Memory (NVM)
  25. *#3243948# Digital Audio Interference Off
  26. *#32436837# Digital Audio Interference On

Unlock Your Memory Card (Nokia s60)

If you have forgotten your password of your memory card of Nokia s60 hand set and you have important data in that memory card then just follow the instruction to unlock the memory card:
You can unlock your memory card using two diffent ways--

For Nokia s60 1st and 2nd edition phones:
-> First Install FExplorer in your phone memory.
-> Go to drive C:\system on your phone
-> You will find a file called mmcstore
-> Copy that file (mmcstore) to your PC
-> Rename it as mmcstore.txt
-> Open it in notepad
-> At the end of the file you will find your password.

For Nokia S60 3rd Phones, Nokia N-Series and Nokia E-Series:
There is almost no way yet to hack the memory card password in case of these types of phone but there is a way to do it some of the s60 3rd edition phones and almost all the E-series phones.
The remote lock option in E-Series phone allws you to unlock your phone by sending a sms. The only thing you have to do is to activate this feature by going to Tools > Settings > Security > Phone and SIM > Allow remote lock menu. The password of your memory card will be your remote lock message.
So you have to just send a sms containing your remote lock message that will automatically change your memory card passsword.

Sunday, November 16, 2008

Nokia Codes (For Symbian OS) - 1

1. *# 06 # IMEI indicates
2. *# 0000 # SW version announcement
3. *# 2820 # Bluetooth device address indicate.
4. xx # Directory quick access (xx=storagestorage location and afterwards lozenge e.g. 24 #)
5. A/from key Short pressing for menu for switching between profiles
6. Menu key Long pressing for "task manager" - switching between active programs (with "C" key programs can be terminated.)
7. Menu quick access Over in the menu e.g. to point 3.1 arrive simply 31 enter (if the third symbol a file is opened is for these and then in it started the first Programm/Icon).
8. Autostart go around When switching on of the Handys on to the pin inquiry the key "ABC" (pin) comes the whole time keeps pressed - this is to ignore (allegedly) the autoinitialization programs.
9. # Do not switch between different lines (AS)... goes e.g. with Austrian ONE Handys (see nose cunning).
10. 12345 ... is according to standard set the Nokia nokia-Sicherheitscode.
11. 0000 ... is according to standard those (with Vodafone windshield frame section) set 2te pin and that standard net code/passwordWith D1 the standard net code is the last 4 numbers of the card number without HLR e.g. 99999234-5/55 - > 2345
12. 0 - for a long time press If one the "0" in the main menue for a long time presses those homepage of the standard WAP connection is called.

Enable or Disable CD/DVD autorun

If you want to disable or enable autorun option of CD/DVD in your windows operating system then follow the instructions:

1. Editing Registry Editor:
Click Start > Run then type regedit and press enter. Now go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom from the regestry editor. Then double click to Autorun from the right window. Change its value. Put 0 to disable autorun and 1 to enable autorun. Click Ok and restart computer.

2. Making Registry Entry File:
To Disable autorun of CD/DVD open notepad and write the following code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom]
"AutoRun"=dword:00000000

Then save it as DisableAutorun.reg. Now close the file and double click on it and click Yes and then Ok from the dialogue box. Now restart the computer.

To enable autorun of CD open notepad and write the following code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom]
"AutoRun"=dword:00000001
Save it as EnableAutorun.reg and close notepad. Now double click on it and click Yes > Ok from the dialogue box. Now restart the computer.

Hide your Folder

Right click to the folder that you want to hide and select Properties. From the Customize tab Click Change Icon. Select 51 number Icon that will find at 12th column of %SystemRoot%\system32\SHELL32.dll. Then select Ok > Ok. Rename the folder and type Alt+0160 and press enter. You will see that your folder is vanished. Change the views as List. To open press Ctrl+A, a little highlighted shadow will appear over the hiden forder. Double click to open.