Monday, November 17, 2014

SSH With GUI

open a GUI application over ssh by simply using the -X flag:

ssh -X user@server

It's also typically a good idea to use compression on the ssh as well when you allow X11 forwarding. Makes it play nicer with your internet:

ssh -X -C user@server

command used to log in into my Raspberry pi:
ssh -X -C -l pi 192.168.0.124

Monday, October 27, 2014

Install PyUSB 1.0.0

Use the following steps:
sudo apt-get update
sudo apt-get install python-pip
sudo pip install pyusb==1.0.0b1

Thursday, October 2, 2014

How to set a Static IP in Ubuntu

(from:http://www.sudo-juice.com/how-to-set-a-static-ip-in-ubuntu-the-proper-way/)

Setting a static IP in Ubuntu is useful for a lot of things. You may want to forward ports from your router to serve web pages, use SSH from outside your local network or set up some sort of media server.

For whatever reason, Ubuntu is trying to make our lives easier by introducing graphical tools to be used by default but kind of making our terminal life a bit harder!

The quick answer to setting up a static IP in Ubuntu the proper way is:


  1. Disable the graphical management of your network connection in /etc/NetworkManager/NetworkManager.conf
  2. Gather the information for the static IP (interface, IP to be used, default gateway, subnet, DNS)
  3. Modify /etc/network/interfaces to include the information above.
  4. Restart networking and network-manager services



gksudo gedit /etc/NetworkManager/NetworkManager.conf
So our NetworkManager.conf now looks like this….

[main]
plugins=ifupdown,keyfile
#dns=dnsmasq

[ifupdown]
managed=true

gksudo gedit /etc/network/interfaces
/etc/network/interfaces file now looks like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.101
gateway 192.168.0.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4

Restart your networking services
sudo service network-manager restart
sudo service networking restart
sudo service resolvconf restart



Sunday, September 21, 2014

How to use an External Text Editor from Cadence IC6.1.6ISR7 onward

Problem

  Cadence unable to generate netlist from schematic which contains verilog/systemverilog/verilogAMS.

Solution

add the following in the .simrc under the project directory:

How to Reset MFC-7345N Toner End of Life Message

Provided there is enough toner in a transferred cartridge that  does not activate the low toner sensor, then you can clear the end of life message as follows manually.

1. open front cover where toner inserts
2. press the "clear/back" button. It may display "replace drum?". Do not respond to this.
3. press *00. A message "accepted" will be displayed

The toner warning should then be cleared.

Tuesday, August 12, 2014

How to use an External Text Editor from Cadence IC6.1.6ISR7 onward

$prompt> setenv EDITOR "gvim -f"

Type one of the following in the CIW to change the SKILL variable editor or set it in the .cdsinit file:
editor = "gvim -f"

The most important added variable is ‘useExternalEditor’. Type the below SKILL in the CIW to set an external text editor or
set it in the .cdsinit file for an external text editor instead of the ‘Cadence Text Editor’.

envSetVal("textedit" "useExternalEditor" 'boolean t)

You can check the value of this variable ‘useExternalEditor’ by using the below SKILL:

envGetVal("textedit" "useExternalEditor")

If the above SKILL return value is ‘nil’ then it will always open text cellViews in the ‘Cadence Text Editor’.

Generate Verilog/VerilogAMS/SystemVerilog netlist USing Cadence SystemVerilog Integration Tool

Problem

  Cadence unable to generate netlist from schematic which contains verilog/systemverilog/verilogAMS.

Solution

add the following in the .simrc under the project directory:
  vlogifVicSVTextCellViewList = (list "systemVerilogText" "text.v" "VerilogAMSText")

Monday, July 28, 2014

Check License Consumed in Cadence

You can view which license is consumed in the run as given below:

$>setenv FLEXLM_DIAGNOSTICS 3
$> irun -access +rwc   //  in this run the screen will display the license used for the run.

Now if you want to see the license consumed in the log file as well ,then provide the command as below:

$> irun -access +rwc  -uselicense DEFAULT

see also:

How do I list which licenses my irun or ncsim simulation is requesting or consuming




Problem
I need to know which licenses my NC simulation is asking for or has checked out.

Sometimes I get a NCLICEX or NCLICN or NOMNEM message.
Solution
There are two scenarios to cover:

1) I want this information every time I run, what methods can I use

METHOD A) the user can set the environment variable FLEXLM_DIAGNOSTICS

UNIX> setenv FLEXLM_DIAGNOSTICS 3

This will cause license checkout information to echo to the terminal window as the executable obtains them. If the user will want to capture that information for later examination, some UNIX screen capture utility must be used like the script command or use tee to also dump this into a file. The simulation log will not see any information issued due to the usage of FLEXLM_DIAGNOSTICS as that affects the lmgrd/cdslmd interaction and not the simulator.

METHOD B) for the ncsim, irun, hal, or ncverilog executables another method is simply to launch the simulation with the -uselicense switch for irun or ncsim.

Use it with the argument DEFAULT, then it will not change any license checkout behavior

UNIX> ncsim worklib.mydesign:module -uselicense DEFAULT
OR
UNIX> irun < files > < options> -uselicense DEFAULT

-uselicense enables license checkout info to echo to the logfile and the screen

the FLEXLM_DIAGNOSTICS method only echoes to the screen.

one caveat for METHOD B:

-uselicense only echoes what the ncsim or irun, etc. obtains.

E.g., if using HDL code and e code with 29651 IES-XL licenses, you will see Incisive_Enterprise_Simulator get checked out and Verilog-XL which authorizes both specman and ncsim to run.

IF using 29610 IES-L plus SMN100 Specman Elite licenses, the checkout of Incisive_Specman_Elite by specman executable will not be shown by using -uselicense. Specman executable does not report under the -uselicense option.


The FLEXLM_DIAGNOSTICS method works in all cases.
Sample output
Trying to check out license...
Incisive_HDL_Simulator 13.2 - Failed
Incisive_Enterprise_Simulator 13.2 - Failed
Incisive_Enterprise_Verifier 13.2 - Failed
ncsim: *F,NOLICN: Unable to checkout license for the simulation. (flag - 4) 'lic_error -97'.


2) my simulation is already running and I want to know what licenses are consumed

In this situation the user will need to know the time the simulation phase of his irun or ncverilog run began since there could be a lengthy time between start of compile and start of simulation. Start of simulation is where the licenses are checked out for simulation. The local log file for the run can be a source for this information.

Then view the license log file ( see your system administrator for this file name) and search for the licenses consumed by the user on the particular machine where the simulation is being run.

A license log file snippet is shown below

.....
10:47:57 (cdslmd) OUT: "Incisive_Design_Team_Simulator" jhb@inca [Incisive]
10:47:57 (cdslmd) OUT: "VERILOG-XL" jhb@inca [Incisive]
10:47:57 (cdslmd) OUT: "Incisive_Specman_Elite" jhb@inca [Incisive]
10:48:07 (cdslmd) IN: "Incisive_Design_Team_Simulator" jhb@inca [Incisive]
10:48:07 (cdslmd) IN: "VERILOG-XL" jhb@inca [Incisive]
10:48:07 (cdslmd) IN: "Incisive_Specman_Elite" jhb@inca [Incisive]
10:49:16 (cdslmd) OUT: "Incisive_Specman_Elite" jhb@inca
10:49:17 (cdslmd) IN: "Incisive_Specman_Elite" jhb@inca
10:49:19 (cdslmd) OUT: "Incisive_Specman_Elite" jhb@inca
10:49:20 (cdslmd) IN: "Incisive_Specman_Elite" jhb@inca
10:49:21 (cdslmd) OUT: "Incisive_Specman_Elite" jhb@inca
10:49:21 (cdslmd) IN: "Incisive_Specman_Elite" jhb@inca
10:49:22 (cdslmd) OUT: "Incisive_Specman_Elite" jhb@inca
10:49:22 (cdslmd) IN: "Incisive_Specman_Elite" jhb@inca
10:49:23 (cdslmd) OUT: "Incisive_Design_Team_Simulator" jhb@inca [Incisive]
10:49:23 (cdslmd) OUT: "VERILOG-XL" jhb@inca [Incisive]
10:49:23 (cdslmd) OUT: "Incisive_Specman_Elite" jhb@inca [Incisive]
.....

Note that at 10:49:23 user jhb on machine inca checked out Incisive_Design_Team_Simulator, VERILOG-XL, and Incisive_Specman_Elite license features. Those entries could represent the exact license features being consumed by the current simulation job if user jhb had a simulation begin at 10:49 am ( it is 24 hour time stamp clock All pm hours are 12:01-23:59 )

Tuesday, July 15, 2014

gvim tricks

1. remove duplicate lines

sort all lines and remove duplicates (keeping unique lines):
:sort u

2. run vi script

vi -e try.txt

3. delete all lines containing pattern

:g/pattern/d

4. delete all lines without the pattern

:v/pattern/d

Monday, May 26, 2014

Change gnome Windows Behavior

Purpose

To let the focus follows the mouse but doesn't raises the window 

How

use configuration Editor, and change the default value (click) of /apps/metacity/general/focus_mode to sloppy.


Sunday, May 25, 2014

Install OpenNX in Ubuntu 12.04

Ubuntu Version

lsb_release -a

Import key

wget -O - http://download.opensuse.org/repositories/home:/felfert/Debian_6.0/Release.key | sudo apt-key add -

add the following to the source list /etc/apt/sources.list:
deb http://download.opensuse.org/repositories/home:/felfert/xUbuntu_12.04 ./

Installation

sudo apt-get update
sudo apt-get install opennx

Usage

nxclient

Saturday, May 24, 2014

Google Drive Sync in Ubuntu 13.04

Installation

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install grive

Using grive

mkdir ~/GoogleDrive
cd ~/GoogleDrive
sudo ln -s /usr/lib/libbfd-2.23.52-system.20130913.so /usr/lib/libbfd-2.23.2-system.so
grive -a   (only for first time configuration, after configuration, just use grive, this command should be run under the GoogleDrive directory)


Monday, May 12, 2014

Change Cadence Virtuoso Schematic Background Color

1- run icfb
2- Open a Terminal and type:
xrdb -query > xyz
3- return to specified folder. You should see the xyz file. Open this file in edit mode.
4- in the xyz file, change or add the option Opus.editorBackground from
black to your desired one. for example:
Opus.editorBackground: white
5- at the UNIX or LINUX prompt (e.g. the second terminal you opened), type:
xrdb -load xyz
6- restart your Cadence software

[from:http://www.edaboard.com/thread174506.html]

Friday, May 9, 2014

Open GUI in Remote Machine

Method 1: Use telnet

Assume the IP address of the local host is 128.100.2.16 and the IP address of the remote host is 17.200.10.5. Depending on the network you are on, you may also be able to use the computer names (domain names) instead of the IP addresses.
Step 1. On the local host
Type the following at the command line:
% xhost + 17.200.10.5
Step 2. Log on to the remote host
% telnet 17.200.10.5
Step 3. On the remote host (through the telnet connection)
Instruct the remote host to display windows on the local host by typing:
% setenv DISPLAY 128.100.2.16:0.0

Method 2: Use ssh

Connect to remote machine using ssh
ssh -X -C user@MyIp

this method is slow, though.


Method 3: Use nomachine or vncserver

Thursday, May 8, 2014

Setup Nomachine Connection in Ubuntu

1. disable firewall:
  sudo fw disable

2. check ssh:
  ssh localhost
if get an error:
 ssh: connect to host localhost port 22: Connection refused

then install the following:
 sudo apt-get install openssh-server

Thursday, April 24, 2014

Gnu Octave Installation and Usage

  1. Install
under Linux command window:
sudo apt-get install octave
sudo apt-get install liboctave-dev


packages can be found at: 
http://octave.sourceforge.net/packages.php

download control package and save as control-2.6.3.tar.gz under Downloads directory.

sudo octave (to allow package installation)
and in octave prompt:
octave:1> pkg install control-2.6.3.tar.gz
octave:2 > pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
     control *|   2.6.3 | /usr/share/octave/packages/control-2.6.3
octave:> pkg load control
octave:>DEMOcontrol

Monday, April 7, 2014

ALT Codes



To obtain an ALT Character:

  1. Make certain that the Num Lock key has been pressed to activate the numeric key section of the keyboard.
  2. Depress the Alt key.
  3. While the Alt key is depressed, type the proper sequence of numbers (on the numeric keypad) of the ALT code from the table above.
  4. Release the Alt key, and the character will appear.
  5. On a laptop computer, there usually is no numeric keypad.  So, instead, depress the Fn (function) key, then the Alt key, then the numerical code sequence.  The numbers are on the fronts of certain keyboard keys: M=0, J=1, K=2, L=3, U=4, I=5, O=6, 7=7, 8=8, and 9=9

Monday, March 31, 2014

Automatic Equation Shortcuts

Google Docs equation shortcuts:
  1. superscripts and subscripts by pressing the ‘^’ and ‘_’ keys
  2. Greek Letters
alpha \alpha
equation symbol \beta
equation symbol \gamma
equation symbol \delta
equation symbol \epsilon
equation symbol \varepsilon
equation symbol \zeta
equation symbol \eta
equation symbol \theta
equation symbol \vartheta
equation symbol \iota
equation symbol \kappa
equation symbol \lambda
equation symbol \mu
equation symbol \nu
equation symbol \xi
equation symbol \pi
equation symbol \varpi
equation symbol \rho
equation symbol \varrho
equation symbol \sigma
equation symbol \varsigma
equation symbol \tau
equation symbol \upsilon
equation symbol \phi
equation symbol \varphi
equation symbol \chi
equation symbol \psi
equation symbol \omega
equation symbol \Gamma
equation symbol \Delta
equation symbol \Theta
equation symbol \Lambda
equation symbol \Xi
equation symbol \Pi
equation symbol \Sigma
equation symbol \Upsilon
equation symbol \Phi
equation symbol \Psi
equation symbol \Omega


3. general Operators
equation symbol \times
equation symbol \div
equation symbol \cdot
equation symbol \pm
equation symbol \mp
equation symbol \ast
equation symbol \star
equation symbol \circ
equation symbol \bullet
equation symbol \oplus
equation symbol \ominus
equation symbol \oslash
equation symbol \otimes
equation symbol \odot
equation symbol \dagger
equation symbol \ddagger
equation symbol \vee
equation symbol \wedge
equation symbol \cap
equation symbol \cup
equation symbol \aleph
equation symbol \Re
equation symbol \Im
equation symbol \top
equation symbol \bot
equation symbol \infty
equation symbol \partial
equation symbol \forall
equation symbol \exists
equation symbol \neg
equation symbol \angle
equation symbol \triangle
equation symbol \diamond
4. Comparison and Inclusion
equation symbol \leq
equation symbol \geq
equation symbol \prec
equation symbol \succ
equation symbol \preceq
equation symbol \succeq
equation symbol \ll
equation symbol \gg
equation symbol \equiv
equation symbol \sim
equation symbol \simeq
equation symbol \asymp
equation symbol \approx
equation symbol \ne
equation symbol \subset
equation symbol \supset
equation symbol \subseteq
equation symbol \supseteq
equation symbol \in
equation symbol \ni
equation symbol \notin 
 5. Operators with Variables

equation symbol \frac
equation symbol \sum
equation symbol \sqrt
equation symbol \rootof
equation symbol \subsuperscript
equation symbol \subscript
equation symbol \superscript
equation symbol \abs
equation symbol \overline
equation symbol \widehat
equation symbol \tilde
equation symbol \bigcap
equation symbol \bigcup
equation symbol \prod
equation symbol \coprod
equation symbol \int
equation symbol \oint

6. Arrows

equation symbol \leftarrow
equation symbol \rightarrow
equation symbol \leftrightarrow
equation symbol \Leftarrow
equation symbol \Rightarrow
equation symbol \Leftrightarrow
equation symbol \uparrow
equation symbol \downarrow
equation symbol \updownarrow
equation symbol \Uparrow
equation symbol \Downarrow
equation symbol \Updownarrow