Suppose I'm building a design like so:
board = rhea.build.boards.get_board("cmoda7_35t")
flow = board.get_flow(top=top_cmoda7_35t)
flow.run()
If (for example) I'm using a ClockManagement module, I've currently got to hard-code the vendor string in the top implementation:
@myhdl.block
def top_cmoda7_35t(clock, led, btn, uart_rxd_out, uart_txd_in):
reset = Reset(0, active=0, async=True)
clkmgmt = ClockManagement(clock, resetext, output_frequencies=(125e6,))
clkmgmt.vendor = 'xilinx'
[...]
it would be nice if I didn't have to hardcode the clkmgmt.vendor = 'xilinx', but instead had access to the board instance being used to portmap this guy, so I could just pull it from board.vendor. (clkmgmt.vendor = board.vendor) Perhaps board could be mapped into the function call similarly to the way the ports are, so you could instead do:
@myhdl.block
def top_cmoda7_35t(board, clock, led, btn, uart_rxd_out, uart_txd_in):
reset = Reset(0, active=0, async=True)
clkmgmt = ClockManagement(clock, resetext, output_frequencies=(125e6,))
clkmgmt.vendor = board.vendor
[...]
Thoughts?