mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-20 12:17:19 -04:00
Fixed issue with SUBW in testbench
This commit is contained in:
parent
f681ced0d5
commit
f69e1c42dc
2 changed files with 5 additions and 4 deletions
2
tb/env/alu_scoreboard.svh
vendored
2
tb/env/alu_scoreboard.svh
vendored
|
@ -30,7 +30,7 @@ class alu_scoreboard extends uvm_scoreboard;
|
|||
SUB:
|
||||
result = seq_item.operand_a - seq_item.operand_b;
|
||||
SUBW: begin
|
||||
result = seq_item.operand_a[31:0] - seq_item.operand_b[31:0];
|
||||
result32 = seq_item.operand_a[31:0] - seq_item.operand_b[31:0];
|
||||
result = {{32{result32[31]}}, result32};
|
||||
end
|
||||
endcase
|
||||
|
|
|
@ -12,15 +12,16 @@ virtual class basic_sequence extends fu_if_seq;
|
|||
fu_if_seq_item command;
|
||||
|
||||
command = fu_if_seq_item::type_id::create("command");
|
||||
`uvm_info("ALU Sequence", $sformatf("Starting %s sequence", get_operator().name))
|
||||
`uvm_info("ALU Sequence", $sformatf("Starting %s sequence", get_operator().name), UVM_LOW)
|
||||
|
||||
for(int i = 0; i <= 100; i++) begin
|
||||
start_item(command);
|
||||
if(~command.randomize())
|
||||
`uvm_warning("ALU Basic Sequence", "Randomization constraints can not be met.")
|
||||
|
||||
void'(command.randomize());
|
||||
command.operator = get_operator();
|
||||
|
||||
finish_item(command);
|
||||
end
|
||||
`uvm_info("ALU Sequence", $sformatf("Finished %s sequence", get_operator().name), UVM_LOW)
|
||||
endtask : body
|
||||
endclass : basic_sequence
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue