|
|
|

|
|
|
|
|
|

|
|
 |
Concatenation Operators
|
|
|

|
|
|
- Concatenations are expressed using the brace characters { and }, with commas separating the expressions within.
- Example: + {a, b[3:0], c, 4'b1001} // if a and c are 8-bit numbers, the results has 24 bits
- Unsized constant numbers are not allowed in concatenations.
|
|
|

|
|
|

|
|
|
|
|
|

|
|
 |
Example : Concatenation Operators
|
|
|

|
|
|
1 program concatenation {
2 // concatenation
3 printf (" {4'b1001,4'b10x1} = %b\n", {4'b1001,4'b10x1});
4 }
You could download file concatenation.vr here
|
|
|

|
|
 |
Simulation : Concatenation Operators
|
|
|

|
|
|
{4'b1001,4'b10x1} = 100110x1
|
|
|

|
|
|

|
|
|

|
|
|
|
|
|

|
|
|
|
|
|

|
|
Copyright © 1998-2025 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|