Lars Segerlund wrote:
 HI, do you have any hints about backend writing for icarus ? ( ie. pointers to docs 
other than the source ? ).

 I tried to bring some old tgt-XXX modules up to the latest revision and didn't have 
much luck.

/ regards, Lars Segerlund.

Hi Lars,

The only source you need to look at is ivl_target.h; and it's well documented. Here are the steps I went through:

1. Create a *.conf file.  Mine generator is called "informal":

  functor:synth2
  functor:synth
  functor:syn-rules
  functor:nodangle
  -t:dll
  flag:DLL=informal.tgt

  (Steve, can you comment on these different functors?)

2.  Code your generator.  It needs to implement "target_design":

  /* Ivl entry point. */
  int target_design(ivl_design_t des)
  {
    output = fopen(ivl_design_flag(design, "-o"), "w");
    if (output == 0) {
      perror(ivl_design_flag(design, "-o"));
      return -1;
    }
    process_scope(ivl_design_root(design), 0);
    fclose(output);
    output = 0;
    return 0;
  }

3.  Compile your generator:

  gcc -Wall -O2 -shared -o informal.tgt informal.c

4.  Install your *.conf and *.tgt files to <install_dir>/lib/ivl.

5.  Run it!

  iverilog -Wall -tinformal -o -output_file some_design.v

-Tom



On Wed, 13 Oct 2004 11:07:30 -0500
Tom Hawkins wrote:


I'm having quite a bit of success writing a back-end for Icarus. After I got used to it, I realized the API is very well thought out.

Quick question: Given an ivl_scope_t, is there a way to determine what produced the scope (module, function, task, or named block) and to get the name of it, if it is a module?

Also, is there a definition of the LPMs anywhere? They seem to be different than EDIF LPM.

-Tom






Reply via email to