Hi all..
My original file FA.vhd is as follows...
component MAJ3
port( A : in std_logic := 'U';
enable : in std_logic; B : in std_logic := 'U';
C : in std_logic := 'U';
Y : out std_logic
);
end component;
signal \GND\, \VCC\, N_5, a_c, b_c, c_c, sum_c, GND_0, VCC_0
: std_logic;
begin
enable_pad : INBUF port map (PAD => enable, Y => enable_c);
i have one more file enabled_nets.txt that has follwoing
lines..
a_e
b_e
c_e
i want to modify the signal declaration statement in FA.vhd as
signal \GND\, \VCC\, N_5, a_c, b_c, c_c, sum_c, GND_0,
VCC_0, a_e, b_e, c_e, enable_c: std_logic;
i.e. i want to include the words in enabled_nets.txt to
signal declaration part of FA.vhd as mentioned above, along with this i want to add one more
signal enable_c also, and all these word need to be comma
separated... Here is the perl script i have written for
this... Correct the mistake in it monks.... Thank you all for your valuable time....
open (IN1, "<FA.vhd") or die;
open (OUT, ">common_modify.vhd") or die;
while (<IN1>) {
print OUT;
if (/signal/){
open (IN2, "<enabled_nets.txt") or die;
my @enabled_nets = <IN2>;
chomp @enabled_nets;
while (<IN2>) {
print OUT ;
print OUT ',enable_c,';
}
close (IN2);
}
}
close (IN1);
close (OUT);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.