注册 登录
电子工程世界-论坛 返回首页 EEWORLD首页 频道 EE大学堂 下载中心 Datasheet 专题
logitech66的个人空间 https://home.eeworld.com.cn/space-uid-479145.html [收藏] [复制] [分享] [RSS]
日志

FPGA基础模块之间的连接学习心得

已有 842 次阅读2015-10-26 09:59 | 学习心得

连接模块之间的模块一般思路是清楚输入和输出各个引脚之间的联系:

module exp06_top 

(

    CLK, RSTn,

 Pin_In, Pin_Out

);

 

    input CLK;

 input RSTn;

 input Pin_In;

 output Pin_Out; //整个工程的输入和输出接口;

 

 /***************************************/

 

 wire Trig_Sig;

 

 debounce_module2 U1

 (

     .CLK( CLK ),

  .RSTn( RSTn ),

  .Pin_In( Pin_In ),   // input - from top  第一级输入给第一级的输入

  .Pin_Out( Trig_Sig ) // output - to U2 第一级的输出给自己定义的一个接口

 );

 

 /***************************************/

 

 wire SOS_En_Sig;

 

 inter_control_module U2

 (

      .CLK( CLK ),

.RSTn( RSTn ),

.Trig_Sig( Trig_Sig ),    // input - from U1 第一级自己定义的接口输出给第二级输入

.SOS_En_Sig( SOS_En_Sig ) // output - to U2  第二级的输出给自己定义的一接口,只是一般情况下吧自己定义的接口定义为下一级的输入的接口名称,导致初学的时候感觉很混乱

 );

 

 /***************************************/

 

 sos_module U3

 (

     .CLK( CLK ),

  .RSTn( RSTn ),

  .SOS_En_Sig( SOS_En_Sig ), // input - from U2

  .Pin_Out( Pin_Out )        // ouput - to top   //系统的输出来自第三级的输出

 );

 

 /***************************************/

 

endmodule

 

 

这是连接模块之间的一些写法,刚开始写的时候可能感觉混乱,将每个接口来自哪里明白了就ok~

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

热门文章