Skip to content

Commit b94ed28

Browse files
committed
Reorder classes in ibex_debug_triggers_overrides.sv
The previous version doesn't make sense if you read the classes in exactly the order they are defined in the file. It turns out that this is what VCS did: oops! Fortunately, the fix is pretty trivial: declare the classes the other way around.
1 parent 4118f97 commit b94ed28

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

dv/uvm/core_ibex/riscv_dv_extension/ibex_debug_triggers_overrides.sv

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,6 @@
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

5-
class ibex_hardware_triggers_asm_program_gen extends ibex_asm_program_gen;
6-
7-
`uvm_object_utils(ibex_hardware_triggers_asm_program_gen)
8-
`uvm_object_new
9-
10-
// Same implementation as the parent class, except substitute for our custom debug_rom class.
11-
virtual function void gen_debug_rom(int hart);
12-
`uvm_info(`gfn, "Creating debug ROM", UVM_LOW)
13-
debug_rom = ibex_hardware_triggers_debug_rom_gen::
14-
type_id::create("debug_rom", , {"uvm_test_top", ".", `gfn});
15-
debug_rom.cfg = cfg;
16-
debug_rom.hart = hart;
17-
debug_rom.gen_program();
18-
instr_stream = {instr_stream, debug_rom.instr_stream};
19-
endfunction
20-
21-
endclass
22-
23-
245
class ibex_hardware_triggers_debug_rom_gen extends riscv_debug_rom_gen;
256

267
`uvm_object_utils(ibex_hardware_triggers_debug_rom_gen)
@@ -123,6 +104,25 @@ class ibex_hardware_triggers_debug_rom_gen extends riscv_debug_rom_gen;
123104

124105
endclass
125106

107+
class ibex_hardware_triggers_asm_program_gen extends ibex_asm_program_gen;
108+
109+
`uvm_object_utils(ibex_hardware_triggers_asm_program_gen)
110+
`uvm_object_new
111+
112+
// Same implementation as the parent class, except substitute for our custom debug_rom class.
113+
virtual function void gen_debug_rom(int hart);
114+
`uvm_info(`gfn, "Creating debug ROM", UVM_LOW)
115+
debug_rom = ibex_hardware_triggers_debug_rom_gen::
116+
type_id::create("debug_rom", , {"uvm_test_top", ".", `gfn});
117+
debug_rom.cfg = cfg;
118+
debug_rom.hart = hart;
119+
debug_rom.gen_program();
120+
instr_stream = {instr_stream, debug_rom.instr_stream};
121+
endfunction
122+
123+
endclass
124+
125+
126126
class ibex_hardware_triggers_illegal_instr extends riscv_illegal_instr;
127127

128128
`uvm_object_utils(ibex_hardware_triggers_illegal_instr)

0 commit comments

Comments
 (0)