Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verilog: clarify method signatures #356

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/verilog/verilog_interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void verilog_typecheckt::module_interface(
interface_module_item(module_item);

// Check the typing of the ports
check_module_ports(module_source);
check_module_ports(module_source.ports());
}

/*******************************************************************\
Expand All @@ -51,10 +51,8 @@ Function: verilog_typecheckt::check_module_ports
\*******************************************************************/

void verilog_typecheckt::check_module_ports(
const verilog_module_sourcet &module_source)
const verilog_module_sourcet::port_listt &module_ports)
{
const auto &module_ports = module_source.ports();

auto &ports = module_symbol.type.add(ID_ports).get_sub();
ports.resize(module_ports.size());
std::map<irep_idt, unsigned> port_names;
Expand Down
8 changes: 4 additions & 4 deletions src/verilog/verilog_typecheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1604,9 +1604,6 @@ void verilog_typecheckt::convert_statements(
// typecheck the new module items
for(auto &item : verilog_module_expr.module_items())
convert_module_item(item);

// store the module expression in module_symbol.value
module_symbol.value = std::move(verilog_module_expr);
}

/*******************************************************************\
Expand Down Expand Up @@ -1674,8 +1671,11 @@ void verilog_typecheckt::typecheck()

auto verilog_module_expr = elaborate_generate_constructs(module_source);

// Now typecheck the statements.
// Now typecheck the generated statements.
convert_statements(verilog_module_expr);

// store the module expression in module_symbol.value
module_symbol.value = std::move(verilog_module_expr);
}

/*******************************************************************\
Expand Down
2 changes: 1 addition & 1 deletion src/verilog/verilog_typecheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class verilog_typecheckt:

// interfaces
void module_interface(const verilog_module_sourcet &);
void check_module_ports(const verilog_module_sourcet &);
void check_module_ports(const verilog_module_sourcet::port_listt &);
void interface_module_decl(const class verilog_declt &);
void interface_function_or_task_decl(const class verilog_declt &);
void interface_inst(const verilog_inst_baset &);
Expand Down