Overriding verilog module name, not the instantiation

9 views
Skip to first unread message

Brendon Chetwynd

unread,
May 30, 2024, 12:34:41 PMMay 30
to Chipyard
.suggestName is a powerful tool for overriding default signal names and module instantiations. 

Is there a way of overriding the default module name and the generated verilog file?

For example, all of my peripherals use .generateSynchronousDomain.  As a result, the generated verilog files are named as follows:

ClockSinkDomain.sv
ClockSinkDomain_1.sv
ClockSinkDomain_2.sv
ClockSinkDomain_3.sv
...

Ideally, the module name and filename would be something like myFuncDomain and myFundDomain.sv


Brendon Chetwynd

unread,
May 30, 2024, 1:14:26 PMMay 30
to Chipyard
.suggestName allows you to override a module instance name (from outside module)

desiredName allows you to override a module name from inside the module.

Unfortunately, I don't control the ClockDomain module... so is there anyway to execute something like desiredName from outside the module definition?

Jerry Zhao

unread,
May 30, 2024, 1:18:31 PMMay 30
to chip...@googlegroups.com
There should be a parameter added to the Chisel constructor of ClockDomain to enable passing in a custom desiredName for the generated ClockDomain.
This should be added to rocket-chip.

-Jerry

--
You received this message because you are subscribed to the Google Groups "Chipyard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chipyard+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/ca4f8fb7-1701-427a-b5d1-cbab4e00ce93n%40googlegroups.com.

Brendon Chetwynd

unread,
May 30, 2024, 2:49:49 PMMay 30
to Chipyard
Thanks, Jerry.  I am guessing there is no way of forcing an override from outside the module?

Jerry Zhao

unread,
May 30, 2024, 6:32:43 PMMay 30
to chip...@googlegroups.com
I'm not aware of one. An API for naming ClockSinkDomains has been added to rocket-chip.

-Jerry

Reply all
Reply to author
Forward
0 new messages