Ask your contact representative or write to capi@us.ibm.com to get a CAPI1.0 HDK project to start. This chapter only works for CAPI1.0, running on Power8. </para>
</note>
<section><title>Steps and directory structure</title>
<para>We use an "Out-of-context" flow to generate a PSL dcp file. For a new FPGA card, following steps need to be done:</para>
<figurepgwide="1"xml:id="step4">
<title>Four steps to build a PSL checkpoint</title>
<para>In this section, we just talk about the first build flow - "build a PSL checkpoint". Read it when you need to enable a FPGA card on CAPI1.0 or to fix a bug and update b_routed_design.dcp. The controlling bits should be set as:</para>
<screen>####flow control
set run.topSynth 1
set run.oocSynth 1
set run.tdImpl 0
set run.oocImpl 1
set run.topImpl 0
set run.flatImpl 0</screen>
<para>The outfile file will be placed in "Checkpoint" directory, the file name is "b_route_design.dcp".</para>
<section><title>Upgrade Xilinx IP cores</title>
<para>When a FPGA chip type is changed, or the Vivado tool version has been upgraded, you need to upgrade the Xilinx IP cores that are used in PSL module. PSL module has instantiated four Xilinx IP cores (in Sources/cores):</para>
<listitem><para>Create a new project. For the second time, just open the project with the four IP cores.</para></listitem>
<listitem><para>Import IP cores (by importing *.xci files under "Source/cores/xxx" directory). For the second time, this step is not needed.</para></listitem>
<listitem><para>Set FPGA type in Project Settings.</para></listitem>
<listitem><para>Run "Tools->Report->Report IP Status"</para></listitem>
<listitem><para>"Upgrade All" and read the upgrade log.</para></listitem>
<para>For PCIe IP, you need to change subsystem_id for a new card. Right click pcie3_ultrascale_0 -> Reconfig IP and change the subsystem ID field. </para>
<para>Ask an IBM representative for the subsystem ID. </para>
</note>
</section>
<section><title>Input xdc files</title>
<para>The IO pin package information for the new card should be provided by card vendor. Generally, they include Flash Interface, PCIe Interface and other interfaces like I2C and LED. Sample code with IO pins in b_phys.xdc:</para>
<para>Refer to Xilinx document UG575 for detailed pin package information.</para>
<para>The checkpoint file b_route_design.dcp will be generated and put in "Checkpoint" directory. With this checkpoint file, we can continue to build a full FPGA bit image and validate it on hardware.</para>
<para>This time the controlling bits should be set to:</para>
<screen>####flow control
set run.topSynth 1
set run.oocSynth 0
set run.tdImpl 0
set run.oocImpl 0
set run.topImpl 1
set run.flatImpl 0</screen>
</section>
<section><title>Check top design file psl_fpga.vhdl</title>
<para>For a new card, the IO pins and functions may be different to your reference card design. So the logic in top file psl_fpga.vhdl needs to be updated.</para>
<para>Similarly, the xdc file "……topimp.xdc" also needs to be updated.</para>
</section>
<section><title>Prepare filelist for psl_fpga.prj</title>
<para>The "prj" file is a file list. It should contain all the AFU design files. Edit it.</para>
<para>Now you get the bin files to be program to the FPGA flash.</para>
<para>For more information about FPGA configuration, please refer to Xilinx Document UG570.</para>
<para>Then you can program the generated bin file to FPGA either by JTAG or on-line programming tools <linkxlink:href="https://github.com/ibm-capi/capi-utils">capi-utils</link></para>