Skip to main content

Posts

Convert to html in VIM batch mode

VIM has a beautiful feature of converting the code into a html formatted code. When you apply syntax highlighting, the code gets beautified. But when you need to copy and visualize the code some where else.. the copy does not actually copy the formatting along with it. Vim has a menu option of converting the code into html syntax. Syntax -> Convert to HTML. This looks cool, but if you have some bunch of files and you have to convert them to html.. The savior is writing some script to automate this The tag that does HTML conversion is this: :.,$TOhtml Now you can automate this: Write this in a vim script. Lets name it as "test.vim" zR :set autochdir :.,$TOhtml  :wqa How to run over a file: vim -s test.vim test.sv  Now this will generate test.sv.html file in the file directory. Point to note: Your .vimrc should contain the setting the automatic file type.  Now i took the file name as "sv". When i open GVIM/VIM, the sv (system v...

System Verilog Questions and Tricks - I

Queues Finite Queues What happens when you read from empty queue? Well, that depends on the what type of que it is. As in, lets say if the que is of the pre defined data type like int, real and others.. the return value will be '0'.  If the que is of a class or any dynamic objects, then the return value will be null. a inta [ $ ]; int fintq [ $ : 2 ]; In the above code, when you pop empty que of class a, then the return value will be NULL pointer When you pop from the Int que, the result will be '0'

Verdi Uses - I

COVERAGE While going through some of the blog posts, i found that the Verdi supports even coverage right out of the box, but from the 2014 Version. Well till now, we relied on the URG reports and the DVE to review the coverage and apply waivers and create exclusion files. Looks verdi supports all the features.. I did not get any hands on the features of this option, soon i will find some time to play around with this option of coverage in Verdi. How to launch the verdi with coverage. $> verdi -cov -covdir <PATH_TO_TB>.simv.vdb -covdir <PATH_TO_TEST1>.simv.vdb -covdir <PATH_TO_TEST2>.simv.vdb...  You can pass multiple covdirs, where in all the results will be merged. References: SYNOPSYS SITE Think Verification  

Visio Tips - I

Connection points for any object: sometimes you need connection points for an object. The default connection points may not be suffice your needs. At that time, you can use the connection point tool in visio This tool allows to add connector points to the shape. To add the connection point, Hold CTRL and click where you need a connection point. Source URL:  Microsoft Visio help for connection point  

Android App Patches

While i am playing Real Racing 3 for couple of years now. The game is awesome, but i cannot complete the game without spending some real money from my pocket. I tried different hacks and work arounds to get some benefits in game. The game requires lot of "R$" and "Gold" Coins which are in game points which are used to buy cars and upgrade them. I came to know about the lucky patcher. Thanks to this link:  https://www.youtube.com/watch?v=i1_ZD7hBNiU The lucky patcher is the tool that allows user to make in app purchase with out spending real money. Basically it works this way. You select the lucky patcher and select the app you want to patch. You copy the android data directory before doing so.  Select the app in lucky patcher and apply patch for in app purchases. Uninstall the app. Open lucky patcher and from bottom menu select the option install from backup. Select and install the app. copy the android data back. Open the app. Now i see that the ...