Tests: Add UVM 2020-3.1 hello world
This commit is contained in:
parent
c87a3e92fc
commit
fbb195e054
|
|
@ -12,6 +12,7 @@ import sys
|
||||||
|
|
||||||
def process() -> None:
|
def process() -> None:
|
||||||
in_header = True
|
in_header = True
|
||||||
|
in_backslash = False
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
line = line.expandtabs(tabsize=8)
|
line = line.expandtabs(tabsize=8)
|
||||||
|
|
@ -32,13 +33,15 @@ def process() -> None:
|
||||||
continue
|
continue
|
||||||
if re.match(r'^`line ', line):
|
if re.match(r'^`line ', line):
|
||||||
continue
|
continue
|
||||||
if re.match(r'^\s*$', line):
|
if re.match(r'^\s*$', line) and not in_backslash:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if re.match(r'^ *endpackage', line):
|
if re.match(r'^ *endpackage', line):
|
||||||
print(line)
|
print(line)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
in_backslash = re.search(r'\\$', line)
|
||||||
|
|
||||||
print(line)
|
print(line)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2024 by Wilson Snyder. This program is free software; you
|
||||||
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
import vltest_bootstrap
|
||||||
|
|
||||||
|
test.scenarios('vlt')
|
||||||
|
test.top_filename = 't/t_uvm_hello.v'
|
||||||
|
|
||||||
|
if test.have_dev_gcov:
|
||||||
|
test.skip("Test suite intended for full dev coverage without needing this test")
|
||||||
|
|
||||||
|
test.compile(v_flags2=[
|
||||||
|
"--binary",
|
||||||
|
"-j 0",
|
||||||
|
"-Wall",
|
||||||
|
"+incdir+t/uvm", #
|
||||||
|
"t/uvm/uvm_pkg_all_v2020_3_1_nodpi.svh",
|
||||||
|
])
|
||||||
|
|
||||||
|
test.passes()
|
||||||
|
|
@ -176,6 +176,7 @@
|
||||||
super.new(name); \
|
super.new(name); \
|
||||||
endfunction \
|
endfunction \
|
||||||
endclass \
|
endclass \
|
||||||
|
|
||||||
`define m_uvm_topdown_phase(PHASE,COMP,PREFIX) \
|
`define m_uvm_topdown_phase(PHASE,COMP,PREFIX) \
|
||||||
class PREFIX``PHASE``_phase extends uvm_topdown_phase; \
|
class PREFIX``PHASE``_phase extends uvm_topdown_phase; \
|
||||||
virtual function void exec_func(uvm_component comp, uvm_phase phase); \
|
virtual function void exec_func(uvm_component comp, uvm_phase phase); \
|
||||||
|
|
@ -195,6 +196,7 @@
|
||||||
super.new(name); \
|
super.new(name); \
|
||||||
endfunction \
|
endfunction \
|
||||||
endclass \
|
endclass \
|
||||||
|
|
||||||
`define m_uvm_bottomup_phase(PHASE,COMP,PREFIX) \
|
`define m_uvm_bottomup_phase(PHASE,COMP,PREFIX) \
|
||||||
class PREFIX``PHASE``_phase extends uvm_bottomup_phase; \
|
class PREFIX``PHASE``_phase extends uvm_bottomup_phase; \
|
||||||
virtual function void exec_func(uvm_component comp, uvm_phase phase); \
|
virtual function void exec_func(uvm_component comp, uvm_phase phase); \
|
||||||
|
|
@ -214,6 +216,7 @@
|
||||||
super.new(name); \
|
super.new(name); \
|
||||||
endfunction \
|
endfunction \
|
||||||
endclass \
|
endclass \
|
||||||
|
|
||||||
`define uvm_builtin_task_phase(PHASE) \
|
`define uvm_builtin_task_phase(PHASE) \
|
||||||
`m_uvm_task_phase(PHASE,uvm_component,uvm_)
|
`m_uvm_task_phase(PHASE,uvm_component,uvm_)
|
||||||
`define uvm_builtin_topdown_phase(PHASE) \
|
`define uvm_builtin_topdown_phase(PHASE) \
|
||||||
|
|
@ -749,11 +752,13 @@ end
|
||||||
`define m_uvm_compare_threshold_begin(COMPARER) \
|
`define m_uvm_compare_threshold_begin(COMPARER) \
|
||||||
if ((!COMPARER.get_threshold() || \
|
if ((!COMPARER.get_threshold() || \
|
||||||
(COMPARER.get_result() < COMPARER.get_threshold()))) begin \
|
(COMPARER.get_result() < COMPARER.get_threshold()))) begin \
|
||||||
|
|
||||||
`define m_uvm_compare_threshold_end \
|
`define m_uvm_compare_threshold_end \
|
||||||
end
|
end
|
||||||
`define m_uvm_compare_begin(LVALUE, RVALUE, COMPARER=comparer) \
|
`define m_uvm_compare_begin(LVALUE, RVALUE, COMPARER=comparer) \
|
||||||
`m_uvm_compare_threshold_begin(COMPARER) \
|
`m_uvm_compare_threshold_begin(COMPARER) \
|
||||||
if ((LVALUE) !== (RVALUE)) begin \
|
if ((LVALUE) !== (RVALUE)) begin \
|
||||||
|
|
||||||
`define m_uvm_compare_end \
|
`define m_uvm_compare_end \
|
||||||
end \
|
end \
|
||||||
`m_uvm_compare_threshold_end
|
`m_uvm_compare_threshold_end
|
||||||
|
|
@ -1802,6 +1807,7 @@ local function void __m_uvm_execute_field_op( uvm_field_op __local_op__ );
|
||||||
default: \
|
default: \
|
||||||
return; /* unknown op, just return */ \
|
return; /* unknown op, just return */ \
|
||||||
endcase \
|
endcase \
|
||||||
|
|
||||||
`define uvm_field_utils_end \
|
`define uvm_field_utils_end \
|
||||||
endfunction : __m_uvm_execute_field_op
|
endfunction : __m_uvm_execute_field_op
|
||||||
`define uvm_object_utils(T) \
|
`define uvm_object_utils(T) \
|
||||||
|
|
@ -1833,8 +1839,10 @@ endfunction : __m_uvm_execute_field_op
|
||||||
`define uvm_component_utils(T) \
|
`define uvm_component_utils(T) \
|
||||||
`m_uvm_component_registry_internal(T,T) \
|
`m_uvm_component_registry_internal(T,T) \
|
||||||
`uvm_type_name_decl(`"T`") \
|
`uvm_type_name_decl(`"T`") \
|
||||||
|
|
||||||
`define uvm_component_param_utils(T) \
|
`define uvm_component_param_utils(T) \
|
||||||
`m_uvm_component_registry_param(T) \
|
`m_uvm_component_registry_param(T) \
|
||||||
|
|
||||||
`define uvm_component_utils_begin(T) \
|
`define uvm_component_utils_begin(T) \
|
||||||
`uvm_component_utils(T) \
|
`uvm_component_utils(T) \
|
||||||
`uvm_field_utils_begin(T)
|
`uvm_field_utils_begin(T)
|
||||||
|
|
@ -1844,8 +1852,10 @@ endfunction : __m_uvm_execute_field_op
|
||||||
`define uvm_component_abstract_utils(T) \
|
`define uvm_component_abstract_utils(T) \
|
||||||
`m_uvm_component_abstract_registry_internal(T,T) \
|
`m_uvm_component_abstract_registry_internal(T,T) \
|
||||||
`uvm_type_name_decl(`"T`") \
|
`uvm_type_name_decl(`"T`") \
|
||||||
|
|
||||||
`define uvm_component_abstract_param_utils(T) \
|
`define uvm_component_abstract_param_utils(T) \
|
||||||
`m_uvm_component_abstract_registry_param(T) \
|
`m_uvm_component_abstract_registry_param(T) \
|
||||||
|
|
||||||
`define uvm_component_abstract_utils_begin(T) \
|
`define uvm_component_abstract_utils_begin(T) \
|
||||||
`uvm_component_abstract_utils(T) \
|
`uvm_component_abstract_utils(T) \
|
||||||
`uvm_field_utils_begin(T)
|
`uvm_field_utils_begin(T)
|
||||||
|
|
@ -2938,6 +2948,7 @@ UVM_``OP: \
|
||||||
`m_uvm_field_end(ARG)
|
`m_uvm_field_end(ARG)
|
||||||
`define uvm_field_aa_int_int(ARG,FLAG=UVM_DEFAULT) \
|
`define uvm_field_aa_int_int(ARG,FLAG=UVM_DEFAULT) \
|
||||||
`uvm_field_aa_int_key(int, ARG, FLAG) \
|
`uvm_field_aa_int_key(int, ARG, FLAG) \
|
||||||
|
|
||||||
`define uvm_field_aa_int_int_unsigned(ARG,FLAG=UVM_DEFAULT) \
|
`define uvm_field_aa_int_int_unsigned(ARG,FLAG=UVM_DEFAULT) \
|
||||||
`uvm_field_aa_int_key(int unsigned, ARG, FLAG)
|
`uvm_field_aa_int_key(int unsigned, ARG, FLAG)
|
||||||
`define uvm_field_aa_int_integer(ARG,FLAG=UVM_DEFAULT) \
|
`define uvm_field_aa_int_integer(ARG,FLAG=UVM_DEFAULT) \
|
||||||
|
|
@ -3660,6 +3671,7 @@ endclass
|
||||||
end
|
end
|
||||||
`define uvm_do_callbacks_exit_on(T,CB,METHOD,VAL) \
|
`define uvm_do_callbacks_exit_on(T,CB,METHOD,VAL) \
|
||||||
`uvm_do_obj_callbacks_exit_on(T,CB,this,METHOD,VAL) \
|
`uvm_do_obj_callbacks_exit_on(T,CB,this,METHOD,VAL) \
|
||||||
|
|
||||||
`define uvm_do_obj_callbacks_exit_on(T,CB,OBJ,METHOD,VAL) \
|
`define uvm_do_obj_callbacks_exit_on(T,CB,OBJ,METHOD,VAL) \
|
||||||
begin \
|
begin \
|
||||||
uvm_callback_iter#(T,CB) iter = new(OBJ); \
|
uvm_callback_iter#(T,CB) iter = new(OBJ); \
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue