Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorted xdc by net name #10

Open
404manu404 opened this issue Jun 27, 2023 · 0 comments
Open

Sorted xdc by net name #10

404manu404 opened this issue Jun 27, 2023 · 0 comments

Comments

@404manu404
Copy link

404manu404 commented Jun 27, 2023

Hello,
This is a really great tool and safes us a lot of time. Thank you for uploading this! This comment is not an issue... It would be nice, if the function "xdc_format(self, component)" in pinout_plugin.py would create the output sorted by net name and not by pin name/number.
Because of that I have made some changes in this function:


_def xdc_format(self, component):
    added_vars = []
    output = "## Pinout generated for "+component.GetReference()+" ("+component.GetValue()+")\n"
    pinout = get_pins(component)
    mylist = []                         
    for pad in pinout:
        myliststr = ""        
        var_name = str_to_C_variable(pad.GetNetname())
        myliststr += var_name + "ä"        #  ä=delimiter
        if var_name in added_vars or not pad_is_connected(pad) or pad_is_power(pad) or pad_is_passive(pad):
            myliststr += "# "
        else:
            added_vars.append(var_name)
        myliststr += "set_property -dict { PACKAGE_PIN "+pad.GetNumber()+"    IOSTANDARD LVCMOS33 } [get_ports { "+var_name+" }];\n"  
        mylist.append(myliststr) 

    #sort alphabetical
    mylist = sorted(mylist)               
    for i in range(len(mylist)):         
        output += mylist[i].split("ä")[1]
    return output

Sorry, i'm python newbie and I do not know how to solve it better.

Regards

@404manu404 404manu404 changed the title Sorted XD Sorted XDF by Netname Jun 27, 2023
@404manu404 404manu404 changed the title Sorted XDF by Netname Sorted xdc by net name Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant