de     

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
en:ztex_boards:ztex_fpga_boards:porting_to_1_15y [2012/05/18 09:41] – created 84.181.63.250en:ztex_boards:ztex_fpga_boards:porting_to_1_15y [2012/05/18 09:59] 84.181.63.250
Line 24: Line 24:
 ===== Firmware ===== ===== Firmware =====
 The EZ-USB controls the FPGA communication using the CS signals. These signals are implemented in the Firmware Kit of the SDk and can be controlled by the host software. In simplest case only the FPGA board identification macro has to be changed (to "''IDENTITY_UFM_1_15Y(...);''" ) The EZ-USB controls the FPGA communication using the CS signals. These signals are implemented in the Firmware Kit of the SDk and can be controlled by the host software. In simplest case only the FPGA board identification macro has to be changed (to "''IDENTITY_UFM_1_15Y(...);''" )
 +
 +For more complex applications the following methods, macros and variables are available.
 +
 +Variables:
 +<code c>
 +__xdata BYTE select_num;       // currently selected FPGA 
 +__xdata BYTE prev_select_num;  // previously selected FPGA
 +</code>
 +
 +The Macro ''PRE_FPGA_SELECT'' is called between deselection and selection of a FPGA. Typically it is used to sore / restore IO states. The following example saves IOC state for previously selected FPGA and restores the IOC state for the newly selected FPGA.
 +
 +<code c>
 +#define[PRE_FPGA_SELECT][PRE_FPGA_SELECT
 +    OLD_IOC[prev_select_num] = IOC;
 +    IOC = OLD_IOC[select_num];
 +]
 +</code>
 +
 +The method
 +<code c>
 +void select_fpga ( BYTE fn ) 
 +</code>
 +can be used to select an FPGA. In particular this method
 +  - set ''prev_select_num = select_num; select_num = fn;''
 +  - deselect previous FPGA
 +  - calls macro ''PRE_FPGA_SELECT'';
 +  - select new FPGA.
  
  
 ===== Host software ===== ===== Host software =====
  
 
en/ztex_boards/ztex_fpga_boards/porting_to_1_15y.txt · Last modified: 2012/05/18 10:11 by 84.181.63.250
 
Recent changes RSS feed Creative Commons License Powered by PHP Debian Driven by DokuWiki
[ZTEX Home] [Imprint] [Privacy policy]