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

Fix SimObject description file documentation #148

Open
powerjg opened this issue Jul 12, 2019 · 0 comments
Open

Fix SimObject description file documentation #148

powerjg opened this issue Jul 12, 2019 · 0 comments

Comments

@powerjg
Copy link
Member

powerjg commented Jul 12, 2019

Right now, if you have a multi-line documentation for a SimObject parameter it looks really bad. For instance,

    op_buffer_size = Param.Unsigned(0, "Size of the InflightInst buffer. This "
                                       "buffer stores decoded (possibly "
                                       "microcoded) instructions used for "
                                       "maintaining the commit order of "
                                       "instructions and microops. Limiting "
                                       "this limits the number of "
                                       "instructions AND microops that can be "
                                       "handled at once before commit (out of "
                                       "order). 0 implies an infinitely large "
                                       "buffer.")

We can improve it by doing something like the following:

 max_instruction_window = Param.Unsigned(0,
        """Normally, the instruction buffer is bound by the number of microops that instructions
        are decoded into (1 for instructions that are not microcoded). This parameter allows for a
        separate constraint to be applied just to the count of ISA instructions, ignoring any
        effects of microcode."""

However, to do this, we need to be able to strip the left margin or else the extra spaces end up in the final string. To do this, we can use inspect.cleandoc().

This change needs to be made in the base SimObject and/or the Param.

This is something we can generally change throughout the codebase.

@powerjg powerjg added the Good starter issue This is an issue that would be good to start with when you're new to gem5. label Jul 12, 2019
@BobbyRBruce BobbyRBruce removed the Good starter issue This is an issue that would be good to start with when you're new to gem5. label Sep 24, 2019
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

2 participants