From dcf359c7db02d3c6daddd4ee58dbc8427fde1a36 Mon Sep 17 00:00:00 2001 From: Ayoub Jalali Date: Tue, 28 Mar 2023 15:59:37 +0200 Subject: [PATCH 1/2] CVXIF : Moving the cvxif sequence from the lib to cva6/lib/ --- .../src/seq => cva6/lib/cvxif_seq}/uvma_cvxif_base_seq.sv | 0 .../uvma_cvxif/src/seq => cva6/lib/cvxif_seq}/uvma_cvxif_seq.sv | 0 lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist | 1 + 3 files changed, 1 insertion(+) rename {lib/uvm_agents/uvma_cvxif/src/seq => cva6/lib/cvxif_seq}/uvma_cvxif_base_seq.sv (100%) rename {lib/uvm_agents/uvma_cvxif/src/seq => cva6/lib/cvxif_seq}/uvma_cvxif_seq.sv (100%) diff --git a/lib/uvm_agents/uvma_cvxif/src/seq/uvma_cvxif_base_seq.sv b/cva6/lib/cvxif_seq/uvma_cvxif_base_seq.sv similarity index 100% rename from lib/uvm_agents/uvma_cvxif/src/seq/uvma_cvxif_base_seq.sv rename to cva6/lib/cvxif_seq/uvma_cvxif_base_seq.sv diff --git a/lib/uvm_agents/uvma_cvxif/src/seq/uvma_cvxif_seq.sv b/cva6/lib/cvxif_seq/uvma_cvxif_seq.sv similarity index 100% rename from lib/uvm_agents/uvma_cvxif/src/seq/uvma_cvxif_seq.sv rename to cva6/lib/cvxif_seq/uvma_cvxif_seq.sv diff --git a/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist b/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist index 183f341c3e..f588aeac0b 100644 --- a/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist +++ b/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist @@ -14,6 +14,7 @@ +incdir+${DV_UVMA_CVXIF_PATH}/src/comps +incdir+${DV_UVMA_CVXIF_PATH}/src/obj +incdir+${DV_UVMA_CVXIF_PATH}/src/seq ++incdir+${CORE_V_VERIF}/${CV_CORE_LC}/lib/cvxif_seq // Files ${DV_UVMA_CVXIF_PATH}/src/uvma_cvxif_pkg.sv From 8e6969dc422a724ea1fff80aae380c4d7b90453d Mon Sep 17 00:00:00 2001 From: Ayoub Jalali Date: Wed, 29 Mar 2023 11:26:02 +0200 Subject: [PATCH 2/2] CVXIF : Moving the cvxif sequence to cva6 env and change it to a vsequence --- .../uvme/cvxif_vseq/uvme_cvxif_base_vseq.sv} | 22 +++++++-------- .../uvme/cvxif_vseq/uvme_cvxif_vseq.sv} | 28 +++++++++---------- cva6/env/uvme/uvme_cva6_env.sv | 8 +++--- cva6/env/uvme/uvme_cva6_pkg.flist | 1 + cva6/env/uvme/uvme_cva6_vsqr.sv | 2 +- .../uvma_cvxif/src/comps/uvma_cvxif_agent.sv | 14 +++++----- .../{uvma_cvxif_sqr.sv => uvma_cvxif_vsqr.sv} | 18 ++++++------ .../uvma_cvxif/src/uvma_cvxif_pkg.flist | 1 - .../uvma_cvxif/src/uvma_cvxif_pkg.sv | 8 +++--- 9 files changed, 51 insertions(+), 51 deletions(-) rename cva6/{lib/cvxif_seq/uvma_cvxif_base_seq.sv => env/uvme/cvxif_vseq/uvme_cvxif_base_vseq.sv} (80%) rename cva6/{lib/cvxif_seq/uvma_cvxif_seq.sv => env/uvme/cvxif_vseq/uvme_cvxif_vseq.sv} (91%) rename lib/uvm_agents/uvma_cvxif/src/comps/{uvma_cvxif_sqr.sv => uvma_cvxif_vsqr.sv} (70%) diff --git a/cva6/lib/cvxif_seq/uvma_cvxif_base_seq.sv b/cva6/env/uvme/cvxif_vseq/uvme_cvxif_base_vseq.sv similarity index 80% rename from cva6/lib/cvxif_seq/uvma_cvxif_base_seq.sv rename to cva6/env/uvme/cvxif_vseq/uvme_cvxif_base_vseq.sv index 83d1f60d45..b41c2d8853 100644 --- a/cva6/lib/cvxif_seq/uvma_cvxif_base_seq.sv +++ b/cva6/env/uvme/cvxif_vseq/uvme_cvxif_base_vseq.sv @@ -8,23 +8,23 @@ // Original Author: Zineb EL KACIMI (zineb.el-kacimi@external.thalesgroup.com) -`ifndef __UVMA_CVXIF_BASE_SEQ_SV__ -`define __UVMA_CVXIF_BASE_SEQ_SV__ +`ifndef __UVME_CVXIF_BASE_VSEQ_SV__ +`define __UVME_CVXIF_BASE_VSEQ_SV__ -class uvma_cvxif_base_seq_c extends uvm_sequence #(uvma_cvxif_resp_item_c); +class uvme_cvxif_base_vseq_c extends uvm_sequence #(uvma_cvxif_resp_item_c); - `uvm_object_utils (uvma_cvxif_base_seq_c) - `uvm_declare_p_sequencer (uvma_cvxif_sqr_c) + `uvm_object_utils (uvme_cvxif_base_vseq_c) + `uvm_declare_p_sequencer (uvma_cvxif_vsqr_c) uvma_cvxif_resp_item_c resp_item; uvma_cvxif_req_item_c req_item; uvma_cvxif_cfg_c cfg; - string info_tag = "CVXIF_BASE_SEQ"; + string info_tag = "CVXIF_BASE_VSEQ"; - extern function new(string name="uvma_cvxif_base_seq"); + extern function new(string name="uvme_cvxif_base_vseq"); extern virtual task pre_body(); @@ -32,13 +32,13 @@ class uvma_cvxif_base_seq_c extends uvm_sequence #(uvma_cvxif_resp_item_c); endclass -function uvma_cvxif_base_seq_c::new(string name="uvma_cvxif_base_seq"); +function uvme_cvxif_base_vseq_c::new(string name="uvme_cvxif_base_vseq"); super.new(name); endfunction : new -task uvma_cvxif_base_seq_c::pre_body(); +task uvme_cvxif_base_vseq_c::pre_body(); req_item = uvma_cvxif_req_item_c::type_id::create("req_item"); resp_item = uvma_cvxif_resp_item_c::type_id::create("resp_item"); @@ -47,7 +47,7 @@ task uvma_cvxif_base_seq_c::pre_body(); endtask -function string uvma_cvxif_base_seq_c::decode(input logic [31:0] instr); +function string uvme_cvxif_base_vseq_c::decode(input logic [31:0] instr); bit [6:0] opcode = instr [6:0]; bit [6:0] custom3 = 7'b1111011; @@ -103,4 +103,4 @@ function string uvma_cvxif_base_seq_c::decode(input logic [31:0] instr); endfunction -`endif // __UVMA_CVXIF_BASE_SEQ_SV__ +`endif // __UVME_CVXIF_BASE_VSEQ_SV__ diff --git a/cva6/lib/cvxif_seq/uvma_cvxif_seq.sv b/cva6/env/uvme/cvxif_vseq/uvme_cvxif_vseq.sv similarity index 91% rename from cva6/lib/cvxif_seq/uvma_cvxif_seq.sv rename to cva6/env/uvme/cvxif_vseq/uvme_cvxif_vseq.sv index f778eada72..c5d0e01449 100644 --- a/cva6/lib/cvxif_seq/uvma_cvxif_seq.sv +++ b/cva6/env/uvme/cvxif_vseq/uvme_cvxif_vseq.sv @@ -7,22 +7,22 @@ // // Original Author: Zineb EL KACIMI (zineb.el-kacimi@external.thalesgroup.com) -`ifndef __UVMA_CVXIF_SEQ_SV__ -`define __UVMA_CVXIF_SEQ_SV__ +`ifndef __UVME_CVXIF_VSEQ_SV__ +`define __UVME_CVXIF_VSEQ_SV__ -class uvma_cvxif_seq_c extends uvma_cvxif_base_seq_c#(uvma_cvxif_resp_item_c); +class uvme_cvxif_vseq_c extends uvme_cvxif_base_vseq_c#(uvma_cvxif_resp_item_c); - `uvm_object_utils (uvma_cvxif_seq_c) - `uvm_declare_p_sequencer (uvma_cvxif_sqr_c) + `uvm_object_utils (uvme_cvxif_vseq_c) + `uvm_declare_p_sequencer (uvma_cvxif_vsqr_c) - string info_tag = "CVXIF_SEQ_RESP"; + string info_tag = "CVXIF_VSEQ_RESP"; string instr; /** * Default constructor. */ - extern function new(string name="uvma_cvxif_seq"); + extern function new(string name="uvme_cvxif_vseq"); /** * Send the Sequence Response to the Sequencer. @@ -57,7 +57,7 @@ class uvma_cvxif_seq_c extends uvma_cvxif_base_seq_c#(uvma_cvxif_resp_item_c); endclass -task uvma_cvxif_seq_c::body(); +task uvme_cvxif_vseq_c::body(); forever begin // wait for a transaction request (get is blocking) @@ -85,13 +85,13 @@ task uvma_cvxif_seq_c::body(); endtask -function uvma_cvxif_seq_c::new(string name="uvma_cvxif_seq"); +function uvme_cvxif_vseq_c::new(string name="uvme_cvxif_vseq"); super.new(name); endfunction : new -task uvma_cvxif_seq_c::do_default(); +task uvme_cvxif_vseq_c::do_default(); resp_item.issue_resp.accept=0; resp_item.issue_resp.writeback=0; @@ -110,7 +110,7 @@ task uvma_cvxif_seq_c::do_default(); endtask -task uvma_cvxif_seq_c::do_issue_resp(); +task uvme_cvxif_vseq_c::do_issue_resp(); resp_item.issue_resp.dualwrite = 0; resp_item.issue_resp.dualread = 0; @@ -154,7 +154,7 @@ task uvma_cvxif_seq_c::do_issue_resp(); endtask -task uvma_cvxif_seq_c::do_result_resp(); +task uvme_cvxif_vseq_c::do_result_resp(); //result_resp if (!req_item.commit_req.commit_kill && req_item.commit_valid) begin @@ -186,7 +186,7 @@ task uvma_cvxif_seq_c::do_result_resp(); endtask -task uvma_cvxif_seq_c::do_instr_result(); +task uvme_cvxif_vseq_c::do_instr_result(); //result response depend on instruction resp_item.result.exc=0; @@ -233,7 +233,7 @@ task uvma_cvxif_seq_c::do_instr_result(); endtask -task uvma_cvxif_seq_c::send_resp(uvma_cvxif_resp_item_c resp); +task uvme_cvxif_vseq_c::send_resp(uvma_cvxif_resp_item_c resp); resp_item.set_sequencer(p_sequencer); `uvm_send(resp_item); diff --git a/cva6/env/uvme/uvme_cva6_env.sv b/cva6/env/uvme/uvme_cva6_env.sv index b22e45ff67..a3052c5e2d 100644 --- a/cva6/env/uvme/uvme_cva6_env.sv +++ b/cva6/env/uvme/uvme_cva6_env.sv @@ -273,7 +273,7 @@ endfunction: connect_scoreboard function void uvme_cva6_env_c::assemble_vsequencer(); vsequencer.clknrst_sequencer = clknrst_agent.sequencer; - vsequencer.cvxif_sequencer = cvxif_agent.sequencer; + vsequencer.cvxif_vsequencer = cvxif_agent.vsequencer; vsequencer.axi_vsequencer = axi_agent.vsequencer; endfunction: assemble_vsequencer @@ -284,9 +284,9 @@ task uvme_cva6_env_c::run_phase(uvm_phase phase); fork begin - uvma_cvxif_seq_c cvxif_seq; - cvxif_seq = uvma_cvxif_seq_c::type_id::create("cvxif_seq"); - cvxif_seq.start(cvxif_agent.sequencer); + uvme_cvxif_vseq_c cvxif_vseq; + cvxif_vseq = uvme_cvxif_vseq_c::type_id::create("cvxif_vseq"); + cvxif_vseq.start(cvxif_agent.vsequencer); end begin diff --git a/cva6/env/uvme/uvme_cva6_pkg.flist b/cva6/env/uvme/uvme_cva6_pkg.flist index bc4c9f95ce..3f38acb01f 100644 --- a/cva6/env/uvme/uvme_cva6_pkg.flist +++ b/cva6/env/uvme/uvme_cva6_pkg.flist @@ -21,6 +21,7 @@ +incdir+${CVA6_UVME_PATH} +incdir+${CVA6_UVME_PATH}/cov +incdir+${CVA6_UVME_PATH}/vseq ++incdir+${CVA6_UVME_PATH}/cvxif_vseq // Files ${CVA6_UVME_PATH}/uvme_cva6_pkg.sv diff --git a/cva6/env/uvme/uvme_cva6_vsqr.sv b/cva6/env/uvme/uvme_cva6_vsqr.sv index d51e98c874..221d4765f8 100644 --- a/cva6/env/uvme/uvme_cva6_vsqr.sv +++ b/cva6/env/uvme/uvme_cva6_vsqr.sv @@ -36,7 +36,7 @@ class uvme_cva6_vsqr_c extends uvm_sequencer#( // Sequencer handles uvma_clknrst_sqr_c clknrst_sequencer; - uvma_cvxif_sqr_c cvxif_sequencer; + uvma_cvxif_vsqr_c cvxif_vsequencer; uvma_axi_vsqr_c axi_vsequencer; diff --git a/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_agent.sv b/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_agent.sv index 790754a893..feeb0face7 100644 --- a/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_agent.sv +++ b/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_agent.sv @@ -16,7 +16,7 @@ class uvma_cvxif_agent_c extends uvm_agent; // Components uvma_cvxif_mon_c monitor; - uvma_cvxif_sqr_c sequencer; + uvma_cvxif_vsqr_c vsequencer; uvma_cvxif_drv_c driver; uvma_cvxif_cov_model_c cov_model; @@ -138,22 +138,22 @@ endfunction : retrieve_vif function void uvma_cvxif_agent_c::create_components(); - monitor = uvma_cvxif_mon_c ::type_id::create("monitor" , this); - sequencer = uvma_cvxif_sqr_c ::type_id::create("sequencer", this); - driver = uvma_cvxif_drv_c ::type_id::create("driver" , this); - cov_model = uvma_cvxif_cov_model_c ::type_id::create("cov_model" , this); + monitor = uvma_cvxif_mon_c ::type_id::create("monitor" , this); + vsequencer = uvma_cvxif_vsqr_c ::type_id::create("vsequencer", this); + driver = uvma_cvxif_drv_c ::type_id::create("driver" , this); + cov_model = uvma_cvxif_cov_model_c ::type_id::create("cov_model" , this); endfunction : create_components function void uvma_cvxif_agent_c::connect_sequencer_and_driver(); - driver.seq_item_port.connect(sequencer.seq_item_export); + driver.seq_item_port.connect(vsequencer.seq_item_export); endfunction : connect_sequencer_and_driver function void uvma_cvxif_agent_c::connect_analysis_ports(); - monitor.req_ap.connect(sequencer.mm_req_fifo.analysis_export); + monitor.req_ap.connect(vsequencer.mm_req_fifo.analysis_export); endfunction : connect_analysis_ports diff --git a/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_sqr.sv b/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_vsqr.sv similarity index 70% rename from lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_sqr.sv rename to lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_vsqr.sv index aeb0be1a67..40b31aaa90 100644 --- a/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_sqr.sv +++ b/lib/uvm_agents/uvma_cvxif/src/comps/uvma_cvxif_vsqr.sv @@ -8,14 +8,14 @@ // Original Author: Zineb EL KACIMI (zineb.el-kacimi@external.thalesgroup.com) -`ifndef __UVMA_CVXIF_SQR_SV__ -`define __UVMA_CVXIF_SQR_SV__ +`ifndef __UVMA_CVXIF_VSQR_SV__ +`define __UVMA_CVXIF_VSQR_SV__ /** * Component provides sequence items for uvma_cvxif_drv_c. */ -class uvma_cvxif_sqr_c extends uvm_sequencer#(uvma_cvxif_resp_item_c); +class uvma_cvxif_vsqr_c extends uvm_sequencer#(uvma_cvxif_resp_item_c); // Analysis port to receive retirement events from monitor uvm_tlm_analysis_fifo #(uvma_cvxif_req_item_c) mm_req_fifo; @@ -23,26 +23,26 @@ class uvma_cvxif_sqr_c extends uvm_sequencer#(uvma_cvxif_resp_item_c); // Objects uvma_cvxif_cfg_c cfg; - `uvm_component_utils_begin (uvma_cvxif_sqr_c) + `uvm_component_utils_begin (uvma_cvxif_vsqr_c) `uvm_field_object(cfg , UVM_DEFAULT) `uvm_object_utils_end /** * Default constructor. */ - extern function new(string name="uvma_cvxif_sqr", uvm_component parent=null); + extern function new(string name="uvma_cvxif_vsqr", uvm_component parent=null); extern virtual function void build_phase(uvm_phase phase); -endclass : uvma_cvxif_sqr_c +endclass : uvma_cvxif_vsqr_c -function uvma_cvxif_sqr_c::new(string name="uvma_cvxif_sqr", uvm_component parent=null); +function uvma_cvxif_vsqr_c::new(string name="uvma_cvxif_vsqr", uvm_component parent=null); super.new(name, parent); endfunction : new -function void uvma_cvxif_sqr_c::build_phase(uvm_phase phase); +function void uvma_cvxif_vsqr_c::build_phase(uvm_phase phase); super.build_phase(phase); @@ -56,4 +56,4 @@ function void uvma_cvxif_sqr_c::build_phase(uvm_phase phase); endfunction : build_phase -`endif // __UVMA_CVXI_SQR_SV__ +`endif // __UVMA_CVXIF_VSQR_SV__ diff --git a/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist b/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist index f588aeac0b..183f341c3e 100644 --- a/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist +++ b/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.flist @@ -14,7 +14,6 @@ +incdir+${DV_UVMA_CVXIF_PATH}/src/comps +incdir+${DV_UVMA_CVXIF_PATH}/src/obj +incdir+${DV_UVMA_CVXIF_PATH}/src/seq -+incdir+${CORE_V_VERIF}/${CV_CORE_LC}/lib/cvxif_seq // Files ${DV_UVMA_CVXIF_PATH}/src/uvma_cvxif_pkg.sv diff --git a/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.sv b/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.sv index de3b396a07..23ebc34acb 100644 --- a/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.sv +++ b/lib/uvm_agents/uvma_cvxif/src/uvma_cvxif_pkg.sv @@ -40,14 +40,14 @@ package uvma_cvxif_pkg; // Agent components `include "uvma_cvxif_mon.sv" - `include "uvma_cvxif_sqr.sv" + `include "uvma_cvxif_vsqr.sv" `include "uvma_cvxif_drv.sv" `include "uvma_cvxif_cov_model.sv" `include "uvma_cvxif_agent.sv" - // Sequences - `include "uvma_cvxif_base_seq.sv" - `include "uvma_cvxif_seq.sv" + // Virtual Sequences + `include "uvme_cvxif_base_vseq.sv" + `include "uvme_cvxif_vseq.sv" endpackage : uvma_cvxif_pkg