Skip to content

Commit

Permalink
Fix SystemVerilog support for .v files
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy committed May 9, 2024
1 parent 9b66cb0 commit b5af9b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontends/verific/verific.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3382,10 +3382,14 @@ struct VerificPass : public Pass {

if (GetSize(args) > argidx && (args[argidx] == "-auto_discover" || args[argidx] == "-hdl_sort"))
{
// Always operate in SystemVerilog mode (overriding not supported)
// Always operate in SystemVerilog mode
unsigned verilog_mode = veri_file::SYSTEM_VERILOG;
const char* arg = args[argidx].c_str();

// Treat .v as SystemVerilog too (overriding default behavior to treat it as VERILOG_2000)
hdl_file_sort::RemoveFileExt(".v");
hdl_file_sort::AddFileExtMode(".v", veri_file::SYSTEM_VERILOG);

// Select analyze function
auto analyze_function = (args[argidx] == "-auto_discover") ? hdl_file_sort::AnalyzeDiscoveredFiles : hdl_file_sort::AnalyzeSortedFiles;

Expand Down

0 comments on commit b5af9b9

Please sign in to comment.