Friday, 11 December 2015

Recover your lost file after Notepad ++ crash or Notepad++ not working.

What if your notepad++ crash while you are updating your file or doing something on notepad++ and suddenly you got error message and  after restart notepad++ you see the file is empty!!!!!!!! I am sure it will make you crazy and your mind will running like electricity ,may be you will loss temper on notepad++.This thing happens with me ones during working on my project. Luckily we have solution if this thing happens to you gain. You can recover your file and its content.

Step 1. When Notepad++ crash

You are updating your file, suddenly following screen appears on your window
source code editor has stopped working. i.e notepad ++ crash !!!.after pressing "Closing the program"
your notepad++ will restart .After restart you will notice you file as blank. Your Mind Also will be BLANK!!!!!!!

Then do not close the notepad++ or not change any things.

Step 2. Locate the file in Notepad++ Cache

Here is simple shortcut to locate the local copy of the file.system always make path for heaven so find it in cache.

Press WinKey+R . Now in run textbox enter the path below.


Step 3.Create backup of the cache file

After pressing OK button of run window it will open other window like below.Now in backup folder all your edited files present . And Supersonically you will fill safe and Heaven.!!!!!!!!!!!!!!
Locate and copy the file  for backup copy the file on desktop .
After creating backup ,you can restart your Notepad++ (GNU) .

Step 4. Recover the file.

After open backup folder you will see below window in which you will see your last edited file.Open those file using notepad++ or with notepad++.It will open your lost data.

So  next time if notepad crashes while uploading then keep these steps in mind.

Now Be Relex and Carry on your work.Be Happy.

Wednesday, 9 December 2015

Useful Keyboard shortcut for Eclipse

Eclipse Shortcuts

F3                              Jumps to include file or variable declaration/definition.

Alt+← / Alt+→        Navigate through my source to back and forward.

Ctrl+Space               Content assist which proposes methods/member variables and more based on                                                              my typing.

Ctrl+3                      Quick Access let me go to views, perspectives and more

Ctrl+M                     Maximizes the current view or editor. Press Ctrl+M again and it goes back to                                                                   the previous size.

Ctrl+Shift+/             Insert block comment, remove it again with Ctrl+Shift+\

Ctrl+Shift+T           Open an element with wildcard support.

Ctrl+F7                   Switch to next view. Pressing again Ctrl+F7 let you iterate to the next view.

Ctrl+Shift+F7         for previous view.

Ctrl+Alt+h              Opens the call hierarchy.

Ctrl-O                      Open the Quick Outline View.

Ctrl+L                      Jump to Line Number. To hide/show line numbers, press ctrl+F10 and select                                                                  'Show Line Numbers'

Ctrl+F10, then n      Show or hide line numbers

Ctrl+Shift+P            With a bracket selected: jump to the matching closing or opening bracket

Ctrl+↓/Ctrl+↑          Scroll Editor without changing cursor position

Ctrl+D                      Delete Line

Ctrl+Delete              Delete next word

Ctrl+Backspace      Delete previous word

Shift+Ctrl+Y           Change selection to all lower case

Shift+Ctrl+X            Change selection to all upper case

Ctrl+K/Ctrl+Shift+K Find previous / find next occurrence of search term (close find window first)

Ctrl+H                     Search Workspace (Java Search, Task Search, and File Search)

Ctrl+/                       Comment / uncomment line or selection ( adds '//' )

Shift+Ctrl+à /ß   Change selection 

Ctrl + E                   for a list of editor

Ctrl+F6                   for switching to the next editor through a list

Wednesday, 28 October 2015

How to add a drop-down list to an Excel cell

In Access, you can limit user entries by forcing users to choose a value from a list control. Office applications use the same functionality in built-in drop-down lists. For instance, the Highlight and Font Color controls on most Formatting toolbars use this flexible tool. Simply click the small triangle to the right of the icon to display a list of choices.
You can create the same type of control for your users in an Excel sheet, but the process isn't intuitive. The option is in the Data Validation feature. Fortunately, once you know the feature exists, it's easy to implement. You need only two things: a list and a data entry cell. The following sheet shows a simple drop-down list in an Excel sheet.
Users click the drop-down arrow to display a list of items from A1:A3. If a user tries to enter something that isn't in the list, Excel rejects the entry. To add this drop-down list to a sheet, do the following:
  1. Create the list in cells A1:A3. Similarly, you can enter the items in a single row, such as A1:C1.
  2. Select cell E3. (You can position the drop-down list in most any cell or even multiple cells.)
  3. Choose Validation from the Data menu.
  4. Choose List from the Allow option's drop-down list. (See, they're everywhere.)
  5. Click the Source control and drag to highlight the cells A1:A3. Alternately, simply enter the reference (=$A$1:$A$3).
  6. Make sure the In-Cell Dropdown option is checked. If you uncheck this option, Excel still forces users to enter only list values (A1:A3), but it won't present a drop-down list.
  7. Click OK.

You can add the drop-down list to multiple cells. Select the range of data input cells (step 2) instead of a single cell. It even works for noncontiguous cells. Hold down the Shift key while you click the appropriate cells.
It's worth noting that the drop-down arrow is visible only when the cell is active.

Wednesday, 2 September 2015

Configure TCL in eclipse

Hello Guys,
Before some time I was working on tcl script.somewhere in middle i need to integrate tcl in eclipse editor,at that time i explore lot of site but as per below step i got successfully configure tcl in eclipse.

To configure Eclipse as a TCL/TK IDE you would need the plugin DLTK (Dynamic Language Toolkit). Information on DLTK is available
DLTK supports other scripting languages such as PERL, PHP, TCL/TK etc.
Things you would need to setup TCL/TK Eclipse IDE –
  • Eclipse 3.4 or greater (ofcourse) : Java or JavaEE IDE.
  • DLTK’
  • TCL/TK
  • Komodo Remote Debugger
Steps to follow are –
  • Download and install Eclipse 3.4 or greater from (install the Java or JavaEE IDE).
  • To install the DLTK, in your eclipse IDE navigate the menu item “Help > Software Updates…”, or “Help > Install New Software…” to install plugins/updates.
  • After the site has been added it would show the list of plugins available under DLTK. Choose the following –
>>> Dynamic Language Toolkit – Core Frameworks
>>> Dynamic Language Toolkit – Core Frameworks SDK
>>> Dynamic Language Toolkit – iTCL Development Tools
>>> Dynamic Language Toolkit – iTCL Development Tools SDK
>>> Dynamic Language Toolkit – TCL Development Tools
>>> Dynamic Language Toolkit – TCL Development Tools SDK
>>> Dynamic Language Toolkit – XOTcl Development Tools
>>> Dynamic Language Toolkit – XOTcl Development Tools SDK

  • After you have selected all the above packages and agreed to the license agreement, install them.
  • After the install of the components, eclipse will re-start and the TCL environment (perspectives, windows etc.) would have been configured into eclipse.
  • Now download and install TCL Shell and interpreter itself. For Windows, you can download it from ActiveState ( and for Linux download it from
  • After you have installed TCL in your preferred path/location; Open Eclipse IDE and follow the menu option “Window > Preferences > TCL“; Click on “Interpreters“, click Add button on the right, enter interpreter name as “TCL” and click “Browse..” and choose the path to the Tcl interpreter executable. Click OK and save the setting.

  • Now you are done. You can write and run TCL programs via Eclipse.
  • To debug your Tcl programs you would need to install the Komodo remote debugger.
  • You can download Komodo from activestate –
  • Install the above software under a directory of your choice.
  • Now, open eclipse, and navigate to the following menu option “Window > Preferences > TCL“, expand TCL and then choose “Debug > Engines > Active State“. Under the “Paths” tab, select the “Path:” dropdown and under “External Debugging Engine” select browse and choose the executable for komodo remote debugger (for windows it would be dbgp_tcldebug.exe). Click OK and save the setting.
Now you are all set. You should be able to choose new TCL project, write your Tcl code and debug your programs.
Snapshot of Eclipse screen:

Reference :

Wednesday, 19 August 2015

Python in eclipse

In industry especially in Aerospace, some of the projects are based on the Python language for verification purpose. In that case developer or verifier deals with the source or application code written in python. In most of the cases it's not just couple of files to deal with but has large amount of files and it's support files too. If person need to trace code and require to find definitions of support functions and class then it becomes tedious. To make it easy, Eclipse is the solution to deal with.

Given below are steps to use Eclipse for your Python Project.

Steps to Configure Eclipse on your Windows PC:
A. Download Eclipse software for your 32/64 bit OS from internet or by other way.
B. If you are using java 32 then use 32bit of eclipse version else 64 bit eclipse version.
C. Follow the steps mentioned in: to add python plugin in existing eclipse.
D. Link with existing source so that your .py scripts and utility both clubbed together as mentioned in below steps (“Steps to create Python Project”).

Steps to create Python Project:
Please refer link file "Create Python Project in Eclipse.docx" for detail.

Steps to Run Python script from Eclipse:
Please refer link file "Steps to run python file in Eclipse.docx" for detail.

Note: Here i gave a reference of PFCC project in attached document. In general, everybody should start to referring from step 2 of this document.

For getting clear doubts one can refer link

Tuesday, 11 August 2015

Function list for TCL file in notepad++

Method for the Function List Work for Tcl script

Hello Guys,One more good solution for notepad++.When I was doing my project i came across that function list is not visible for tcl script file and without function list ,it is very tedious to understand code or edit just google it and explore some solution regarding this.Here I tried to explain solution with step by step so it is easy to understand.

Open functionList.xml file (Location : C:\Program Files (x86)\Notepad++\)in an editor.  FunctionList.xml is in the installation directory of Notepad++.
Add this line to the section with all the other association-entries.

 <association langID="29" id="tcl_procedure"/>

Add this to the section <parsers>

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
            mainExpr="^[\t ]*((proc)[\s]+)[^\n]+\{"
            <nameExpr expr="[\w: ]+ \{.*\}"/>

Now press Windows key and go to run window

Then write below line in run window


Then It will open window from them just delete functionList.xml file.It is actually cache file.

 Restart Notepad++.

 here you go.......

Reference For BASH script:-

Wednesday, 24 June 2015

Install Qt 5.4 in Ubuntu 14.04

First you need to download according to your OS version(32 bit or  64-bit). 

Download link is below..

For 32bit

1)    wget

2)    chmod +x

3)    ./

For 64bit

1)    wget

2)    chmod +x

3)    ./
After this command  User Interface window will open then press next according to instruction. 

Note: Same way you can download any version just change 5.X according to version you want to install.

Wednesday, 10 June 2015

Apple's iOS 9 Features

1. Siri goes proactive

One of the major overhauls in iOS 9 can be found with Siri. The digital voice assistant has received a colourful facelift, but it's what's going on behind the scenes that is more interesting.

The new interface displays content in a better way, and Siri can now understand a wider range of requests on top of what was on offer in iOS 8. We were shown a number of examples during the keynote, including "show me my photos from Utah last August", "remind me to grab my coffee off the roof when I get in my car" and "play the top songs from 1982" via Apple Music.

Siri has been, until now, a reactive service, but that's changed in iOS 9. It's now Apple's answer to Google Now, with context sensitive information based on time, date and location. It can, for example, intelligently recognize when you get to the gym and plug in your headphones you'll want your workout mix, and display it on your lock screen.

2. Battery performance

In iOS 8, there is no clear battery saving mode. You're left to your own devices to turn off data, Wi-Fi, Bluetooth etc to try and conserve power.

That changes in iOS 9 with the introduction of a "low power mode," which Apple claims will provide you with three additional hours of typical usage.

iOS 9 apparently improves general performance too, with Apple saying it gives you an extra one hour of full usage over devices running iOS 8.

3. Multitasking on iPads

There are a few iPad-only new features incorporated into iOS 9. First up is the QuickType Keyboard, which adds handy copy, cut, paste tools to the suggestion bar, along with access to the camera, attachments and formatting.

Use two fingers on the keyboard and it becomes a track pad, allowing you to easily select the text you want -- something which is a little tricky in iOS 8.

There's also 'Slide Over', 'Split View' and 'Picture in Picture', which provide a range of multi-tasking options. The first two see two apps share the screen, the former just for a brief moment while the latter sees tho apps sit side by side permanently.

If you're familiar with Samsung's top end smartphones you'll recognize picture-in-picture, which allows you to pop out a video into a floating window.

4. App switching

Apple added contact shortcuts to the multi-tasking pane in iOS 8, but the large app previews means it's difficult to see just how many apps you have running.

This has been improved in iOS 9, with app previews now appearing as stacked cards, allowing you to flip through open applications far more easily and quickly, while getting a better overview on just how many you have open.

5. Spotlight Search

Apple has launched a search API for iOS 9, offering a huge improvement to the search feature. It will allow developers to index and link out their apps, making it easier to discover their content through the native search experience on iOS 9. Basically, users will be able to search not only apps or content from web, but also data within apps. This doesnt come as a surprise, considering recently Google started showing results from Android apps that users didn’t have installed on their phones.

6. Apple Pay

Unsurprisingly Apple Pay has been given a boost with iOS 9, but a word of warning -- it's still only supported on the iPhone 6 and 6 Plus (and Apple Watch).

Apple Pay on iOS 8 is compatible with a handful of US bank cards, but that support gets extended with iOS 9 to more providers including Discover, plus the service rolls out to users in the UK too.

With iOS 9 you can also add store credit and debit cards, plus loyalty and reward cards too. These are stored in "Wallet", the new name for "Passbook" in iOS 9.

7. Apple Maps gets transit data

Apple is regularly improving its once-disastrous mapping effort and with each update it becomes ever more useful, but it's still not quite a match for Google Maps.

One major improvement which was actually rumoured for iOS 8 but didn't arrive was public transport directions, which would add bus, train and subway routes, making it easier to get around.
Why it was a no show isn't clear but we're hoping it's a feature that will be picked up for iOS 9 if not before.
More ambitiously, we've also heard rumours that Apple is working on an augmented reality view that uses your camera to highlight points of interest on your screen. We never expected that to make it into iOS 8, but fingers crossed for iOS 9.

8. Support for older devices

Usually with a new iOS release older Apple devices are cast out into the cold with no update in sight, so it wasn't looking good for the iPad 2 and iPhone 4S.

That's not the case with iOS 9 however, as it will be coming to all the iPhones, iPads and iPods which received iOS 8. Therefore, iPhone 4S and above, iPad 2 and above, all iPad mini models, and iPod touch fifth-generation will get the latest software.

9. More free space

There's good news when it comes to downloading and installing iOS 9, as Apple has reduced its size.

The iOS 8 over-the-air (OTA) update was a hefty 4.6GB download, which caused many users issues with space on their devices. Last year, Apple had received a lot of flak from all quarters for the iOS 8 update taking up too much space for the install files.

The iOS 9 download is just 1.3GB -- which should be much more manageable.

10. Availability

As with iOS 8 last year, you'll be getting the iOS 9 update this "fall" (probably September) for free, but for the first time Apple will be launching a public beta this July -- allowing anyone to sign up and try the latest software before its official launch.




Saturday, 30 May 2015

Android 6.0 (Marshmallow) features

After months of waiting, Google has finally announced that the next version of its mobile OS Android will be called Marshmallow. Also, it the next update of the OS will be numbered Android 6.0, instead of Android 5.2 as previously speculated.

Announced at Google I/O 2015, Android Marshmallow brings with it a number of new features to spruce up your smartphones and tablets (provided they get the update). Here we take a look at 10 of the features you can look look forward to with the next build of Android…

Native fingerprint support

We've seen some smartphone manufacturers already include fingerprint scanners in their devices, but with Android M, Google is looking to make the support standardized across the whole platform. To confirm rumors, native fingerprint support is coming to Android M using a standard API. That will mean that devices with a fingerprint scanner, like the Samsung Galaxy S6, can offer the same range of features.

The new feature will make it easy for Android phones with fingerprint readers to support mobile payments. You can authorize Android Pay transactions, and support can be integrated into other apps, so anyone will be able to use it.

With a partnership with Google on Lollipop, Samsung delivered important bits of code to the Android operating system with its SELinux security reinforcements.

The new fingerprint scanner support to stock Android will now benefit the entire Android ecosystem. This would effectively restrict the access of Android phones to their owners, something which is so far only possible on some of the high-end flagships from a select few manufacturers.

Web experience

Google has been exploring trends in the way web content is consumed to provide a better user-experience when interacting with websites and apps. "Chrome Custom Tabs is a new feature that gives developers a way to harness all of Chrome's capabilities, while still keeping control of the look and feel of the experience," said Burke.
Chrome Custom Tabs will allow apps to open a customized Chrome window on top of the active app, instead of launching the Chrome app separately. This will provide a faster and more intuitive user-experience when navigating between apps and the web. 
Chrome Custom Tabs supports automatic sign-in, saved passwords, autofill, and multi-process security to assist the integration of the app and web experience. So, for example, a Pinterest custom tab will have a Pinterest share button embedded in it, can include custom overflow menu options and doesn't require the Pinterest developers to build their own web browser.

Android Pay

Left off on Lollipop, one of the big introductions of Android M is Android Pay. It will be pre-installed on Android 4.4+ devices and will be supported on devices with NFC running Android KitKat and above without opening any app. Android Pay is secure because a virtual card number is created when you register a payment card, rather than an actual card number.

Using an open API, Android Pay will be available through Android's own app, or integrated into other bank apps. It will be available in the US, compatible with existing contactless payment locations, such as those that currently accept Apple Pay (a must to compete with Apple Pay's distribution) both at stores and in apps using their fingerprint.

It also means that app developers will be able to use a user's fingerprint for verification. Android Pay launch will be with Android M later in the year.

Improved battery life

One of the biggest announcements pertaining to Android M is a feature called Doze, and it has everything to do with saving precious juice on those baby batteries. Battery life has been something of concern for Android users since the beginning, and it looks like Google is taking measures to improve it.

Doze is a system state that will idle your device and background apps to a near-off state when you haven't used it for a while, a tactic that can make your phone last twice as long as it would if your Lollipop phone were on standby with Project Volta. With an OS like Android which supports multitasking, there's always a delicate balance between managing power and keeping applications running in the background updated.

Project Volta was supposed to change the fact that Android wasn't battery efficient. Like many other occasions where Google failed to deliver with Lollipop, the company is working hard to finally push through its vision of improving the way it collects location data and other information.

The search giant says it grabbed two Nexus 9 tablets, one running Lollipop and the other Android M, loaded the same apps and settings on both and then tested the standby power drain on the two. Apparently the Nexus 9 running Android M lasted up to two times longer than its Lollipop counterpart. It sounds impressive and we're hoping it translates to noticeably better battery life on our devices.

Your device will use motion detection to realize when it hasn't moved for an extended period of time and switches to a deeper sleep which consumes much less power. And, luckily, your device won't be completely useless in this mode, as Doze still allows alarms and key notifications to come through.

This comes with one sacrifice: apps don't stay as "fresh," meaning they won't be fully up-to-date with the latest information while your phone is dozing. That's a small price to pay for double the battery life, though.


Besides making our batteries last longer, Android M is also bringing faster charging with USB-C support, which is a new type of USB connector which, like Apple's Lightning connector, can be plugged in either way round and allows for faster and easier charging. It also lets users charge other devices with their Android phone, which isn't something any of us have asked for, but it's there.

Burke said on stage that it would be "coming to a device near you soon" -- that's the biggest hint at the next Nexus yet. Also, because USB Type-C works both ways, you'll get options for what you want to do when you connect a device. No more fumbling in the dark trying to plug in your charging cable the right way round.

Google claims devices with USB-C connectors will charge three- to five-times faster than the current microUSB offerings on the market.

Apps permissions

One of the big parts of Android M is a redesigned apps permissions system. Users will be able to approve or deny security permissions, such as camera or location access, on a case-by-case basis.

Currently, when you install an Android app, you agree to a range of permissions, such as what the app has access to. In Android M, you don't have to agree to things you don't want agree to. Instead, apps will ask permissions when you use a feature, rather than at installation.

This means that a user can grant applications some permissions but not others, and they can manage permissions access after the fact. It also makes it more clear to the user what an application is asking to do.

There are only eight categories of permissions available to apps now, and the apps will ask for them as they're needed. That's different from how Android currently works: Users are asked to approve all permissions at once when the app is installed. You'll be able to update the permissions at times other than installation, too, so if you don't want microphone permission, for example, you can cancel it.

More Android M features

Other improvements include changes to how text selection works, and further changes to the not-very-popular alterations to volume controls that were made in Android Lollipop. Google has simplified volume controls once again with the Android M update, with more granular control over the various audio settings on your device from ringtones and alarms to music playback and voice calls.

For Android M, Google is also revamping the web browsing experience with its Chrome browser. A new feature called Chrome Custom Tabs lets developers insert webviews directly in their apps, giving them the full power of Chrome without having to force the user to switch apps.

Essentially this feature allows applications to have the Chrome browser run atop their app whenever the user clicks on a link. This means that all of a user's autofill data, passwords, and cache are available when they open links within an application.

Android's built-in app linking system (also known as intents) is getting an upgrade, allowing apps to open content directly instead of stopping users with a dialogue box everytime.

With Android M, app developers can now have the operating system verify that certain types of links are meant to be opened with their app by checking with the web server what those links point to and verifying that it's meant to be opened with that app.

This year's release is accompanied by a preview for developers so they can test their apps and give Google feedback on the changes that they are making to Android. The Android M developer preview will be available today for the Nexus 5, Nexus 6, Nexus 9 and Nexus Player. The public will get its hands on it in Q3 2015.

Google Now 

Google Now has been improved upon once again in Android M. Focusing on three key ares: being aware of different contexts, providing answers and helping you take action, Google Now is now smarter than ever.

Google Now's context awareness understand over 100 million different places, so when you ask ''How far is it to there?'' Google Now know exactly which ''there'' you're referring to. This awareness is compounded by Google's Knowledge Graph, which understands one billion different entities, from sports teams to gas stations, TV shows to recipes.

Google Now is also rolling out a pilot program called ''Now on Tap'' with 100 popular apps. Now on Tap provides Google Now-like content right where you are, without having to leave the app you're in. So if you're in Spotify and say ''Ok Google, what is his real name?'' Now on Tap will know you're talking about the musician you're listening to and provide search results right there an then.

The same goes for content in emails. If someone asks you a question about a restaurant and to not forget something on your way home, Now on Tap can automatically pop up a restaurant card with Maps info, Yelp, OpenTable and the dialer, as well as offer to set a reminder for whatever it was you were supposed to not forget.

Google Chrome 
Chrome is also leaner and faster than ever before. Initially revamped with Android One devices in mind, where stable and speedy internet connections are not always possible, Chrome's new optimizations are set to arrive for everyone.

Chrome is now aware of network strength and can modify what you see as a result. For example, if your connection is bad, you might see colored squares rather than preview images in Search results. Optimized web pages will load four times faster and use 80 percent fewer bytes. You'll also see a memory usage reduction of up to 80 MB. Chrome will also support offline mode.

Google Photos 

As expected, Google pulled the wraps off its new Google Photos service. Previously a part of Google+, Google Photos is now standalone photo and video storage and sharing service that provides unlimited free storage for up to 16 MP photos and 1080p video. That is seriously impressive.

The Google Photos service stores high-quality compressed versions of your photos and movies but doesn't store anything on your device, so you can search through thousands of photos at high speed and without bogging your device down with gigabytes of photos.  

Popular features like Auto-Awesome and Stories are a key highlight, accessible through a new Assistant feature, which will automatically suggest creative uses of your images and footage. Through simple pinch gestures you can see tiled images for particular days, weeks, months or even years and then zoom right back in at any point you like.

Google Photos is also powerful for search, as you'd expect. You can search by People, Places, Things and Types, which are all automatically created, and you can drill down in each of those categories to see, for example, every picture you have of a particular person, all without ever tagging them. 

Sharing is also a breeze. You don't even need you contacts to have the Google Photos app. You can simply share a link that they can view in Chrome. If they are logged in they can easily download an entire album in seconds.

Saturday, 2 May 2015

verilog code for mejority detector


module majority
(input v1,v2,v3,
output reg m);
always@(v1 or v2 or v3)


module majority_tb;
reg v1,v2,v3;
wire m;
majority m1(v1,v2,v3,m);
$monitor($time, ,,v1,v2,v3,,"m=%d",m);
#2 v1=0;v2=0;v3=0;
#2 v1=0;v2=0;v3=1;
#2 v1=0;v2=1;v3=1;
#2 v1=1;v2=0;v3=0;
#2 v1=1;v2=0;v3=1;
#2 v1=1;v2=1;v3=0;
#2 v1=1;v2=1;v3=1;

You can also check more verilog code on

verilog code for counter


module counter2(r,clk,y);
input r,clk;
output [3:0]y;
reg [3:0]y;
always@(posedge clk or posedge r)
if (r)
y <= 4'b0000;
y <= y + 2;


module counter3_tb;
reg r,clk;
wire [3:0]y;
counter2 m1(r,clk,y);
$monitor($time, ,,"c=%b",clk,,"r=%b",r,,"y=%b",y);
#5 r=1;
#15 r=0;
#50 $finish;
#5 clk=~clk;



module counter2(r,clk,y);
input r,clk;
output [3:0]y;
reg [3:0]y;
always@(posedge clk or posedge r)
if (r)
y <= 4'b0000;
y <= y + 3;


module counter3_tb;
reg r,clk;
wire [3:0]y;
counter2 m1(r,clk,y);
$monitor($time, ,,"c=%b",clk,,"r=%b",r,,"y=%b",y);
#5 r=1;
#15 r=0;
#50 $finish;
#5 clk=~clk;

verilog code for berral shifter


module bshift
input [7:0]a,
input [2:0]sh,
input left,right,
output reg [7:0] b);


3'b000: b = a;
3'b001: b = a<<1;
3'b010: b = a<<2;
3'b011: b = a<<3;
3'b100: b = a<<4;
3'b101: b = a<<5;
3'b110: b = a<<6;
3'b111: b = a<<7;

3'b000: b = a;
3'b001: b = a>>1;
3'b010: b = a>>2;
3'b011: b = a>>3;
3'b100: b = a>>4;
3'b101: b = a>>5;
3'b110: b = a>>6;
3'b111: b = a>>7;



module bshift_tb;
reg [7:0] a;
reg [2:0] sh,left,right;
wire [7:0] b;

bshift bs(a,sh,left,right,b);

$monitor($time, ,"lef","ft=",left, ,"rig","ht=",right, ,"shi","ft", ,"%b",sh,  ,"inp","ut", ,"%b",a,   ,"out","put", ,"%b",b);

#1 sh=sh+1;

#9 left=1'b0;
#10 right=1'b1;

#18 $stop;


You can also check more verilog code on