Bug 402 - RecordObject to automatically prepend name of object to child signals
Summary: RecordObject to automatically prepend name of object to child signals
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- enhancement
Assignee: Michael Nolan
URL:
Depends on:
Blocks:
 
Reported: 2020-06-24 01:55 BST by Luke Kenneth Casson Leighton
Modified: 2020-06-24 22:01 BST (History)
1 user (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?