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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 276|回复: 3

[求助] Found 'module' inside module before 'endmodule'. 'module' inside 'module' is

[复制链接]
发表于 2024-3-14 11:43:25 | 显示全部楼层 |阅读模式
10资产
module sramc_top(
    //input signals
        hclk,
        sram_clk,
                hresetn,
                hsel,
                hwrite,
        hready,
                hsize,
                htrans,
                hburst,
                hwdata,
                haddr,
               
                DFT_en,
                bist_en,

    //output signals
                hready_resp,
                hresp,
                hrdata,

                bist_done,
                bist_fail
);

  //*********************//
  // list of AHB signals //
  //*********************//
  //Signals used during normal operation
  input hclk;
  input sram_clk;
  input hresetn;

  //---------------------------------------------------
  //Signals from AMBA bus used during normal operation
  //---------------------------------------------------
  input        hsel;
  input        hwrite;
  input        hready;
  input [2:0]  hsize ;   
  input [2:0]  hburst;
  input [1:0]  htrans;
  input [31:0] hwdata;
  input [31:0] haddr;

  //--------------------------------------------------
  //Signals to AMBA bus used during normal operation
  //--------------------------------------------------
  output        hready_resp;
  output [1:0]  hresp;
  output [31:0] hrdata;

  //-------------------------------------------------
  //Signals for BIST and DFT test mode
  //-------------------------------------------------
  //When signal"dft_en" or "bist_en" is high, sram
  //controller enters into test mode.
  input dft_en;
  input bist_en;

  //When "bist_done" is high, it shows BIST test is over.
  output bist_done;

  //"bist_fail" shows the results of each sram funtions.
  //There are 8 srams in this controller.
  output [7:0] bist_fail;

  //Select one of the two sram blocks according to the value of sram_csn
  wire [3:0] bank0_csn;
  wire [3:0] bank1_csn;

  //Sram read or write signals: When it is high, read sram; low, write
  //sram.
  wire  sram_w_en;

  //Each of 8 srams is 8kx8, the depth is 2^13, so the sram's address width
  //is 13 bits.
  wire [12:0] sram_addr;

  //AHB bus data write into srams
  wire [31:0] sram_wdata;
  //--------------------------------------------------------------
  //sram data output data which selected and read by AHB bus
  //--------------------------------------------------------------
  wire [7:0] sram_q0;
  wire [7:0] sram_q1;
  wire [7:0] sram_q2;
  wire [7:0] sram_q3;
  wire [7:0] sram_q4;
  wire [7:0] sram_q5;
  wire [7:0] sram_q6;
  wire [7:0] sram_q7;
  //*************************************//
  // Instance the two :           //
  // ahb_slave_if.v and sram_core.v      //
  //*************************************//
  ahb_slave_if U_ahb_slave_if(
                              //-----------------------------------------
                              // AHB input signals into sram controller
                              //-----------------------------------------
                              .hclk     (hclk),
                              .hresetn  (hresetn),
                              .hsel     (hsel),
                              .hwrite   (hwrite),
                              .hready   (hready),
                              .hsize    (hsize),
                              .htrans   (htrans),
                              .hburst   (hburst),
                              .hwdata   (hwdata),
                              .haddr    (haddr),

                              //-----------------------------------------
                              //8 sram blcoks data output into ahb slave
                              //interface
                              //-----------------------------------------
                              .sram_q0   (sram_q0),
                              .sram_q1   (sram_q1),
                              .sram_q2   (sram_q2),
                              .sram_q3   (sram_q3),
                              .sram_q4   (sram_q4),
                              .sram_q5   (sram_q5),
                              .sram_q6   (sram_q6),
                              .sram_q7   (sram_q7),

                              //---------------------------------------------
                              //AHB slave(sram controller) output signals
                              //---------------------------------------------
                              .hready_resp  (hready_resp),
                              .hresp        (hresp),
                              .hrdata       (hrdata),

                              //---------------------------------------------
                              //sram control signals and sram address  
                              //---------------------------------------------
                                          .sram_w_en    (sram_w_en),
                                      .sram_addr_out(sram_addr),
                              //data write into sram
                                      .sram_wdata   (sram_wdata),
                              //choose the corresponding sram in a bank, active low
                              .bank0_csn    (bank0_csn),
                              .bank1_csn    (bank1_csn)
                              );


  sram_core U_sram_core(
                        //AHB bus signals
                        .hclk        (hclk    ),
                        .sram_clk    (sram_clk), // negetive of the hclk for system integration
                                          .hresetn     (hresetn ),

                        //-------------------------------------------
                        //sram control singals from ahb_slave_if.v
                        //-------------------------------------------
                                          .sram_addr    (sram_addr),
                                          .sram_wdata_in(sram_wdata),
                                          .sram_wen     (sram_w_en),
                                          .bank0_csn   (bank0_csn),
                                          .bank1_csn   (bank1_csn),

                        //test mode enable signals
                                          .bist_en     (bist_en),
                                          .dft_en      (dft_en),

                        //-------------------------------------------
                        //8 srams data output into AHB bus
                        //-------------------------------------------
                        .sram_q0    (sram_q0),
                        .sram_q1    (sram_q1),
                        .sram_q2    (sram_q2),
                        .sram_q3    (sram_q3),
                        .sram_q4    (sram_q4),
                        .sram_q5    (sram_q5),
                        .sram_q6    (sram_q6),
                        .sram_q7    (sram_q7),

                        //test results output when in test mode
                        .bist_done  (bist_done),
                        .bist_fail  (bist_fail)
                       );

endmodule

请问哪里有语法问题啊?

 楼主| 发表于 2024-3-14 14:37:12 | 显示全部楼层
跪求
发表于 2024-3-15 09:58:05 | 显示全部楼层
碰到这种问题就应该往前一个文件追
发表于 2024-3-17 04:29:21 | 显示全部楼层
还有一个办法就是对所有文件进行grep module关键字,发现module和endmodule不是一对的,肯定就是问题所在。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-27 22:45 , Processed in 0.019270 second(s), 6 queries , Gzip On, Redis On.

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