# Use the desVar value in Ocean script

I have an Ocean script that has a few design Variables defined using desVar as follows

desVar("simTemp" 27)
desVar("simVdd" 1.0)

simVdd is my supply Voltage. I have to measure the propagation delay of my circuit and for that I need to find the delay between my input signal crossing the vdd/2 value and the output signal crossing the vdd/2 mark. In most cases, when the supply voltage is a constant, the calculator expression for delay is

delay(?wf1 v("/D1" ?result "tran") ?value1 0.5 ?edge1 "rising"  ?nth1 1 ?td1 0.0 ?wf2 v("/CMPLT32" ?result "tran") ?value2 0.5 ?edge2 "rising"  ?nth2 1 ?td2 nil ?stop nil ?multiple nil)

However now in my case, because the supply voltage was changing with each run, I needed a calculate the vdd/2 value at run time in my Ocean script.

The correct way to do this is as follows.

halfVdd = evalstring(desVar("simVdd"))/2.0

Of course the reference manual would have a long description of the correct way and the different options that can be used with evalString, however I was led in the correct direction by this post.

Also note the 2.0 in the denominator. Without the 2.0, I ended up having the halfVdd value set to ‘0’ when simVdd was 1, as it was doing an integer division and not treating the evaluated value as a real number. This was something that I had to figure out myself.

And then the delay expression would be

delay(?wf1 v("/D1" ?result "tran") ?value1 halfVdd ?edge1 "rising"  ?nth1 1 ?td1 0.0 ?wf2 v("/CMPLT32" ?result "tran") ?value2 halfVdd ?edge2 "rising"  ?nth2 1 ?td2 nil ?stop nil ?multiple nil)

# Grouping two figures together in Latex

There are instances when one want two figures to be placed on a single page. One has space for the two figures, but for some reason Latex decides to place them on two separate figures. What one can do in this case is include both the graphics in a single figure structure as follows

\begin{figure}[t]
\centering
\includegraphics[width= 0.9\columnwidth]{myfig1.pdf}
\caption{Caption 1}
\label{fig:myfig1}

\includegraphics[width= 0.9\columnwidth]{myfig2.pdf}
\caption{Caption 2}
\label{fig:myfig2}
\end{figure}



This will group the two graphics together and place them on a page as a single entity. And because each graphic is followed by a caption, they will receive separate figure numbers.

# Flushend package to balance columns on the last page in Latex

When using the biblatex-ieee package, the last line of the last citation may be flushed too much to the left with flushend. Adding the keeplastbox option when loading the packages fixes this.

\usepackage[keeplastbox]{flushend}

# Installing Xilinx Vivado on RHEL through putty

I was installing Vivado 2015.4 on RHEL. I am working through a putty session and was facing the following error

Surprisingly through the same putty session I was able to launch gedit or any other graphical program.

It fit my situation to the T and the answer was appropriate as well.

Problem solved. Moving on to save the world!!!

# Date picker using Calendar in Excel

If you want to insert a calendar into your spreadsheet, you can do so by enabling Developer Mode from the program’s main menu.

• Click the “Office” button and select the “Excel Options” option from the drop-down menu that appears.
• Click the “Popular” tab in the “Options” menu and place a check mark next to the “Show Developer Tab in the Ribbon” option.
• Click “OK” to save the changes.
• Click the “Developer” tab, followed by the “Insert” menu. Select the “More Controls” button in the drop-down menu that appears. Highlight the “Microsoft Date and Time Picker Control” option, then click “OK.”
• Click on the upper left corner of the cell to which you want to add the calendar and drag your mouse pointer to the cell’s bottom-right corner. This will draw a rectangle around the cell.Release your mouse button to insert the calendar into the cell.
• Whenever you click on the cell, the calendar drop-down menu will appear.
• Before the Date and Time Picker Control can be used its properties must be defined. With the control selected, in the Controls section of the Developer tab click the Properties button. This opens the Properties window listing all the properties of the Date and Time Picker control. Here you can specify a format for the date, define a range of allowed dates as well as  many other useful properties.
• The calendar needs to be activated before it will work. Click the Design Mode button on the Developer tab to take the worksheet out of design mode. Job done!
• To insert a date click the control’s down-arrow to open the calendar. When you select a date the calendar will close and the date will be written into the specified cell. If you want to link the calendar to a specific cell so that, when a date is chosen it is entered into that cell only, you must enter the address of the cell into the LinkedCell

Articles of help

# Latex tips and tricks

Here are some tips and tricks I found useful while working with Latex

• If one wants to reduce the spacing between a figure and its caption, use the following command
\begin{figure}[t]
\centering
\includegraphics[width=3.5in]{some_image.pdf}
\vspace*{-1.0cm}
\caption{some image caption}
\label{fig:ref_to_some_image}
• If one wants two or more images to be placed on the same page, include them in the same figure environment
\begin{figure}[t]
\centering
\includegraphics[width=3.5in]{fig1.pdf}
\vspace*{-1.0cm}
\caption{caption 1}
\label{fig:label1}
\includegraphics[width=3.5in]{fig2.pdf}
\vspace*{-1.0cm}
\caption{caption2}
\label{fig:label2}
\end{figure}

# Move to first character on the command line

I am using CSH inside SCREEN on a PUTTY terminal. When I have to repeatedly enter similar commands, I tend to press the up arrow or use the shell history to bring up the command at the prompt. However I realise that there is a switch right at the beginning of the command that I need to change.

How do I quickly move to the first character of the command

Nope!!! <HOME> does not work for me.

Instead I press Ctrl + x twice to toggle cursor position from the first character to the last character of the command.

I do not know if this shortcut is provide by CSH or by Screen or by Putty, but it does work for me right now.