• Top
  • Sv::vl-moddb.lisp

Vl-genblob->svex-modules

Given a vl-genblob, translate its contents into an svex sv::module.

Signature
(vl-genblob->svex-modules x elabindex 
                          modname config modalist interfacep) 
 
  → 
(mv warnings mod modalist1 width new-elabindex)
Arguments
x — Guard (vl-genblob-p x).
elabindex — outside of the genblob scope.
modname — Guard (sv::modname-p modname).
config — Guard (vl-simpconfig-p config).
modalist — Guard (sv::modalist-p modalist).
interfacep — determines whether we create :self wires aliased to the concatenation of all the variables.
Returns
warnings — Type (vl-warninglist-p warnings).
mod — Type (and (sv::module-p mod) (sv::svarlist-addr-p (sv::module-vars mod))).
modalist1 — Type (and (sv::modalist-p modalist1) (implies (sv::svarlist-addr-p (sv::modalist-vars modalist)) (sv::svarlist-addr-p (sv::modalist-vars modalist1)))) .
width — Type (natp width).

Mostly, this function delegates its work to other functions:

  • vl-vardecllist->svex to process variable declarations
  • vl-assigns->svex-assigns to process assignments
  • vl-modinstlist->svex-assigns/aliases to process module instances.

It also creates new modules for any generate blocks/arrays present.