# \#generate

**URL:** https://verificationacademy.com/forums/tag/generate/4392.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [SystemVerilog generate label as signal name](https://verificationacademy.com/forums/t/systemverilog-generate-label-as-signal-name/49944)

<div class="topic-metadata">

**Author:** [@jamal](https://verificationacademy.com/forums/u/jamal)\
**Replies:** 1\
**Last updated:** [March 28, 2025, 4:11pm UTC](https://verificationacademy.com/forums/t/systemverilog-generate-label-as-signal-name/49944 "2025-03-28T16:11:45Z")

</div>

Dear Forum, I saw this syntax in some open source coding : generate for (i=0;i\<\`N ;i=i+1) begin:gen\_label wire p ; ... end endgenerate assign sig = gen\_label\[0\].p; // use of …

---

## [How to use generate block in top module in UVM](https://verificationacademy.com/forums/t/how-to-use-generate-block-in-top-module-in-uvm/41800)

<div class="topic-metadata">

**Author:** [@Harsha\_vardhan](https://verificationacademy.com/forums/u/Harsha_vardhan)\
**Replies:** 5\
**Last updated:** [June 12, 2023, 7:19pm UTC](https://verificationacademy.com/forums/t/how-to-use-generate-block-in-top-module-in-uvm/41800 "2023-06-12T19:19:17Z")

</div>

Hi, I am trying to use genvar and genrate block in top module of the UVM. I took three clocks and I want to connect to the common clock I tried using generate block but I am getting some syntax error I am unable to find…

---

## [Create Class names with Macro](https://verificationacademy.com/forums/t/create-class-names-with-macro/39730)

<div class="topic-metadata">

**Author:** [@mayubh](https://verificationacademy.com/forums/u/mayubh)\
**Replies:** 1\
**Last updated:** [October 22, 2021, 8:16pm UTC](https://verificationacademy.com/forums/t/create-class-names-with-macro/39730 "2021-10-22T20:16:42Z")

</div>

I wanted to create class names using macro. The class are of type uvm\_reg and there are 31 such classes named as : PMT\_1, PMT\_2 and so on until PMT\_31. The object of teh class is already created in other file where the…

---

## [Index resolution in a macro used in a generate block](https://verificationacademy.com/forums/t/index-resolution-in-a-macro-used-in-a-generate-block/39067)

<div class="topic-metadata">

**Author:** [@nex](https://verificationacademy.com/forums/u/nex)\
**Replies:** 3\
**Last updated:** [May 12, 2021, 3:33pm UTC](https://verificationacademy.com/forums/t/index-resolution-in-a-macro-used-in-a-generate-block/39067 "2021-05-12T15:33:16Z")

</div>

Hi, I have some issues trying to use a parametrized macro in a generate loop (I guess the issue would be the same in a for loop). I want to assign some internal signals of my design under test from my TestBench. Those …

---

## [Work around for generating particular code using generate block with dynamic variable in SVA for assert property](https://verificationacademy.com/forums/t/work-around-for-generating-particular-code-using-generate-block-with-dynamic-variable-in-sva-for-assert-property/38275)

<div class="topic-metadata">

**Author:** [@Pavan\_Kumar\_Kollipara](https://verificationacademy.com/forums/u/Pavan_Kumar_Kollipara)\
**Replies:** 8\
**Last updated:** [October 30, 2020, 5:07pm UTC](https://verificationacademy.com/forums/t/work-around-for-generating-particular-code-using-generate-block-with-dynamic-variable-in-sva-for-assert-property/38275 "2020-10-30T17:07:40Z")

</div>

// length value will change dynamically, len is signal // READ\_DATA = 32; // tag is some value. for(genvar i = 0; i \<= (length/(READ\_DATA/8)); i++) begin property\_a: assert property (P\_TAG\_CHECK(tag)) …

---

## [SV Generate](https://verificationacademy.com/forums/t/sv-generate/37869)

<div class="topic-metadata">

**Author:** [@SUNODH](https://verificationacademy.com/forums/u/SUNODH)\
**Replies:** 1\
**Last updated:** [July 24, 2020, 3:37pm UTC](https://verificationacademy.com/forums/t/sv-generate/37869 "2020-07-24T15:37:34Z")

</div>

Do system Verilog support delays inside. Suppose I am using genvar to generate multiple clocks like below reg \[7:0\]clk; genvar i; generate for (i=0; i \< 7; i++) begin #1 clk\[i\]=~cl…

---

## [Bind statements to VHDL generate block](https://verificationacademy.com/forums/t/bind-statements-to-vhdl-generate-block/36405)

<div class="topic-metadata">

**Author:** [@agstod](https://verificationacademy.com/forums/u/agstod)\
**Replies:** 1\
**Last updated:** [August 12, 2019, 6:41pm UTC](https://verificationacademy.com/forums/t/bind-statements-to-vhdl-generate-block/36405 "2019-08-12T18:41:39Z")

</div>

I am trying to bind a module to a VHDL generate block: module top; ... DUT dut(); bind dut.GENERATE\_BLOCK.sub\_module module2bind module2bind\_inst() endmodule However I get the error: \*\* Error: Cannot bind to ‘d…

---

## [Distributing task calls between SV implementations in "generate" blocks](https://verificationacademy.com/forums/t/distributing-task-calls-between-sv-implementations-in-generate-blocks/35774)

<div class="topic-metadata">

**Author:** [@simonsabato](https://verificationacademy.com/forums/u/simonsabato)\
**Replies:** 4\
**Last updated:** [February 27, 2019, 7:47pm UTC](https://verificationacademy.com/forums/t/distributing-task-calls-between-sv-implementations-in-generate-blocks/35774 "2019-02-27T19:47:11Z")

</div>

In our “ram” library element, we compile in accessor tasks during simulation. Currently, we globally define LIB\_VENDOR or LIB\_BEHAVIORAL to control implementation. So we have code like: module ram; \`ifdef LIB\_VENDO…

---

## [Code within always @\* in a generate doesn't inherit the generate for if (PARAMS) statement](https://verificationacademy.com/forums/t/code-within-always-in-a-generate-doesnt-inherit-the-generate-for-if-params-statement/34938)

<div class="topic-metadata">

**Author:** [@galavish](https://verificationacademy.com/forums/u/galavish)\
**Replies:** 1\
**Last updated:** [August 28, 2018, 10:33pm UTC](https://verificationacademy.com/forums/t/code-within-always-in-a-generate-doesnt-inherit-the-generate-for-if-params-statement/34938 "2018-08-28T22:33:29Z")

</div>

I see compile issues with most of the vendors for this pseudo code (Simplified version): generate if (PARAM1 == 1) then always @\* begin if (PARAM2 == 1) begin sig2 = sig1\[PARAM2+Width:Width+1\] …

---

## [Parameter and generate usage in the interface](https://verificationacademy.com/forums/t/parameter-and-generate-usage-in-the-interface/34317)

<div class="topic-metadata">

**Author:** [@MohammedWasimMaster](https://verificationacademy.com/forums/u/MohammedWasimMaster)\
**Replies:** 2\
**Last updated:** [April 9, 2018, 10:43pm UTC](https://verificationacademy.com/forums/t/parameter-and-generate-usage-in-the-interface/34317 "2018-04-09T22:43:47Z")

</div>

I have two parameters one is ENABLE\_DISABLE and another is a number NUM\_OF\_INTERFACES. Now when enable\_disable is 1 it should generate blocks but when enable\_disable is 0 then it should not generate any of the paramete…

---

## [How to use numbered identifiers in a loop](https://verificationacademy.com/forums/t/how-to-use-numbered-identifiers-in-a-loop/32590)

<div class="topic-metadata">

**Author:** [@vlsiraptor](https://verificationacademy.com/forums/u/vlsiraptor)\
**Replies:** 1\
**Last updated:** [November 24, 2016, 1:27pm UTC](https://verificationacademy.com/forums/t/how-to-use-numbered-identifiers-in-a-loop/32590 "2016-11-24T13:27:10Z")

</div>

Let’s say I want to connect a bus, similar to the below, where the name of the wire includes numbering: wire bus\[500:0\]; assign bus\[0\] = my\_wire\_0; assign bus\[1\] = my\_wire\_1; … assign bus\[500\]= my\_wire\_500; Is ther…

---

## [Combination of generate and macro](https://verificationacademy.com/forums/t/combination-of-generate-and-macro/29837)

<div class="topic-metadata">

**Author:** [@kobipinhas](https://verificationacademy.com/forums/u/kobipinhas)\
**Replies:** 3\
**Last updated:** [August 21, 2014, 3:42pm UTC](https://verificationacademy.com/forums/t/combination-of-generate-and-macro/29837 "2014-08-21T15:42:45Z")

</div>

Hi. I defined the next macro: \`define CONNECT(ARRAY\_NAME, CH)\\ assign ARRAY\_NAME\[CH\] = ddr\`\`CH; if i use it like: \`CONNECT(signal\_list, 2) then every thing is O.K and this macro replaced by: assign sginal\_lis…

---

## [Undeclared Identifiers in Conditional Generate Blocks](https://verificationacademy.com/forums/t/undeclared-identifiers-in-conditional-generate-blocks/29098)

<div class="topic-metadata">

**Author:** [@dplumb](https://verificationacademy.com/forums/u/dplumb)\
**Replies:** 4\
**Last updated:** [January 22, 2014, 8:55pm UTC](https://verificationacademy.com/forums/t/undeclared-identifiers-in-conditional-generate-blocks/29098 "2014-01-22T20:55:25Z")

</div>

Verilog compilers seem to have inconsistent behavior when compiling different types of code in conditional generate blocks. Here is an example: 1: module bar(input x, output y); 2: assign y = x; 3: endmodule 4: 5: …
