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