...
for instance i:gpio[7:0] will be expanded to i:gpio7,i:gpio6,i:gpio5,i:gpio4,i:gpio3,i:gpio2,i:gpio1,i:gpio0 and then starts over at i:gpio7
top to bottom | bottom to top |
---|---|
Comma Separated Ranges
Multiple ranged sigNames can be separated by commas,
...
Here is a table of all the alternations and the resulting sigNames in sequence
alternation value | alternation value | ||||||||
---|---|---|---|---|---|---|---|---|---|
seq# | lt | mid | rt | sigName | seq# | lt | mid | rt | signame |
1 | sw0 | 3 | p | pcie_sw0_dq3p | 9 | sw1 | 3 | p | pcie_sw1_dq3p |
2 | sw0 | 3 | n | pcie_sw0_dq3n | 10 | sw1 | 3 | n | pcie_sw1_dq3p |
3 | sw0 | 2 | p | pcie_sw0_dq2n | 11 | sw1 | 2 | p | pcie_sw1_dq2p |
4 | sw0 | 2 | n | pcie_sw0_dq2p | 12 | sw1 | 2 | n | pcie_sw1_dq2p |
5 | sw0 | 1 | p | pcie_sw0_dq1n | 13 | sw1 | 1 | p | pcie_sw1_dq1p |
6 | sw0 | 1 | n | pcie_sw0_dq1p | 14 | sw1 | 1 | n | pcie_sw1_dq1p |
7 | sw0 | 0 | p | pcie_sw0_dq0n | 15 | sw1 | 0 | p | pcie_sw1_dq0p |
8 | sw0 | 0 | n | pcie_sw0_dq0p | 16 | sw1 | 0 | n | pcie_sw1_dq0p |
Interleaving Busses of Signals using Alternation with inc_dec operators
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#!/usr/bin/perl use strict; use warnings; my $expString=""; #you need to create code that adds comma separated signal names to the $expString variable #note that strict is enforced so you need to declare your variables with 'my' #Insert code here #End insert code print "\$expString=$expString\n"; #this needs to be the last thing you do in this code $expString=$expString; |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#!/usr/bin/perl use strict; use warnings; my $expString=""; #you need to create code that adds comma separated signal names to the $expString variable #note that strict is enforced so you need to declare your variables with 'my' #Insert code here foreach my $i (0..3){ foreach my $j (0..1){ foreach my $pn (qw(p n)){ $expString.="I:pcie_sw" . $j ."_rx_" .${i} .${pn}. ","; } } } #End insert code print "\$expString=$expString\n"; #this needs to be the last thing you do in this code $expString=$expString; |
...