# How to assign a variable name to a parameter?

**URL:** <https://verificationacademy.com/forums/t/how-to-assign-a-variable-name-to-a-parameter/31781>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, parameter, array-of-defines\
**Created:** [May 3, 2016, 10:30am UTC](https://verificationacademy.com/forums/t/how-to-assign-a-variable-name-to-a-parameter/31781 "2016-05-03T10:30:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Reuben](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/reuben/32/1409_2.png) [@Reuben](https://verificationacademy.com/forums/u/Reuben)\
**Post date:** [May 4, 2016, 2:07am UTC](https://verificationacademy.com/forums/t/how-to-assign-a-variable-name-to-a-parameter/31781/3 "2016-05-04T02:07:49Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/how-to-assign-a-variable-name-to-a-parameter/31781/2):_  
Hi,

I tried using the alias but a compile error says illegal operand for constant expression.  
Here’s what I did:

```verilog

// In this code, wire_var is triggerWrite0, while PARAM_1 is REGISTER_0_TRIGGER_WRITE
wire triggerWrite0;
assign triggerWrite0 = pm_trig[0];
alias triggerWrite0 = TRIG_WRITE0;
parameter REGISTER_0_TRIGGER_WRITE = TRIG_WRITE0; // Compile error points here

```

I’ll explain the situation in much further details later. I’m just looking for a better way to explain it simply.

Regards,  
Reuben

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-assign-a-variable-name-to-a-parameter/31781)._
