Monday, March 28, 2011

Quartus Makefile flow


Click image to enlarge...

Friday, March 25, 2011

Xilinx TCL Flow Example

# try.tcl
# usage: xtclsh try.tcl
# xtclsh is Xilinx tcl shell
# reference: http://www.xilinx.com/itp/xilinx10/books/docs/dev/dev.pdf
# -- details on commandline and tcl command to create and setup project
# http://www.doulos.com/knowhow/tcltk/xilinx/
# -- An good example

# From an existing project, a tcl script can be generated in ISE/project/generate tcl
# It could be usefull as a reference to write my own tcl script, especially to setup process properties.

# Some include file will need to be copied to working directory if they are needed to parse the architecture
# The include file which is included by other include file may need to be copied to working directory??
# Within cygwin terminal, xtclsh works, but from tcsh or xterm, it frozen.

# the following is oen of my example tcl script
# It works with ISE 12.1

if { $argc != 1 } {
puts "The tcl script requires one arguement ."
puts "For example, xtclsh main.tcl my_prj"
puts "Please try again."
} else {
set PRJ_NAME [lindex $argv 0]
}

project close

## put out a 'heartbeat' - so we know something's happening.
puts "\n$PRJ_NAME: Rebuilding ($PRJ_NAME)...\n"


# Remove existed project files
set proj_exts [ list ise xise gise ]
foreach ext $proj_exts {
set proj_name "${PRJ_NAME}.$ext"
if { [ file exists $proj_name ] } {
file delete $proj_name
}
}

# Build a new project
project new ${PRJ_NAME}.xise

# Set project properties
project set family spartan6
project set device xc6slx45t
project set package fgg484
project set speed -3


project set "Verilog Include Directories" "...." -process "Synthesize - XST"

# Add source file
source rtl_files_list.tcl

# Add constraint files
xfile add "my_prj.ucf"

# project set "Manual Implementation Compile Order" true

# Set project properties
#project set Top $proj_name

# Set process option
# TBD

project set "Cores Search Directories" "...."


project set "Macro Search Path" "...."

# Run implementation
process run "Implement Design"
process run "Generate Programming File"

# close project
project close

A good blog site to look at.
If you are doing EE stuff.

http://www.eetimes.com/electronics-blogs

Friday, March 18, 2011

Endian

Depending on which computing system you use, you will have to consider the byte order in which multibyte numbers are stored, particularly when you are writing those numbers to a file. The two orders are called "Little Endian" and "Big Endian".

The Basics

"Little Endian" means that the low-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address. (The little end comes first.) For example, a 4 byte LongInt

    Byte3 Byte2 Byte1 Byte0
will be arranged in memory as follows:
    Base Address+0   Byte0
Base Address+1 Byte1
Base Address+2 Byte2
Base Address+3 Byte3
Intel processors (those used in PC's) use "Little Endian" byte order.

"Big Endian" means that the high-order byte of the number is stored in memory at the lowest address, and the low-order byte at the highest address. (The big end comes first.) Our LongInt, would then be stored as:

    Base Address+0   Byte3
Base Address+1 Byte2
Base Address+2 Byte1
Base Address+3 Byte0
Motorola processors (those used in Mac's) use "Big Endian" byte order.

Spansion S29GL512N simulation model issue

There is a bug in the simulation model V1.3 and eariler. Not try any version newer.

When doing section erase, the RY should be de-asserted right after erase command, but instead, it is de-asserted after 50us.

Note: 50us is the timeout time of erase command. After this time, the device starts real erasing process.

Impact: If the RTL checks if the device is buys or not based on RY, this would give RTL wrong status.

Fix: de-asserte RY right after erase command.

CVS tag - delete, rename, remove

Deleting, moving, and renaming tags

Normally one does not modify tags. They exist in order to record the history of the repository and so deleting them or changing their meaning would, generally, not be what you want.

However, there might be cases in which one uses a tag temporarily or accidentally puts one in the wrong place. Therefore, one might delete, move, or rename a tag. Warning: the commands in this section are dangerous; they permanently discard historical information and it can difficult or impossible to recover from errors. If you are a cvsnt administrator, you may consider restricting these commands with taginfo (the section called “User-defined logging”).

To delete a tag, specify the -d option to either cvs tag or cvs rtag. For example:

cvs rtag -d rel-0-4 tc

deletes the tag rel-0-4 from the module tc.

When we say move a tag, we mean to make the same name point to different revisions. For example, the stable tag may currently point to revision 1.4 of backend.c and perhaps we want to make it point to revision 1.6. To move a tag, specify the -F option to either cvs tag or cvs rtag. For example, the task just mentioned might be accomplished as:

cvs tag -r 1.6 -F stable backend.c

By default CVS doesn't allow moving and deleting branch tags, as this should not be done without understanding the issues that this raises. To override this, specify the -B option on the command line.

When we say rename a tag, we mean to make a different name point to the same revisions as the old tag. For example, one may have misspelled the tag name and want to correct it (hopefully before others are relying on the old spelling). To rename a tag, first create a new tag using the -r option to cvs rtag, and then delete the old name. This leaves the new tag on exactly the same files as the old tag. For example:

cvs rtag -r old-name-0-4 rel-0-4 tc
cvs rtag -d old-name-0-4 tc