Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 631289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:56:54+00:00 2026-05-13T19:56:54+00:00

I am using the parameter keyword to define a state, i.e., RESET = 5’b00000.

  • 0

I am using the parameter keyword to define a state, i.e., RESET = 5’b00000. If I want to use $display to print out the state name instead of the binary representation, or display the state name in my simulation wave viewer, how can I do this? It doesn’t work to try to print it out as a string (as you would expect), so I’m wondering if this can be done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:56:55+00:00Added an answer on May 13, 2026 at 7:56 pm

    I do not know of a way to automatically $display the name of a parameter. However, if you don’t mind duplicating your code, you could create a task (or function) to accomplish your goal:

        task show_name_state;
            case (state)
                5'b00000: $display("RESET");
                5'b00001: $display("WAIT");
            endcase
        endtask
    
        $display(state); show_name_state();
    

    I know of at least one (expensive) Verilog debugger which has the capability to recognize parameters and automatically display their names in its waveform viewer: the Verdi (formerly Debussy) nWave tool can do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While I am not a huge fan of using the out parameter in c#
When using an anonymous innerclass inside a method, when we want to use a
I want to create a stored procedure to do some combined keyword search using
In C#, if you set up a method parameter using the params keyword, that
I'm executing a stored procedure using GetNamedQuery and setting a string parameter using SetString
Just started with JQuery and I've managed to pass a parameter using POST, firebug
I am joining onto a freetexttable using a searchTerm parameter which is also used
In my template I am currently using the next parameter to redirect the user
What is the maximum value of the limit parameter when using the Facebook Graph
i'm stuck at a point where i am using a wildcard parameter with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.