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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2334|回复: 0

[求助] 请教一个Modelsim仿真过程中遇到不定态的问题

[复制链接]
发表于 2016-6-16 09:55:57 | 显示全部楼层 |阅读模式

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

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

x
大家好,这两天在做Modelsim仿真时,每次在rst为高电平时出现不定态,一直没找到原因,请大家帮忙分析分析~



  1. module txu_load_part_fault (clk, rst, data_req, en, n91, n92, n132, n137, n138, control, n93, n94, n95, n96);
  2.   input clk, rst, en, data_req;
  3.   input n91, n92, n132, n137, n138;
  4.   input [41:0] control;
  5.   output n93, n94, n95, n96;
  6.   
  7.   DFFARX1_RVT_FAULT \state_reg[0]  ( .D(n73), .CLK(clk), .RSTB(rst), .Q(n78), .QN(n7) , .control({control[0],control[1],control[2],control[3],control[4],control[5],control[6],control[7],control[8],control[9],control[10],control[11],control[12]}));
  8.   DFFARX1_RVT_FAULT \state_reg[1]  ( .D(n72), .CLK(clk), .RSTB(rst), .Q(n79), .QN(n6) , .control({control[13],control[14],control[15],control[16],control[17],control[18],control[19],control[20],control[21],control[22],control[23],control[24],control[25]}));
  9.   NAND3X0_RVT_FAULT U106 ( .A1(n6), .A2(n78), .A3(n92), .Y(n93) , .control(control[26]));
  10.   NAND3X0_RVT_FAULT U107 ( .A1(n138), .A2(n132), .A3(n93), .Y(n95) , .control(control[27]));
  11.   NAND2X0_RVT_FAULT U108 ( .A1(n137), .A2(n95), .Y(n94) , .control(control[28]));
  12.   OAI22X1_RVT_FAULT U109 ( .A1(n6), .A2(n94), .A3(n7), .A4(n95), .Y(n73) , .control({control[29],control[30],control[31]}));
  13.   OA221X1_RVT_FAULT U110 ( .A1(n7), .A2(en), .A3(n7), .A4(data_req), .A5(n95), .Y(
  14.         n96) , .control({control[32],control[33],control[34]}));
  15.   OA221X1_RVT_FAULT U111 ( .A1(n6), .A2(n132), .A3(n79), .A4(n96), .A5(n137), .Y(n72) , .control({control[35],control[36],control[37]}));
  16.   AO222X1_RVT_FAULT U94 ( .A1(n137), .A2(n78), .A3(n137), .A4(n79), .A5(n137), .A6(
  17.         n91), .Y(n138) , .control({control[38],control[39],control[40],control[41]}));
  18. endmodule  
  19.       


复制代码






  1. //用到的基本门单元的定义:
  2. module DFFARX1_RVT_FAULT (D, CLK, RSTB, control, Q, QN);
  3. output  Q, QN;
  4. input   D, CLK, RSTB;
  5. input [12:0] control;
  6. reg notifier;
  7. wire [12:0] n;
  8. pullup (setb);
  9. saed32_dff_pos_lvt (Q_buf, D, CLK, RSTB, setb, notifier);  
  10. buf (n[0], Q_buf);
  11. xor (Q, n[0], control[0]);
  12. not (n[1], Q_buf);
  13. xor (QN, n[1], control[1]);
  14. `ifdef TETRAMAX
  15. `else
  16. saed32_xbuf_lvt (RSTB_SDFCHK, RSTB, 1'b1);
  17. saed32_xbuf_lvt (D_SDFCHK, D, 1'b1);
  18. saed32_xbuf_lvt (CLK_D_SDFCHK, CLK_D, 1'b1);
  19. saed32_xbuf_lvt (CLK_nD_SDFCHK, CLK_nD, 1'b1);
  20. saed32_xbuf_lvt (nCLK_D_SDFCHK, nCLK_D, 1'b1);
  21. saed32_xbuf_lvt (nCLK_nD_SDFCHK, nCLK_nD, 1'b1);
  22. saed32_xbuf_lvt (RSTB_D_SDFCHK, RSTB_D, 1'b1);
  23. saed32_xbuf_lvt (RSTB_nD_SDFCHK, RSTB_nD, 1'b1);
  24. `endif
  25. not (n[2], D);
  26. xor (nD, n[2], control[2]);
  27. not (n[3], CLK);
  28. xor (nCLK, n[3], control[3]);
  29. and (n[4], CLK, D);
  30. xor (CLK_D, n[4], control[4]);
  31. and (n[5], CLK, nD);
  32. xor (CLK_nD, n[5], control[5]);
  33. and (n[6], nCLK, D);
  34. xor (nCLK_D, n[6], control[6]);
  35. and (n[7], nCLK, nD);
  36. xor (nCLK_nD, n[7], control[7]);
  37. and (n[8], RSTB, D);
  38. xor (RSTB_D, n[8], control[8]);
  39. and (n[9], RSTB, nD);
  40. xor (RSTB_nD, n[9], control[9]);
  41. buf      (n[10], RSTB);
  42. xor      (RSTB_i, n[10], control[10]);
  43. buf  (n[11], RSTB_i);
  44. xor  (CLK_check, n[11], control[11]);
  45. buf  (n[12], RSTB_i);
  46. xor  (D_check, n[12], control[12]);
  47. `ifdef TETRAMAX
  48. `else
  49. saed32_xbuf_lvt (CLK_DEFCHK, CLK_check, 1'b1);
  50. saed32_xbuf_lvt (D_DEFCHK, D_check, 1'b1);
  51. `endif
  52. endmodule

  53. module NAND2X0_RVT_FAULT (A1, A2, control, Y);
  54. output  Y;
  55. input   A1, A2, control;
  56. wire n;
  57. nand (n, A2, A1);
  58. xor (Y, n, control);
  59. endmodule

  60. module NAND3X0_RVT_FAULT (A1, A2, A3, control, Y);
  61. output  Y;
  62. input   A1, A2, A3, control;
  63. wire n;
  64. nand (n, A2, A1, A3);
  65. xor (Y, n, control);
  66. endmodule

  67. module OAI22X1_RVT_FAULT (A1, A2, A3, A4, control, Y);
  68. output  Y;
  69. input   A1, A2, A3, A4;
  70. input [2:0] control;
  71. wire [2:0] n;
  72. or (n[0], A4, A3);
  73. xor (g_1_out, n[0], control[0]);
  74. or (n[1], A2, A1);
  75. xor (g_1_out, n[1], control[1]);
  76. nand (n[2], g_1_out,g_2_out);
  77. xor (Y, n[2], control[2]);
  78. endmodule

  79. module OA221X1_RVT_FAULT (A1, A2, A3, A4, A5, control, Y);
  80. output  Y;
  81. input   A1, A2, A3, A4, A5;
  82. input [2:0] control;
  83. wire  [2:0] n;
  84. or (n[0], A2, A1);
  85. xor (g_2_out, n[0], control[0]);
  86. or (n[1], A3, A4);
  87. xor (g_3_out, n[1], control[1]);
  88. and (n[2], A5, g_2_out, g_3_out);
  89. xor (Y, n[2], control[2]);
  90. endmodule

  91. module AO222X1_RVT_FAULT (A1, A2, A3, A4, A5, A6, control, Y);
  92. output  Y;
  93. input   A1, A2, A3, A4, A5, A6;
  94. input[3:0] control;
  95. wire [3:0] n;
  96. and (n[0], A1, A2);
  97. xor (g_1_out, n[0], control[0]);
  98. and (n[1], A3, A4);
  99. xor (g_2_out, n[1], control[1]);
  100. and (n[2], A5, A6);
  101. xor (g_3_out, n[2], control[2]);
  102. or (n[3],g_1_out,g_2_out,g_3_out);
  103. xor (Y, n[3], control[3]);
  104. endmodule

  105. primitive saed32_xbuf_lvt (o, i, dummy);
  106. output o;     
  107. input i, dummy;
  108. table         
  109. // i dummy : o
  110. 0   1   : 0 ;
  111. 1   1   : 1 ;
  112. x   1   : 1 ;
  113. endtable      
  114. endprimitive

  115. primitive saed32_dff_pos_lvt (q, d, clk, rstb, setb, notifier);
  116. output q;
  117. input d, clk, rstb, setb, notifier;
  118. reg q;
  119. table
  120. // d   clk   rstb   setb  ntfr          Q
  121. ?     ?     0     ?     ?  :  ?  :  0  ; // RST dominate SET
  122. ?     ?     1     0     ?  :  ?  :  1  ; // SET is set   
  123. ?     ?     1     x     ?  :  0  :  x  ; // SET affect Q
  124. ?     ?     1     x     ?  :  1  :  1  ; // Q=1,preset=X
  125. ?     ?     x     1     ?  :  0  :  0  ; // Q=0,clear=X
  126. 0    (01)   ?     1     ?  :  ?  :  0  ; // Latch 0
  127. 0     *     ?     1     ?  :  0  :  0  ; // Keep 0 (D==Q)
  128. 1    (01)   1     ?     ?  :  ?  :  1  ; // Latch 1   
  129. 1     *     1     ?     ?  :  1  :  1  ; // Keep 1 (D==Q)
  130. ?    (1?)   1     1     ?  :  ?  :  -  ; // ignore negative edge of clock
  131. ?    (?0)   1     1     ?  :  ?  :  -  ; // ignore negative edge of clock
  132. ?     ?    (?1)   1     ?  :  ?  :  -  ; // ignore positive edge of RST
  133. ?     ?     1    (?1)   ?  :  ?  :  -  ; // ignore posative edge of SET
  134. *     ?     1     1     ?  :  ?  :  -  ; // ignore data change on steady clock
  135. //    ?     ?     ?     ?     *  :  ?  :  x  ; // timing check violation
  136. endtable
  137. endprimitive



复制代码


txu.png
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-5-10 14:20 , Processed in 0.020531 second(s), 9 queries , Gzip On, Redis On.

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