OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cuc/] [verilog.c] - Diff between revs 1061 and 1098

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1061 Rev 1098
Line 220... Line 220...
    fprintf (stderr, "Cannot open '%s'\n", tmp);
    fprintf (stderr, "Cannot open '%s'\n", tmp);
    exit (1);
    exit (1);
  }
  }
 
 
  /* output header */
  /* output header */
  GEN ("/* %s -- generated by OpenRISC Custom Unit Compiler\n", tmp);
  GEN ("/* %s -- generated by FLEXelerator\n", tmp);
  GEN ("   (C) 2002 OpenCores http://www.opencores.org/\n");
  GEN ("   (C) 2002 Flextronics http://www.flextronics.com/\n");
  GEN ("   function   \"%s\"\n", funcname);
  GEN ("   function   \"%s\"\n", funcname);
  GEN ("   at         %08x - %08x\n", f->start_addr, f->end_addr);
  GEN ("   at         %08x - %08x\n", f->start_addr, f->end_addr);
  GEN ("   num BBs    %i */\n\n", f->num_bb);
  GEN ("   num BBs    %i */\n\n", f->num_bb);
 
 
  GEN ("`include \"timescale.v\"\n\n");
  GEN ("`include \"timescale.v\"\n\n");
Line 523... Line 523...
        GEN ("assign r%i_o = t%x_%x;\n", i, REF_BB(f->lur[i]),
        GEN ("assign r%i_o = t%x_%x;\n", i, REF_BB(f->lur[i]),
                        REF_I(f->lur[i]));
                        REF_I(f->lur[i]));
  }
  }
 
 
  if (nstores) {
  if (nstores) {
    int cur_store = 0;
    int cur_store;
    GEN ("\n/* Memory stores */\n");
    GEN ("\n/* Memory stores */\n");
    GEN ("always @(");
    GEN ("always @(s_stb");
    for (i = 0; i < f->nmsched; i++)
    for (i = 0; i < f->nmsched; i++)
      if (f->mtype[i] & MT_STORE) {
      if (f->mtype[i] & MT_STORE) {
        char t[30];
        char t[30];
        GEN ("%s%s", cur_store++ ? " or " : "", print_op_v (f, t, f->msched[i], 0));
        unsigned long opt = f->INSN(ref).opt[j];
 
        if ((opt & ~OPT_DEST) != OPT_CONST) {
 
          GEN (" or %s", print_op_v (f, t, f->msched[i], 0));
 
        }
      }
      }
 
 
    cur_store = 0;
    cur_store = 0;
    GEN (")\nbegin\n");
    GEN (")\nbegin\n");
    for (i = 0; i < f->nmsched; i++) if (f->mtype[i] & MT_STORE) {
    for (i = 0; i < f->nmsched; i++) if (f->mtype[i] & MT_STORE) {
Line 729... Line 732...
    fprintf (stderr, "Cannot open '%s'\n", tmp);
    fprintf (stderr, "Cannot open '%s'\n", tmp);
    exit (1);
    exit (1);
  }
  }
 
 
  /* output header */
  /* output header */
  GEN ("/* %s -- generated by OpenRISC Custom Unit Compiler\n", tmp);
  GEN ("/* %s -- generated by FLEXelerator\n", tmp);
  GEN ("   (C) 2002 OpenCores http://www.opencores.org/ */\n\n");
  GEN ("   (C) 2002 Flextronics http://www.flextronics.com/ */\n\n");
  GEN ("/* Includes %i functions:", nrf);
  GEN ("/* Includes %i functions:", nrf);
  for (i = 0; i < nfuncs; i++) if (f[i])
  for (i = 0; i < nfuncs; i++) if (f[i])
    GEN ("\n%s", prof_func[i].name);
    GEN ("\n%s", prof_func[i].name);
  GEN (" */\n\n");
  GEN (" */\n\n");
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.