forked from openhwgroup/cva6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CVXIF : Moving the cvxif sequence to cva6 env and change it to a vseq…
…uence
- Loading branch information
1 parent
dcf359c
commit 8e6969d
Showing
9 changed files
with
51 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,37 +8,37 @@ | |
// Original Author: Zineb EL KACIMI ([email protected]) | ||
|
||
|
||
`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(); | ||
|
||
extern function string decode(input logic [31:0] instr); | ||
|
||
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__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,22 +7,22 @@ | |
// | ||
// Original Author: Zineb EL KACIMI ([email protected]) | ||
|
||
`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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,41 +8,41 @@ | |
// Original Author: Zineb EL KACIMI ([email protected]) | ||
|
||
|
||
`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; | ||
|
||
// 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__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters