Friday, January 20, 2012

Connect clock signal to FPGA output pad

So now i know how to connect some internal clock signal to the output pin. Direct connection is impossible because the only dedicated clock signal buses can be connected only to the clock input pins of the internal flip-flops.
The internal clock signal can be connected to the output pin or to non clock signal with the following construct:
Here is the VHDL sample:
oddr2_0 : ODDR2
    port map(
        Q           => Output_clk_o,
        C0          => Output_clk_i,
        C1          => Output_clk_i,
        D0          => '0',
        D1          => '1'
    );

obuf_0 : OBUF
    generic map (
        CAPACITANCE => "NORMAL",
        IOSTANDARD  => "LVCMOS33",
        SLEW        => "FAST"
    )
    port map (
        O => Output_clk,
        I => Output_clk_o
    );
Where
  • Output_clk_i is some internal input clock signal
  • Output_clk_o is intermediate wire between ODDR2 and OBUF
  • Output_clk is output clock signal, which can be connected to the non clock input or to the output pin.
Same can be made for differential output clock:
Here is the VHDL sample:
oddr2_0 : ODDR2
    port map(
        Q           => Output_clk_o,
        C0          => Output_clk_i,
        C1          => Output_clk_i,
        D0          => '0',
        D1          => '1'
    );

obuf_0 : OBUFDS
    generic map (
        CAPACITANCE => "NORMAL",
        IOSTANDARD  => "LVDS_33",
        SLEW        => "FAST"
    )
    port map (
        O => Output_clk,
        OB => Output_clk_n,
        I => Output_clk_o
    );
Where
  • Output_clk_i is some internal input clock signal
  • Output_clk_o is intermediate wire between ODDR2 and OBUF
  • Output_clk is output clock signal, which can be connected to the non clock input or to the output pin.
  • Output_clk_n is negative output clock signal, which can be connected to the non clock input or to the output pin. 
In the VHDL file in entity block you must define this signals as clock for simulation:
attribute SIGIS : string;
attribute SIGIS of Output_clk         : signal is "CLK";
attribute SIGIS of Output_clk_n       : signal is "CLK";
If you use this code for embedded Xilinx MicroBlaze you must define this signal in MPD file as follow:
PORT Output_clk      = "", DIR = O, SIGIS = CLK
PORT Output_clk_n      = "", DIR = O, SIGIS = CLK
This information is get from Spartan-6 FPGA Clocking Resources on page 112.

Sunday, January 15, 2012

Usefull user constraints for axi_ethernet

If you try to get hardware design using axi_ethernet core you may to need this recommended constraints:
AXI_Ethernet v3.00.a - Recommended Constraints for AXI-based Ethernet Systems

The above link doesn't exists any more :( Here is carbon copy of them:

This Answer Record provides links to zip files with the recommended constraints for the AXI_Ethernet v3.00.a core logic. The constraints for the Ethernet pins themselves are not included. These constraints have been tested on specific development boards and some attributes such as IDELAY, IDELAYCTRL, and GTP/GTX locations can change in custom implementations.

Designs with AVB Endpoint Enabled (C_AVB = 1)

Virtex-6 Hard TEMAC Implementations 

Virtex-6 Soft TEMAC Implementations 

Spartan-6 Soft TEMAC Implementations 

Designs without AVB Endpoint Enabled (C_AVB = 0)

Virtex-6 Hard TEMAC Implementations 

Virtex-6 Soft TEMAC Implementations 

Spartan-6 Soft TEMAC Implementations 

Wednesday, December 28, 2011

My first experiments with Xilinx's FPGA

Ok, I've decided to note my breakthrough with FPGA.
Now I describe short what you need, if EDK say you that it can't find site for some PLL in clock generator you create in design. You must write in the constraint file (usually data\system.ucf) following code:

INST "clock_generator_0/clock_generator_0/PLL0_INST/Using_PLL_ADV.PLL_ADV_inst" LOC = "PLL_ADV_X0Y1";

The appropriate site you can find in the Spartan-6 FPGA Clocking Resources on the page 93 in table 3-1:

Table 3-1: PLLs with Direct Connections to BUFPLL
BUFPLL LocationBankValid PLL Locations by Device Type
LX4, LX9, LX16,
LX25/LX25T
LX45/LX45TLX75/LX75T
LX100/LX100T
LX150/LX150T
BUFPLL_X1Y5
BUFPLL_X1Y4
BUFPLL_MCB_X1Y9
0PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y5
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y0
BUFPLL_X2Y2
BUFPLL_X2Y3
BUFPLL_MCB_X2Y5
1 (5)PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y5
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y0
BUFPLL_X1Y0
BUFPLL_X1Y1
BUFPLL_MCB_X1Y5
2PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y5
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y0
BUFPLL_X0Y2
BUFPLL_X0Y3
BUFPLL_MCB_X0Y5
3 (4)PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y1
PLL_ADV_X0Y0
PLL_ADV_X0Y5
PLL_ADV_X0Y3
PLL_ADV_X0Y2
PLL_ADV_X0Y0

Friday, March 26, 2010

Eclipse J2EE & IAM - NullPointerException

An internal error occurred during: "Updating classpath container: ...".
java.lang.NullPointerException
    at org.eclipse.wst.common.componentcore.internal.resources.
        VirtualResource.removeLink(VirtualResource.java:300)
    at org.eclipse.iam.wtp.core.internal.war.MavenWarClasspathListener.
        addOverlayWarFolders(MavenWarClasspathListener.java:89)
    at org.eclipse.iam.wtp.core.internal.war.MavenWarClasspathListener.
        resolved(MavenWarClasspathListener.java:57)
You've seen this error in Eclipse? This error occurs on the Eclipse J2EE in conjunction with Eclipse IAM. If you are writing a web application using maven as the build system - your welcome.
On the Internet I found a temporary solution - every time I load the eclipse and it compiles all projects, I should in web applications delete the folder .settings. However, it is not easy and may not be long-term solution.
After a long search for a solution was found.
In the file .project is necessary to add in a tag natures:
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
Furthermore, in the folder .settings need to create or modify file org.eclipse.wst.common.component. It should contain:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="your-webapp">
         <module-type module-type-id="jst.web">
             <version>2.4</version>
             <property name="context-root" value="your-webapp"/>
             <property name="java-output-path" value="/target/classes/"/>
         </module-type>
         <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/classes"/>
     </wb-module>
</project-modules>
"your-webapp" should be replaced by the name of your project.

I advise you add this file to the version control system.

Thursday, March 25, 2010

Oracle WebCenter Interaction 10.3.0 on Mac OS X

For a week I am a happy owner of MacBook Pro with 8 GB of memory. And since I'm working on a corporate portal for a large company, I needed to install the development environment and the portal directly to Mac OS X. However, the Oracle WebCenter Interaction 10.3.0 distribution does not exist for Mac OS X, I tried to install a version for Linux.
But the distribution of the portal does not install automatically. And I had to unpack it manually.
Since Mac OS X is built on Darwin - clone of FreeBSD, I thought that I could run binary programs for Linux under Mac OS X. But soon it became clear that a Linux program can not run straight under the Mac.
On a Mac there is no Linux emulator or program brandelf, which allows you to run Linux (and Solaris, SCO etc) software on FreeBSD.
Thus, I had the basic portal services installed on Windows 7 x64 in a virtual machine Fusion. In Windows, I installed Api Service, Automation Server, Content Upload, Document Repository, Publisher and Search Server.
Portal itself runs in the Java Virtual Mashine, but to communicate with the portal search server uses a native library. For communication with the search server I had to create RMI bridge between the portal and search server. The portal started running JVM installed on my Mac excelent. Moreover, because now the portal is left native libraries, it runs the same way on 32-bit and 64-bit JVMs.
I must however be noted that an RMI Bridge slowing the search server and can be used only for development. Soon I'll talk about installing programs PTSpy on a Mac.