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

Allow the user to specify the JTAG ID #4

Open
sgherbst opened this issue Apr 16, 2020 · 1 comment
Open

Allow the user to specify the JTAG ID #4

sgherbst opened this issue Apr 16, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sgherbst
Copy link
Contributor

sgherbst commented Apr 16, 2020

The tap template allows the user to specify version[3:0] (valid range 0 through 15), part[15:0] (valid range 0 through 65535), and man_num[10:0] (valid range 0 through 2047):

.version(`$version`),
.part(`$part`),
.man_num(`$man_num`),

These are taken together to form the JTAG ID (note that the LSB is always "1")

logic [31:0] id_code = {version, part, man_num, 1'b1};

It would be great it the user could optionally specify these parameters. This would allow them to do things like encode the git commit hash in the ID for debugging purposes. This feature could be exposed as optional command-line arguments (something like justag --version NNNN --part NNNN --man_num NNNN file1 file2 ...).

Right now, it might be a little cumbersome to add these command-line options because sys.argv is read directly:

list_of_files = sys.argv[1:]

However I think if this is changed to an ArgumentParser-based approach, it should be relatively quick. By the way, please validate the user input for these three arguments to ensure that they fall within the allowed range of values. Thanks!

@sgherbst sgherbst added the enhancement New feature or request label Apr 16, 2020
@sgherbst
Copy link
Contributor Author

Please see updated comments since there were some errors in my understanding of the tap template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants