@@ -47,20 +47,20 @@ struct ConnectPass : public Pass {
47
47
{
48
48
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
49
49
log (" \n " );
50
- log (" connect [-nomap] [-nounset] -set <lhs-expr> <rhs-expr>\n " );
50
+ log (" connect [-nomap] [-nounset] -set <lhs-expr> <rhs-expr> [selection] \n " );
51
51
log (" \n " );
52
52
log (" Create a connection. This is equivalent to adding the statement 'assign\n " );
53
53
log (" <lhs-expr> = <rhs-expr>;' to the Verilog input. Per default, all existing\n " );
54
54
log (" drivers for <lhs-expr> are unconnected. This can be overwritten by using\n " );
55
55
log (" the -nounset option.\n " );
56
56
log (" \n " );
57
57
log (" \n " );
58
- log (" connect [-nomap] -unset <expr>\n " );
58
+ log (" connect [-nomap] -unset <expr> [selection] \n " );
59
59
log (" \n " );
60
60
log (" Unconnect all existing drivers for the specified expression.\n " );
61
61
log (" \n " );
62
62
log (" \n " );
63
- log (" connect [-nomap] [-assert] -port <cell> <port> <expr>\n " );
63
+ log (" connect [-nomap] [-assert] -port <cell> <port> <expr> [selection] \n " );
64
64
log (" \n " );
65
65
log (" Connect the specified cell port to the specified cell port.\n " );
66
66
log (" \n " );
@@ -80,17 +80,6 @@ struct ConnectPass : public Pass {
80
80
}
81
81
void execute (std::vector<std::string> args, RTLIL::Design *design) override
82
82
{
83
- RTLIL::Module *module = nullptr ;
84
- for (auto mod : design->selected_modules ()) {
85
- if (module != nullptr )
86
- log_cmd_error (" Multiple modules selected: %s, %s\n " , log_id (module->name ), log_id (mod->name ));
87
- module = mod;
88
- }
89
- if (module == nullptr )
90
- log_cmd_error (" No modules selected.\n " );
91
- if (!module->processes .empty ())
92
- log_cmd_error (" Found processes in selected module.\n " );
93
-
94
83
bool flag_nounset = false , flag_nomap = false , flag_assert = false ;
95
84
std::string set_lhs, set_rhs, unset_expr;
96
85
std::string port_cell, port_port, port_expr;
@@ -128,6 +117,18 @@ struct ConnectPass : public Pass {
128
117
}
129
118
break ;
130
119
}
120
+ extra_args (args, argidx, design);
121
+
122
+ RTLIL::Module *module = nullptr ;
123
+ for (auto mod : design->selected_modules ()) {
124
+ if (module != nullptr )
125
+ log_cmd_error (" Multiple modules selected: %s, %s\n " , log_id (module->name ), log_id (mod->name ));
126
+ module = mod;
127
+ }
128
+ if (module == nullptr )
129
+ log_cmd_error (" No modules selected.\n " );
130
+ if (!module->processes .empty ())
131
+ log_cmd_error (" Found processes in selected module.\n " );
131
132
132
133
SigMap sigmap;
133
134
if (!flag_nomap)
0 commit comments