Skip to content

Commit

Permalink
Bump surelog (#1974)
Browse files Browse the repository at this point in the history
Some tests would fail in the automatic PR to bump Surelog:

https://github.com/chipsalliance/synlig/actions/runs/6172468338/job/16753192588?pr=1965

There was an unhandled case in the switch in `process_object`. With this
PR it's solved.

I'm also adding files to the `.gitignore` file assuming that such a
change doesn't need a separate PR. Please let me know if other solution
is preferred.
  • Loading branch information
wsipak authored Sep 20, 2023
2 parents c2de604 + 5ace19d commit 069f89d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
__pycache__
/build
/image
.cache/
compile_commands.json
13 changes: 13 additions & 0 deletions frontends/systemverilog/uhdm_ast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4512,6 +4512,16 @@ void UhdmAst::process_longint_typespec()
current_node->is_signed = vpi_get(vpiSigned, obj_h);
}

void UhdmAst::process_shortreal_typespec()
{
std::vector<AST::AstNode *> packed_ranges; // comes before wire name
std::vector<AST::AstNode *> unpacked_ranges; // comes after wire name
current_node = make_ast_node(AST::AST_WIRE);
packed_ranges.push_back(make_range(31, 0));
add_multirange_wire(current_node, packed_ranges, unpacked_ranges);
current_node->is_signed = vpi_get(vpiSigned, obj_h);
}

void UhdmAst::process_byte_typespec()
{
std::vector<AST::AstNode *> packed_ranges; // comes before wire name
Expand Down Expand Up @@ -5269,6 +5279,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle)
case vpiLongIntTypespec:
process_longint_typespec();
break;
case vpiShortRealTypespec:
process_shortreal_typespec();
break;
case vpiTimeTypespec:
process_time_typespec();
break;
Expand Down
1 change: 1 addition & 0 deletions frontends/systemverilog/uhdm_ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class UhdmAst
void process_int_typespec();
void process_shortint_typespec();
void process_longint_typespec();
void process_shortreal_typespec();
void process_time_typespec();
void process_bit_typespec();
void process_string_var();
Expand Down
2 changes: 2 additions & 0 deletions tests/formal/passlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ sv2v:core/assert.v
sv2v:core/case_inside_cast.v
sv2v:core/class_ident.sv
sv2v:core/class_ident.v
sv2v:core/class_param_nest.sv
sv2v:core/class_param_nest.v
sv2v:core/constexpr.v
sv2v:core/data_lifetime.sv
Expand Down Expand Up @@ -622,6 +623,7 @@ yosys:simple/case_expr_extend.sv
yosys:simple/case_expr_query.sv
yosys:simple/case_large.v
yosys:simple/constmuldivmod.v
yosys:simple/constpower.v
yosys:simple/const_branch_finish.v
yosys:simple/const_fold_func.v
yosys:simple/defvalue.sv
Expand Down
2 changes: 1 addition & 1 deletion third_party/surelog
Submodule surelog updated 271 files

0 comments on commit 069f89d

Please sign in to comment.