Bug 402

Summary: RecordObject to automatically prepend name of object to child signals
Product: Libre-SOC's first SoC Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: Source CodeAssignee: Michael Nolan <mtnolan2640>
Status: RESOLVED FIXED    
Severity: enhancement CC: libre-soc-bugs
Priority: ---    
Version: unspecified   
Hardware: Other   
OS: Linux   
NLnet milestone: --- total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0 parent task for budget allocation:
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:

Description Luke Kenneth Casson Leighton 2020-06-24 01:55:33 BST
https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=8c63d6dfe17825ca984854e33e20589df6c5bdb6

i like the idea of having the name of the port prepended to the signals (and other records) however the extra line length added with the compact nature of the PortInterface declararion.

it would i think be much better to have *all* RecordObjects do this.

the only thing is it involves digging into the Signal (or Record) to obtain a name.

this might involve a bit of code duplication from nmigen.

__setattr__is overridden in RecordObject already, so there is access to the Signal (or Record) being added, and at that time it becomes possible to mess with the name.
Comment 1 Michael Nolan 2020-06-24 21:05:02 BST
Fixed in nmutil f61e3beee
Comment 2 Luke Kenneth Casson Leighton 2020-06-24 22:01:01 BST
https://git.libre-soc.org/?p=nmutil.git;a=commitdiff;h=HEAD

ha, hilarious i was just thinking name  name thing, great to see you also thought about Record as well.

PortInterface is a looot tidier, neh?