|
From: Cary R. <cy...@ya...> - 2014-07-11 21:44:37
|
Just to be clear there are actually six .vpi files, but some of them likely don't need headers since I believe they are fully contained in a single file (e.g. vpi_debug). I will also say the proposed in file description was a bit verbose for me. It could just be something like this definition is only needed to prevent a compile time warning.
Cary
On Friday, July 11, 2014 2:31 PM, Stephen Williams <st...@ic...> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
*Aaagh*
No no no no NO NO! Not 27 new files! 3! Three!
I'm thinking for each *.vpi file (there are only 3 *.vpi files)
create a single *.h file that contains all the declarations that
that module needs. For example, for the system.vpi, create a
system_funcs.h file and put all the "extern void foo_register(void);"
declarations in there. Include that in the sys_table.c and the
other *.c files that make of the system.vpi. Then similar for
the va_math.vpi and so forth.
On 07/11/2014 02:23 PM, Larry Doolittle wrote:
> Friends -
>
> On Fri, Jul 11, 2014 at 01:38:13PM -0700, Larry Doolittle wrote:
>>>>> 3. Create 20 new .h files, each declaring
>>>>> foo_register(void). #include all 20 of these files in
>>>>> sys_table.c. Creates quite a bit of fluff for not much
>>>>> benefit.
>> I didn't like it either, which is why I suggested #4.
>
> If making all those 27 files is the maintainers' choice, as ugly as
> it is, at least we can script their creation:
>
> #!/bin/bash for n in sys_clog2 sys_convert sys_countdrivers
> sys_darray sys_deposit sys_display sys_fileio sys_finish sys_fst
> sys_lxt sys_lxt2 sys_plusargs sys_queue sys_random sys_random_mti
> sys_readmem sys_scanf sys_sdf sys_special sys_time sys_vcd
> sys_vcdoff table_model v2009_array v2009_enum v2009_string
> vams_simparam; do echo "#include \"${n}_register.h\"" (echo
> "#ifndef ${n^^}_REGISTER_H" echo "#define ${n^^}_REGISTER_H" echo
> "extern void ${n}_register(void);" echo "#endif") >
> ${n}_register.h done
>
> where the output is ready (more-or-less) to paste into
> sys_table.c. BTW, the use of the "extern" keyword here is
> optional.
>
> Just because I suggested this as an option, doesn't mean I like
> it.
>
> - Larry
>
> ------------------------------------------------------------------------------
>
>
_______________________________________________
> Iverilog-devel mailing list Ive...@li...
> https://lists.sourceforge.net/lists/listinfo/iverilog-devel
>
- --
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlPAV48ACgkQrPt1Sc2b3im8KACcCCif1ZgPoVzZRLUyM+5cIwjY
Qq8AoOTsXBKttwWb0blKH92e6cq+Czgl
=2Eqg
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
_______________________________________________
Iverilog-devel mailing list
Ive...@li...
https://lists.sourceforge.net/lists/listinfo/iverilog-devel |