search some good vhdl preprocessor (opensource)

Discussion in 'VHDL' started by troll greenЪ, Nov 8, 2012.

  1. Can anyone help?
    Main tags: opensource, good architectured.

    Google, opencores didn't help :)
    Thanks!
    troll greenЪ, Nov 8, 2012
    #1
    1. Advertising

  2. troll greenЪ

    HT-Lab Guest

    On 08/11/2012 16:06, troll greenЪ wrote:
    > Can anyone help?
    > Main tags: opensource, good architectured.
    >
    > Google, opencores didn't help :)
    > Thanks!
    >

    I have used VPP in the past, I did modify it slightly but I can't
    remember what I changed, anyway you can download the source

    http://sourceforge.net/projects/vhdlpp/

    Hans
    www.ht-lab.com
    HT-Lab, Nov 8, 2012
    #2
    1. Advertising

  3. troll greenЪ

    Rob Gaddi Guest

    On Thu, 8 Nov 2012 08:06:45 -0800 (PST)
    troll greenЪ <> wrote:

    > Can anyone help?
    > Main tags: opensource, good architectured.
    >
    > Google, opencores didn't help :)
    > Thanks!


    I've used cpp, M4, and my own proprietary code all as VHDL
    preprocessors in the past. Inevitably, they allowed me to write
    non-standard code that was more difficult to maintain and work with in
    the long run.

    VHDL is a fantastically extensible language. Whatever it is you think
    you need a preprocessor for, you're probably wrong.

    --
    Rob Gaddi, Highland Technology -- www.highlandtechnology.com
    Email address domain is currently out of order. See above to fix.
    Rob Gaddi, Nov 8, 2012
    #3
  4. четверг, 8 ноÑÐ±Ñ€Ñ 2012 г., 20:26:36 UTC+4 пользователь HT-Lab напиÑал:
    > On 08/11/2012 16:06, troll greenЪ wrote:
    >
    > > Can anyone help?

    >
    > > Main tags: opensource, good architectured.

    >
    > >

    >
    > > Google, opencores didn't help :)

    >
    > > Thanks!

    >
    > >

    >
    > I have used VPP in the past, I did modify it slightly but I can't
    >
    > remember what I changed, anyway you can download the source
    >
    >
    >
    > http://sourceforge.net/projects/vhdlpp/
    >
    >
    >
    > Hans
    >
    > www.ht-lab.com


    Thanks! I've tried it today but I'll try to find something more complex. Looks like https://metacpan.org/release/Hardware-Vhdl-Automake is a good stuff.
    https://metacpan.org/source/MYKL/Ha...00/lib/Hardware/Vhdl/Automake/PreProcessor.pm
    troll greenЪ, Nov 8, 2012
    #4
  5. > I've used cpp,
    You mean KPP -- http://klabs.org/richcontent/software_content/kpp.htm
    Or i'm wrong?


    >M4,

    Hard to find - can you provide some link?

    >Inevitably, they allowed me to write
    > non-standard code that was more difficult to maintain and work with in
    > the long run.

    Yes...

    > Whatever it is you think you need a preprocessor for, you're probably wrong.

    I need it to control matlab->HDL flow easily.
    F.E. change vhdl coder output parts for using some FPGA embedded DSP blocks.
    etc.
    Have my own samples, but do not want to reinvent the wheel in the case of bone preprocessor :)
    troll greenЪ, Nov 8, 2012
    #5
  6. troll greenЪ

    HT-Lab Guest

    On 08/11/2012 16:49, Rob Gaddi wrote:
    > On Thu, 8 Nov 2012 08:06:45 -0800 (PST)
    > troll greenЪ <> wrote:
    >
    >> Can anyone help?
    >> Main tags: opensource, good architectured.
    >>
    >> Google, opencores didn't help :)
    >> Thanks!

    >
    > I've used cpp, M4, and my own proprietary code all as VHDL
    > preprocessors in the past. Inevitably, they allowed me to write
    > non-standard code that was more difficult to maintain and work with in
    > the long run.
    >
    > VHDL is a fantastically extensible language. Whatever it is you think
    > you need a preprocessor for, you're probably wrong.


    Probably he isn't as preprocessing is being discussed in the P1076
    steering group:

    http://www.eda.org/twiki/bin/view.cgi/P1076/VHDLPreprocessor

    I do hope we don't end up with the unreadable ' or is it the ` character...

    Hans
    www.ht-lab.com


    >
    HT-Lab, Nov 8, 2012
    #6
  7. On 8 ноÑ, 21:22, HT-Lab <> wrote:
    > On 08/11/2012 16:49, Rob Gaddi wrote:
    >
    > > On Thu, 8 Nov 2012 08:06:45 -0800 (PST)
    > > troll greenЪ <> wrote:

    >
    > >> Can anyone help?
    > >> Main tags: opensource, good architectured.

    >
    > >> Google, opencores didn't help :)
    > >> Thanks!

    >
    > > I've used cpp, M4, and my own proprietary code all as VHDL
    > > preprocessors in the past.  Inevitably, they allowed me to write
    > > non-standard code that was more difficult to maintain and work with in
    > > the long run.

    >
    > > VHDL is a fantastically extensible language.  Whatever it is you think
    > > you need a preprocessor for, you're probably wrong.

    >
    > Probably he isn't as preprocessing is being discussed in the P1076
    > steering group:
    >
    > http://www.eda.org/twiki/bin/view.cgi/P1076/VHDLPreprocessor
    >
    > I do hope we don't end up with the unreadable ' or is it the ` character....
    >
    > Hanswww.ht-lab.com
    >

    Cool link, thanks. Try to collect and optimize all my ideas :)

    >I do hope we don't end up with the unreadable ' or is it the ` character....

    Yap. too.
    troll greenЪ, Nov 8, 2012
    #7
  8. troll greenЪ

    Rob Gaddi Guest

    On Thu, 8 Nov 2012 09:10:06 -0800 (PST)
    troll greenЪ <> wrote:

    > > I've used cpp,

    > You mean KPP -- http://klabs.org/richcontent/software_content/kpp.htm
    > Or i'm wrong?
    >


    No, cpp, the C preprocessor. #define, #include, etc. If you've got a
    standard GNU GCC installation, the preprocessor is a standalone
    program, and can be used on anything you like not just C. Good:
    super-easy to work with and you already know the syntax. Bad: pretty
    limited in terms of what it can do.

    >
    > >M4,

    > Hard to find - can you provide some link?
    >


    http://www.gnu.org/software/m4/

    Good: Super powerful. Turing complete in fact; you can make M4 do
    pretty much anything you want it to. Bad: Expect to spend time syntax
    tuning. Lots and lots of time. One thing that helps with that is to
    use whichever command line setting changes the command names from
    things like divert and index to m4_divert and m4_index, you'll get far
    fewer collisions that way.

    > >Inevitably, they allowed me to write
    > > non-standard code that was more difficult to maintain and work with in
    > > the long run.

    > Yes...
    >
    > > Whatever it is you think you need a preprocessor for, you're probably wrong.

    > I need it to control matlab->HDL flow easily.
    > F.E. change vhdl coder output parts for using some FPGA embedded DSP blocks.
    > etc.
    > Have my own samples, but do not want to reinvent the wheel in the case ofbone preprocessor :)


    Another option would be to have Matlab write out text files, and use
    std.textio to read those text files from VHDL to configure things.
    That's generally kosher for synthesis so long as your use of textio
    only happens at elaboration time. Generally you'd wrap a function
    around the textio calls, and have that function return something that
    can initialize a constant, that can then make the rest of your code do
    what it ought. I've used this technique primarily for initializing
    ROMs, filter coefficients, etc.

    Or have Matlab write out functions, procedures, or
    constants to a VHDL package file, and then use that package in your
    main code. I've used this technique to create packages that hold
    things like Subversion revision, timestamp, etc, in such a way that
    they can be synthesized in.

    --
    Rob Gaddi, Highland Technology -- www.highlandtechnology.com
    Email address domain is currently out of order. See above to fix.
    Rob Gaddi, Nov 8, 2012
    #8
  9. > No, cpp, the C preprocessor.
    oh, ok :) I forgot about original variant

    > Good:
    > super-easy to work with and you already know the syntax.  Bad: pretty
    > limited in terms of what it can do.

    Understood, with all limitations

    > http://www.gnu.org/software/m4/

    Thanks, never heard about it before

    > Bad: Expect to spend time syntax tuning.  Lots and lots of time.

    Yes, too heavy "add-on" for vhdl. Not an elegant solution

    >std.textio to read those text files from VHDL to configure things

    Hmm... might be much prettier.

    Last seen GNU ADA gnatprep preprocessor is very simple and ugly, so
    I'll try your naturally VHDL variant :)
    Big tnx!

    > I've used this technique to create packages that hold
    > things like Subversion revision, timestamp, etc

    Preffer matlab/vhdl project makefiles for similar tasks.
    And something like Apache Ant -- http://ant.apache.org/ -- upper.
    With simple AntNest GUI -- http://antsnest.sourceforge.net/
    :)
    troll greenЪ, Nov 8, 2012
    #9
  10. troll greenЪ

    Andy Guest

    Hopefully, the only "preprocessing" allowed will be to address tool incompatibility, especially WRT new LRM features not yet universally supported.

    I adamantly oppose standardizing anything approaching the common pre-processors in use with other languages today. They are too often abused to allow lazy, unmaintaibable coding, while slowing the development of language features to accomplish the same functionality. Exhibit A: SystemVerilog and UVM..

    For those that want to incorporate a pre-processor in their tool flow, thatis fine, but as far as the standard is concerned, such capability should be considerably limited.

    Just my $0.02...

    Andy
    Andy, Nov 8, 2012
    #10
  11. troll greenЪ

    Walter Guest

    My apologies, I write VHDL code since long time; I never need a preprocessor. You coming from software or has formed in some language with cuisine "C" ?


    El jueves, 8 de noviembre de 2012 14:06:45 UTC-2, troll greenЪ escribió:
    > Can anyone help?
    >
    > Main tags: opensource, good architectured.
    >
    >
    >
    > Google, opencores didn't help :)
    >
    > Thanks!
    Walter, Nov 12, 2012
    #11
  12. понедельник, 12 ноÑÐ±Ñ€Ñ 2012 г., 23:30:49 UTC+2 пользователь Walter напиÑал:
    > My apologies, I write VHDL code since long time; I never need a preprocessor. You coming from software or has formed in some language with cuisine "C" ?
    >


    Good day,
    Preprocessor - for some special stuff - Matlab->HDL-coder->VDHL-preprocessor (insert some hardware modules optimizations, etc.).
    At now playing with
    "std.textio to read those text files from VHDL to configure things"
    by Rob Gaddi answer.
    troll greenЪ, Nov 16, 2012
    #12
  13. четверг, 8 ноÑÐ±Ñ€Ñ 2012 г., 19:46:24 UTC+2 пользователь Rob Gaddi напиÑал:
    >
    > Another option would be to have Matlab write out text files, and use
    >
    > std.textio to read those text files from VHDL to configure things.
    >
    > That's generally kosher for synthesis so long as your use of textio
    >
    > only happens at elaboration time. Generally you'd wrap a function
    >
    > around the textio calls, and have that function return something that
    >
    > can initialize a constant, that can then make the rest of your code do
    >
    > what it ought. I've used this technique primarily for initializing
    >
    > ROMs, filter coefficients, etc.
    >
    >
    >
    > Or have Matlab write out functions, procedures, or
    >
    > constants to a VHDL package file, and then use that package in your
    >
    > main code. I've used this technique to create packages that hold
    >
    > things like Subversion revision, timestamp, etc, in such a way that
    >
    > they can be synthesized in.
    >

    ----------------------------------------------------------------
    All above is very good and practical way.
    Decided to use this after a long period of trying.
    When I get more experience and practical examples - try to open some sources and examples.

    Thanks for all!
    troll greenЪ, Jan 22, 2013
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cronus
    Replies:
    1
    Views:
    658
    Paul Mensonides
    Jul 15, 2004
  2. cracker
    Replies:
    2
    Views:
    385
    Sybren Stuvel
    May 19, 2006
  3. afd
    Replies:
    1
    Views:
    8,293
    Colin Paul Gloster
    Mar 23, 2007
  4. Chris K.
    Replies:
    3
    Views:
    733
    Chris K.
    Jun 8, 2008
  5. Abby Lee
    Replies:
    5
    Views:
    393
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page