在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 5147|回复: 13

[原创] 关于cadence 的混合信号仿真中的一个问题

[复制链接]
发表于 2010-4-26 23:28:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
我的verilog 文件如下:

module A ();
....
endmodule

module B ();
....
endmodule

module C ();
A A1();
B B1()
endmodule

也就是说,我在同一个verilog 文件中定义了 A 和 B 两个子模块,又在C中实例化了这两个模块
但是,candence的编译器竟然说不支持这样做(在modelsim里仿的没问题),
各位可有遇到这种情况,有什么解决办法没?
发表于 2010-4-26 23:44:32 | 显示全部楼层
首先我不能确定是否可以在同一个文件中调用,这个可以查说明文档,好像是可以的。

个人觉得问题出在你调用的方式。上网搜下看看吧
发表于 2010-4-27 09:15:51 | 显示全部楼层
试试做一个顶层文件调用AB吧!
发表于 2010-4-27 09:16:51 | 显示全部楼层
不懂。。。。。
发表于 2010-4-27 09:26:10 | 显示全部楼层
不懂。。。。。
 楼主| 发表于 2010-4-27 11:34:06 | 显示全部楼层
顶层文件怎么写呀,可以给一个示例吗?
发表于 2010-6-3 00:46:30 | 显示全部楼层
Thanks for ur sharing idea , pls more discuss about cadence ic6.Thans again
发表于 2010-8-12 21:47:17 | 显示全部楼层
我碰到和你一样的问题,说端口需要连接
似乎cadence不能这样调用
发表于 2010-8-12 23:50:18 | 显示全部楼层
在C中只能对A、B进行实例化,不能再有其它的非结构级的代码

以下是我的一个设计的顶层模块代码,只有结构级代码:
// Created by ihdl
module AFCFast(sband, AFCdone, AFCnomatch, Fref, Fcmp, AFCstart, Ncmp);
  output [3:0] sband;
  output       AFCdone, AFCnomatch;
  input        Fref, Fcmp, AFCstart;
  input [10:0] Ncmp;
  
  wire [11:0] Ncount;  // Fcmp counter's output
  wire [10:0] Ncmp_eff;  // NcmpLoader's output
  
  and (Fcmp_gated, Fcmp, CMPen_n);
  and (Fref_gated, Fref, C64_n);
  
  CountFcmpFast CountFcmpInst(.data(Ncount),
                              .clk(Fcmp_gated), .rst_n(Rst));
                              
  CountFrefFast CountFrefInst(.C64(C64), .C64_n(C64_n), .CMPen(CMPen), .CMPen_n(CMPen_n),
                              .clk(Fref_gated), .rst_n(Rst));
                              
  CompareFast CompareInst(.up(up), .proper(proper), .down(down), .noproper_n(noproper_n),
                          .Ncount(Ncount), .Ncmp(Ncmp_eff), .CMPen(CMPen));
  
  NcmpLoaderFast NcmpLoadInst(.Ncmp_out(Ncmp_eff),
                              .Fref(Fref), .CMPen(CMPen), .Load_n(Rst), .Ncmp_in(Ncmp));
  
  DFFFast DFFup_Inst(.Qout(up_d1),
                     .clk(CMPen_d1), .rst_n(AFCstart), .Din(up));
                     
  DFFFast DFFproper_Inst(.Qout(proper_d1),
                         .clk(CMPen_d1), .rst_n(AFCstart), .Din(proper));
                        
  DFFFast DFFdown_Inst(.Qout(down_d1),
                       .clk(CMPen_d1), .rst_n(AFCstart), .Din(down));
                       
  DFFFast DFF_C64_Inst(.Qout(C64_d1),
                      .clk(CMPen_d1), .rst_n(AFCstart), .Din(C64));
  
  DFFFast DFF_CMPen_d1_Inst(.Qout(CMPen_d1),
                           .clk(Fref), .rst_n(AFCstart), .Din(CMPen));
  
  DFFFast DFF_FSMclk_Inst(.Qout(FSMclk),
                          .clk(Fref), .rst_n(AFCstart), .Din(CMPen_d1));
  
  FSMFast FSM_Inst(.sband(sband),
                   .next(gonextband), .done(AFCdone), .nomatch(AFCnomatch),
                   .clk(FSMclk), .rst_n(AFCstart),
                   .up(up_d1), .proper(proper_d1), .down(down_d1), .C64(C64_d1));
  // generate Rst for counters
  and  (Rst0, noproper_n, gonextband);
  DFFFast DFF_Rst1_Inst(.Qout(Rst1),
                        .clk(Fref), .rst_n(AFCstart), .Din(Rst0));
  DFFFast DFF_Rst2_Inst(.Qout(Rst),
                        .clk(Fref), .rst_n(AFCstart), .Din(Rst1));  
  
endmodule

1# 211lili
发表于 2010-8-13 00:40:02 | 显示全部楼层


在C中只能对A、B进行实例化,不能再有其它的非结构级的代码

以下是我的一个设计的顶层模块代码,只有结构级代码:
// Created by ihdl
module AFCFast(sband, AFCdone, AFCnomatch, Fref, Fcmp, AFCstart, Ncmp ...
vikinglan 发表于 2010-8-12 23:50



结合你这个帖子,大概明白什么意思了,就是在调用module进行实例化的时候,不能再有其他的行为级操作,比如赋值什么的。
只能有一些rtl级或者实例化的操作。
不知是否正确理解你的意思
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-28 21:52 , Processed in 0.168166 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表