New Horizons






<< November 2006 >>
Sun Mon Tue Wed Thu Fri Sat
 01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30


Table of content

New Horizons
What's new
Starting a blog
Writing a blog
I got a job

SystemC
SystemC from scratch. Part 1
SystemC from scratch. Part 2
SystemC from scratch. Part 3

ASIC/FPGA Design
Table of content
Index
FPGA design from scratch. Part 1
FPGA design from scratch. Part 2
FPGA design from scratch. Part 3
FPGA design from scratch. Part 4
FPGA design from scratch. Part 5
FPGA design from scratch. Part 6
FPGA design from scratch. Part 7
FPGA design from scratch. Part 8
FPGA design from scratch. Part 9
FPGA design from scratch. Part 10
FPGA design from scratch. Part 11
FPGA design from scratch. Part 12
FPGA design from scratch. Part 13
FPGA design from scratch. Part 14
FPGA design from scratch. Part 15
FPGA design from scratch. Part 16
FPGA design from scratch. Part 17
FPGA design from scratch. Part 18
FPGA design from scratch. Part 19
FPGA design from scratch. Part 20
FPGA design from scratch. Part 21
FPGA design from scratch. Part 22
FPGA design from scratch. Part 23
FPGA design from scratch. Part 24
FPGA design from scratch. Part 25
FPGA design from scratch. Part 26
FPGA design from scratch. Part 27
FPGA design from scratch. Part 28
FPGA design from scratch. Part 29
FPGA design from scratch. Part 30
FPGA design from scratch. Part 31
FPGA design from scratch. Part 32
FPGA design from scratch. Part 33
FPGA design from scratch. Part 34
FPGA design from scratch. Part 35
FPGA design from scratch. Part 36
FPGA design from scratch. Part 37
FPGA design from scratch. Part 38
FPGA design from scratch. Part 39
FPGA design from scratch. Part 40
FPGA design from scratch. Part 41
FPGA design from scratch. Part 42
FPGA design from scratch. Part 43
FPGA design from scratch. Part 44
FPGA design from scratch. Part 45
FPGA design from scratch. Part 46
FPGA design from scratch. Part 47
FPGA design from scratch. Part 48
FPGA design from scratch. Part 49
FPGA design from scratch. Part 50
Links
Acronyms and abbreviations
XCell Journals
CAD
A hardware designer's best friend
Zoo Design Platform
Linux
Installing Ubuntu Linux on a MacBook
Customizing Ubuntu Linux 1
Customizing Ubuntu Linux 2
Upgrading to Ubuntu 7.04
Install Ubuntu 7.04 with VMware
Making the virtual machine run faster
Ubuntu Links
A processor benchmark
Mac
Porting a Unix program to Mac OS X
Fixing a HyperTerminal in Mac OS X
A dream come true
Wireless freedom
Running
The New York City Marathon
Skiing/Skating
Kittelfjäll Lappland
Tour skating in Sweden and around the world
Top
Introduction
SSSK
Wild skating
Tour day
Safety equipment
A look at the equipment you need
Skate maintenance
Calendar
Links
Books, photos, films and videos
Weather forecasts
Travel
38000 feet above see level
A trip to Spain
Florida the sunshine state


Example Files
Verilog Testbench Body
Verilog Testcase
Verilog Setup
Simulation Result File
Simulation Report File




Photo Albums
Seaside Florida
Ronda Spain
Sevilla Spain
Cordoba Spain
Alhambra Spain
Kittelfjäll Lapland
Landsort Art Walk
Skating on thin ice


Favorites
Adventures in ASIC
ChipHit
Computer History Museum
Community of Sweden
DeepChip
Design & Reuse
Dilbert
EDA Cafe
EDA DesignLine
Embedded.com
EmbeddedRelated.com
FPGA Arcade
FPGA Blog
FPGA Central
FPGA Journal
FPGA World
MacApper
Mac geekery
Mac 2 Ubuntu
Get Perpendicular
Programmable Logic DesignLine
History of Linux
OpenCores
ORSoC
Simplehelp
SOCcentral
World of ASIC



New York City Marathon




If you want to be updated on this weblog Enter your email here:



rss feed



 
Dec 11, 2006
FPGA design from scratch. Part 9
When we have a stable design it is time to start the regression testing. We have to put together a test suite containing all the testcases we would like to use for our functional simulation. When we run all these testcases we will produce a lot of test result log files. We need a system to handle the whole regression testing and the Mongoose Simulation Environment can help you.

Regression Testing in Mongoose

Mongoose uses test sequences written in the Mongoose
Script Language (MSL) to perform regression testing. A  test sequence is a collection of testcases that are executed in sequence. You can control when to start a new testcase and where to send it. It can run as a background job on your own host or it can be sent to a batch queue manager (LSF) and  run on a dedicated simulation host.
This flow diagram shows the process of generating a test sequence, running a test sequence, analyzing the result and display the result in a web browser and/or send an email or
SMS with a summary of all test results.



Here is an example of a test sequence file. You can mix unix commands and Mongoose script commands. Lines starting with UC: are a unix commands and lines starting with MC: are Mongoose commands. You can write this file by hand or you can use the Test Sequence Generator to automatically generate one from the testcases you selected.


//$$HEADER
/*************************************************************************/
// Module:        ETC_TEST
// Design:        ETC
// Written by:    Sven-Ake Andersson ZooCad Consulting
// Description:   Test sequence file used for regression runs 
/*************************************************************************/

UC:echo 'Start test sequence'
MC:DisplayTime
MC:ClearAllCounters
MC:ClearFileNameAddOns
MC:AddTestCountToFileName
MC:AddTagNameToFileName
MC:SaveTickerInfo
MC:StartTicker
MC:SetTestCounter 1
MC:SetTagName ETC
MC:SetReportFormatShort
MC:SelectLogFile On
MC:SetReleaseName today
// Start of test sequence
UC:echo 'Testcase running : AllInstructionsExternalExcl.tc'
1:AllInstructionsExternalExcl.tc
MC:WaitSeconds 20
MC:WaitForSimulationToFinish 100
UC:echo 'Testcase running : BypassExternalExcl.tc'
1:BypassExternalExcl.tc
MC:WaitSeconds 20
MC:WaitForSimulationToFinish 100
// Add more testcases here
// ..................
MC:GenerateErrorReport
MC:DisplayHtmlFile
// Stop routine

UC:echo 'End of test sequence'
MC:SendErrorCount
MC:SendSMS 0706420380
MC:SendEmail zoodesign@comhem.se
MC:DisplayTime
MC:EndOfTestSequence


This is the email and SMS message sender window.



After running our testcases we have all
simulation log files saved in the result/printout directory:



Let's use the Log File Analyzer/Test Report Generator to generate a condensed test report file.



The Test Report Generator will search all log files for important information and put it into the
report file. The two errors reported are from testcases testing a function not implemented and can be ignored. We are finally ready for implementing the design into the FPGA.

Here is the email sent from the Mongoose script:




Top
Next  Previous




Posted at 03:02 pm by svenand
Make a comment  

 
Dec 10, 2006
FPGA design from scratch. Part 10
It took longer than expected to finalize the verification phase but I think we can regain this lost time when we start debugging the real design. Hopefully we will not have that many bugs left in the design. We are now ready for the final synthesis runs.

Synthesis with timing constraints

Logic synthesis is a process by which an abstract form of desired circuit behavior (typically register transfer level (RTL) or behavioral) is turned into a design implementation in terms of logic gates. Common examples of this process include synthesis of HDLs, including VHDL and Verilog. Some tools can generate bitstreams for programmable logic devices such as PALs or FPGAs, while others target the creation of ASICs. Logic synthesis is one aspect of electronic design automation.

The synthesis is part of the
design closure process by which a VLSI design is modified from its initial description to meet a growing list of design constraints and objectives. A constraint is a design target that must be met in order for the design to be considered successful. For example, a chip may be required to run at a specific frequency in order to interface with other components in a system. Other constraints can be the power consumption and the chip size.

Designing an embedded system design in an FPGA that meets all timing requirements, starts already in the planing phase and continues throughout the whole project. Here are some important steps in achieving design closure.
  1. Understanding the differences between ASIC and FPGA
  2. System analysis and design partitioning
  3. RTL design for FPGA
  4. Synthesizing using the "right" timing constraints.
  5. Floor planing critical parts of the design
  6. Place and route and pin placement
Here is an article from Altera describing the differences between ASIC and FPGA design. From Altera you can also download the ASIC to FPGA Design Methodology & Guidelines.

In our design the only constraints we have are timing constraints for input and output signals. The design will operate at a maximum clock frequence of 54 MHz .This will be easily met in the Virtex-4 FPGA family.


We will use the Xilinx synthesis tool
XST because it is part of the Integrated Software Environment (ISE) and it is free. Here is an interesting article form FPGA Journal about "free" synthesis tools, how good are they. Other synthesis tools we could have used can be found in this table:

 Tool  Vendor
 Synplify Pro  Synplicity
 Precision  Mentor

Before we start the synthesis run, let's take a look in the 
XST User Guide
and the FAQ.

XST is a Xilinx tool that synthesizes HDL designs to create Xilinx specific netlist files called NGC files. The NGC file is a netlist that contains both logical design data and constraints that takes the place of both EDIF
and NCF (Netlist Constraints File) files. This manual describes XST support for Xilinx devices, HDL languages and design constraints. The manual also explains how to use various design optimization and coding techniques when creating designs for use with XST. We can choose to run XST from the command line or from inside the Project Navigator. Let's start the Project Navigator and follow these instructions.

=> ise &



After the synthesis the ISE project directory looks like this:




The synthesis report file


The Synthesis Report file is called <ETC.syr>, let's take a
look at it. We can see that the synthesis was successful, that the timing looks good and that the device utilization is about 10%. We could have used a smaller FPGA.
Timing Summary:
---------------
Speed Grade: -12

Minimum period: 5.839ns (Maximum Frequency: 171.250MHz)
Minimum input arrival time before clock: 5.433ns
Maximum output required time after clock: 6.491ns
Maximum combinational path delay: 8.409ns



Device utilization summary:

---------------------------

Selected Device : 4vfx12ff668-12

Number of Slices: 601 out of 5472 10%
Number of Slice Flip Flops: 570 out of 10944 5%
Number of 4 input LUT
s: 1113 out of 10944 10%
Number of IOs: 129
Number of bonded IOBs: 109 out of 320 34%
Number of GCLKs: 2 out of 32 6%

What else can we find out from the synthesis report file

The memory blocks are black boxed:

WARNING:Xst:2211 - "../../design/ETC_DUAL_PORT_1024x32.v" line 327:
Instantiating black box module <ETC_DUAL_PORT_1024x32>.

WARNING:Xst:2211 - "../../design/ETC_DUAL_PORT_1024x32.v" line 339:
Instantiating black box module <ETC_DUAL_PORT_1024x32>.

Black box instantiation

A black box is any instantiated component that is not represented by HDL code, but rather by another netlist format. Synthesis tools will generally report some kind of warning when a black box (this is, an instantiated component with no associated VHDL code) is detected.


Examples of black boxes include:
- CORE Generator modules (in our case)
- Instantiated EDIF files
- Instantiated primitives

If you are instantiating a component that is represented by something other than VHDL code, no response to the warning message is needed. If your intent was not to instantiate a black box, check your component declaration and instantiation to ensure that the component is properly represented by VHDL code.

To avoid "black box" warning messages, add the following lines to your HDL code:

VHDL:

architecture <architecture_name>
:

attribute box_type : string;
attribute box_type of <component_name> : component is "black_box";
:

begin

Verilog:

//synthesis attribute box_type <module_name> "black_box"


Unused register bits

Some registers have unused bits:
WARNING:Xst:646 - Signal <tdi_data_reg1<31:30>> is assigned but never used.
WARNING:Xst:646 - Signal <tdi_data_reg2<31:30>> is assigned but never used.
WARNING:Xst:646 - Signal <tdi_data_reg3<31:30>> is assigned but never used.
WARNING:Xst:646 - Signal <tdi_data_reg4<31:30>> is assigned but never used.
One-hot encoding not safe
INFO:Xst:2117 - HDL ADVISOR -Mux Selector <jtc_tck_source> of Case statement line 313 
was re-encoded using one-hot encoding.The case statement will be optimized
(default statement optimization),but this optimization may lead to design initialization problems.
To ensure the design works safely, you can:
- add an 'INIT' attribute on signal <jtc_tck_source> (optimization is then done without any risk)
- use the attribute 'signal_encoding user' to avoid onehot optimization
- use the attribute 'safe_implementation yes' to force XST to perform a safe (but less efficient) optimization

We will take a closer look at these warnings and info messages but before we do, we will generate a Post-Synthesis Simulation Model.

Post-synthesis simulation model

The Post-Synthesis Simulation Model will contain all the building blocks used in the FPGA, like LUTs, muxes and I/O buffers. It is functionally correct but it has no timing information and it should be simulated using the unisim library.
Double-click the <Generate Post-Synthesis Simulation Model> entry in the Processes window in the Project Navigator to start the generation.
The flat netlist file
ETC_synthesis.v
will be found in the <ETC/netgen/synthesis> directory.
Before we can use it in our simulation we have to add the following instantiation <glbl   glbl();>  inside the module ETC.

We replace the ETC RTL design files with the ETC netlist file in our simulation setup and rerun our testcases and they all pass. The synthesis tool did its job.



Top  Next  Previous


Posted at 08:57 am by svenand
Make a comment  

 
Dec 7, 2006
FPGA design from scratch. Part 11
Before we continue our FPGA design journey we will make a short stop and take a closer look at the leading actor/actress in this story. The FPGA device itself.

The Field Programmable Gate Array

If you are not involved in electronic design this header makes no sense to you. Is it a computer game where you try to arrange an array of gates out in a corn field or what is it? Let's start by explaining the gate array part first. We will turn to the
Wikipedia encyclopedia for an explanation as we have done so many times before in this story.

A gate array is an approach to the design and manufacture of application-specific integrated circuits (ASICS). A gate array circuit is a prefabricated silicon chip circuit with no particular function in which transistors, standard NAND or NOR logic gates, and other active devices are placed at regular predefined positions and manufactured on a wafer, usually called master slice. Creation of a circuit with a specified function is accomplished by adding a final surface layer metal interconnects to the chips on the master slice late in the manufacturing process, joining these elements to allow the function of the chip to be customised as desired. This layer is analogous to the copper layer of a single-sided printed circuit board PCB.

Instead of having to manufacture the gate array at an expensive silicon foundry we can make it programmable by the user (in the field) and we will come up with a field programmable gate array.

A field programmable gate array (FPGA) is a semiconductor device containing programmable logic components and programmable interconnects. The programmable logic components can be programmed to duplicate the functionality of basic logic gates such as AND, OR, XOR, NOT or more complex combinational functions such as decoders or simple math functions. In most FPGAs, these programmable logic components (or logic blocks, in FPGA parlance) also include memory elements, which may be simple flip-flops or more complete blocks of memories.

Basic process technology types

  • SRAM - based on static memory technology. In-system programmable and re-programmable. Requires external boot devices. CMOS.
  • Antifuse - One-time programmable. CMOS.
  • EPROM - Erasable Programmable Read-Only Memory technology. Usually one-time programmable in production because of plastic packaging. Windowed devices can be erased with ultraviolet (UV) light. CMOS.
  • EEPROM - Electrically Erasable Programmable Read-Only Memory technology. Can be erased, even in plastic packages. Some, but not all, EEPROM devices can be in-system programmed. CMOS.
  • Flash - Flash-erase EPROM technology. Can be erased, even in plastic packages. Some, but not all, flash devices can be in-system programmed. Usually, a flash cell is smaller than an equivalent EEPROM cell and is therefore less expensive to manufacture. CMOS.
  • Fuse - One-time programmable. Bipolar.

FPGA manufacturers and their specialties

As of late 2006, the FPGA market has mostly settled into a state where there are two major "general-purpose" FPGA manufacturers and a number of other players who differentiate themselves by offering unique capabilities.

  • Xilinx and Altera are the current FPGA market leaders.
  • Lattice Semiconductor provides both SRAM and non-volatile, flash-based FPGAs.
  • Actel has antifuse and reprogrammable flash-based FPGAs, and also offers mixed signal flash-based FPGAs.
  • Atmel provides fine-grain reconfigurable devices, as the Xilinx XC62xx were. They focus on providing AVR Microcontrollers with FPGA fabric on the same die.

I have chosen to use a Xilinx FPGA in this story not because it is better or more powerful then the competitors, but it has the MicroBlaze soft processor core which is important to me. The evaluation board I purchased contains a Xilinx Virtex-4 FPGA device (XC4VFX12). Here is a good start to the Xilinx FPGA world.

The Virtex-4 FPGA family

The Virtex-4 family of FPGAs was introduced 2004 and includes three platforms; Virtex-4 LX for logic, Virtex-4 SX for very high performance signal processing, and Virtex-4 FX for embedded processing and high-speed serial connectivity. Each version has a different mix of the special features and comes in a range of density to cover a variety of application sizes. Here is the data sheet.
 
                                                                                                                    (Courtesy of Xilinx)

These
product tables show the different platforms and which features are included. To find out more about the Virtex-4 family read the user guide (pdf). Let's take a look at the XC4VFX12 and see what's inside the chip.



                                                                                                                                                         
(Courtesy of Xilinx)
Logic Cells

A logic cell is defined by Xilinx to be one 4 input
LUT + a flip flop + carry logic. The XC4FX12 has 12,312 logic cells. A logic cell looks like this:




Configurable Logic Blocks

The Configurable Logic Block (CLB) is the basic logic unit in an FPGA. Exact numbers and features vary from device to device, but every CLB consists of a configurable switch matrix with 4 or 6 inputs, some selection circuitry (MUX, etc), and flip-flops. The switch matrix is highly flexible and can be configured to handle combinatorial logic, shift registers, or RAM.
  • CLB is optimized for area and speed for compact high performance design.
  • Four slices per CLB implement any combinatorial and sequential circuit.
  • Each slice has 4-input look-up tables (LUT), flip-flops, multiplexors, arithmetic logic, carry logic, and dedicated internal routing.
  • Dedicated AND/OR logic implements wide input functions.
CLB Block Diagram
                                                                          (Courtesy of Xilinx)

Smart RAM

There are several ways you can build a memory in the XC4VFX12.

Shift Register SRL16 block

  • Configure any CLB LUT (Look-Up Table) to work as a fast, compact, 16-bit shift register.
  • Cascade LUTs to build longer shift registers.
  • Implement pipeline registers and buffers for video, wireless.

Distributed RAM

  • Configure any LUT to work as a single-port or dual-port 16-bit RAM/ROM.
  • Cascade LUTs to build larger memories.
  • Applications include flexible memory sizes, FIFOs, and buffers.

Embedded Block RAM

  • 36 blocks of cascadable, synchronous 18 Kbit block RAM.
  • Configure any 18 Kbit block as a single/dual-port RAM.
  • Supports multiple aspect ratios, data-width conversion, and parity.
  • Applications include data caches, deep FIFOs, and buffers.
  • The maximum size of a block RAM is 648 kbits

Digital Clock Managers

The Digital Clock Managers (DCM) provides a number of clock management features:
  • Clock deskew. The DCM contains a delayed-locked loop to completely eliminate clock distribution delays.
  • Frequency Synthesis. Separate outputs provide a doubled frequency. Another output provides a frequency that is a specified fraction of the input.
  • Phase shifting. The DCM allows coarse and fine-grained phase-shifting.

XtremeDSP Slices

The
XtremeDSP slices contain a dedicated 18x18-bits 2's complement signed multiplier, adder logic, and a 48 bit accumulator. Each multiplier and accumulator can be used independently. XC4VFX12 has 32 XtremeDSPs.

PowerPC Processor Block


The XC4VFX12 FPGA has one PowerPC™ 405, 32-bit RISC processor core. This industry standard processor offer high performance and a broad range of third-party support. The new Auxiliary Processor Unit (APU) controller simplifies the integration of hardware accelerators and co-processors.

PowerPC Block Diagram
                                                                    (Courtesy of Xilinx)
Ethernet MAC

The XC4VFX12 FPGA has built-in Ethernet connectivity with two Ethernet media access controller (MAC) blocks. The Xilinx unique tri-mode Ethernet MAC provides guaranteed performance and UNH-verified interoperability. This integrated functionality reduces total system cost by reducing design and verification effort, freeing approximately 1,800 logic cells per Ethernet MAC in the FPGA fabric.

Summary

The XC4VFX12FPGA device has 12,312 logic cells. We will use about 1200 logic cells for the design excluding the MicroBlaze soft processor core. The MicroBlaze will use between 800 to 2600 LUTs. For the block RAM we will use 64 kbits out of 648 kbits. There is plenty of room for future expansions.

More to read

If you want to know more about FPGA design look for a book at
Amazon.com.

Training

Here are some companies providing training for Xilinix users. There are many more.
Top  Next  Previous



Posted at 09:09 am by svenand
Make a comment  

 
Dec 6, 2006
FPGA design from scratch. Part 12
Adding synthesis constraints

Constraints are essential to help you meet your design goals or obtain the best implementation of your circuit. Constraints are available in XST to control various aspects of the synthesis process itself, as well as placement and routing. Synthesis algorithms and heuristics have been tuned to automatically provide optimal results in most situations. In some cases, however, synthesis may fail to initially achieve optimal results; some of the available constraints allow you to explore different synthesis alternatives to meet your specific needs.

XST constraints can be specified in a file called the Xilinx Constraint File (XCF). The XCF must have an extension of .xcf.
To add a synthesis constraints file open the Synthesis Options window by right-clicking Synthesize - XST in the Proceses window and select Properties. Mark the Use Synthesis Constraints File box and fill in the name of the Synthesis Constraints File : /home/svenand/root/projects/ETC/synthesis/constraints/ETC_constraints.xcf



This
table shows all synthesis constraints available for XST.

Here is the constraints file I am using to make a safe implementation of the case statements in the ETC_CONFIG module.

BEGIN MODEL ETC_CONFIG
   NET jtc_tck_source       safe_implementation = yes;
   NET tdo_source           safe_implementation = yes;
   NET jtc_tms_source       safe_implementation = yes;
   NET jtc_trstz_source     safe_implementation = yes;
   NET jtc_tdi_source       safe_implementation = yes;
   NET mtc_tdo_source       safe_implementation = yes;
END;

When we rerun the synthesis we will see the following messages appear in the report file:

Analyzing module <ETC_CONFIG> in library <work>.
    Set property "SAFE_IMPLEMENTATION = yes" for signal <jtc_tms_source> in unit <ETC_CONFIG>.
    Set property "SAFE_IMPLEMENTATION = yes" for signal <jtc_tck_source> in unit <ETC_CONFIG>.
    Set property "SAFE_IMPLEMENTATION = yes" for signal <jtc_trstz_source> in unit <ETC_CONFIG>.
    Set property "SAFE_IMPLEMENTATION = yes" for signal <mtc_tdo_source> in unit <ETC_CONFIG>.
    Set property "SAFE_IMPLEMENTATION = yes" for signal <tdo_source> in unit <ETC_CONFIG>.
    Set property "SAFE_IMPLEMENTATION = yes" for signal <jtc_tdi_source> in unit <ETC_CONFIG>.

Top  Next  Previous



Posted at 03:56 pm by svenand
Comment (1)  

 
Dec 5, 2006
FPGA design from scratch. Part 13
The MicroBlaze soft processor

We will use the
MicroBlaze soft processor as the main controller in our system. The MicroBlaze™ soft processor is a 32-bit Harvard RISC architecture optimized for Xilinx FPGAs. The basic architecture consists of 32 general-purpose registers, an Arithmetic Logic Unit (ALU), a shift unit, and two levels of interrupt. We can configure this basic design with more advanced features to allow us to balance the required performance of the target application against the logic area cost of the soft processor.


                                                                                                                                                                     
(Courtesy of Xilinx)
Here is the reference guide to
download.

Installation of the Embedded Development Kit (EDK)

The Embedded Development Kit provides you with a complete tool chain for the creation of your Virtex™ and Spartan™ series embedded PowerPC™ 405 and MicroBlaze™ designs. You find all the documentation here.

To install the Linux version of EDK follow these steps.
  1. Download the EDK Get Started  document
  2. Insert the Embedded Development Kit DVD. This DVD is part of the ML401 development kit.
  3. Open a terminal window and type cd /media/cdrom0 or whatever the path is to the cdrom.
  4. Execute the setup script ./setup. If everything goes fine the Xilinx Install Program window will be displayed.
  5. If you get the following error message when running the setup script it probably means that the system doesn't allow you to execute programs on the DVD:  bash: ./setup: /bin/sh: bad interpreter: Permission denied.
  6. To fix this problem you have to edit the file /etc/fstab (static file system information) and add execute permission to the line defining the cdrom. Here is an example:  /dev/hdb  /media/cdrom0   udf,iso9660 user,noauto,exec  0   0
  7. Restart the system and start from 3 again.



  1. Register the EDK software here.
  2. Fill in all information and have the EDK product ID available, found on the back of EDK Development Kit DVD.
  3. The registration code will appear in the web browser and will also be sent to the email address you specified.
  4. Read all license agreements carefully !!! and click the agree check boxes.
  5. Insert the registration code when asked for.
  6. Specify the destination directory where the EDK software will be installed.
  7. Start the installation


When the installation has finished we will see the following file tree structure.



The files settings.csh and settings.sh contains setting of environment variables used by EDK. If you use a bash or sh shell add the line: source edk_install_dir/settings.sh to your shell startup file. If you use csh or tcsh add the line: source edk_install_dir/settings.csh to your shell startup file.

Now it is time to find the MicroBlaze VHDL source code. I wonder where it can be and in what format it is. Let's look in the hw directory.




Protected code

All the IP vendors protect their
intellectual property using different forms of encryption. The MicroBlaze VHDL source code is encrypted and can not be read, modified or understood. It can be compiled using the Cadence ncvhdl compiler and you don't need to specify any special flags for the compilation.

Xilinx libraries

UNISIM library

The UNISIM Library is a library of functional models used for behavioral and structural simulation. It includes all of the Xilinx Unified Library components that are inferred by most popular synthesis tools. The UNISIM library also includes components that are commonly instantiated, such as I/Os and memory cells. We can instantiate the UNISIM library components in our design (VHDL or Verilog) and  simulate them during behavioral simulation. All asynchronous components in the UNISIM library have zero delay. All synchronous components have a unit delay to avoid race conditions. The clock-to-out delay for these is 100 ps.

SIMPRIM library

The SIMPRIM Library is used for timing simulation. It includes all the Xilinx Primitives Library components used by Xilinx implementation tools.

XilinxCoreLib library

The Xilinx CORE Generator™ is a graphical Intellectual Property (IP) design tool for creating high-level modules like FIR Filters, FIFOs, CAMs, and other advanced IP. We can customize and pre-optimize modules to take advantage of the inherent architectural features of Xilinx FPGA devices, such as block multipliers, SRLs, fast carry logic and onchip, single-port or dual-port RAM.
The CORE Generator HDL library models are used for behavioral simulation. We can select the appropriate HDL model to integrate into our HDL design. The models do not use library components for global signals.

EDK library

The EDK Library is used for behavioral simulation. It contains all the EDK IP components, precompiled for ModelSim SE and PE or NcSim. This library eliminates the need to recompile EDK components on a per-project basis, minimizing overall compile time. The EDK IP components library is provided for VHDL only and may be encrypted. The Xilinx CompEDKLib utility deploys compiled models for EDK IP components into a common location. Unencrypted EDK IP components can be compiled using CompEDKLib. Precompiled libraries are provided for encrypted components.

Compiling everything


To find out how to compile all the libraries and all the IP blocks  for the IUS simulator we first read the
Embedded Systems Tools Guide. It tells us to use the Xilinx program compedklib to perform the compilation of all the libraries. We will use the program in GUI mode. Let's start. But before we start we will delete all old libraries we have compiled before. If not we may see a lot of compilation errors.

==> compedklib



Select the simulator to use.




Select directories to store compiled libraries.



Select directory to store EDK libs




Compile ISE and EDK libraries




Here is the result.




Now when we have everything compiled it is time to start building the complete simulation environment.That is the subject for the next chapter in this story.

Top Next  Previous



Posted at 12:28 pm by svenand
Comment (1)  

 
Dec 3, 2006
FPGA design from scratch. XCell Journals
 
Dec 2, 2006
ASIC & FPGA design. Links
 
Dec 1, 2006
ASIC and FPGA design. Acronyms and abbreviations
It very frustrating to read technical literature scattered with acronyms and abbreviations you don't understand or don't know the meaning of. The "FPGA design from scratch" story is also full of acronyms. I try to explain them the first time they are used but if you don't find an explanation in the text you can look here.

Here are some links to web sites that can help you.

 Acronym  Explanation  Comment
ASIC Application-Specific Integrated Circuit
 
CLB
Configurable Logic Block

CMOSComplementary metal–oxide–semiconductor
DCM
Digital Clock Manager

DSOCM
Data Side On-Chip Memory Controller

DSP
Digital Signal Processor

FIFO
First In First Out

FPGA Field Programmable Gate Array
 
ISOCM
Instruction Side On-Chip Memory Controller

JTAG Joint Test Action Group
 
LUT
Look-up table

MAC
Media Access Controller

NRE Non-Recurring Engineering
 
RISC
Reduced Instruction Set Computer

UNH University of New Hampshire   
     
     
     
     


Posted at 08:28 am by svenand
Make a comment  

 
Nov 26, 2006
A trip to Spain
This summer we went to Spain to visit our daughter Sara, who was studying Spanish in Sevilla. Sevilla is the capital of Andalucia the most southern province in Spain. To see a map of Spain you can go to Google Maps. We traveled with Spanair from  Stockholm to Malaga. The direct flight took 4 hours.

We had a rental car from AurigaCrown car hire waiting for us at the Malaga Airport, a dark blue Seat Leon, good-looking sporty car. It was too late to drive that far so we decided to stay the first night in Malaga at Hotel Los Naranjos. The second day we planned to arrive in Sevilla late in the afternoon. On the way to Sevilla we wanted to make a stop in Ronda. We took the route E15/A7 driving west from Malaga. Along the way we passed the famous resorts Torremolinos, Fuengirola and Marbella. We didn't see much of Costa del Sol but we saw a lot of ugly looking hotel complex. From Marbella we turned right and drove A-376 towards Ronda. The road started to climb up the mountain and would take us more than 1000 meters up.
Ronda is one of Andalucia's loveliest towns, steeped in history. It stands on a towering plateau in the mountains of Malaga Province, and is famous through Spain for the plunging river gorge which divides the medieval from the 18th century parts of the town. This gorge is known as "El Tajo" - The Cliff and is spanned by a stone bridge, which once housed a prison. Visitors love to peer down into the gorge, to see the waters of the River Guadalevín.

We walked around in Ronda for several hours in the heat and burning sun. We visited the bullring, one of the oldest in Spain and we climbed down all the stairs to the bottom of the gorge. We had lunch in a beautiful restaurant, Restaurante Santa Casa Pola that is built in to the mountain side of the gorge. Here are more photos from Ronda.  After this fantastic start of our journey through Andalucia it was time to get back on the road again and head for Sevilla. On our way to Sevilla we passed Alogodonales a famous center for paragliding and hang gliding in Southern Spain.

Sevilla is a big city with  a population of more than 1 million, ranking as the fourth-largest metropolitan area of Spain. We had a hard time finding our hotel without a good map and not knowing where we were. After we got lost several times in the old town with all its narrow one way streets we at last found our hotel, Catalonia Giralda. When we got out of our car the heat almost knocked us. The thermometer displayed 46 Celcius (115 Farenheit) and we hesitated to leave the air-conditioned car. When we entered the hotel lobby it was 20C (68F) inside. The hotel was nice and perfectly located close to the oldest part of Sevilla. There are so many things to see in Sevilla you could easily spend several week here. The main attractions are the Cathedral with the Giralda bell tower and the Alcazar royal palace.

The Cathedral of Sevilla, formally Catedral de Santa María de la Sede (Cathedral of Saint Mary of the See) was begun in 1402, with construction continuing into the 16th century.It is the largest of all Roman Catholic cathedrals and also the largest Medieval Gothic religious building, in terms of both area and volume. It is 76 by 115 meters, and was built to cover the land previously occupied by the Almohad Mosque. Its central nave rises to an awesome 42 metres and even the side chapels seem tall enough to contain an ordinary church. Its main altarpiece is considered the largest in the Christian world.

T
he Giralda is the bell tower of the Cathedral of Seville one of the largest churches in the world and an outstanding example of the Gothic and Baroque architectural styles. The tower is a former Almohad minaret which, when built, was the tallest tower in the world at 97.5 m (320 ft) in height. It was one of the most important symbols in the medieval city.
The Alcázar of Seville is a royal palace. Originally a Moorish fort, the Alcázar(from the Arabic القصر al-qasr, meaning "palace") has been expanded several times. The Almohades were the first to build a palace, called Al-Muwarak, on the site. Most of the modern Alcázar was built over Moorish ruins for King Pedro of Castile  with construction beginning in 1364. Pedro used Moorish workers to build his palace giving it a distinctly Islamic design. The palace is one of the best remaining examples of mudéjar architecture, a style under Christian rule in Spain but using Islamic architectural influence.
The city sits well inland, but a mere 6 metres above sea level. Seville was long an important
sea port, prior to the silting up of the Guadalquivir. From Seville Ferdinand Magellan obtained the ships for his circumnavigation. Much of the Spanish Empire's silver from the New World came to Europe in the Spanish treasure fleet that landed in Seville.

Sevilla is especially known for its
Flamenco artists. The best Spanish Guitar players are from Andalusia, and many of them from Sevilla. You can also find in Sevilla many Flamenco Shows, with dancers and singers. Here are some photos from Sevilla. The barrio of Triana, across the Rio Guadalquivir from central Sevilla, used to be the quarter of the city's gitanos and the home of Sevillian ceramics. This is also where Sara lives. She share an appartement together with three other students.
The first week we used Sevilla as our starting-point for excursion to exciting places in the south-west of Spain. In a few hours time we can reach
Cadiz, Jerez de la Frontera, Gibraltar and Costa de la Luz. One of the most beautiful beaches in Spain is Los Caños de Meca, located 10 km north of Barbate.

After one week in Sevilla we take road A4 to Cordoba. On the way we make a stop in Carmona. Carmona stands on a low hill just off A4, 38km east of Sevilla. It is a charming old town with impressive monuments from many different epochs and with fine views.
We arrive in the afternoon in
Cordoba and find our hotel Macia Alfaros a beautiful place with a refreshing outdoor swimming pool. Cordoba is famous for a single architectural  treasure, the Mezquita symbol of the sophisticated Islamic culture. Cordoba's medieval quarter, once the home of the Jewish community, is called "La Judería" (The Jewry), a labyrinth of winding, narrow streets, shady flower-filled courtyards and picturesque squares such as La Plaza del Potro. That night we are having a exquiste diner at restaurant Casa PePe. We are sitting outside at 11 pm and it is still 30 C and it feels cool compared to the 43 C in the middle of the day.

Our next stop on our Spanish tour is
Granada. There is no doubt about it - Granada does enchant. The Alhambra palace-fortress stretched along the top of the Sabika hill amid its sumptuos gardens, and the warrenlike Albayzin, Granada's old Islamic quarter, are highlights of any visit to Andalucia. There's no other city in Andalucia where the Islamic past feels so recent. We have booked a room at Parador de Granada Hotel San Fransisco which is part of the famous Palace of Alhambra. We were told we had to make reservations many month in advance but we were lucky and could get a room just a few weeks in advance. Parador hotels can be found all over Spain and they are operated by the Paradores de Turismo de Espana, S.A. which is state owned. Parador hotels are normally found in beautifully restored castles, palaces, fortresses, convents and other fine locations.



Want to read more about Andalucia search for a book at
Amazon.

When writing this story I had great help from Wikipedia, the free encyclopedia. Since its creation in 2001, Wikipedia has rapidly grown into the largest reference Web site on the Internet. The content of Wikipedia is free, and is written collaboratively by people from all around the world. This Web site is a wiki, which means that anyone with access to an Internet-connected computer can edit, correct, or improve information throughout the encyclopedia, simply by clicking the edit this page link.

Top

Posted at 08:58 pm by svenand
 

 
Nov 24, 2006
A processor benchmark
How fast is my MacBook? Let's compare it to some other computers. Here are the contanders.

 Model  Processor  Speed  Memory  Operating_System
 Compaq EVO N610c
 Pentium 4-M
 1.8 GHz
 512 MB
RedHat Rel 3.0
 SUN SunBlade 1500
 Ultra SPARC IIIi
 1.5 GHz
 1 GB
Solaris 10
 HP Proliant DL145
 AMD Opteron 200
 2.6 GHz
 32 GB
RedHat Rel 3.0
 Apple MacBook I
 Intel Duo Core
 2.0 GHz
 1 GB
 Note 1.
Mac OS X 10.47
Ubuntu 6.06
 Apple MacBook II
 Intel Duo 2 Core
 2.0 GHz
 1 GB
Note 1.
Mac OS X 10.48
Ubuntu 6.10

Note 1. On the MacBook all files are stored on the local disk. All the others have the files stored on an external file server.

The benchmark consists of two tasks. The first task uses ncvlog to compile a Xilinx macro library including 3100 Verilog files. The second task runs a verilog simulation using ncsim. Here are the results (in seconds) :

 Task  Compaq  Sun  HP  Apple I
Apple II
 Verilog compilation
 58  72  25  2423
 Verilog simulation
 60  59  31  2817



Top

Posted at 08:25 am by svenand
Make a comment  

Next Page