From a17b1ca8f589beb770ae78c5f03d9dadb5aaeaf1 Mon Sep 17 00:00:00 2001 From: lf <15201710458@163.com> Date: Sun, 26 Jul 2020 23:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=8E=9F=E6=9C=89=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=A1=E5=8F=B7=E5=81=9A=E4=BA=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtl/wrppr/sm3_pad_core_wrapper.sv | 18 +++++++++--------- tb/sm3_pad_mntr.sv | 8 ++++---- tb/tb_sm3_pad_top.sv | 26 +++++++++++++------------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/rtl/wrppr/sm3_pad_core_wrapper.sv b/rtl/wrppr/sm3_pad_core_wrapper.sv index 0e7462f..83d6ec4 100644 --- a/rtl/wrppr/sm3_pad_core_wrapper.sv +++ b/rtl/wrppr/sm3_pad_core_wrapper.sv @@ -21,18 +21,18 @@ sm3_pad_core U_sm3_pad_core( .clk (sm3if.clk ), .rst_n (sm3if.rst_n ), - .msg_inpt_d_i (sm3if.msg_inpt_d_i ), - .msg_inpt_vld_byte_i (sm3if.msg_inpt_vld_byte_i ), - .msg_inpt_vld_i (sm3if.msg_inpt_vld_i ), - .msg_inpt_lst_i (sm3if.msg_inpt_lst_i ), + .msg_inpt_d_i (sm3if.msg_inpt_d ), + .msg_inpt_vld_byte_i (sm3if.msg_inpt_vld_byte ), + .msg_inpt_vld_i (sm3if.msg_inpt_vld ), + .msg_inpt_lst_i (sm3if.msg_inpt_lst ), - .pad_otpt_ena_i (sm3if.pad_otpt_ena_i ), + .pad_otpt_ena_i (sm3if.pad_otpt_ena ), - .msg_inpt_rdy_o (sm3if.msg_inpt_rdy_o ), + .msg_inpt_rdy_o (sm3if.msg_inpt_rdy ), - .pad_otpt_d_o (sm3if.pad_otpt_d_o ), - .pad_otpt_lst_o (sm3if.pad_otpt_lst_o ), - .pad_otpt_vld_o (sm3if.pad_otpt_vld_o ) + .pad_otpt_d_o (sm3if.pad_otpt_d ), + .pad_otpt_lst_o (sm3if.pad_otpt_lst ), + .pad_otpt_vld_o (sm3if.pad_otpt_vld ) ); endmodule \ No newline at end of file diff --git a/tb/sm3_pad_mntr.sv b/tb/sm3_pad_mntr.sv index e23788e..9b71fc2 100644 --- a/tb/sm3_pad_mntr.sv +++ b/tb/sm3_pad_mntr.sv @@ -35,11 +35,11 @@ always @(posedge sm3if.clk or negedge sm3if.rst_n) begin sm3_pad_reg_cmpr <= 1'b0; sm3_pad_reg_init <= 1'b0; end else begin - sm3_pad_reg_cmpr <= sm3if.pad_otpt_lst_o; + sm3_pad_reg_cmpr <= sm3if.pad_otpt_lst; sm3_pad_reg_init <= sm3_pad_reg_cmpr; end end -assign sm3_pad_reg_shft = sm3if.pad_otpt_vld_o; +assign sm3_pad_reg_shft = sm3if.pad_otpt_vld; //shift reg pad data always @(posedge sm3if.clk or negedge sm3if.rst_n) begin @@ -47,9 +47,9 @@ always @(posedge sm3if.clk or negedge sm3if.rst_n) begin sm3_pad_lst_blk_reg <= 512'b0; end else if(sm3_pad_reg_shft)begin `ifdef SM3_INPT_DW_32 - sm3_pad_lst_blk_reg <= {sm3_pad_lst_blk_reg[(511-32):0],sm3if.pad_otpt_d_o}; + sm3_pad_lst_blk_reg <= {sm3_pad_lst_blk_reg[(511-32):0],sm3if.pad_otpt_d}; `elsif SM3_INPT_DW_64 - sm3_pad_lst_blk_reg <= {sm3_pad_lst_blk_reg[(511-64):0],sm3if.pad_otpt_d_o}; + sm3_pad_lst_blk_reg <= {sm3_pad_lst_blk_reg[(511-64):0],sm3if.pad_otpt_d}; `endif end else if(sm3_pad_reg_init)begin sm3_pad_lst_blk_reg <= 512'b0; diff --git a/tb/tb_sm3_pad_top.sv b/tb/tb_sm3_pad_top.sv index 1f82608..7f36c97 100644 --- a/tb/tb_sm3_pad_top.sv +++ b/tb/tb_sm3_pad_top.sv @@ -47,11 +47,11 @@ sm3_pad_mntr U_sm3_pad_mntr( initial begin sm3if.clk = 0; sm3if.rst_n = 0; - sm3if.msg_inpt_d_i = DATA_INIT_PTTRN; - sm3if.msg_inpt_vld_byte_i = 0; - sm3if.msg_inpt_vld_i = 0; - sm3if.msg_inpt_lst_i = 0; - sm3if.pad_otpt_ena_i = 1;//置高填充模块输出使能 + sm3if.msg_inpt_d = DATA_INIT_PTTRN; + sm3if.msg_inpt_vld_byte = 0; + sm3if.msg_inpt_vld = 0; + sm3if.msg_inpt_lst = 0; + sm3if.pad_otpt_ena = 1;//置高填充模块输出使能 #100; sm3if.rst_n =1; @@ -66,7 +66,7 @@ initial begin task_pad_inpt_gntr(sm3_inpt_byte_num); //生成 golden pattern golden_pttrn_gntr(gldn_pttrn,sm3_inpt_byte_num); - wait(sm3if.pad_otpt_lst_o); + wait(sm3if.pad_otpt_lst); @(posedge sm3if.clk); end @@ -94,23 +94,23 @@ task automatic task_pad_inpt_gntr( //前 N-1 个周期的数据 - sm3if.msg_inpt_vld_i = 1'b1; + sm3if.msg_inpt_vld = 1'b1; repeat(data_inpt_clk_num - 1'b1)begin @(posedge sm3if.clk); end - sm3if.msg_inpt_lst_i = 1'b1; + sm3if.msg_inpt_lst = 1'b1; //准备最后一个周期的数据 `ifdef SM3_INPT_DW_32 - lst_data_gntr_32(sm3if.msg_inpt_d_i,sm3if.msg_inpt_vld_byte_i,unalign_byte_num); + lst_data_gntr_32(sm3if.msg_inpt_d,sm3if.msg_inpt_vld_byte,unalign_byte_num); `elsif SM3_INPT_DW_64 - lst_data_gntr_64(sm3if.msg_inpt_d_i,sm3if.msg_inpt_vld_byte_i,unalign_byte_num); + lst_data_gntr_64(sm3if.msg_inpt_d,sm3if.msg_inpt_vld_byte,unalign_byte_num); `endif @(posedge sm3if.clk); - sm3if.msg_inpt_vld_i = 1'b0; - sm3if.msg_inpt_lst_i = 1'b0; - sm3if.msg_inpt_d_i = DATA_INIT_PTTRN; + sm3if.msg_inpt_vld = 1'b0; + sm3if.msg_inpt_lst = 1'b0; + sm3if.msg_inpt_d = DATA_INIT_PTTRN; endtask //automatic