|
我们在sopc builder中加入了altera IP核后,在top level也要为相应的sopc配置引脚,如下:DE2_70_SOPC DE2_70_SOPC_inst
(
.clk_50 (CLK_50),
.out_port_from_the_LED (LED_RED),
.in_port_to_the_SW (SW), .reset_n (1'b1)
);
上面code中的 .out_port_from_the_LED 和 in_port_to_the_SW表达出了这样的信息:
1. from 表明LED_RED的方向应该是 output ,the_LED表明IP名为 ED
2. to 表明SW 的方向是input ,the_SW表明IP名为 SW
再看下面的example:
// the_sdram
.zs_addr_from_the_sdram(DRAM_ADDR), //(1)
.zs_ba_from_the_sdram({DRAM_BA_1,DRAM_BA_0}), //(2)
.zs_cas_n_from_the_sdram(DRAM_CAS_N), //(3)
.zs_cke_from_the_sdram(DRAM_CKE), //(4)
.zs_cs_n_from_the_sdram(DRAM_CS_N), //(5)
.zs_dq_to_and_from_the_sdram(DRAM_DQ), //(6)
.zs_dqm_from_the_sdram({DRAM_UDQM,DRAM_LDQM}), //(7)
.zs_ras_n_from_the_sdram(DRAM_RAS_N), //(8)
.zs_we_n_from_the_sdram(DRAM_WE_N), //(9)
(1) 的from 表明 DRAM_ADDR的direction为: output
(6)的to from表明DRAM_DQ的direction为:inout
认真一看,altera的code style写得还不错. |
|