Friday, November 1, 2013

Creating ssh keys for daq slow control linux machine

  Personal history of typed commands using cygwin
  284  ssh-keygen
  285  cd .ssh
  287  pwd
  288  cd /home/
  290  cd .ssh
  291  pwd
  294  cd /home/leardila-perez/.ssh
  295  cd /cygdrive/home/leardila-perez/.ssh
  296  cd /home/
  297  ls
  300  pwd
  301  mkdir .ssh
  302  ls
  303  ls -la
  304  ssh-keygen
  305  pwd
  306  ls .ssh
  307  ls -ld .ssh
  308  cd .ssh
  309  ssh-keygen
  310  ls
  311  chmod 700  .
  312  ls -l
  313  cat id_rsa.pub
  314  ssh -Y leardilap@ssd-sc
  315  ssh -Y ssd@ssd-sc
  316  pwd
  317  cd
  318  pwd
  319  man ssh
  320  export HOME=`pwd
  321  pwd
  322  export HOME=`pwd`
  323  ssh -Y ssd@ssd-sc
  325  env | grep HOME
  326  man ssh
  327  pwd
  328  echo $HOME
  329  cd $HOME
  330  ls -ld .
  331  ls -l
  332  mkdir .ssh
  333  ls -la
  334  cd .ssh
  335  ls -la
  336  cd
  337  cd ~
  338  pwd
  339  cd
  340  ls /home
  341  pwd
  342  cd /home
  343  ls
  344  ssh
  345  history
  346  ssh -Y ssd@ssd-sc
  347  cd
  348  pwd
  349  ln -s /cygdrive/c/SPB_Data
  350  ln -s /cygdrive/c/SPB_Data /home/leardila-perez
  351  cd /home/leardila-perez
  352  ls
  353  ls -la
  354  ssh -Y ssd@ssd-sc

Friday, October 25, 2013

Modifiying db files for epics, rebuilding and relaunching softioc

And here's the command history of what I used to edit and rebuild:
  224  cd /usr/local/epics/ioc/siocftdi/head/
  225  vi ftdiApp/Db/example1.db 
  226  make

When doing make the file gets copied over this folder
wenorum@ssd-sc-daq 217> ls -l ftdiApp/Db/example1.db db/example1.db 
-r--r--r-- 1 wenorum ssd 595 Oct  3 19:06 db/example1.db
-rw-rw-r-- 1 wenorum ssd 595 Oct  3 19:06 ftdiApp/Db/example1.db

Re-Run softioc
1011  cd /usr/local/epics/ioc/siocftdi
 1012  sh run
 1013  sh attach
 1014  sh attach
 1015  sh attach                                             to deattach = Ctrl+A+D    to end type "exit"
 1016  sh run
 1017  history
 1018  make
 1019  pwd
 1020  cd head
 1021  make
 1022  ls db
 1023  ls -l db
 1024  ls
 1025  vi ftdiApp/Db/Makefile
 1026  ls ftdiApp/Db/
 1027  vi ftdiApp/Db/ftdiCommon.db
 1028  make

I've updated the 'run' script a little to try to ensure that multiple copies don't get started.
To summarize: 
......
cd /usr/local/epics/ioc/siocftdi/
sh -x run

Or, to attach to a running IOC to check its console messages or terminate it:
......
cd /usr/local/epics/ioc/siocftdi/
sh -x attach
Then type 'exit'

Also, all console messages are logged in
 /usr/local/epics/ioc/siocftdi/screenlog.0

Friday, September 6, 2013

Compiling xilinx Simulation libraries for modelsim

2.2 Simulation Library Compilation Wizard
This method is highly recommended because library compilation can be performed for more
than one device family and/or language.
1. Open the Simulation Library Compilation Wizard. This can be accessed from Start
Menu!Programs!Xilinx ISE Design Suite 13.x!ISE Design Tools!32-bit Tools.
Note: If you are using 64-bit version of ModelSim use the Simulation Library Compilation
Wizard from 64-bit Tools. ModelSim PE Student Version 10.x is only available in the
32-bit version.
2. The Select Simulator window opens up. Select the appropriate simulator (For Student
Edition select ModelSim PE), enter c:nmodeltech64 10.0cnwin64 for executable location,
compxlib.cfg for Compxlib Con guration File and compxlib.log for Compxlib Log File.
3. Next select the HDL used for simulation. If you are unsure select Both VHDL and Verilog.
However, this will increase the compilation time and the disk space required.
4. Then select all the device families that you will be working with. Again the more number
of devices, more the compilation time and the disk space required. Remember that you
can always run the compilation wizard at a later time for additional devices.
5. The next window is for Selecting libraries for Functional and Timing Simulation. Di erent
libraries are required for di erent types of simulation (behavioral, post-route, etc.). We
suggest that you select All Libraries as the default option. Interested users can refer to
Chapter 6 of the Xilinx Synthesis and Simulation Design Guide for additional information.
6. Finally the window for Output directory for compiled libraries is shown. We suggest to
leave the default values that Xilinx picks. Then select Launch Compile Process.
7. Be patient as the compilation can take a long time depending on the options that you
have chosen.
8. The compile process may have contain a lot of warnings but should be error-free. We
have not explored the reasons behind these warnings, but they do not appear to a ect
the simulation of any of our designs.
9. Once the process is completed, open c:nmodeltech64 10.0cnmodelsim.ini and verify if there
are libraries pointing to the output directory entered in step 6. This will happen only if
you have set the environment variables.
Library compilation is now complete. If you have not set the environment variables then
the wizard creates a modelsim.ini in the output directory entered in step 6. By default this
location is c:nXilinxn13.xnISE DSnISE. Open this le and verify that it contains the location of
the libraries that were just compiled. This le should be copied into every project you create.

Take a look at this PDF for more info.

Tuesday, August 20, 2013

putting custom template format into xilinx autogenerated files

If you have your own installation of the software you could hard code your changes into the Tcl scripts that control this.
For example, the company name could be entered for VHDL modules and VHDL TBs in the following files.

C:\xilinx\13.1\ISE_DS\ISE\data\projnav\scripts\dpm_sourceTasks.Tcl, line 713 – VHDL Module
C:\xilinx\13.1\ISE_DS\ISE\data\testbnch2.tcl – VHDL Testbench

I modified my file like this:  (however i had some issues later and it wasn't doing anything, just creating blank files, If you have a solution for this please let me know, if not try this under your own risk.)

set _t [clock seconds]
set _ts [clock format $_t -format "%H:%M:%S %m/%d/%Y"]
set _date_stamp [clock -format "%m/%d/%Y"]
global xilinx::Dpm::INewSourceHdlDataID
set _iHdlData [$iNewSourceComp GetInterface $INewSourceHdlDataID]
if { $_iHdlData == 0 } {
return [dpm_Fail "interface passed to Create New Source code hook is invalid."]
}
set _entityName ""
dpm_returnOnFail { $_iHdlData GetEntityName _entityName }
set _archName ""
dpm_returnOnFail { $_iHdlData GetModuleName _archName }
dpm_Debug 11 "architecture returned is $_archName"
set _portIter 0
$_iHdlData GetPorts _portIter
puts $hFile "----------------------------------------------------------------------------------"
puts $hFile "-- Company: LBNL"
puts $hFile "-- Engineer: Luis Ardila (leardilap@******** - leardilap@********)"
puts $hFile "-- "
puts $hFile "-- Create Date: $_ts "
puts $hFile "-- Design Name: "
puts $hFile "-- Module Name: $_entityName - $_archName "
puts $hFile "-- Project Name: "
puts $hFile "-- Target Devices: "
puts $hFile "-- Tool versions: "
puts $hFile "-- Description: "
puts $hFile "--"
puts $hFile "-- Dependencies: "
puts $hFile "--"
puts $hFile "-- Revision: "
puts $hFile "-- Date Version Author Description"
puts $hFile "-- $_date_stamp 1.0 Luis Ardila File Created"

puts $hFile "-- Additional Comments: "
puts $hFile "--"
puts $hFile "----------------------------------------------------------------------------------"
puts $hFile "LIBRARY IEEE;"
puts $hFile "USE IEEE.STD_LOGIC_1164.ALL;"

Tuesday, August 6, 2013

Solo quería compartir una frase que me pareció interesante

"Always forgive the one that go to far, never forgive the boring ones" -Marco Grob- fotógrafo exclusivo de retratos


Maine Media Workshops Interview with Marco Grob from Maine Media Workshops + College on Vimeo.

Friday, June 7, 2013

Creating Components and libraries in Kicad

Refer to this tutorial, where it is well documented:

compressing file from the command line and adding the date of creation to it


You need to use tar command as follows (syntax of tar command):
tar -zcvf LC52_`date +%b%d-%y`.tag.gz data/


Where,
  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name
  • -x: Extract files
source: link for compresing and link for date on file 1, 2