This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:ztex_boards:ztex_fpga_boards:sd_cards_on_series_2_fpga_boards [2014/07/15 22:17] – stefan | en:ztex_boards:ztex_fpga_boards:sd_cards_on_series_2_fpga_boards [2014/07/21 12:51] – stefan | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== SD card support on Series 2 FPGA Boards ====== | ====== SD card support on Series 2 FPGA Boards ====== | ||
- | By introduction of [[http:// | + | By introduction of [[http:// |
+ | |||
+ | A SD card is connected to an [[http:// | ||
+ | |||
+ | | ^ External I/O || ^ FX2 I/O ^^ | ||
+ | ^ Signal | ||
+ | | CS | B13 | K15 | ← (in) | PC1 | N12 | | ||
+ | | DI | B14 | J13 | ← (in) | PC2 | P12 | | ||
+ | | CLK | B18 | J14 | ← (in) | PC3 | N5 | | ||
+ | | DO | B19 | H15 | → (out) | PA2 | H15 | | ||
+ | |||
+ | The HDL code for routing the signals looks like: | ||
+ | |||
+ | <code ucf> | ||
+ | # ... | ||
+ | NET " | ||
+ | NET " | ||
+ | NET " | ||
+ | NET " | ||
+ | |||
+ | NET " | ||
+ | NET " | ||
+ | NET " | ||
+ | NET " | ||
+ | |||
+ | # ... | ||
+ | </ | ||
+ | |||
+ | (.ucf constraints file) and | ||
+ | |||
+ | <code verilog> | ||
+ | // ... | ||
+ | |||
+ | module top ( | ||
+ | |||
+ | // ... | ||
+ | |||
+ | input pc1, | ||
+ | output b13, | ||
+ | ); | ||
+ | |||
+ | // ... | ||
+ | |||
+ | assign b13 = pc1; | ||
+ | assign b14 = pc2; | ||
+ | assign b18 = pc3; | ||
+ | assign pa2 = b19; | ||
+ | |||
+ | // ... | ||
+ | |||
+ | endmodule | ||
+ | </ | ||
+ | (verilog HDL file). | ||
+ | |||
+ | In order to enable firmware support the following lines have to be inserted between ''# | ||
+ | |||
+ | <code c> | ||
+ | ENABLE_FLASH2; | ||
+ | # | ||
+ | # | ||
+ | // can be omitted if equal to input port) | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | The SD card now can be accessed using the functions '' | ||